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

[AlPhaPha] Updated readme and added a finetuning CutAuto that change behaviour...

[AlPhaPha] Updated readme and added a finetuning CutAuto that change behaviour at the edges also added way to rename and add tcut easily by hand
parent 83716df2
No related branches found
No related tags found
No related merge requests found
...@@ -103,6 +103,9 @@ but be careful as it has some weird behaviour on edges !. ...@@ -103,6 +103,9 @@ but be careful as it has some weird behaviour on edges !.
This macro output the TCUTG in a root file in the output folder. This macro output the TCUTG in a root file in the output folder.
There is a version FineTuning of this macro : if you need good cut use this one but be wary that now there is two Threshold at the
beginning of the macro : ThresholdX and ThresholdY it correspond to the max distance of point on those axes. You should play
around with value until it works.
# Step 5 : Flattening of the DE. # Step 5 : Flattening of the DE.
......
#include "CutAutoDEE.h" #include "CutAutoDEE_FineTuning.h"
#include <numeric> #include <numeric>
#include <set> #include <set>
#include <iostream> #include <iostream>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#define THRESHOLDX 200.0; #define THRESHOLDX 200.0;
//Main //Main
void CutAutoDEE(){ void CutAutoDEE_FineTuning(){
// Retrieve initial histogram // Retrieve initial histogram
TFile *inFile = new TFile("Output/DE_E_merged.root","read"); TFile *inFile = new TFile("Output/DE_E_merged.root","read");
...@@ -61,7 +61,7 @@ void CutAutoDEE(){ ...@@ -61,7 +61,7 @@ void CutAutoDEE(){
} }
//Save the cut ! //Save the cut !
TFile *ofile = new TFile("Output/CutAutoZ.root","RECREATE"); TFile *ofile = new TFile("Output/CutAutoZtest.root","RECREATE");
for (auto cut : CutLine){ for (auto cut : CutLine){
cut->Write(); cut->Write();
} }
......
...@@ -15,8 +15,8 @@ using namespace std; ...@@ -15,8 +15,8 @@ using namespace std;
const int CutNumberLoader(); const int CutNumberLoader();
const int Ncuts = CutNumberLoader(); const int Ncuts = CutNumberLoader();
const int NSegment=11; const int NSegment=11;
const int Nrun=1; const int Nrun=8;
int RunNumber[Nrun]={247}; int RunNumber[Nrun]={245 , 246 ,247 ,248 ,249 ,250 ,251 ,252};
const char *CutPath = "../Step4/Output/CutAutoZ.root" ; const char *CutPath = "../Step4/Output/CutAutoZ.root" ;
void MakeSpline(); void MakeSpline();
...@@ -43,7 +43,7 @@ void SplineChio() ...@@ -43,7 +43,7 @@ void SplineChio()
for(int i=0;i<Nrun;i++) for(int i=0;i<Nrun;i++)
{ {
chain->Add(Form("../../../../root/analysis/Run%dEcorr.root",RunNumber[i])); chain->Add(Form("../../../../root/analysis/Run%d.root",RunNumber[i]));
cout << "Run number " << RunNumber[i] << " loaded sucessfully !" << endl; cout << "Run number " << RunNumber[i] << " loaded sucessfully !" << endl;
} }
...@@ -61,9 +61,9 @@ void SplineChio() ...@@ -61,9 +61,9 @@ void SplineChio()
//***************************************************************** //*****************************************************************
TH2F *hChioDE_E_all = new TH2F("hChioDE_E","hChioDE_E",1000,1000,36000,500,1000,26000); TH2F *hChioDE_E_all = new TH2F("hChioDE_E","hChioDE_E",1000,0,36000,500,1000,26000);
vector<TH2F*> hChioDE_E(Ncuts); vector<TH2F*> hChioDE_E(Ncuts);
for(int i=0;i<Ncuts;i++) hChioDE_E[i]=new TH2F(Form("hChioDE_E_%d",i+1),Form("hChioDE_E_%d",i+1),2000,1000,36000,1250,1000,26000); for(int i=0;i<Ncuts;i++) hChioDE_E[i]=new TH2F(Form("hChioDE_E_%d",i+1),Form("hChioDE_E_%d",i+1),2000,0,36000,1250,1000,26000);
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
...@@ -113,7 +113,7 @@ void MakeSpline(){ ...@@ -113,7 +113,7 @@ void MakeSpline(){
// ********************** Load prev histo**************************** // ********************** Load prev histo****************************
TFile *inFile=new TFile("histo/SingleZ_ChioDE_E.root"); TFile *inFile=new TFile("histo/SingleZ_ChioDE_E.root");
int Z59POS = 32; int Z59POS = 28;
vector<TSpline3*> gspline(Ncuts); vector<TSpline3*> gspline(Ncuts);
vector<TH2F*> h2 (Ncuts); vector<TH2F*> h2 (Ncuts);
vector<TH1F*> hProfile(Ncuts); vector<TH1F*> hProfile(Ncuts);
......
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