28 Int_t numberOfVpdEast;
29 Int_t numberOfVpdWest;
33 Double_t vpdLeEast[19];
34 Double_t vpdLeWest[19];
35 Double_t vpdTotEast[19];
36 Double_t vpdTotWest[19];
41 Double_t leTime[5000];
43 Int_t matchFlag[5000];
46 Float_t thetaLocal[5000];
47 Float_t xGlobal[5000];
48 Float_t yGlobal[5000];
49 Float_t zGlobal[5000];
61 Int_t nHitsDedx[5000];
67 Float_t tofCorr[5000];
78 TBranch *b_numberOfVpdEast;
79 TBranch *b_numberOfVpdWest;
85 TBranch *b_vpdTotEast;
86 TBranch *b_vpdTotWest;
96 TBranch *b_thetaLocal;
111 TBranch *b_nHitsDedx;
122 virtual Int_t
Cut(Long64_t entry);
123 virtual Int_t GetEntry(Long64_t entry);
124 virtual Long64_t LoadTree(Long64_t entry);
125 virtual void Init(TTree *tree);
127 virtual Bool_t Notify();
128 virtual void Show(Long64_t entry = -1);
134 tof::tof(TTree *tree)
139 TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject(
"out/0.root");
141 f =
new TFile(
"out/0.root");
143 tree = (TTree*)gDirectory->Get(
"tof");
152 delete fChain->GetCurrentFile();
155 Int_t tof::GetEntry(Long64_t entry)
158 if (!fChain)
return 0;
159 return fChain->GetEntry(entry);
161 Long64_t tof::LoadTree(Long64_t entry)
164 if (!fChain)
return -5;
165 Long64_t centry = fChain->LoadTree(entry);
166 if (centry < 0)
return centry;
167 if (!fChain->InheritsFrom(TChain::Class()))
return centry;
168 TChain *chain = (TChain*)fChain;
169 if (chain->GetTreeNumber() !=
fCurrent) {
176 void tof::Init(TTree *tree)
190 fChain->SetMakeClass(1);
192 fChain->SetBranchAddress(
"run", &
run, &b_run);
193 fChain->SetBranchAddress(
"evt", &evt, &b_evt);
194 fChain->SetBranchAddress(
"vertexX", &vertexX, &b_vertexX);
195 fChain->SetBranchAddress(
"vertexY", &vertexY, &b_vertexY);
196 fChain->SetBranchAddress(
"vertexZ", &vertexZ, &b_vertexZ);
197 fChain->SetBranchAddress(
"vpdEast", &vpdEast, &b_vpdEast);
198 fChain->SetBranchAddress(
"vpdWest", &vpdWest, &b_vpdWest);
199 fChain->SetBranchAddress(
"numberOfVpdEast", &numberOfVpdEast, &b_numberOfVpdEast);
200 fChain->SetBranchAddress(
"numberOfVpdWest", &numberOfVpdWest, &b_numberOfVpdWest);
201 fChain->SetBranchAddress(
"tDiff", &tDiff, &b_tDiff);
202 fChain->SetBranchAddress(
"tStart", &tStart, &b_tStart);
203 fChain->SetBranchAddress(
"vpdVz", &vpdVz, &b_vpdVz);
204 fChain->SetBranchAddress(
"vpdLeEast", vpdLeEast, &b_vpdLeEast);
205 fChain->SetBranchAddress(
"vpdLeWest", vpdLeWest, &b_vpdLeWest);
206 fChain->SetBranchAddress(
"vpdTotEast", vpdTotEast, &b_vpdTotEast);
207 fChain->SetBranchAddress(
"vpdTotWest", vpdTotWest, &b_vpdTotWest);
208 fChain->SetBranchAddress(
"nTofHits", &nTofHits, &b_nTofHits);
209 fChain->SetBranchAddress(
"tray", tray, &b_tray);
210 fChain->SetBranchAddress(
"module", module, &b_module);
211 fChain->SetBranchAddress(
"cell", cell, &b_cell);
212 fChain->SetBranchAddress(
"leTime", leTime, &b_leTime);
213 fChain->SetBranchAddress(
"tot", tot, &b_tot);
214 fChain->SetBranchAddress(
"matchFlag", matchFlag, &b_matchFlag);
215 fChain->SetBranchAddress(
"yLocal", yLocal, &b_yLocal);
216 fChain->SetBranchAddress(
"zLocal", zLocal, &b_zLocal);
217 fChain->SetBranchAddress(
"thetaLocal", thetaLocal, &b_thetaLocal);
218 fChain->SetBranchAddress(
"xGlobal", xGlobal, &b_xGlobal);
219 fChain->SetBranchAddress(
"yGlobal", yGlobal, &b_yGlobal);
220 fChain->SetBranchAddress(
"zGlobal", zGlobal, &b_zGlobal);
221 fChain->SetBranchAddress(
"trackId", trackId, &b_trackId);
222 fChain->SetBranchAddress(
"charge", charge, &b_charge);
223 fChain->SetBranchAddress(
"pt", pt, &b_pt);
224 fChain->SetBranchAddress(
"eta", eta, &b_eta);
225 fChain->SetBranchAddress(
"phi", phi, &b_phi);
226 fChain->SetBranchAddress(
"dcaX", dcaX, &b_dcaX);
227 fChain->SetBranchAddress(
"dcaY", dcaY, &b_dcaY);
228 fChain->SetBranchAddress(
"dcaZ", dcaZ, &b_dcaZ);
229 fChain->SetBranchAddress(
"length", length, &b_length);
230 fChain->SetBranchAddress(
"nHits", nHits, &b_nHits);
231 fChain->SetBranchAddress(
"nHitsFit", nHitsFit, &b_nHitsFit);
232 fChain->SetBranchAddress(
"nHitsDedx", nHitsDedx, &b_nHitsDedx);
233 fChain->SetBranchAddress(
"dedx", dedx, &b_dedx);
234 fChain->SetBranchAddress(
"nSigE", nSigE, &b_nSigE);
235 fChain->SetBranchAddress(
"nSigPi", nSigPi, &b_nSigPi);
236 fChain->SetBranchAddress(
"nSigK", nSigK, &b_nSigK);
237 fChain->SetBranchAddress(
"nSigP", nSigP, &b_nSigP);
238 fChain->SetBranchAddress(
"tofCorr", tofCorr, &b_tofCorr);
239 fChain->SetBranchAddress(
"beta", beta, &b_beta);
254 void tof::Show(Long64_t entry)
261 Int_t tof::Cut(Long64_t entry)
268 #endif // #ifdef tof_cxx
Int_t run
current Tree number in a TChain
Int_t fCurrent
pointer to the analyzed TTree or TChain