-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathTinyTree.h
276 lines (257 loc) · 9.66 KB
/
TinyTree.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
//////////////////////////////////////////////////////////
// This class has been automatically generated on
// Tue Mar 21 19:43:32 2017 by ROOT version 6.04/16
// from TTree TinyTree/TinyTree
// found on file: hist-MiniNTuple.root
//////////////////////////////////////////////////////////
#ifndef TinyTree_h
#define TinyTree_h
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
// Header file for the classes stored in the TTree if any.
class TinyTree {
public :
TTree *fChain; //!pointer to the analyzed TTree or TChain
Int_t fCurrent; //!current Tree number in a TChain
// Fixed size dimensions of array or collections stored in the TTree if any.
// Declaration of leaf types
Float_t runNumber;
Float_t lbNumber;
Long64_t eventNumber;
Float_t mHH;
Float_t mHH_pole;
Float_t detaHH;
Float_t dphiHH;
Float_t drHH;
Float_t j0_m;
Float_t j0_pt;
Float_t j0_eta;
Float_t j0_phi;
Float_t j0_nTrk;
Float_t j0_nb;
Float_t j0_trkdr;
Float_t j1_m;
Float_t j1_pt;
Float_t j1_eta;
Float_t j1_phi;
Float_t j1_nTrk;
Float_t j1_nb;
Float_t j1_trkdr;
Float_t j0_trk0_m;
Float_t j0_trk0_pt;
Float_t j0_trk0_eta;
Float_t j0_trk0_phi;
Float_t j0_trk0_Mv2;
Float_t j1_trk0_m;
Float_t j1_trk0_pt;
Float_t j1_trk0_eta;
Float_t j1_trk0_phi;
Float_t j1_trk0_Mv2;
Float_t j0_trk1_m;
Float_t j0_trk1_pt;
Float_t j0_trk1_eta;
Float_t j0_trk1_phi;
Float_t j0_trk1_Mv2;
Float_t j1_trk1_m;
Float_t j1_trk1_pt;
Float_t j1_trk1_eta;
Float_t j1_trk1_phi;
Float_t j1_trk1_Mv2;
Float_t Xzz;
Float_t Xww;
Float_t Xhh;
Float_t Rhh;
Float_t Xtt;
Float_t nresj;
Float_t resXhh;
Float_t weight;
// List of branches
TBranch *b_runNumber; //!
TBranch *b_lbNumber; //!
TBranch *b_eventNumber; //!
TBranch *b_mHH; //!
TBranch *b_mHH_pole; //!
TBranch *b_detaHH; //!
TBranch *b_dphiHH; //!
TBranch *b_drHH; //!
TBranch *b_j0_m; //!
TBranch *b_j0_pt; //!
TBranch *b_j0_eta; //!
TBranch *b_j0_phi; //!
TBranch *b_j0_nTrk; //!
TBranch *b_j0_nb; //!
TBranch *b_j0_trkdr; //!
TBranch *b_j1_m; //!
TBranch *b_j1_pt; //!
TBranch *b_j1_eta; //!
TBranch *b_j1_phi; //!
TBranch *b_j1_nTrk; //!
TBranch *b_j1_nb; //!
TBranch *b_j1_trkdr; //!
TBranch *b_j0_trk0_m; //!
TBranch *b_j0_trk0_pt; //!
TBranch *b_j0_trk0_eta; //!
TBranch *b_j0_trk0_phi; //!
TBranch *b_j0_trk0_Mv2; //!
TBranch *b_j1_trk0_m; //!
TBranch *b_j1_trk0_pt; //!
TBranch *b_j1_trk0_eta; //!
TBranch *b_j1_trk0_phi; //!
TBranch *b_j1_trk0_Mv2; //!
TBranch *b_j0_trk1_m; //!
TBranch *b_j0_trk1_pt; //!
TBranch *b_j0_trk1_eta; //!
TBranch *b_j0_trk1_phi; //!
TBranch *b_j0_trk1_Mv2; //!
TBranch *b_j1_trk1_m; //!
TBranch *b_j1_trk1_pt; //!
TBranch *b_j1_trk1_eta; //!
TBranch *b_j1_trk1_phi; //!
TBranch *b_j1_trk1_Mv2; //!
TBranch *b_Xzz; //!
TBranch *b_Xww; //!
TBranch *b_Xhh; //!
TBranch *b_Rhh; //!
TBranch *b_Xtt; //!
TBranch *b_nresj; //!
TBranch *b_resXhh; //!
TBranch *b_weight; //!
TinyTree(TTree *tree=0);
virtual ~TinyTree();
virtual Int_t Cut(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry);
virtual Long64_t LoadTree(Long64_t entry);
virtual void Init(TTree *tree);
virtual void Loop();
virtual Bool_t Notify();
virtual void Show(Long64_t entry = -1);
};
#endif
#ifdef TinyTree_cxx
TinyTree::TinyTree(TTree *tree) : fChain(0)
{
// if parameter tree is not specified (or zero), connect the file
// used to generate this class and read the Tree.
if (tree == 0) {
TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("hist-MiniNTuple.root");
if (!f || !f->IsOpen()) {
f = new TFile("hist-MiniNTuple.root");
}
f->GetObject("TinyTree",tree);
}
Init(tree);
}
TinyTree::~TinyTree()
{
if (!fChain) return;
delete fChain->GetCurrentFile();
}
Int_t TinyTree::GetEntry(Long64_t entry)
{
// Read contents of entry.
if (!fChain) return 0;
return fChain->GetEntry(entry);
}
Long64_t TinyTree::LoadTree(Long64_t entry)
{
// Set the environment to read one entry
if (!fChain) return -5;
Long64_t centry = fChain->LoadTree(entry);
if (centry < 0) return centry;
if (fChain->GetTreeNumber() != fCurrent) {
fCurrent = fChain->GetTreeNumber();
Notify();
}
return centry;
}
void TinyTree::Init(TTree *tree)
{
// The Init() function is called when the selector needs to initialize
// a new tree or chain. Typically here the branch addresses and branch
// pointers of the tree will be set.
// It is normally not necessary to make changes to the generated
// code, but the routine can be extended by the user if needed.
// Init() will be called many times when running on PROOF
// (once per file to be processed).
// Set branch addresses and branch pointers
if (!tree) return;
fChain = tree;
fCurrent = -1;
fChain->SetMakeClass(1);
fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber);
fChain->SetBranchAddress("lbNumber", &lbNumber, &b_lbNumber);
fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber);
fChain->SetBranchAddress("mHH", &mHH, &b_mHH);
fChain->SetBranchAddress("mHH_pole", &mHH_pole, &b_mHH_pole);
fChain->SetBranchAddress("detaHH", &detaHH, &b_detaHH);
fChain->SetBranchAddress("dphiHH", &dphiHH, &b_dphiHH);
fChain->SetBranchAddress("drHH", &drHH, &b_drHH);
fChain->SetBranchAddress("j0_m", &j0_m, &b_j0_m);
fChain->SetBranchAddress("j0_pt", &j0_pt, &b_j0_pt);
fChain->SetBranchAddress("j0_eta", &j0_eta, &b_j0_eta);
fChain->SetBranchAddress("j0_phi", &j0_phi, &b_j0_phi);
fChain->SetBranchAddress("j0_nTrk", &j0_nTrk, &b_j0_nTrk);
fChain->SetBranchAddress("j0_nb", &j0_nb, &b_j0_nb);
fChain->SetBranchAddress("j0_trkdr", &j0_trkdr, &b_j0_trkdr);
fChain->SetBranchAddress("j1_m", &j1_m, &b_j1_m);
fChain->SetBranchAddress("j1_pt", &j1_pt, &b_j1_pt);
fChain->SetBranchAddress("j1_eta", &j1_eta, &b_j1_eta);
fChain->SetBranchAddress("j1_phi", &j1_phi, &b_j1_phi);
fChain->SetBranchAddress("j1_nTrk", &j1_nTrk, &b_j1_nTrk);
fChain->SetBranchAddress("j1_nb", &j1_nb, &b_j1_nb);
fChain->SetBranchAddress("j1_trkdr", &j1_trkdr, &b_j1_trkdr);
fChain->SetBranchAddress("j0_trk0_m", &j0_trk0_m, &b_j0_trk0_m);
fChain->SetBranchAddress("j0_trk0_pt", &j0_trk0_pt, &b_j0_trk0_pt);
fChain->SetBranchAddress("j0_trk0_eta", &j0_trk0_eta, &b_j0_trk0_eta);
fChain->SetBranchAddress("j0_trk0_phi", &j0_trk0_phi, &b_j0_trk0_phi);
fChain->SetBranchAddress("j0_trk0_Mv2", &j0_trk0_Mv2, &b_j0_trk0_Mv2);
fChain->SetBranchAddress("j1_trk0_m", &j1_trk0_m, &b_j1_trk0_m);
fChain->SetBranchAddress("j1_trk0_pt", &j1_trk0_pt, &b_j1_trk0_pt);
fChain->SetBranchAddress("j1_trk0_eta", &j1_trk0_eta, &b_j1_trk0_eta);
fChain->SetBranchAddress("j1_trk0_phi", &j1_trk0_phi, &b_j1_trk0_phi);
fChain->SetBranchAddress("j1_trk0_Mv2", &j1_trk0_Mv2, &b_j1_trk0_Mv2);
fChain->SetBranchAddress("j0_trk1_m", &j0_trk1_m, &b_j0_trk1_m);
fChain->SetBranchAddress("j0_trk1_pt", &j0_trk1_pt, &b_j0_trk1_pt);
fChain->SetBranchAddress("j0_trk1_eta", &j0_trk1_eta, &b_j0_trk1_eta);
fChain->SetBranchAddress("j0_trk1_phi", &j0_trk1_phi, &b_j0_trk1_phi);
fChain->SetBranchAddress("j0_trk1_Mv2", &j0_trk1_Mv2, &b_j0_trk1_Mv2);
fChain->SetBranchAddress("j1_trk1_m", &j1_trk1_m, &b_j1_trk1_m);
fChain->SetBranchAddress("j1_trk1_pt", &j1_trk1_pt, &b_j1_trk1_pt);
fChain->SetBranchAddress("j1_trk1_eta", &j1_trk1_eta, &b_j1_trk1_eta);
fChain->SetBranchAddress("j1_trk1_phi", &j1_trk1_phi, &b_j1_trk1_phi);
fChain->SetBranchAddress("j1_trk1_Mv2", &j1_trk1_Mv2, &b_j1_trk1_Mv2);
fChain->SetBranchAddress("Xzz", &Xzz, &b_Xzz);
//fChain->SetBranchAddress("Xww", &Xww, &b_Xww);
fChain->SetBranchAddress("Xhh", &Xhh, &b_Xhh);
fChain->SetBranchAddress("Rhh", &Rhh, &b_Rhh);
//fChain->SetBranchAddress("Xtt", &Xtt, &b_Xtt);
fChain->SetBranchAddress("nresj", &nresj, &b_nresj);
fChain->SetBranchAddress("resXhh", &resXhh, &b_resXhh); //will be activated
fChain->SetBranchAddress("weight", &weight, &b_weight);
Notify();
}
Bool_t TinyTree::Notify()
{
// The Notify() function is called when a new file is opened. This
// can be either for a new TTree in a TChain or when when a new TTree
// is started when using PROOF. It is normally not necessary to make changes
// to the generated code, but the routine can be extended by the
// user if needed. The return value is currently not used.
return kTRUE;
}
void TinyTree::Show(Long64_t entry)
{
// Print contents of entry.
// If entry is not specified, print current entry
if (!fChain) return;
fChain->Show(entry);
}
Int_t TinyTree::Cut(Long64_t entry)
{
// This function may be called from Loop.
// returns 1 if entry is accepted.
// returns -1 otherwise.
return 1;
}
#endif // #ifdef TinyTree_cxx