FRIB_e21062/plotPID.C

43 lines
1.0 KiB
C++
Raw Normal View History

2022-06-22 19:33:20 -04:00
#include "peachCake.C+"
void plotPID() {
vector<int> skipRun = {0};//{239, 240, 242, 243, 244, 245, 255};
peachCake * selector = new peachCake();
selector->SaveNewTree(false);
selector->SetPIDCorrectionFile("");
selector->SetPlotHist(false);
2022-06-27 20:21:44 -04:00
for( int run = 272 ; run < 330 ; run ++){
2022-06-22 19:33:20 -04:00
printf("\033[31m######################################### run : %d \033[0m\n", run);
bool contFlag = false;
for( int k = 0; k < (int) skipRun.size(); k ++){
if( run == skipRun[k] ) contFlag = true;
}
if( contFlag ) continue;
TChain * chain = new TChain("tree");
chain->Add(Form("root_data/run-%04d-*.root", run));
chain->GetListOfFiles()->Print();
int nFile = chain->GetListOfFiles()->GetEntries();
printf("================================ num of Files : %d \n", nFile);
if( nFile == 0 ) continue;
2023-05-18 16:33:51 -04:00
selector->SetHistRootFileName(Form("PID_runID/PID_%03d.root", run));
2022-06-22 19:33:20 -04:00
chain->Process(selector, "");
delete chain;
}
}