ATLAS Offline Software
bsTree.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // This class has been automatically generated on
7 // Thu May 14 14:23:52 2009 by ROOT version 5.22/00a
8 // from TTree Beamspots/Beamspot Solutions
9 // found on file: beamspot.root
11 
12 #ifndef bsTree_h
13 #define bsTree_h
14 
15 #include <TROOT.h>
16 #include <TChain.h>
17 #include <TFile.h>
18 
19 class bsTree {
20 public :
21  TTree *fChain;
22  Int_t fCurrent;
23 
24  // Declaration of leaf types
25  Int_t event_run;
26  Int_t event_id;
30  Int_t event_fitID;
32  Float_t bs_x0;
33  Float_t bs_y0;
34  Float_t bs_z;
35  Float_t bs_ax;
36  Float_t bs_ay;
37  Float_t bs_sx;
38  Float_t bs_sy;
39  Float_t bs_sz;
40  Float_t bs_rhoxy;
41  Float_t bs_k;
42  Float_t bsCov_x0x0;
43  Float_t bsCov_x0y0;
44  Float_t bsCov_x0z;
45  Float_t bsCov_x0ax;
46  Float_t bsCov_x0ay;
47  Float_t bsCov_x0sx;
48  Float_t bsCov_x0sy;
49  Float_t bsCov_x0sz;
50  Float_t bsCov_x0rhoxy;
51  Float_t bsCov_x0k;
52  Float_t bsCov_y0y0;
53  Float_t bsCov_y0z;
54  Float_t bsCov_y0ax;
55  Float_t bsCov_y0ay;
56  Float_t bsCov_y0sx;
57  Float_t bsCov_y0sy;
58  Float_t bsCov_y0sz;
59  Float_t bsCov_y0rhoxy;
60  Float_t bsCov_y0k;
61  Float_t bsCov_zz;
62  Float_t bsCov_zax;
63  Float_t bsCov_zay;
64  Float_t bsCov_zsx;
65  Float_t bsCov_zsy;
66  Float_t bsCov_zsz;
67  Float_t bsCov_zrhoxy;
68  Float_t bsCov_zk;
69  Float_t bsCov_axax;
70  Float_t bsCov_axay;
71  Float_t bsCov_axsx;
72  Float_t bsCov_axsy;
73  Float_t bsCov_axsz;
74  Float_t bsCov_axrhoxy;
75  Float_t bsCov_axk;
76  Float_t bsCov_ayay;
77  Float_t bsCov_aysx;
78  Float_t bsCov_aysy;
79  Float_t bsCov_aysz;
80  Float_t bsCov_ayrhoxy;
81  Float_t bsCov_ayk;
82  Float_t bsCov_sxsx;
83  Float_t bsCov_sxsy;
84  Float_t bsCov_sxsz;
85  Float_t bsCov_sxrhoxy;
86  Float_t bsCov_sxk;
87  Float_t bsCov_sysy;
88  Float_t bsCov_sysz;
89  Float_t bsCov_syrhoxy;
90  Float_t bsCov_syk;
91  Float_t bsCov_szsz;
92  Float_t bsCov_szrhoxy;
93  Float_t bsCov_szk;
95  Float_t bsCov_rhoxyk;
96  Float_t bsCov_kk;
97  Float_t bsCentroid_xc;
98  Float_t bsCentroid_yc;
99  Float_t bsCentroid_sxc;
100  Float_t bsCentroid_syc;
107 
108  // List of branches
109  TBranch *b_event;
110  TBranch *b_bs;
111  TBranch *b_bsCov;
112  TBranch *b_bsCentroid;
113  TBranch *b_bsCovCentroid;
114 
115  bsTree(TTree *tree=0);
116  virtual ~bsTree();
117  virtual Int_t Cut(Long64_t entry);
118  virtual Int_t GetEntry(Long64_t entry);
119  virtual Long64_t LoadTree(Long64_t entry);
120  virtual void Init(TTree *tree);
121  virtual void Loop();
122  virtual Bool_t Notify();
123  virtual void Show(Long64_t entry = -1);
124 };
125 
126 #endif
127 
128 #ifdef bsTree_cxx
129 bsTree::bsTree(TTree *tree)
130 {
131 // if parameter tree is not specified (or zero), connect the file
132 // used to generate this class and read the Tree.
133  if (tree == 0) {
134  TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("beamspot.root");
135  if (!f) {
136  f = new TFile("beamspot.root");
137  f->cd("beamspot.root:/Beamspot");
138  }
139  tree = (TTree*)gDirectory->Get("Beamspots");
140 
141  }
143 }
144 
146 {
147  if (!fChain) return;
148  delete fChain->GetCurrentFile();
149 }
150 
151 Int_t bsTree::GetEntry(Long64_t entry)
152 {
153 // Read contents of entry.
154  if (!fChain) return 0;
155  return fChain->GetEntry(entry);
156 }
157 Long64_t bsTree::LoadTree(Long64_t entry)
158 {
159 // Set the environment to read one entry
160  if (!fChain) return -5;
161  Long64_t centry = fChain->LoadTree(entry);
162  if (centry < 0) return centry;
163  if (!fChain->InheritsFrom(TChain::Class())) return centry;
164  TChain *chain = (TChain*)fChain;
165  if (chain->GetTreeNumber() != fCurrent) {
166  fCurrent = chain->GetTreeNumber();
167  Notify();
168  }
169  return centry;
170 }
171 
172 void bsTree::Init(TTree *tree)
173 {
174  // The Init() function is called when the selector needs to initialize
175  // a new tree or chain. Typically here the branch addresses and branch
176  // pointers of the tree will be set.
177  // It is normally not necessary to make changes to the generated
178  // code, but the routine can be extended by the user if needed.
179  // Init() will be called many times when running on PROOF
180  // (once per file to be processed).
181 
182  // Set branch addresses and branch pointers
183  if (!tree) return;
184  fChain = tree;
185  fCurrent = -1;
186  fChain->SetMakeClass(1);
187 
188  fChain->SetBranchAddress("event", &event_run, &b_event);
189  fChain->SetBranchAddress("bs", &bs_x0, &b_bs);
190  fChain->SetBranchAddress("bsCov", &bsCov_x0x0, &b_bsCov);
191  fChain->SetBranchAddress("bsCentroid", &bsCentroid_xc, &b_bsCentroid);
192  fChain->SetBranchAddress("bsCovCentroid", &bsCovCentroid_xcxc, &b_bsCovCentroid);
193  Notify();
194 }
195 
196 Bool_t bsTree::Notify()
197 {
198  // The Notify() function is called when a new file is opened. This
199  // can be either for a new TTree in a TChain or when when a new TTree
200  // is started when using PROOF. It is normally not necessary to make changes
201  // to the generated code, but the routine can be extended by the
202  // user if needed. The return value is currently not used.
203 
204  return kTRUE;
205 }
206 
207 void bsTree::Show(Long64_t entry)
208 {
209 // Print contents of entry.
210 // If entry is not specified, print current entry
211  if (!fChain) return;
212  fChain->Show(entry);
213 }
214 Int_t bsTree::Cut(Long64_t entry)
215 {
216 // This function may be called from Loop.
217 // returns 1 if entry is accepted.
218 // returns -1 otherwise.
219  return 1;
220 }
221 #endif // #ifdef bsTree_cxx
bsTree::bsCov_szrhoxy
Float_t bsCov_szrhoxy
Definition: bsTree.h:92
bsTree::bsCov_y0sz
Float_t bsCov_y0sz
Definition: bsTree.h:58
bsTree::bsCov_sysz
Float_t bsCov_sysz
Definition: bsTree.h:88
bsTree::bsCov_x0z
Float_t bsCov_x0z
Definition: bsTree.h:44
bsTree::bs_x0
Float_t bs_x0
Definition: bsTree.h:32
bsTree::bsCov_zay
Float_t bsCov_zay
Definition: bsTree.h:63
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
bsTree::bsCov_y0y0
Float_t bsCov_y0y0
Definition: bsTree.h:52
bsTree::bsCov_zrhoxy
Float_t bsCov_zrhoxy
Definition: bsTree.h:67
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
bsTree::bsCov_x0sx
Float_t bsCov_x0sx
Definition: bsTree.h:47
bsTree::bsCov_axrhoxy
Float_t bsCov_axrhoxy
Definition: bsTree.h:74
bsTree::bsCov_x0y0
Float_t bsCov_x0y0
Definition: bsTree.h:43
bsTree::bsTree
bsTree(TTree *tree=0)
bsTree::bsCov_sysy
Float_t bsCov_sysy
Definition: bsTree.h:87
bsTree::bsCov_zsx
Float_t bsCov_zsx
Definition: bsTree.h:64
bsTree::bsCovCentroid_xcxc
Float_t bsCovCentroid_xcxc
Definition: bsTree.h:101
bsTree::bsCov_axsz
Float_t bsCov_axsz
Definition: bsTree.h:73
bsTree::bsCov_zsy
Float_t bsCov_zsy
Definition: bsTree.h:65
bsTree::bs_sy
Float_t bs_sy
Definition: bsTree.h:38
bsTree::LoadTree
virtual Long64_t LoadTree(Long64_t entry)
bsTree::bsCov_sxrhoxy
Float_t bsCov_sxrhoxy
Definition: bsTree.h:85
bsTree::bsCov_sxsz
Float_t bsCov_sxsz
Definition: bsTree.h:84
bsTree::bsCov_axay
Float_t bsCov_axay
Definition: bsTree.h:70
bsTree::bsCov_sxsx
Float_t bsCov_sxsx
Definition: bsTree.h:82
tree
TChain * tree
Definition: tile_monitor.h:30
bsTree::bsCov_axsy
Float_t bsCov_axsy
Definition: bsTree.h:72
bsTree::bs_ax
Float_t bs_ax
Definition: bsTree.h:35
bsTree::Init
virtual void Init(TTree *tree)
bsTree::Cut
virtual Int_t Cut(Long64_t entry)
bsTree::bsCov_x0sy
Float_t bsCov_x0sy
Definition: bsTree.h:48
bsTree::bsCovCentroid_sxcsxc
Float_t bsCovCentroid_sxcsxc
Definition: bsTree.h:105
bsTree::bsCov_zk
Float_t bsCov_zk
Definition: bsTree.h:68
bsTree::bs_rhoxy
Float_t bs_rhoxy
Definition: bsTree.h:40
bsTree::bsCov_y0rhoxy
Float_t bsCov_y0rhoxy
Definition: bsTree.h:59
bsTree::bsCov_axsx
Float_t bsCov_axsx
Definition: bsTree.h:71
bsTree::b_bsCov
TBranch * b_bsCov
Definition: bsTree.h:111
bsTree::Notify
virtual Bool_t Notify()
bsTree::bsCov_y0ay
Float_t bsCov_y0ay
Definition: bsTree.h:55
bsTree::bsCov_szsz
Float_t bsCov_szsz
Definition: bsTree.h:91
bsTree::bsCentroid_sxc
Float_t bsCentroid_sxc
Definition: bsTree.h:99
bsTree::bsCovCentroid_aycayc
Float_t bsCovCentroid_aycayc
Definition: bsTree.h:104
bsTree::bsCov_sxsy
Float_t bsCov_sxsy
Definition: bsTree.h:83
bsTree::bsCov_zz
Float_t bsCov_zz
Definition: bsTree.h:61
bsTree::bsCov_aysy
Float_t bsCov_aysy
Definition: bsTree.h:78
bsTree::bs_sz
Float_t bs_sz
Definition: bsTree.h:39
bsTree::bsCov_zax
Float_t bsCov_zax
Definition: bsTree.h:62
bsTree::bsCov_syrhoxy
Float_t bsCov_syrhoxy
Definition: bsTree.h:89
bsTree::bsCov_aysx
Float_t bsCov_aysx
Definition: bsTree.h:77
bsTree::b_bsCovCentroid
TBranch * b_bsCovCentroid
Definition: bsTree.h:113
bsTree::bsCov_ayk
Float_t bsCov_ayk
Definition: bsTree.h:81
bsTree::event_lumiStart
Int_t event_lumiStart
Definition: bsTree.h:27
bsTree::bsCov_aysz
Float_t bsCov_aysz
Definition: bsTree.h:79
bsTree::bsCov_sxk
Float_t bsCov_sxk
Definition: bsTree.h:86
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
bsTree::b_bs
TBranch * b_bs
Definition: bsTree.h:110
bsTree::bsCov_x0rhoxy
Float_t bsCov_x0rhoxy
Definition: bsTree.h:50
bsTree::bsCovCentroid_sycsyc
Float_t bsCovCentroid_sycsyc
Definition: bsTree.h:106
bsTree::bsCovCentroid_ycyc
Float_t bsCovCentroid_ycyc
Definition: bsTree.h:102
bsTree::bsCov_rhoxyk
Float_t bsCov_rhoxyk
Definition: bsTree.h:95
bsTree::bs_k
Float_t bs_k
Definition: bsTree.h:41
bsTree::bsCov_rhoxyrhoxy
Float_t bsCov_rhoxyrhoxy
Definition: bsTree.h:94
bsTree::bs_z
Float_t bs_z
Definition: bsTree.h:34
bsTree::event_nEvents
Int_t event_nEvents
Definition: bsTree.h:31
bsTree::bsCov_y0k
Float_t bsCov_y0k
Definition: bsTree.h:60
bsTree::bsCov_y0z
Float_t bsCov_y0z
Definition: bsTree.h:53
bsTree::bsCov_zsz
Float_t bsCov_zsz
Definition: bsTree.h:66
bsTree::bsCov_axk
Float_t bsCov_axk
Definition: bsTree.h:75
bsTree::bsCovCentroid_axcaxc
Float_t bsCovCentroid_axcaxc
Definition: bsTree.h:103
GetAllXsec.entry
list entry
Definition: GetAllXsec.py:132
bsTree::event_fitStatus
Int_t event_fitStatus
Definition: bsTree.h:29
bsTree::bsCov_syk
Float_t bsCov_syk
Definition: bsTree.h:90
bsTree::event_id
Int_t event_id
Definition: bsTree.h:26
bsTree::bsCov_axax
Float_t bsCov_axax
Definition: bsTree.h:69
bsTree::GetEntry
virtual Int_t GetEntry(Long64_t entry)
bsTree::bsCov_kk
Float_t bsCov_kk
Definition: bsTree.h:96
bsTree::Loop
virtual void Loop()
bsTree::bs_sx
Float_t bs_sx
Definition: bsTree.h:37
bsTree::event_lumiRange
Int_t event_lumiRange
Definition: bsTree.h:28
bsTree::bsCov_y0ax
Float_t bsCov_y0ax
Definition: bsTree.h:54
bsTree
Definition: bsTree.h:19
bsTree::bsCov_x0k
Float_t bsCov_x0k
Definition: bsTree.h:51
bsTree::bsCov_y0sy
Float_t bsCov_y0sy
Definition: bsTree.h:57
bsTree::bsCov_x0x0
Float_t bsCov_x0x0
Definition: bsTree.h:42
bsTree::event_fitID
Int_t event_fitID
Definition: bsTree.h:30
bsTree::bsCov_x0sz
Float_t bsCov_x0sz
Definition: bsTree.h:49
bsTree::bsCov_x0ay
Float_t bsCov_x0ay
Definition: bsTree.h:46
bsTree::event_run
Int_t event_run
current Tree number in a TChain
Definition: bsTree.h:25
bsTree::bsCentroid_syc
Float_t bsCentroid_syc
Definition: bsTree.h:100
bsTree::fChain
TTree * fChain
Definition: bsTree.h:21
bsTree::bsCov_x0ax
Float_t bsCov_x0ax
Definition: bsTree.h:45
bsTree::bsCentroid_yc
Float_t bsCentroid_yc
Definition: bsTree.h:98
bsTree::b_event
TBranch * b_event
Definition: bsTree.h:109
bsTree::bsCov_szk
Float_t bsCov_szk
Definition: bsTree.h:93
bsTree::~bsTree
virtual ~bsTree()
bsTree::Show
virtual void Show(Long64_t entry=-1)
bsTree::bsCov_y0sx
Float_t bsCov_y0sx
Definition: bsTree.h:56
bsTree::bs_y0
Float_t bs_y0
Definition: bsTree.h:33
bsTree::bsCentroid_xc
Float_t bsCentroid_xc
Definition: bsTree.h:97
bsTree::bsCov_ayrhoxy
Float_t bsCov_ayrhoxy
Definition: bsTree.h:80
bsTree::b_bsCentroid
TBranch * b_bsCentroid
Definition: bsTree.h:112
bsTree::fCurrent
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition: bsTree.h:22
bsTree::bsCov_ayay
Float_t bsCov_ayay
Definition: bsTree.h:76
bsTree::bs_ay
Float_t bs_ay
Definition: bsTree.h:36