9 const char *dirname=
"/pnfs/dune/persistent/users/ND_GAr/2020_06_21/neutrino/";
11 const char *ext=
".root";
12 std::vector<const char*> lista;
15 TChain *chain =
new TChain(
"caf");
17 TSystemDirectory
dir(dirname, dirname);
24 while ((file = (TSystemFile*)next())) {
25 fname = file->GetName();
26 if (file->IsDirectory() && fname.EndsWith(ext))
continue;
29 strcpy(result,dirname);
30 strcat(result,fname.Data());
32 lista.push_back(result);
39 TFile *
tf =
new TFile ( Form(
"%s",
a.c_str() ) );
40 chain->Add( Form(
"%s/caf",
a.c_str()) );
48 std::vector<double>* mctime = 0;
49 std::vector<int> *_nFSP = 0;
50 std::vector<double> *
theta = 0;
51 std::vector<int> *detected = 0;
52 std::vector<int> *pdgmother = 0;
53 std::vector<int> *truepdg = 0;
54 std::vector<int> * _MCPStartX = 0;
55 std::vector<int> *_MCPStartY = 0;
56 std::vector<int> *_MCPStartZ = 0;
57 std::vector<int> *_MCPEndX = 0;
58 std::vector<int> *_MCPEndY = 0;
59 std::vector<int> *_MCPEndZ = 0;
60 std::vector<std::string> *_MCProc = 0;
61 std::vector<std::string> *_MCEndProc = 0;
62 std::vector<float> *trkLen = 0;
63 std::vector<float> *trkLenPerp = 0;
64 std::vector<float> *truep = 0;
65 std::vector<float> *truepx = 0;
66 std::vector<float> *truepy = 0;
67 std::vector<float> *truepz = 0;
68 std::vector<float> *_angle = 0;
70 std::vector<int> *recopid = 0;
71 std::vector<float> *prob_arr = 0;
72 std::vector<float> *partereco = 0;
73 std::vector<float> *anglereco = 0;
74 std::vector<float> *_preco = 0;
75 std::vector<float> *erecon = 0;
77 chain->SetBranchAddress(
"Event", &evt);
78 chain->SetBranchAddress(
"theta", &theta);
79 chain->SetBranchAddress(
"nFSP", &_nFSP);
80 chain->SetBranchAddress(
"detected", &detected);
81 chain->SetBranchAddress(
"pdgmother", &pdgmother);
82 chain->SetBranchAddress(
"MCPTime", &mctime);
83 chain->SetBranchAddress(
"MCPStartX", &_MCPStartX);
84 chain->SetBranchAddress(
"MCPStartY", &_MCPStartY);
85 chain->SetBranchAddress(
"MCPStartZ", &_MCPStartZ);
86 chain->SetBranchAddress(
"truepx", &truepx);
87 chain->SetBranchAddress(
"truepy", &truepy);
88 chain->SetBranchAddress(
"truepz", &truepz);
89 chain->SetBranchAddress(
"MCPEndX", &_MCPEndX);
90 chain->SetBranchAddress(
"MCPEndY", &_MCPEndY);
91 chain->SetBranchAddress(
"MCPEndZ", &_MCPEndZ);
92 chain->SetBranchAddress(
"MCProc", &_MCProc);
93 chain->SetBranchAddress(
"MCEndProc", &_MCEndProc);
94 chain->SetBranchAddress(
"angle", &_angle);
95 chain->SetBranchAddress(
"truep", &truep);
96 chain->SetBranchAddress(
"truepdg", &truepdg);
98 chain->SetBranchAddress(
"recopid", &recopid);
99 chain->SetBranchAddress(
"trkLen", &trkLen);
100 chain->SetBranchAddress(
"trkLenPerp", &trkLenPerp);
101 chain->SetBranchAddress(
"preco", &_preco);
102 chain->SetBranchAddress(
"anglereco", &anglereco);
103 chain->SetBranchAddress(
"erecon", &erecon);
104 chain->SetBranchAddress(
"prob_arr", &prob_arr);
106 for(
int itree = 0; itree < chain->GetEntries(); itree++)
108 chain->GetEntry(itree);
110 std::cout <<
"Event " << evt <<
std::endl;
111 std::cout <<
"theta " << theta->size() <<
std::endl;
112 std::cout <<
"Size pdgmother: " << pdgmother->size() <<
std::endl;
113 std::cout <<
"Size MCPTime: " << mctime->size() <<
std::endl;
114 std::cout <<
"Size MCPStartX: " << _MCPStartX->size() <<
std::endl;
115 std::cout <<
"Size MCPStartY: " << _MCPStartY->size() <<
std::endl;
116 std::cout <<
"Size MCPStartZ: " << _MCPStartZ->size() <<
std::endl;
117 std::cout <<
"Size truepx: " << truepx->size() <<
std::endl;
118 std::cout <<
"Size truepy: " << truepy->size() <<
std::endl;
119 std::cout <<
"Size truepz: " << truepz->size() <<
std::endl;
120 std::cout <<
"Size MCPEndX: " << _MCPEndX->size() <<
std::endl;
121 std::cout <<
"Size MCPEndY: " << _MCPEndY->size() <<
std::endl;
122 std::cout <<
"Size MCPEndZ: " << _MCPEndZ->size() <<
std::endl;
123 std::cout <<
"Size _MCProc: " << _MCProc->size() <<
std::endl;
124 std::cout <<
"Size _MCEndProc: " << _MCEndProc->size() <<
std::endl;
125 std::cout <<
"Size _angle: " << _angle->size() <<
std::endl;
126 std::cout <<
"Size truep: " << truep->size() <<
std::endl;
127 std::cout <<
"Size truepdg: " << truepdg->size() <<
std::endl;
128 std::cout <<
"Size recopid: " << recopid->size() <<
std::endl;
129 std::cout <<
"Size trkLen: " << trkLen->size() <<
std::endl;
130 std::cout <<
"Size trkLenPerp: " << trkLenPerp->size() <<
std::endl;
131 std::cout <<
"Size _preco: " << _preco->size() <<
std::endl;
132 std::cout <<
"Size anglereco: " << anglereco->size() <<
std::endl;
133 std::cout <<
"Size erecon: " << erecon->size() <<
std::endl;
134 std::cout <<
"Size prob_arr: " << prob_arr->size() <<
std::endl;
135 std::cout <<
"Size _nFSP: " << _nFSP->size() <<
" value " << _nFSP->at(0) <<
std::endl;
136 std::cout <<
"Size detected: " << detected->size() <<
std::endl;
138 for(
int i = 0; i < theta->size(); i++)
141 std::cout <<
"value of theta is: " << theta->at(i) <<
std::endl;
QTextStream & endl(QTextStream &s)