StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TBaseK.h
1 // This class has been automatically generated on
3 // Mon Feb 5 20:23:25 2007 by ROOT version 5.15/01
4 // from TTree T/TTree with SVT + SSD hits and tracks
5 // found on file: /star/data09/calib/fisyak/Pass112/TpcSsd/065/Event_6065045_raw_1010001.root
7 
8 #ifndef TBase_h
9 #define TBase_h
10 
11 #include <TROOT.h>
12 #include <TChain.h>
13 #include <TFile.h>
14  const Int_t kMaxfTracks = 10000;
15  const Int_t kMaxfHits = 100000;
16 
17 class TBase {
18 public :
19  TTree *fChain;
20  Int_t fCurrent;
21 
22  // Declaration of leave types
23  //EventT *EventT;
24  UInt_t fUniqueID;
25  UInt_t fBits;
26  UInt_t fNPTracks;
27  UInt_t fNtrack;
28  UInt_t fNhit;
29  UInt_t fFlag;
30  Int_t fEvtHdr_fEvtNum;
31  Int_t fEvtHdr_fRun;
32  Int_t fEvtHdr_fDate;
33  Double32_t fEvtHdr_fField;
34  Double32_t fVertex[3];
35  Double32_t fCovariantMatrix[6];
36  Int_t fTracks_;
37  UInt_t fTracks_fUniqueID[kMaxfTracks]; //[fTracks_]
38  UInt_t fTracks_fBits[kMaxfTracks]; //[fTracks_]
39  Char_t fTracks_beg[kMaxfTracks]; //[fTracks_]
40  Double32_t fTracks_fInvpT[kMaxfTracks]; //[fTracks_]
41  Double32_t fTracks_fTanL[kMaxfTracks]; //[fTracks_]
42  Double32_t fTracks_fPhi[kMaxfTracks]; //[fTracks_]
43  Double32_t fTracks_fRho[kMaxfTracks]; //[fTracks_]
44  UInt_t fTracks_fNpoint[kMaxfTracks]; //[fTracks_]
45  Short_t fTracks_fValid[kMaxfTracks]; //[fTracks_]
46  UInt_t fTracks_fNsp[kMaxfTracks]; //[fTracks_]
47  UInt_t fTracks_fIdHitT[kMaxfTracks][1000]; //[fTracks_]
48  Double32_t fTracks_fdEdx[kMaxfTracks]; //[fTracks_]
49  Double32_t fTracks_fLength[kMaxfTracks]; //[fTracks_]
50  Char_t fTracks_end[kMaxfTracks]; //[fTracks_]
51  Int_t fHits_;
52  UInt_t fHits_fUniqueID[kMaxfHits]; //[fHits_]
53  UInt_t fHits_fBits[kMaxfHits]; //[fHits_]
54  Char_t fHits_start[kMaxfHits]; //[fHits_]
55  Int_t fHits_Id[kMaxfHits]; //[fHits_]
56  Int_t fHits_sector[kMaxfHits]; //[fHits_]
57  Int_t fHits_barrel[kMaxfHits]; //[fHits_]
58  Int_t fHits_layer[kMaxfHits]; //[fHits_]
59  Int_t fHits_ladder[kMaxfHits]; //[fHits_]
60  Int_t fHits_wafer[kMaxfHits]; //[fHits_]
61  Int_t fHits_hybrid[kMaxfHits]; //[fHits_]
62  Int_t fHits_rdo[kMaxfHits]; //[fHits_]
63  Double32_t fHits_xG[kMaxfHits]; //[fHits_]
64  Double32_t fHits_yG[kMaxfHits]; //[fHits_]
65  Double32_t fHits_zG[kMaxfHits]; //[fHits_]
66  Double32_t fHits_xGC[kMaxfHits]; //[fHits_]
67  Double32_t fHits_yGC[kMaxfHits]; //[fHits_]
68  Double32_t fHits_zGC[kMaxfHits]; //[fHits_]
69  Double32_t fHits_xL[kMaxfHits]; //[fHits_]
70  Double32_t fHits_yL[kMaxfHits]; //[fHits_]
71  Double32_t fHits_zL[kMaxfHits]; //[fHits_]
72  Double32_t fHits_u[kMaxfHits]; //[fHits_]
73  Double32_t fHits_v[kMaxfHits]; //[fHits_]
74  Double32_t fHits_w[kMaxfHits]; //[fHits_]
75  Double32_t fHits_tuP[kMaxfHits]; //[fHits_]
76  Double32_t fHits_tvP[kMaxfHits]; //[fHits_]
77  Double32_t fHits_uP[kMaxfHits]; //[fHits_]
78  Double32_t fHits_vP[kMaxfHits]; //[fHits_]
79  Double32_t fHits_pT[kMaxfHits]; //[fHits_]
80  Double32_t fHits_pMom[kMaxfHits]; //[fHits_]
81  Double32_t fHits_xPG[kMaxfHits]; //[fHits_]
82  Double32_t fHits_yPG[kMaxfHits]; //[fHits_]
83  Double32_t fHits_zPG[kMaxfHits]; //[fHits_]
84  Double32_t fHits_cxPG[kMaxfHits]; //[fHits_]
85  Double32_t fHits_cyPG[kMaxfHits]; //[fHits_]
86  Double32_t fHits_czPG[kMaxfHits]; //[fHits_]
87  Double32_t fHits_wGu[kMaxfHits]; //[fHits_]
88  Double32_t fHits_wGv[kMaxfHits]; //[fHits_]
89  Double32_t fHits_wGw[kMaxfHits]; //[fHits_]
90  Double32_t fHits_xPL[kMaxfHits]; //[fHits_]
91  Double32_t fHits_yPL[kMaxfHits]; //[fHits_]
92  Double32_t fHits_zPL[kMaxfHits]; //[fHits_]
93  Double32_t fHits_uM[kMaxfHits]; //[fHits_]
94  Double32_t fHits_vM[kMaxfHits]; //[fHits_]
95  Double32_t fHits_anode[kMaxfHits]; //[fHits_]
96  Double32_t fHits_timeb[kMaxfHits]; //[fHits_]
97  Int_t fHits_NoHitPerTrack[kMaxfHits]; //[fHits_]
98  Char_t fHits_end[kMaxfHits]; //[fHits_]
99  TRef fLastTrackT;
100  TRef fLastHitT;
101  Bool_t fIsValid;
102 
103  // List of branches
104  TBranch *b_EventT_fUniqueID;
105  TBranch *b_EventT_fBits;
106  TBranch *b_EventT_fNPTracks;
107  TBranch *b_EventT_fNtrack;
108  TBranch *b_EventT_fNhit;
109  TBranch *b_EventT_fFlag;
110  TBranch *b_EventT_fEvtHdr_fEvtNum;
111  TBranch *b_EventT_fEvtHdr_fRun;
112  TBranch *b_EventT_fEvtHdr_fDate;
113  TBranch *b_EventT_fEvtHdr_fField;
114  TBranch *b_EventT_fVertex;
115  TBranch *b_EventT_fCovariantMatrix;
116  TBranch *b_EventT_fTracks_;
117  TBranch *b_fTracks_fUniqueID;
118  TBranch *b_fTracks_fBits;
119  TBranch *b_fTracks_beg;
120  TBranch *b_fTracks_fInvpT;
121  TBranch *b_fTracks_fTanL;
122  TBranch *b_fTracks_fPhi;
123  TBranch *b_fTracks_fRho;
124  TBranch *b_fTracks_fNpoint;
125  TBranch *b_fTracks_fValid;
126  TBranch *b_fTracks_fNsp;
127  TBranch *b_fTracks_fIdHitT;
128  TBranch *b_fTracks_fdEdx;
129  TBranch *b_fTracks_fLength;
130  TBranch *b_fTracks_end;
131  TBranch *b_EventT_fHits_;
132  TBranch *b_fHits_fUniqueID;
133  TBranch *b_fHits_fBits;
134  TBranch *b_fHits_start;
135  TBranch *b_fHits_Id;
136  TBranch *b_fHits_sector;
137  TBranch *b_fHits_barrel;
138  TBranch *b_fHits_layer;
139  TBranch *b_fHits_ladder;
140  TBranch *b_fHits_wafer;
141  TBranch *b_fHits_hybrid;
142  TBranch *b_fHits_rdo;
143  TBranch *b_fHits_xG;
144  TBranch *b_fHits_yG;
145  TBranch *b_fHits_zG;
146  TBranch *b_fHits_xGC;
147  TBranch *b_fHits_yGC;
148  TBranch *b_fHits_zGC;
149  TBranch *b_fHits_xL;
150  TBranch *b_fHits_yL;
151  TBranch *b_fHits_zL;
152  TBranch *b_fHits_u;
153  TBranch *b_fHits_v;
154  TBranch *b_fHits_w;
155  TBranch *b_fHits_tuP;
156  TBranch *b_fHits_tvP;
157  TBranch *b_fHits_uP;
158  TBranch *b_fHits_vP;
159  TBranch *b_fHits_pT;
160  TBranch *b_fHits_pMom;
161  TBranch *b_fHits_xPG;
162  TBranch *b_fHits_yPG;
163  TBranch *b_fHits_zPG;
164  TBranch *b_fHits_cxPG;
165  TBranch *b_fHits_cyPG;
166  TBranch *b_fHits_czPG;
167  TBranch *b_fHits_wGu;
168  TBranch *b_fHits_wGv;
169  TBranch *b_fHits_wGw;
170  TBranch *b_fHits_xPL;
171  TBranch *b_fHits_yPL;
172  TBranch *b_fHits_zPL;
173  TBranch *b_fHits_uM;
174  TBranch *b_fHits_vM;
175  TBranch *b_fHits_anode;
176  TBranch *b_fHits_timeb;
177  TBranch *b_fHits_NoHitPerTrack;
178  TBranch *b_fHits_end;
179  TBranch *b_EventT_fLastTrackT;
180  TBranch *b_EventT_fLastHitT;
181  TBranch *b_EventT_fIsValid;
182 
183  TBase();
184 
185  TBase(TTree *tree);
186  virtual ~TBase();
187  virtual Int_t Cut(Long64_t entry);
188  virtual Int_t GetEntry(Long64_t entry);
189  virtual Long64_t LoadTree(Long64_t entry);
190  virtual void Init(TTree *tree);
191  virtual void Loop(){};
192  virtual Bool_t Notify();
193  virtual void Show(Long64_t entry = -1);
194 };
195 
196 //#endif
197 
198 //#ifdef TBase_cxx
199 
200 TBase::TBase(){}
201 
202 TBase::TBase(TTree *tree)
203 {
204 // if parameter tree is not specified (or zero), connect the file
205 // used to generate this class and read the Tree.
206  if (tree == 0) {
207  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("/star/data09/calib/fisyak/Pass112/TpcSsd/065/Event_6065045_raw_1010001.root");
208  if (!f) {
209  f = new TFile("/star/data09/calib/fisyak/Pass112/TpcSsd/065/Event_6065045_raw_1010001.root");
210  }
211  tree = (TTree*)gDirectory->Get("T");
212 
213  }
214  Init(tree);
215 }
216 
217 TBase::~TBase()
218 {
219  if (!fChain) return;
220  delete fChain->GetCurrentFile();
221 }
222 
223 Int_t TBase::GetEntry(Long64_t entry)
224 {
225 // Read contents of entry.
226  if (!fChain) return 0;
227  return fChain->GetEntry(entry);
228 }
229 Long64_t TBase::LoadTree(Long64_t entry)
230 {
231 // Set the environment to read one entry
232  if (!fChain) return -5;
233  Long64_t centry = fChain->LoadTree(entry);
234  if (centry < 0) return centry;
235  if (!fChain->InheritsFrom(TChain::Class())) return centry;
236  TChain *chain = (TChain*)fChain;
237  if (chain->GetTreeNumber() != fCurrent) {
238  fCurrent = chain->GetTreeNumber();
239  Notify();
240  }
241  return centry;
242 }
243 
244 void TBase::Init(TTree *tree)
245 {
246  // The Init() function is called when the selector needs to initialize
247  // a new tree or chain. Typically here the branch addresses and branch
248  // pointers of the tree will be set.
249  // It is normaly not necessary to make changes to the generated
250  // code, but the routine can be extended by the user if needed.
251  // Init() will be called many times when running on PROOF
252  // (once per file to be processed).
253 
254  // Set branch addresses and branch pointers
255  if (!tree) return;
256  fChain = tree;
257  fCurrent = -1;
258  fChain->SetMakeClass(1);
259 
260  fChain->SetBranchAddress("fUniqueID", &fUniqueID, &b_EventT_fUniqueID);
261  fChain->SetBranchAddress("fBits", &fBits, &b_EventT_fBits);
262  fChain->SetBranchAddress("fNPTracks", &fNPTracks, &b_EventT_fNPTracks);
263  fChain->SetBranchAddress("fNtrack", &fNtrack, &b_EventT_fNtrack);
264  fChain->SetBranchAddress("fNhit", &fNhit, &b_EventT_fNhit);
265  fChain->SetBranchAddress("fFlag", &fFlag, &b_EventT_fFlag);
266  fChain->SetBranchAddress("fEvtHdr.fEvtNum", &fEvtHdr_fEvtNum, &b_EventT_fEvtHdr_fEvtNum);
267  fChain->SetBranchAddress("fEvtHdr.fRun", &fEvtHdr_fRun, &b_EventT_fEvtHdr_fRun);
268  fChain->SetBranchAddress("fEvtHdr.fDate", &fEvtHdr_fDate, &b_EventT_fEvtHdr_fDate);
269  fChain->SetBranchAddress("fEvtHdr.fField", &fEvtHdr_fField, &b_EventT_fEvtHdr_fField);
270  fChain->SetBranchAddress("fVertex[3]", fVertex, &b_EventT_fVertex);
271  fChain->SetBranchAddress("fCovariantMatrix[6]", fCovariantMatrix, &b_EventT_fCovariantMatrix);
272  fChain->SetBranchAddress("fTracks", &fTracks_, &b_EventT_fTracks_);
273  fChain->SetBranchAddress("fTracks.fUniqueID", fTracks_fUniqueID, &b_fTracks_fUniqueID);
274  fChain->SetBranchAddress("fTracks.fBits", fTracks_fBits, &b_fTracks_fBits);
275  fChain->SetBranchAddress("fTracks.beg", fTracks_beg, &b_fTracks_beg);
276  fChain->SetBranchAddress("fTracks.fInvpT", fTracks_fInvpT, &b_fTracks_fInvpT);
277  fChain->SetBranchAddress("fTracks.fTanL", fTracks_fTanL, &b_fTracks_fTanL);
278  fChain->SetBranchAddress("fTracks.fPhi", fTracks_fPhi, &b_fTracks_fPhi);
279  fChain->SetBranchAddress("fTracks.fRho", fTracks_fRho, &b_fTracks_fRho);
280  fChain->SetBranchAddress("fTracks.fNpoint", fTracks_fNpoint, &b_fTracks_fNpoint);
281  fChain->SetBranchAddress("fTracks.fValid", fTracks_fValid, &b_fTracks_fValid);
282  fChain->SetBranchAddress("fTracks.fNsp", fTracks_fNsp, &b_fTracks_fNsp);
283  fChain->SetBranchAddress("fTracks.fIdHitT[1000]", fTracks_fIdHitT, &b_fTracks_fIdHitT);
284  fChain->SetBranchAddress("fTracks.fdEdx", fTracks_fdEdx, &b_fTracks_fdEdx);
285  fChain->SetBranchAddress("fTracks.fLength", fTracks_fLength, &b_fTracks_fLength);
286  fChain->SetBranchAddress("fTracks.end", fTracks_end, &b_fTracks_end);
287  fChain->SetBranchAddress("fHits", &fHits_, &b_EventT_fHits_);
288  fChain->SetBranchAddress("fHits.fUniqueID", fHits_fUniqueID, &b_fHits_fUniqueID);
289  fChain->SetBranchAddress("fHits.fBits", fHits_fBits, &b_fHits_fBits);
290  fChain->SetBranchAddress("fHits.start", fHits_start, &b_fHits_start);
291  fChain->SetBranchAddress("fHits.Id", fHits_Id, &b_fHits_Id);
292  fChain->SetBranchAddress("fHits.sector", fHits_sector, &b_fHits_sector);
293  fChain->SetBranchAddress("fHits.barrel", fHits_barrel, &b_fHits_barrel);
294  fChain->SetBranchAddress("fHits.layer", fHits_layer, &b_fHits_layer);
295  fChain->SetBranchAddress("fHits.ladder", fHits_ladder, &b_fHits_ladder);
296  fChain->SetBranchAddress("fHits.wafer", fHits_wafer, &b_fHits_wafer);
297  fChain->SetBranchAddress("fHits.hybrid", fHits_hybrid, &b_fHits_hybrid);
298  fChain->SetBranchAddress("fHits.rdo", fHits_rdo, &b_fHits_rdo);
299  fChain->SetBranchAddress("fHits.xG", fHits_xG, &b_fHits_xG);
300  fChain->SetBranchAddress("fHits.yG", fHits_yG, &b_fHits_yG);
301  fChain->SetBranchAddress("fHits.zG", fHits_zG, &b_fHits_zG);
302  fChain->SetBranchAddress("fHits.xGC", fHits_xGC, &b_fHits_xGC);
303  fChain->SetBranchAddress("fHits.yGC", fHits_yGC, &b_fHits_yGC);
304  fChain->SetBranchAddress("fHits.zGC", fHits_zGC, &b_fHits_zGC);
305  fChain->SetBranchAddress("fHits.xL", fHits_xL, &b_fHits_xL);
306  fChain->SetBranchAddress("fHits.yL", fHits_yL, &b_fHits_yL);
307  fChain->SetBranchAddress("fHits.zL", fHits_zL, &b_fHits_zL);
308  fChain->SetBranchAddress("fHits.u", fHits_u, &b_fHits_u);
309  fChain->SetBranchAddress("fHits.v", fHits_v, &b_fHits_v);
310  fChain->SetBranchAddress("fHits.w", fHits_w, &b_fHits_w);
311  fChain->SetBranchAddress("fHits.tuP", fHits_tuP, &b_fHits_tuP);
312  fChain->SetBranchAddress("fHits.tvP", fHits_tvP, &b_fHits_tvP);
313  fChain->SetBranchAddress("fHits.uP", fHits_uP, &b_fHits_uP);
314  fChain->SetBranchAddress("fHits.vP", fHits_vP, &b_fHits_vP);
315  fChain->SetBranchAddress("fHits.pT", fHits_pT, &b_fHits_pT);
316  fChain->SetBranchAddress("fHits.pMom", fHits_pMom, &b_fHits_pMom);
317  fChain->SetBranchAddress("fHits.xPG", fHits_xPG, &b_fHits_xPG);
318  fChain->SetBranchAddress("fHits.yPG", fHits_yPG, &b_fHits_yPG);
319  fChain->SetBranchAddress("fHits.zPG", fHits_zPG, &b_fHits_zPG);
320  fChain->SetBranchAddress("fHits.cxPG", fHits_cxPG, &b_fHits_cxPG);
321  fChain->SetBranchAddress("fHits.cyPG", fHits_cyPG, &b_fHits_cyPG);
322  fChain->SetBranchAddress("fHits.czPG", fHits_czPG, &b_fHits_czPG);
323  fChain->SetBranchAddress("fHits.wGu", fHits_wGu, &b_fHits_wGu);
324  fChain->SetBranchAddress("fHits.wGv", fHits_wGv, &b_fHits_wGv);
325  fChain->SetBranchAddress("fHits.wGw", fHits_wGw, &b_fHits_wGw);
326  fChain->SetBranchAddress("fHits.xPL", fHits_xPL, &b_fHits_xPL);
327  fChain->SetBranchAddress("fHits.yPL", fHits_yPL, &b_fHits_yPL);
328  fChain->SetBranchAddress("fHits.zPL", fHits_zPL, &b_fHits_zPL);
329  fChain->SetBranchAddress("fHits.uM", fHits_uM, &b_fHits_uM);
330  fChain->SetBranchAddress("fHits.vM", fHits_vM, &b_fHits_vM);
331  fChain->SetBranchAddress("fHits.anode", fHits_anode, &b_fHits_anode);
332  fChain->SetBranchAddress("fHits.timeb", fHits_timeb, &b_fHits_timeb);
333  fChain->SetBranchAddress("fHits.NoHitPerTrack", fHits_NoHitPerTrack, &b_fHits_NoHitPerTrack);
334  fChain->SetBranchAddress("fHits.end", fHits_end, &b_fHits_end);
335  fChain->SetBranchAddress("fLastTrackT", &fLastTrackT, &b_EventT_fLastTrackT);
336  fChain->SetBranchAddress("fLastHitT", &fLastHitT, &b_EventT_fLastHitT);
337  fChain->SetBranchAddress("fIsValid", &fIsValid, &b_EventT_fIsValid);
338  Notify();
339 }
340 
341 Bool_t TBase::Notify()
342 {
343  // The Notify() function is called when a new file is opened. This
344  // can be either for a new TTree in a TChain or when when a new TTree
345  // is started when using PROOF. It is normaly not necessary to make changes
346  // to the generated code, but the routine can be extended by the
347  // user if needed. The return value is currently not used.
348 
349  return kTRUE;
350 }
351 
352 void TBase::Show(Long64_t entry)
353 {
354 // Print contents of entry.
355 // If entry is not specified, print current entry
356  if (!fChain) return;
357  fChain->Show(entry);
358 }
359 Int_t TBase::Cut(Long64_t entry)
360 {
361 // This function may be called from Loop.
362 // returns 1 if entry is accepted.
363 // returns -1 otherwise.
364  if (entry);
365  return 1;
366 }
367 #endif
UInt_t fUniqueID
current Tree number in a TChain
Definition: TBase.h:24
Definition: TBase.h:17
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: TBase.h:20
Definition: Cut.h:18