ATLAS Offline Software
Loading...
Searching...
No Matches
bsTree.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 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
19class bsTree {
20public :
21 TTree *fChain;
22 Int_t fCurrent;
23
24 // Declaration of leaf types
25 Int_t event_run;
26 Int_t event_id;
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;
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;
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;
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;
81 Float_t bsCov_ayk;
82 Float_t bsCov_sxsx;
83 Float_t bsCov_sxsy;
84 Float_t bsCov_sxsz;
86 Float_t bsCov_sxk;
87 Float_t bsCov_sysy;
88 Float_t bsCov_sysz;
90 Float_t bsCov_syk;
91 Float_t bsCov_szsz;
93 Float_t bsCov_szk;
95 Float_t bsCov_rhoxyk;
96 Float_t bsCov_kk;
107
108 // List of branches
109 TBranch *b_event;
110 TBranch *b_bs;
111 TBranch *b_bsCov;
112 TBranch *b_bsCentroid;
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
129bsTree::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
151Int_t bsTree::GetEntry(Long64_t entry)
152{
153// Read contents of entry.
154 if (!fChain) return 0;
155 return fChain->GetEntry(entry);
156}
157Long64_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 = static_cast<TChain*>(fChain);
165 if (chain->GetTreeNumber() != fCurrent) {
166 fCurrent = chain->GetTreeNumber();
167 Notify();
168 }
169 return centry;
170}
171
172void 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
196Bool_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
207void 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}
214Int_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
TBranch * b_bs
Definition bsTree.h:110
Float_t bsCov_sxsx
Definition bsTree.h:82
Float_t bsCov_sysz
Definition bsTree.h:88
Float_t bsCov_x0sy
Definition bsTree.h:48
Float_t bsCov_x0ax
Definition bsTree.h:45
Float_t bsCov_sxsz
Definition bsTree.h:84
TBranch * b_bsCov
Definition bsTree.h:111
Float_t bs_z
Definition bsTree.h:34
Float_t bsCovCentroid_sxcsxc
Definition bsTree.h:105
TTree * fChain
Definition bsTree.h:21
Float_t bsCov_zz
Definition bsTree.h:61
Float_t bs_ay
Definition bsTree.h:36
bsTree(TTree *tree=0)
Float_t bsCov_zax
Definition bsTree.h:62
Float_t bsCov_szk
Definition bsTree.h:93
Float_t bsCov_sxsy
Definition bsTree.h:83
Float_t bsCov_zay
Definition bsTree.h:63
Float_t bsCov_x0rhoxy
Definition bsTree.h:50
Float_t bsCentroid_syc
Definition bsTree.h:100
Float_t bsCentroid_yc
Definition bsTree.h:98
Float_t bs_ax
Definition bsTree.h:35
Float_t bsCov_szrhoxy
Definition bsTree.h:92
Float_t bsCov_axsy
Definition bsTree.h:72
Float_t bsCovCentroid_ycyc
Definition bsTree.h:102
Float_t bsCov_sysy
Definition bsTree.h:87
Int_t event_lumiStart
Definition bsTree.h:27
Int_t event_nEvents
Definition bsTree.h:31
Float_t bsCov_y0y0
Definition bsTree.h:52
Float_t bs_sz
Definition bsTree.h:39
Float_t bs_sx
Definition bsTree.h:37
Float_t bsCov_x0y0
Definition bsTree.h:43
Float_t bsCov_x0sz
Definition bsTree.h:49
TBranch * b_bsCentroid
Definition bsTree.h:112
Float_t bsCovCentroid_xcxc
Definition bsTree.h:101
Float_t bsCov_syk
Definition bsTree.h:90
Float_t bsCov_x0ay
Definition bsTree.h:46
Float_t bsCovCentroid_sycsyc
Definition bsTree.h:106
Float_t bsCov_x0z
Definition bsTree.h:44
Float_t bsCov_zrhoxy
Definition bsTree.h:67
virtual void Loop()
Float_t bsCov_y0ay
Definition bsTree.h:55
virtual Bool_t Notify()
Float_t bsCov_axsx
Definition bsTree.h:71
Float_t bsCov_ayrhoxy
Definition bsTree.h:80
Float_t bsCov_rhoxyrhoxy
Definition bsTree.h:94
Float_t bsCov_aysx
Definition bsTree.h:77
Int_t event_fitStatus
Definition bsTree.h:29
Float_t bsCov_kk
Definition bsTree.h:96
virtual Int_t GetEntry(Long64_t entry)
Float_t bsCov_y0sz
Definition bsTree.h:58
Float_t bsCov_axax
Definition bsTree.h:69
Int_t event_fitID
Definition bsTree.h:30
Float_t bsCov_zk
Definition bsTree.h:68
Int_t event_id
Definition bsTree.h:26
virtual Long64_t LoadTree(Long64_t entry)
Float_t bsCov_y0sy
Definition bsTree.h:57
Float_t bsCov_zsx
Definition bsTree.h:64
Float_t bsCentroid_sxc
Definition bsTree.h:99
Float_t bs_rhoxy
Definition bsTree.h:40
Float_t bs_y0
Definition bsTree.h:33
Float_t bsCov_ayk
Definition bsTree.h:81
Float_t bsCov_axrhoxy
Definition bsTree.h:74
Float_t bsCov_axk
Definition bsTree.h:75
Int_t event_lumiRange
Definition bsTree.h:28
Float_t bsCov_rhoxyk
Definition bsTree.h:95
Float_t bs_k
Definition bsTree.h:41
Float_t bsCov_y0rhoxy
Definition bsTree.h:59
Int_t fCurrent
pointer to the analyzed TTree or TChain
Definition bsTree.h:22
TBranch * b_bsCovCentroid
Definition bsTree.h:113
Float_t bsCov_axay
Definition bsTree.h:70
Float_t bsCov_x0k
Definition bsTree.h:51
Float_t bsCov_y0z
Definition bsTree.h:53
Float_t bsCovCentroid_aycayc
Definition bsTree.h:104
Float_t bsCov_ayay
Definition bsTree.h:76
Float_t bsCov_aysz
Definition bsTree.h:79
Float_t bsCov_zsz
Definition bsTree.h:66
Float_t bsCov_aysy
Definition bsTree.h:78
Float_t bsCov_szsz
Definition bsTree.h:91
Float_t bsCovCentroid_axcaxc
Definition bsTree.h:103
Float_t bsCov_x0x0
Definition bsTree.h:42
virtual void Show(Long64_t entry=-1)
Float_t bsCov_sxk
Definition bsTree.h:86
Float_t bsCov_sxrhoxy
Definition bsTree.h:85
Float_t bsCov_x0sx
Definition bsTree.h:47
virtual ~bsTree()
Int_t event_run
current Tree number in a TChain
Definition bsTree.h:25
Float_t bsCentroid_xc
Definition bsTree.h:97
Float_t bs_x0
Definition bsTree.h:32
virtual void Init(TTree *tree)
Float_t bsCov_y0k
Definition bsTree.h:60
Float_t bs_sy
Definition bsTree.h:38
Float_t bsCov_axsz
Definition bsTree.h:73
TBranch * b_event
Definition bsTree.h:109
Float_t bsCov_syrhoxy
Definition bsTree.h:89
Float_t bsCov_zsy
Definition bsTree.h:65
virtual Int_t Cut(Long64_t entry)
Float_t bsCov_y0sx
Definition bsTree.h:56
Float_t bsCov_y0ax
Definition bsTree.h:54
TChain * tree