2022-06-08 14:43:03 -04:00
|
|
|
///#include "armory/evtReader.h"
|
2022-06-06 19:57:17 -04:00
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
///evtReader * evt = new evtReader("run-0238-00.evt", true);
|
|
|
|
|
|
|
|
#include "peachCake.C+"
|
2022-06-06 19:57:17 -04:00
|
|
|
|
|
|
|
void script() {
|
2022-06-22 19:33:20 -04:00
|
|
|
|
2022-06-06 19:57:17 -04:00
|
|
|
|
2022-06-22 19:33:20 -04:00
|
|
|
int runNum = 250;
|
2022-06-08 14:43:03 -04:00
|
|
|
|
2022-05-24 18:21:12 -04:00
|
|
|
TChain * chain = new TChain("tree");
|
2022-06-22 19:33:20 -04:00
|
|
|
//chain->Add(Form("root_data/run-%04d-*.root", runNum));
|
2022-05-24 18:21:12 -04:00
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
//chain->Add("root_data/run-0237-*.root");
|
|
|
|
//chain->Add("root_data/run-0238-*.root");
|
|
|
|
//chain->Add("root_data/run-0241-*.root");
|
2022-06-22 19:33:20 -04:00
|
|
|
|
|
|
|
// new beam
|
2022-06-27 20:21:44 -04:00
|
|
|
chain->Add("root_data/run-024[6-8]*.root");
|
|
|
|
chain->Add("root_data/run-0250*.root");
|
|
|
|
chain->Add("root_data/run-025[1-4].root");
|
|
|
|
chain->Add("root_data/run-025[6-9].root");
|
|
|
|
chain->Add("root_data/run-026[1-4]*.root");
|
|
|
|
chain->Add("root_data/run-0269*.root");
|
|
|
|
chain->Add("root_data/run-027[0-1]*.root");
|
|
|
|
chain->Add("root_data/run-028[3-4]*.root");
|
|
|
|
chain->Add("root_data/run-028[6-8]*.root");
|
|
|
|
chain->Add("root_data/run-0292*.root");
|
|
|
|
chain->Add("root_data/run-029[4-6]*.root");
|
|
|
|
chain->Add("root_data/run-029[8-9]*.root");
|
|
|
|
chain->Add("root_data/run-03*.root");
|
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
|
2022-06-27 20:21:44 -04:00
|
|
|
//chain->Add("root_data/run-0250*.root");
|
2022-06-08 14:43:03 -04:00
|
|
|
|
|
|
|
bool isSaveNewTree = false;
|
2022-06-22 19:33:20 -04:00
|
|
|
|
|
|
|
TString histRootFileName = "";// Form("PID_%03d.root", runNum);
|
|
|
|
|
|
|
|
TString pidCorrFileName = "correction_PID.dat";
|
2022-05-24 18:21:12 -04:00
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
chain->GetListOfFiles()->Print();
|
2022-06-27 20:21:44 -04:00
|
|
|
int nFile = chain->GetListOfFiles()->GetEntries();
|
|
|
|
if( nFile == 0 ) return;
|
|
|
|
printf("================================ num of Files : %d \n", nFile);
|
2022-06-22 19:33:20 -04:00
|
|
|
|
|
|
|
printf("================================\n");
|
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
peachCake * selector = new peachCake();
|
|
|
|
selector->SaveNewTree(isSaveNewTree);
|
2022-06-22 19:33:20 -04:00
|
|
|
selector->SetPIDCorrectionFile(pidCorrFileName);
|
|
|
|
selector->SetHistRootFileName(histRootFileName);
|
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
chain->Process(selector, "");
|
2022-06-06 19:57:17 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-22 19:33:20 -04:00
|
|
|
|
2022-06-08 14:43:03 -04:00
|
|
|
///gROOT->ProcessLine("armory/nsclEvtReader.h");
|
|
|
|
///evt->ReadBlock(2);
|
2022-06-22 19:33:20 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-24 18:21:12 -04:00
|
|
|
}
|