Skip to content
Snippets Groups Projects
Commit 05d78282 authored by Theodore Efremov's avatar Theodore Efremov :hibiscus:
Browse files

[AlPhaPha] Optimized settings for cutauto

parent 4dfb2146
No related branches found
No related tags found
No related merge requests found
Pipeline #385645 canceled
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// Important variable // Important variable
#define STEP 2; // Step to parse through the histogram in X #define STEP 2; // Step to parse through the histogram in X
#define BINSIZE 25; // Size of the bin in X on which to projectY the plot #define BINSIZE 15; // Size of the bin in X on which to projectY the plot
//Main //Main
...@@ -15,7 +15,6 @@ void CutAutoDEE(){ ...@@ -15,7 +15,6 @@ void CutAutoDEE(){
// Retrieve initial histogram // Retrieve initial histogram
TFile *inFile = new TFile("Output/DE_E_merged.root","open"); TFile *inFile = new TFile("Output/DE_E_merged.root","open");
TH2F *hDE_E = (TH2F*)inFile->Get("DE_E"); TH2F *hDE_E = (TH2F*)inFile->Get("DE_E");
// Inverse data to use tspectrum // Inverse data to use tspectrum
for (int xBin=1; xBin<= hDE_E->GetNbinsX();xBin++){ for (int xBin=1; xBin<= hDE_E->GetNbinsX();xBin++){
for (int yBin=1; yBin<= hDE_E->GetNbinsY();yBin++){ for (int yBin=1; yBin<= hDE_E->GetNbinsY();yBin++){
...@@ -33,8 +32,8 @@ void CutAutoDEE(){ ...@@ -33,8 +32,8 @@ void CutAutoDEE(){
// Tspectrum used to find the peak : If you have problem with peak finding // Tspectrum used to find the peak : If you have problem with peak finding
// adjust the setting in this function // adjust the setting in this function
// Step and Binsize are used in this function // Step and Binsize are used in this function
Double_t sigma = 4; Double_t sigma = 3;
Double_t threshold = 0.05; Double_t threshold = 0.003;
PeakFinder(vPeakFinder,vPeaks,hDE_E,LinePos,sigma,threshold); PeakFinder(vPeakFinder,vPeaks,hDE_E,LinePos,sigma,threshold);
...@@ -119,9 +118,9 @@ void PeakFinder(vector<TSpectrum*> *sPeak , vector<int> *vPeak, TH2F *h, vector< ...@@ -119,9 +118,9 @@ void PeakFinder(vector<TSpectrum*> *sPeak , vector<int> *vPeak, TH2F *h, vector<
//Test //Test
if (true && iter ==41){ if (true && iter ==50){
// Draw the histogram // Draw the histogram
TCanvas* c = new TCanvas(Form("c%d",i), Form("Histogram with Peaks%d",i), 800, 600); TCanvas* c = new TCanvas(Form("c%d",i), Form("Histogram with E = %f",(h->GetXaxis()->GetBinCenter(i))), 800, 600);
projY->Draw(); projY->Draw();
} }
...@@ -175,7 +174,7 @@ vector<TCutG*> PeakLinker(vector<vector<Double_t>> *LinePos){ ...@@ -175,7 +174,7 @@ vector<TCutG*> PeakLinker(vector<vector<Double_t>> *LinePos){
// To do so adjust the bin STEP at the beginning of the code. // To do so adjust the bin STEP at the beginning of the code.
//Very important set //Very important set
Double_t Threshold = ThresholdX + 30; Double_t Threshold = ThresholdX + 32;
cout << "Threshold X : " << ThresholdX << endl; cout << "Threshold X : " << ThresholdX << endl;
cout << "N of X " << SetX.size() << endl; cout << "N of X " << SetX.size() << endl;
cout << "Threshold " << Threshold << endl; cout << "Threshold " << Threshold << endl;
...@@ -244,8 +243,8 @@ vector<TCutG*> PeakLinker(vector<vector<Double_t>> *LinePos){ ...@@ -244,8 +243,8 @@ vector<TCutG*> PeakLinker(vector<vector<Double_t>> *LinePos){
//=========================================================================================================== //===========================================================================================================
//This is a pretty sensitive variable //This is a pretty sensitive variable
int MinElem = SetX.size()/4 - 30; int MinElem = SetX.size()/6;
//cout << "Min Elem " << MinElem << endl ; cout << "Min Elem " << MinElem << endl ;
set<int> SetIdTemp(vID.begin() , vID.end()); set<int> SetIdTemp(vID.begin() , vID.end());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment