StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
tof.h
1 // This class has been automatically generated on
3 // Sat Mar 20 10:51:16 2010 by ROOT version 5.22/00
4 // from TTree tof/BTof cell data
5 // found on file: out/0.root
7 
8 #ifndef tof_h
9 #define tof_h
10 
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14 
15 class tof {
16 public :
17  TTree *fChain;
18  Int_t fCurrent;
19 
20  // Declaration of leaf types
21  Int_t run;
22  Int_t evt;
23  Float_t vertexX;
24  Float_t vertexY;
25  Float_t vertexZ;
26  Int_t vpdEast;
27  Int_t vpdWest;
28  Int_t numberOfVpdEast;
29  Int_t numberOfVpdWest;
30  Float_t tDiff;
31  Double_t tStart;
32  Float_t vpdVz;
33  Double_t vpdLeEast[19];
34  Double_t vpdLeWest[19];
35  Double_t vpdTotEast[19];
36  Double_t vpdTotWest[19];
37  Int_t nTofHits;
38  Int_t tray[5000]; //[nTofHits]
39  Int_t module[5000]; //[nTofHits]
40  Int_t cell[5000]; //[nTofHits]
41  Double_t leTime[5000]; //[nTofHits]
42  Double_t tot[5000]; //[nTofHits]
43  Int_t matchFlag[5000]; //[nTofHits]
44  Float_t yLocal[5000]; //[nTofHits]
45  Float_t zLocal[5000]; //[nTofHits]
46  Float_t thetaLocal[5000]; //[nTofHits]
47  Float_t xGlobal[5000]; //[nTofHits]
48  Float_t yGlobal[5000]; //[nTofHits]
49  Float_t zGlobal[5000]; //[nTofHits]
50  Int_t trackId[5000]; //[nTofHits]
51  Int_t charge[5000]; //[nTofHits]
52  Float_t pt[5000]; //[nTofHits]
53  Float_t eta[5000]; //[nTofHits]
54  Float_t phi[5000]; //[nTofHits]
55  Float_t dcaX[5000]; //[nTofHits]
56  Float_t dcaY[5000]; //[nTofHits]
57  Float_t dcaZ[5000]; //[nTofHits]
58  Float_t length[5000]; //[nTofHits]
59  Int_t nHits[5000]; //[nTofHits]
60  Int_t nHitsFit[5000]; //[nTofHits]
61  Int_t nHitsDedx[5000]; //[nTofHits]
62  Float_t dedx[5000]; //[nTofHits]
63  Float_t nSigE[5000]; //[nTofHits]
64  Float_t nSigPi[5000]; //[nTofHits]
65  Float_t nSigK[5000]; //[nTofHits]
66  Float_t nSigP[5000]; //[nTofHits]
67  Float_t tofCorr[5000]; //[nTofHits]
68  Float_t beta[5000]; //[nTofHits]
69 
70  // List of branches
71  TBranch *b_run;
72  TBranch *b_evt;
73  TBranch *b_vertexX;
74  TBranch *b_vertexY;
75  TBranch *b_vertexZ;
76  TBranch *b_vpdEast;
77  TBranch *b_vpdWest;
78  TBranch *b_numberOfVpdEast;
79  TBranch *b_numberOfVpdWest;
80  TBranch *b_tDiff;
81  TBranch *b_tStart;
82  TBranch *b_vpdVz;
83  TBranch *b_vpdLeEast;
84  TBranch *b_vpdLeWest;
85  TBranch *b_vpdTotEast;
86  TBranch *b_vpdTotWest;
87  TBranch *b_nTofHits;
88  TBranch *b_tray;
89  TBranch *b_module;
90  TBranch *b_cell;
91  TBranch *b_leTime;
92  TBranch *b_tot;
93  TBranch *b_matchFlag;
94  TBranch *b_yLocal;
95  TBranch *b_zLocal;
96  TBranch *b_thetaLocal;
97  TBranch *b_xGlobal;
98  TBranch *b_yGlobal;
99  TBranch *b_zGlobal;
100  TBranch *b_trackId;
101  TBranch *b_charge;
102  TBranch *b_pt;
103  TBranch *b_eta;
104  TBranch *b_phi;
105  TBranch *b_dcaX;
106  TBranch *b_dcaY;
107  TBranch *b_dcaZ;
108  TBranch *b_length;
109  TBranch *b_nHits;
110  TBranch *b_nHitsFit;
111  TBranch *b_nHitsDedx;
112  TBranch *b_dedx;
113  TBranch *b_nSigE;
114  TBranch *b_nSigPi;
115  TBranch *b_nSigK;
116  TBranch *b_nSigP;
117  TBranch *b_tofCorr;
118  TBranch *b_beta;
119 
120  tof(TTree *tree=0);
121  virtual ~tof();
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);
126  virtual void Loop();
127  virtual Bool_t Notify();
128  virtual void Show(Long64_t entry = -1);
129 };
130 
131 #endif
132 
133 #ifdef tof_cxx
134 tof::tof(TTree *tree)
135 {
136 // if parameter tree is not specified (or zero), connect the file
137 // used to generate this class and read the Tree.
138  if (tree == 0) {
139  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("out/0.root");
140  if (!f) {
141  f = new TFile("out/0.root");
142  }
143  tree = (TTree*)gDirectory->Get("tof");
144 
145  }
146  Init(tree);
147 }
148 
149 tof::~tof()
150 {
151  if (!fChain) return;
152  delete fChain->GetCurrentFile();
153 }
154 
155 Int_t tof::GetEntry(Long64_t entry)
156 {
157 // Read contents of entry.
158  if (!fChain) return 0;
159  return fChain->GetEntry(entry);
160 }
161 Long64_t tof::LoadTree(Long64_t entry)
162 {
163 // Set the environment to read one 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) {
170  fCurrent = chain->GetTreeNumber();
171  Notify();
172  }
173  return centry;
174 }
175 
176 void tof::Init(TTree *tree)
177 {
178  // The Init() function is called when the selector needs to initialize
179  // a new tree or chain. Typically here the branch addresses and branch
180  // pointers of the tree will be set.
181  // It is normally not necessary to make changes to the generated
182  // code, but the routine can be extended by the user if needed.
183  // Init() will be called many times when running on PROOF
184  // (once per file to be processed).
185 
186  // Set branch addresses and branch pointers
187  if (!tree) return;
188  fChain = tree;
189  fCurrent = -1;
190  fChain->SetMakeClass(1);
191 
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);
240  Notify();
241 }
242 
243 Bool_t tof::Notify()
244 {
245  // The Notify() function is called when a new file is opened. This
246  // can be either for a new TTree in a TChain or when when a new TTree
247  // is started when using PROOF. It is normally not necessary to make changes
248  // to the generated code, but the routine can be extended by the
249  // user if needed. The return value is currently not used.
250 
251  return kTRUE;
252 }
253 
254 void tof::Show(Long64_t entry)
255 {
256 // Print contents of entry.
257 // If entry is not specified, print current entry
258  if (!fChain) return;
259  fChain->Show(entry);
260 }
261 Int_t tof::Cut(Long64_t entry)
262 {
263 // This function may be called from Loop.
264 // returns 1 if entry is accepted.
265 // returns -1 otherwise.
266  return 1;
267 }
268 #endif // #ifdef tof_cxx
Int_t run
current Tree number in a TChain
Definition: tof.h:21
Definition: Cut.h:18
Definition: tof.h:15
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: tof.h:18