1 |
sixie |
1.1 |
#ifndef ElectronTree_H
|
2 |
|
|
#define ElectronTree_H
|
3 |
|
|
|
4 |
|
|
#include "TFile.h"
|
5 |
|
|
#include "TTree.h"
|
6 |
|
|
#include "TError.h"
|
7 |
|
|
#include <cmath>
|
8 |
|
|
#include "assert.h"
|
9 |
|
|
|
10 |
sixie |
1.2 |
namespace citana
|
11 |
|
|
{
|
12 |
|
|
class ElectronTree {
|
13 |
|
|
|
14 |
|
|
public:
|
15 |
|
|
|
16 |
|
|
/// bit map
|
17 |
|
|
/// DON'T CHANGE ORDER
|
18 |
|
|
|
19 |
|
|
//*******************************************
|
20 |
|
|
//=== ElectronTriggerBits ====
|
21 |
|
|
//*******************************************
|
22 |
|
|
enum ElectronTriggerBits { kEleTrigger_Ele = 0x000001,
|
23 |
|
|
kEleTrigger_Ele_CaloIdL_CaloIsoVL = 0x000002,
|
24 |
|
|
kEleTrigger_Ele_CaloIdT_TrkIdVL_CaloIsoVL_TrkIsoVL = 0x000004
|
25 |
|
|
};
|
26 |
|
|
|
27 |
emanuele |
1.4 |
//*******************************************
|
28 |
|
|
//=== tree versions ===
|
29 |
|
|
//*******************************************
|
30 |
|
|
enum ElectronTreeVersion { kTreeV1, kTreeV2 };
|
31 |
|
|
|
32 |
sixie |
1.2 |
/// variables
|
33 |
|
|
Float_t fWeight;
|
34 |
|
|
UInt_t fRunNumber;
|
35 |
|
|
UInt_t fLumiSectionNumber;
|
36 |
|
|
UInt_t fEventNumber;
|
37 |
|
|
Bool_t fEleEventNumberParity;
|
38 |
|
|
Float_t fElePt;
|
39 |
|
|
Float_t fEleEta;
|
40 |
|
|
Float_t fElePhi;
|
41 |
|
|
Float_t fEleSCEt;
|
42 |
|
|
Float_t fEleSCEta;
|
43 |
|
|
Float_t fEleSCPhi;
|
44 |
|
|
Float_t fEleEcalEnergy;
|
45 |
|
|
Bool_t fEleIsEcalDriven;
|
46 |
|
|
UInt_t fEleTriggerBit;
|
47 |
|
|
Float_t fRho;
|
48 |
emanuele |
1.4 |
Float_t fNVertices;
|
49 |
sixie |
1.2 |
|
50 |
|
|
// Conversion and IP
|
51 |
|
|
Float_t fEleD0;
|
52 |
|
|
Float_t fEleDZ;
|
53 |
|
|
Float_t fEleIP3d;
|
54 |
|
|
Float_t fEleIP3dSig;
|
55 |
|
|
Bool_t fEleMatchedConversion;
|
56 |
|
|
Float_t fEleConvDCot;
|
57 |
|
|
Float_t fEleConvDist;
|
58 |
emanuele |
1.4 |
Float_t fEleNMissHits;
|
59 |
sixie |
1.2 |
|
60 |
|
|
// E/P variables
|
61 |
|
|
Float_t fEleNBrem;
|
62 |
|
|
Float_t fEleFBrem;
|
63 |
|
|
Float_t fEleEOverP;
|
64 |
|
|
Float_t fEleESeedClusterOverPIn;
|
65 |
|
|
Float_t fEleESeedClusterOverPout;
|
66 |
|
|
Float_t fEleEEleClusterOverPout;
|
67 |
|
|
Float_t fEleOneOverEMinusOneOverP;
|
68 |
|
|
|
69 |
|
|
// track cluster matching
|
70 |
|
|
Float_t fEleDEtaIn;
|
71 |
|
|
Float_t fEleDPhiIn;
|
72 |
|
|
Float_t fEledEtaCalo;
|
73 |
|
|
Float_t fEledPhiCalo;
|
74 |
|
|
|
75 |
|
|
//shower shape
|
76 |
|
|
Float_t fEleSigmaIEtaIEta;
|
77 |
|
|
Float_t fEleSigmaIPhiIPhi;
|
78 |
|
|
Float_t fEleSigmaIEtaIPhi;
|
79 |
|
|
Float_t fEleSCEtaWidth;
|
80 |
|
|
Float_t fEleSCPhiWidth;
|
81 |
|
|
Float_t fEleR9;
|
82 |
|
|
Float_t fElePreShowerOverRaw;
|
83 |
|
|
Float_t fEleHoverE;
|
84 |
|
|
|
85 |
|
|
//track quality
|
86 |
|
|
Float_t fEleGsfTrackChi2OverNdof;
|
87 |
|
|
Float_t fEleKFTrackChi2OverNDoF;
|
88 |
emanuele |
1.4 |
Float_t fEleKFTrackNHits;
|
89 |
|
|
Float_t fEleKFTrackNLayersWithMeasurement;
|
90 |
sixie |
1.2 |
Float_t fEleOneMinusSeedE1x5OverE5x5;
|
91 |
|
|
|
92 |
|
|
//Isolation Variables
|
93 |
|
|
Float_t fElePFMVA;
|
94 |
|
|
Float_t fEleTrkIso03;
|
95 |
|
|
Float_t fEleEMIso03;
|
96 |
|
|
Float_t fEleHadIso03;
|
97 |
|
|
Float_t fEleTrkIso04;
|
98 |
|
|
Float_t fEleEMIso04;
|
99 |
|
|
Float_t fEleHadIso04;
|
100 |
|
|
Float_t fElePFIso04;
|
101 |
|
|
Float_t fChargedIso_DR0p0To0p1;
|
102 |
|
|
Float_t fChargedIso_DR0p1To0p2;
|
103 |
|
|
Float_t fChargedIso_DR0p2To0p3;
|
104 |
|
|
Float_t fChargedIso_DR0p3To0p4;
|
105 |
|
|
Float_t fChargedIso_DR0p4To0p5;
|
106 |
|
|
Float_t fGammaIso_DR0p0To0p1;
|
107 |
|
|
Float_t fGammaIso_DR0p1To0p2;
|
108 |
|
|
Float_t fGammaIso_DR0p2To0p3;
|
109 |
|
|
Float_t fGammaIso_DR0p3To0p4;
|
110 |
|
|
Float_t fGammaIso_DR0p4To0p5;
|
111 |
|
|
Float_t fNeutralHadronIso_DR0p0To0p1;
|
112 |
|
|
Float_t fNeutralHadronIso_DR0p1To0p2;
|
113 |
|
|
Float_t fNeutralHadronIso_DR0p2To0p3;
|
114 |
|
|
Float_t fNeutralHadronIso_DR0p3To0p4;
|
115 |
|
|
Float_t fNeutralHadronIso_DR0p4To0p5;
|
116 |
|
|
|
117 |
|
|
Bool_t fElePassTriggerDenominator;
|
118 |
|
|
|
119 |
sixie |
1.3 |
//Regression Variables
|
120 |
|
|
Bool_t fIsEB;
|
121 |
|
|
Bool_t fIsEE;
|
122 |
|
|
Float_t fSCRawEnergy;
|
123 |
|
|
Float_t fNClusters;
|
124 |
|
|
Float_t fEtaSeed;
|
125 |
|
|
Float_t fPhiSeed;
|
126 |
|
|
Float_t fESeed;
|
127 |
|
|
Float_t fE3x3Seed;
|
128 |
|
|
Float_t fE5x5Seed;
|
129 |
|
|
Float_t fEMaxSeed;
|
130 |
|
|
Float_t fE2ndSeed;
|
131 |
|
|
Float_t fETopSeed;
|
132 |
|
|
Float_t fEBottomSeed;
|
133 |
|
|
Float_t fELeftSeed;
|
134 |
|
|
Float_t fERightSeed;
|
135 |
|
|
Float_t fE2x5MaxSeed;
|
136 |
|
|
Float_t fE2x5TopSeed;
|
137 |
|
|
Float_t fE2x5BottomSeed;
|
138 |
|
|
Float_t fE2x5LeftSeed;
|
139 |
|
|
Float_t fE2x5RightSeed;
|
140 |
|
|
Float_t fIEtaSeed;
|
141 |
|
|
Float_t fIPhiSeed;
|
142 |
|
|
Float_t fEtaCrySeed;
|
143 |
|
|
Float_t fPhiCrySeed;
|
144 |
sixie |
1.5 |
Float_t fEcalEnergyError;
|
145 |
sixie |
1.3 |
Float_t fGsfTrackPIn;
|
146 |
sixie |
1.5 |
Float_t fTrackMomentumError;
|
147 |
emanuele |
1.4 |
Float_t fpmeangsf;
|
148 |
|
|
Float_t fpmeankf;
|
149 |
|
|
Float_t fCharge;
|
150 |
sixie |
1.3 |
Float_t fGeneratedEnergy;
|
151 |
|
|
Float_t fGeneratedEnergyStatus1;
|
152 |
|
|
Float_t fGeneratedEnergyStatus3;
|
153 |
|
|
|
154 |
sixie |
1.7 |
//MVA Variables
|
155 |
|
|
Float_t fEGammaNonTriggeringMVA;
|
156 |
|
|
|
157 |
sixie |
1.2 |
public:
|
158 |
|
|
/// this is the main element
|
159 |
|
|
TTree *tree_;
|
160 |
|
|
TFile *f_;
|
161 |
sixie |
1.1 |
|
162 |
sixie |
1.2 |
/// hold the names of variables to facilitate things (filled during Init)
|
163 |
|
|
std::vector<std::string> variables_;
|
164 |
sixie |
1.1 |
|
165 |
sixie |
1.2 |
/// default constructor
|
166 |
|
|
ElectronTree() {};
|
167 |
|
|
/// default destructor
|
168 |
|
|
~ElectronTree(){
|
169 |
|
|
if (f_) f_->Close();
|
170 |
|
|
};
|
171 |
sixie |
1.1 |
|
172 |
sixie |
1.2 |
/// initialize varibles and fill list of available variables
|
173 |
|
|
void InitVariables() {
|
174 |
|
|
fWeight = 0.0;
|
175 |
|
|
fRunNumber = 0.0;
|
176 |
|
|
fLumiSectionNumber = 0.0;
|
177 |
|
|
fEventNumber = 0.0;
|
178 |
|
|
fEleEventNumberParity = 0.0;
|
179 |
|
|
fElePt = 0.0;
|
180 |
sixie |
1.3 |
fEleEta = 0.0;
|
181 |
|
|
fElePhi = 0.0;
|
182 |
|
|
fEleSCEt = 0.0;
|
183 |
sixie |
1.2 |
fEleSCEta = 0.0;
|
184 |
|
|
fEleSCPhi = 0.0;
|
185 |
|
|
fEleEcalEnergy = 0.0;
|
186 |
sixie |
1.3 |
fEleIsEcalDriven = 0.0;
|
187 |
sixie |
1.2 |
fEleTriggerBit = 0.0;
|
188 |
|
|
fRho = 0.0;
|
189 |
|
|
fNVertices = 0.0;
|
190 |
|
|
fEleD0 = 0.0;
|
191 |
|
|
fEleDZ = 0.0;
|
192 |
sixie |
1.3 |
fEleIP3d = 0.0;
|
193 |
sixie |
1.2 |
fEleIP3dSig = 0.0;
|
194 |
|
|
fEleMatchedConversion = 0.0;
|
195 |
|
|
fEleConvDCot = 0.0;
|
196 |
|
|
fEleConvDist = 0.0;
|
197 |
|
|
fEleNMissHits = 0.0;
|
198 |
|
|
fEleNBrem = 0.0;
|
199 |
|
|
fEleFBrem = 0.0;
|
200 |
|
|
fEleEOverP = 0.0;
|
201 |
sixie |
1.3 |
fEleESeedClusterOverPIn = 0.0;
|
202 |
|
|
fEleESeedClusterOverPout = 0.0;
|
203 |
|
|
fEleEEleClusterOverPout = 0.0;
|
204 |
|
|
fEleOneOverEMinusOneOverP = 0.0;
|
205 |
sixie |
1.2 |
fEleDEtaIn = 0.0;
|
206 |
|
|
fEleDPhiIn = 0.0;
|
207 |
|
|
fEledEtaCalo = 0.0;
|
208 |
|
|
fEledPhiCalo = 0.0;
|
209 |
|
|
fEleSigmaIEtaIEta = 0.0;
|
210 |
|
|
fEleSigmaIPhiIPhi = 0.0;
|
211 |
sixie |
1.3 |
fEleSigmaIEtaIPhi = 0.0;
|
212 |
sixie |
1.2 |
fEleSCEtaWidth = 0.0;
|
213 |
|
|
fEleSCPhiWidth = 0.0;
|
214 |
|
|
fEleR9 = 0.0;
|
215 |
|
|
fElePreShowerOverRaw = 0.0;
|
216 |
|
|
fEleHoverE = 0.0;
|
217 |
sixie |
1.3 |
fEleGsfTrackChi2OverNdof = 0.0;
|
218 |
sixie |
1.2 |
fEleKFTrackChi2OverNDoF = 0.0;
|
219 |
sixie |
1.3 |
fEleKFTrackNHits = 0.0;
|
220 |
sixie |
1.2 |
fEleKFTrackNLayersWithMeasurement = 0.0;
|
221 |
sixie |
1.3 |
fEleOneMinusSeedE1x5OverE5x5 = 0.0;
|
222 |
|
|
fElePFMVA = 0.0;
|
223 |
sixie |
1.2 |
fEleTrkIso03 = 0.0;
|
224 |
|
|
fEleEMIso03 = 0.0;
|
225 |
|
|
fEleHadIso03 = 0.0;
|
226 |
|
|
fEleTrkIso04 = 0.0;
|
227 |
|
|
fEleEMIso04 = 0.0;
|
228 |
sixie |
1.3 |
fEleHadIso04 = 0.0;
|
229 |
sixie |
1.2 |
fElePFIso04 = 0.0;
|
230 |
|
|
fChargedIso_DR0p0To0p1 = 0.0;
|
231 |
|
|
fChargedIso_DR0p1To0p2 = 0.0;
|
232 |
|
|
fChargedIso_DR0p2To0p3 = 0.0;
|
233 |
|
|
fChargedIso_DR0p3To0p4 = 0.0;
|
234 |
|
|
fChargedIso_DR0p4To0p5 = 0.0;
|
235 |
|
|
fGammaIso_DR0p0To0p1 = 0.0;
|
236 |
|
|
fGammaIso_DR0p1To0p2 = 0.0;
|
237 |
|
|
fGammaIso_DR0p2To0p3 = 0.0;
|
238 |
|
|
fGammaIso_DR0p3To0p4 = 0.0;
|
239 |
|
|
fGammaIso_DR0p4To0p5 = 0.0;
|
240 |
sixie |
1.3 |
fNeutralHadronIso_DR0p0To0p1 = 0.0;
|
241 |
|
|
fNeutralHadronIso_DR0p1To0p2 = 0.0;
|
242 |
|
|
fNeutralHadronIso_DR0p2To0p3 = 0.0;
|
243 |
|
|
fNeutralHadronIso_DR0p3To0p4 = 0.0;
|
244 |
|
|
fNeutralHadronIso_DR0p4To0p5 = 0.0;
|
245 |
|
|
fElePassTriggerDenominator = 0.0;
|
246 |
|
|
fIsEB = 0.0;
|
247 |
|
|
fIsEE = 0.0;
|
248 |
|
|
fSCRawEnergy = 0.0;
|
249 |
|
|
fNClusters = 0.0;
|
250 |
|
|
fEtaSeed = 0.0;
|
251 |
|
|
fPhiSeed = 0.0;
|
252 |
|
|
fESeed = 0.0;
|
253 |
|
|
fE3x3Seed = 0.0;
|
254 |
|
|
fE5x5Seed = 0.0;
|
255 |
|
|
fEMaxSeed = 0.0;
|
256 |
|
|
fE2ndSeed = 0.0;
|
257 |
|
|
fETopSeed = 0.0;
|
258 |
|
|
fEBottomSeed = 0.0;
|
259 |
|
|
fELeftSeed = 0.0;
|
260 |
|
|
fERightSeed = 0.0;
|
261 |
|
|
fE2x5MaxSeed = 0.0;
|
262 |
|
|
fE2x5TopSeed = 0.0;
|
263 |
|
|
fE2x5BottomSeed = 0.0;
|
264 |
|
|
fE2x5LeftSeed = 0.0;
|
265 |
|
|
fE2x5RightSeed = 0.0;
|
266 |
|
|
fIEtaSeed = 0.0;
|
267 |
|
|
fIPhiSeed = 0.0;
|
268 |
|
|
fEtaCrySeed = 0.0;
|
269 |
|
|
fPhiCrySeed = 0.0;
|
270 |
sixie |
1.5 |
fEcalEnergyError = 0.0;
|
271 |
|
|
fGsfTrackPIn = 0.0;
|
272 |
|
|
fTrackMomentumError = 0.0;
|
273 |
emanuele |
1.4 |
fpmeangsf = 0.0;
|
274 |
|
|
fpmeankf = 0.0;
|
275 |
sixie |
1.3 |
fCharge = 0.0;
|
276 |
|
|
fGeneratedEnergy = 0.0;
|
277 |
|
|
fGeneratedEnergyStatus1 = 0.0;
|
278 |
|
|
fGeneratedEnergyStatus3 = 0.0;
|
279 |
sixie |
1.7 |
fEGammaNonTriggeringMVA = -9999.0;
|
280 |
sixie |
1.3 |
|
281 |
sixie |
1.2 |
}
|
282 |
sixie |
1.1 |
|
283 |
sixie |
1.2 |
/// load a ElectronTree
|
284 |
emanuele |
1.4 |
void LoadTree(const char* file, int version=kTreeV1){
|
285 |
sixie |
1.2 |
f_ = TFile::Open(file);
|
286 |
|
|
assert(f_);
|
287 |
emanuele |
1.4 |
if(version==kTreeV1) tree_ = dynamic_cast<TTree*>(f_->Get("Electrons"));
|
288 |
|
|
else if(version==kTreeV2) tree_ = dynamic_cast<TTree*>(f_->Get("eleIDdir/T1"));
|
289 |
sixie |
1.2 |
assert(tree_);
|
290 |
|
|
}
|
291 |
sixie |
1.1 |
|
292 |
sixie |
1.2 |
/// create a ElectronTree
|
293 |
|
|
void CreateTree(){
|
294 |
|
|
tree_ = new TTree("Electrons","Electrons");
|
295 |
|
|
f_ = 0;
|
296 |
|
|
|
297 |
|
|
//book the branches
|
298 |
|
|
tree_->Branch("weight",&fWeight,"weight/F");
|
299 |
|
|
tree_->Branch("run",&fRunNumber,"run/i");
|
300 |
|
|
tree_->Branch("lumi",&fLumiSectionNumber,"lumi/i");
|
301 |
|
|
tree_->Branch("event",&fEventNumber,"event/i");
|
302 |
|
|
tree_->Branch("EventNumberParity",&fEleEventNumberParity,"EventNumberParity/O");
|
303 |
|
|
tree_->Branch("pt",&fElePt,"pt/F");
|
304 |
|
|
tree_->Branch("eta",&fEleEta,"eta/F");
|
305 |
|
|
tree_->Branch("phi",&fElePhi,"phi/F");
|
306 |
|
|
tree_->Branch("scEt",&fEleSCEt,"scEt/F");
|
307 |
|
|
tree_->Branch("scEta",&fEleSCEta,"scEta/F");
|
308 |
|
|
tree_->Branch("scPhi",&fEleSCPhi,"scPhi/F");
|
309 |
|
|
tree_->Branch("ecalenergy",&fEleEcalEnergy,"ecalenergy/F");
|
310 |
|
|
tree_->Branch("ecaldriven",&fEleIsEcalDriven,"ecaldriven/O");
|
311 |
|
|
tree_->Branch("triggerBit",&fEleTriggerBit,"triggerBit/i");
|
312 |
|
|
tree_->Branch("rho",&fRho,"rho/F");
|
313 |
sixie |
1.6 |
tree_->Branch("vertices",&fNVertices,"vertices/F");
|
314 |
sixie |
1.2 |
tree_->Branch("d0",&fEleD0,"d0/F");
|
315 |
|
|
tree_->Branch("dz",&fEleDZ,"dz/F");
|
316 |
|
|
tree_->Branch("ip3d",&fEleIP3d,"ip3d/F");
|
317 |
|
|
tree_->Branch("ip3ds",&fEleIP3dSig,"ip3ds/F");
|
318 |
|
|
tree_->Branch("matchConv",&fEleMatchedConversion,"matchConv/O");
|
319 |
|
|
tree_->Branch("dcot",&fEleConvDCot,"dcot/F");
|
320 |
|
|
tree_->Branch("dist",&fEleConvDist,"dist/F");
|
321 |
sixie |
1.6 |
tree_->Branch("missHits",&fEleNMissHits,"NMissHits/F");
|
322 |
sixie |
1.2 |
tree_->Branch("nbrems",&fEleNBrem,"nbrems/F");
|
323 |
|
|
tree_->Branch("fbrem",&fEleFBrem,"fbrem/F");
|
324 |
|
|
tree_->Branch("EoP",&fEleEOverP,"EoP/F");
|
325 |
|
|
tree_->Branch("EoPin",&fEleESeedClusterOverPIn,"EoPin/F");
|
326 |
|
|
tree_->Branch("ESeedoPout",&fEleESeedClusterOverPout,"ESeedoPout/F");
|
327 |
|
|
tree_->Branch("EEleoPout",&fEleEEleClusterOverPout,"EEleoPout/F");
|
328 |
sixie |
1.3 |
// tree_->Branch("eleEoPout",&fEleEEleClusterOverPout,"eleEoPout/F"); //old name of the branch
|
329 |
|
|
tree_->Branch("IoEmIoP",&fEleOneOverEMinusOneOverP,"IoEmIoP/F");
|
330 |
sixie |
1.2 |
tree_->Branch("deta",&fEleDEtaIn,"deta/F");
|
331 |
|
|
tree_->Branch("dphi",&fEleDPhiIn,"dphi/F");
|
332 |
|
|
tree_->Branch("detacalo",&fEledEtaCalo,"detacalo/F");
|
333 |
|
|
tree_->Branch("dphicalo",&fEledPhiCalo,"dphicalo/F");
|
334 |
|
|
tree_->Branch("see",&fEleSigmaIEtaIEta,"see/F");
|
335 |
|
|
tree_->Branch("spp",&fEleSigmaIPhiIPhi,"spp/F");
|
336 |
|
|
tree_->Branch("sep",&fEleSigmaIEtaIPhi,"sep/F");
|
337 |
|
|
tree_->Branch("etawidth",&fEleSCEtaWidth,"etawidth/F");
|
338 |
|
|
tree_->Branch("phiwidth",&fEleSCPhiWidth,"phiwidth/F");
|
339 |
|
|
tree_->Branch("R9",&fEleR9,"R9/F");
|
340 |
|
|
tree_->Branch("PreShowerOverRaw",&fElePreShowerOverRaw,"PreShowerOverRaw/F");
|
341 |
|
|
tree_->Branch("HoE",&fEleHoverE,"HoE/F");
|
342 |
|
|
tree_->Branch("gsfchi2",&fEleGsfTrackChi2OverNdof,"gsfchi2/F");
|
343 |
|
|
tree_->Branch("kfchi2",&fEleKFTrackChi2OverNDoF,"kfchi2/F");
|
344 |
sixie |
1.6 |
tree_->Branch("kfhits",&fEleKFTrackNHits,"kfhits/F");
|
345 |
|
|
tree_->Branch("kflayers",&fEleKFTrackNLayersWithMeasurement,"kflayers/F");
|
346 |
sixie |
1.2 |
tree_->Branch("OneMinusSeedE1x5OverE5x5",&fEleOneMinusSeedE1x5OverE5x5,"OneMinusSeedE1x5OverE5x5/F");
|
347 |
|
|
tree_->Branch("PFMVA",&fElePFMVA,"PFMVA/F");
|
348 |
|
|
tree_->Branch("trkIso03",&fEleTrkIso03,"trkIso03/F");
|
349 |
|
|
tree_->Branch("ecalIso03",&fEleEMIso03,"ecalIso03/F");
|
350 |
|
|
tree_->Branch("hcalIso03",&fEleHadIso03,"hcalIso03/F");
|
351 |
|
|
tree_->Branch("trkIso04",&fEleTrkIso04,"trkIso04/F");
|
352 |
|
|
tree_->Branch("ecalIso04",&fEleEMIso04,"ecalIso04/F");
|
353 |
|
|
tree_->Branch("hcalIso04",&fEleHadIso04,"hcalIso04/F");
|
354 |
|
|
tree_->Branch("pfIso04",&fElePFIso04,"pfIso04/F");
|
355 |
|
|
tree_->Branch("ChargedIso_DR0p0To0p1",&fChargedIso_DR0p0To0p1,"ChargedIso_DR0p0To0p1/F");
|
356 |
|
|
tree_->Branch("ChargedIso_DR0p1To0p2",&fChargedIso_DR0p1To0p2,"ChargedIso_DR0p1To0p2/F");
|
357 |
|
|
tree_->Branch("ChargedIso_DR0p2To0p3",&fChargedIso_DR0p2To0p3,"ChargedIso_DR0p2To0p3/F");
|
358 |
|
|
tree_->Branch("ChargedIso_DR0p3To0p4",&fChargedIso_DR0p3To0p4,"ChargedIso_DR0p3To0p4/F");
|
359 |
|
|
tree_->Branch("ChargedIso_DR0p4To0p5",&fChargedIso_DR0p4To0p5,"ChargedIso_DR0p4To0p5/F");
|
360 |
|
|
tree_->Branch("GammaIso_DR0p0To0p1",&fGammaIso_DR0p0To0p1,"GammaIso_DR0p0To0p1/F");
|
361 |
|
|
tree_->Branch("GammaIso_DR0p1To0p2",&fGammaIso_DR0p1To0p2,"GammaIso_DR0p1To0p2/F");
|
362 |
|
|
tree_->Branch("GammaIso_DR0p2To0p3",&fGammaIso_DR0p2To0p3,"GammaIso_DR0p2To0p3/F");
|
363 |
|
|
tree_->Branch("GammaIso_DR0p3To0p4",&fGammaIso_DR0p3To0p4,"GammaIso_DR0p3To0p4/F");
|
364 |
|
|
tree_->Branch("GammaIso_DR0p4To0p5",&fGammaIso_DR0p4To0p5,"GammaIso_DR0p4To0p5/F");
|
365 |
|
|
tree_->Branch("NeutralHadronIso_DR0p0To0p1",&fNeutralHadronIso_DR0p0To0p1,"NeutralHadronIso_DR0p0To0p1/F");
|
366 |
|
|
tree_->Branch("NeutralHadronIso_DR0p1To0p2",&fNeutralHadronIso_DR0p1To0p2,"NeutralHadronIso_DR0p1To0p2/F");
|
367 |
|
|
tree_->Branch("NeutralHadronIso_DR0p2To0p3",&fNeutralHadronIso_DR0p2To0p3,"NeutralHadronIso_DR0p2To0p3/F");
|
368 |
|
|
tree_->Branch("NeutralHadronIso_DR0p3To0p4",&fNeutralHadronIso_DR0p3To0p4,"NeutralHadronIso_DR0p3To0p4/F");
|
369 |
|
|
tree_->Branch("NeutralHadronIso_DR0p4To0p5",&fNeutralHadronIso_DR0p4To0p5,"NeutralHadronIso_DR0p4To0p5/F");
|
370 |
|
|
tree_->Branch("PassTriggerDenominator",&fElePassTriggerDenominator,"PassTriggerDenominator/O");
|
371 |
sixie |
1.3 |
tree_->Branch("IsEB",&fIsEB,"IsEB/O");
|
372 |
|
|
tree_->Branch("IsEE",&fIsEE,"IsEE/O");
|
373 |
|
|
tree_->Branch("SCRawEnergy",&fSCRawEnergy,"SCRawEnergy/F");
|
374 |
|
|
tree_->Branch("NClusters",&fNClusters,"NClusters/F");
|
375 |
|
|
tree_->Branch("EtaSeed",&fEtaSeed,"EtaSeed/F");
|
376 |
|
|
tree_->Branch("PhiSeed",&fPhiSeed,"PhiSeed/F");
|
377 |
|
|
tree_->Branch("ESeed",&fESeed,"ESeed/F");
|
378 |
|
|
tree_->Branch("E3x3Seed",&fE3x3Seed,"E3x3Seed/F");
|
379 |
|
|
tree_->Branch("E5x5Seed",&fE5x5Seed,"E5x5Seed/F");
|
380 |
|
|
tree_->Branch("EMaxSeed",&fEMaxSeed,"EMaxSeed/F");
|
381 |
|
|
tree_->Branch("E2ndSeed",&fE2ndSeed,"E2ndSeed/F");
|
382 |
|
|
tree_->Branch("ETopSeed",&fETopSeed,"ETopSeed/F");
|
383 |
|
|
tree_->Branch("EBottomSeed",&fEBottomSeed,"EBottomSeed/F");
|
384 |
|
|
tree_->Branch("ELeftSeed",&fELeftSeed,"ELeftSeed/F");
|
385 |
|
|
tree_->Branch("ERightSeed",&fERightSeed,"ERightSeed/F");
|
386 |
|
|
tree_->Branch("E2x5MaxSeed",&fE2x5MaxSeed,"E2x5MaxSeed/F");
|
387 |
|
|
tree_->Branch("E2x5TopSeed",&fE2x5TopSeed,"E2x5TopSeed/F");
|
388 |
|
|
tree_->Branch("E2x5BottomSeed",&fE2x5BottomSeed,"E2x5BottomSeed/F");
|
389 |
|
|
tree_->Branch("E2x5LeftSeed",&fE2x5LeftSeed,"E2x5LeftSeed/F");
|
390 |
|
|
tree_->Branch("E2x5RightSeed",&fE2x5RightSeed,"E2x5RightSeed/F");
|
391 |
|
|
tree_->Branch("IEtaSeed",&fIEtaSeed,"IEtaSeed/F");
|
392 |
|
|
tree_->Branch("IPhiSeed",&fIPhiSeed,"IPhiSeed/F");
|
393 |
|
|
tree_->Branch("EtaCrySeed",&fEtaCrySeed,"EtaCrySeed/F");
|
394 |
|
|
tree_->Branch("PhiCrySeed",&fPhiCrySeed,"PhiCrySeed/F");
|
395 |
sixie |
1.5 |
tree_->Branch("ecalenergyerror",&fEcalEnergyError,"ecalenergyerror/F");
|
396 |
emanuele |
1.4 |
tree_->Branch("pmodegsf",&fGsfTrackPIn,"pmodegsf/F");
|
397 |
sixie |
1.5 |
tree_->Branch("perror",&fTrackMomentumError,"perror/F");
|
398 |
emanuele |
1.4 |
tree_->Branch("pmeangsf",&fpmeangsf,"pmodegsf/F");
|
399 |
|
|
tree_->Branch("pmeankf",&fpmeankf,"pmeankf/F");
|
400 |
sixie |
1.6 |
tree_->Branch("Charge",&fCharge,"Charge/F");
|
401 |
sixie |
1.3 |
tree_->Branch("GeneratedEnergy",&fGeneratedEnergy,"GeneratedEnergy/F");
|
402 |
|
|
tree_->Branch("GeneratedEnergyStatus1",&fGeneratedEnergyStatus1,"GeneratedEnergyStatus1/F");
|
403 |
|
|
tree_->Branch("GeneratedEnergyStatus3",&fGeneratedEnergyStatus3,"GeneratedEnergyStatus3/F");
|
404 |
sixie |
1.7 |
tree_->Branch("EGammaNonTriggeringMVA",&fEGammaNonTriggeringMVA,"EGammaNonTriggeringMVA/F");
|
405 |
sixie |
1.2 |
|
406 |
|
|
|
407 |
|
|
}
|
408 |
|
|
|
409 |
|
|
// initialze a ElectronTree
|
410 |
|
|
void InitTree(){
|
411 |
|
|
assert(tree_);
|
412 |
|
|
// don't forget to set pointers to zero before you set address
|
413 |
|
|
// or you will fully appreciate that "ROOT sucks" :)
|
414 |
|
|
InitVariables();
|
415 |
|
|
//Set branch address
|
416 |
|
|
Int_t currentState = gErrorIgnoreLevel;
|
417 |
|
|
|
418 |
|
|
tree_->SetBranchAddress("weight",&fWeight);
|
419 |
|
|
tree_->SetBranchAddress("run",&fRunNumber);
|
420 |
|
|
tree_->SetBranchAddress("lumi",&fLumiSectionNumber);
|
421 |
|
|
tree_->SetBranchAddress("event",&fEventNumber);
|
422 |
|
|
tree_->SetBranchAddress("EventNumberParity",&fEleEventNumberParity);
|
423 |
|
|
tree_->SetBranchAddress("pt",&fElePt);
|
424 |
|
|
tree_->SetBranchAddress("eta",&fEleEta);
|
425 |
|
|
tree_->SetBranchAddress("phi",&fElePhi);
|
426 |
|
|
tree_->SetBranchAddress("scEt",&fEleSCEt);
|
427 |
|
|
tree_->SetBranchAddress("scEta",&fEleSCEta);
|
428 |
|
|
tree_->SetBranchAddress("scPhi",&fEleSCPhi);
|
429 |
|
|
tree_->SetBranchAddress("ecalenergy",&fEleEcalEnergy);
|
430 |
|
|
tree_->SetBranchAddress("ecaldriven",&fEleIsEcalDriven);
|
431 |
|
|
tree_->SetBranchAddress("triggerBit",&fEleTriggerBit);
|
432 |
|
|
tree_->SetBranchAddress("rho",&fRho);
|
433 |
|
|
tree_->SetBranchAddress("vertices",&fNVertices);
|
434 |
|
|
tree_->SetBranchAddress("d0",&fEleD0);
|
435 |
|
|
tree_->SetBranchAddress("dz",&fEleDZ);
|
436 |
|
|
tree_->SetBranchAddress("ip3d",&fEleIP3d);
|
437 |
|
|
tree_->SetBranchAddress("ip3ds",&fEleIP3dSig);
|
438 |
|
|
tree_->SetBranchAddress("matchConv",&fEleMatchedConversion);
|
439 |
|
|
tree_->SetBranchAddress("dcot",&fEleConvDCot);
|
440 |
|
|
tree_->SetBranchAddress("dist",&fEleConvDist);
|
441 |
|
|
tree_->SetBranchAddress("missHits",&fEleNMissHits);
|
442 |
|
|
tree_->SetBranchAddress("nbrems",&fEleNBrem);
|
443 |
|
|
tree_->SetBranchAddress("fbrem",&fEleFBrem);
|
444 |
|
|
tree_->SetBranchAddress("EoP",&fEleEOverP);
|
445 |
|
|
tree_->SetBranchAddress("EoPin",&fEleESeedClusterOverPIn);
|
446 |
|
|
tree_->SetBranchAddress("ESeedoPout",&fEleESeedClusterOverPout);
|
447 |
|
|
tree_->SetBranchAddress("EEleoPout",&fEleEEleClusterOverPout);
|
448 |
|
|
tree_->SetBranchAddress("IoEmIoP",&fEleOneOverEMinusOneOverP);
|
449 |
|
|
tree_->SetBranchAddress("deta",&fEleDEtaIn);
|
450 |
|
|
tree_->SetBranchAddress("dphi",&fEleDPhiIn);
|
451 |
|
|
tree_->SetBranchAddress("detacalo",&fEledEtaCalo);
|
452 |
|
|
tree_->SetBranchAddress("dphicalo",&fEledPhiCalo);
|
453 |
|
|
tree_->SetBranchAddress("see",&fEleSigmaIEtaIEta);
|
454 |
|
|
tree_->SetBranchAddress("spp",&fEleSigmaIPhiIPhi);
|
455 |
|
|
tree_->SetBranchAddress("sep",&fEleSigmaIEtaIPhi);
|
456 |
|
|
tree_->SetBranchAddress("etawidth",&fEleSCEtaWidth);
|
457 |
|
|
tree_->SetBranchAddress("phiwidth",&fEleSCPhiWidth);
|
458 |
|
|
tree_->SetBranchAddress("R9",&fEleR9);
|
459 |
|
|
tree_->SetBranchAddress("PreShowerOverRaw",&fElePreShowerOverRaw);
|
460 |
|
|
tree_->SetBranchAddress("HoE",&fEleHoverE);
|
461 |
|
|
tree_->SetBranchAddress("gsfchi2",&fEleGsfTrackChi2OverNdof);
|
462 |
|
|
tree_->SetBranchAddress("kfchi2",&fEleKFTrackChi2OverNDoF);
|
463 |
|
|
tree_->SetBranchAddress("kfhits",&fEleKFTrackNHits);
|
464 |
|
|
tree_->SetBranchAddress("kflayers",&fEleKFTrackNLayersWithMeasurement);
|
465 |
|
|
tree_->SetBranchAddress("OneMinusSeedE1x5OverE5x5",&fEleOneMinusSeedE1x5OverE5x5);
|
466 |
|
|
tree_->SetBranchAddress("PFMVA",&fElePFMVA);
|
467 |
|
|
tree_->SetBranchAddress("trkIso03",&fEleTrkIso03);
|
468 |
|
|
tree_->SetBranchAddress("ecalIso03",&fEleEMIso03);
|
469 |
|
|
tree_->SetBranchAddress("hcalIso03",&fEleHadIso03);
|
470 |
|
|
tree_->SetBranchAddress("trkIso04",&fEleTrkIso04);
|
471 |
|
|
tree_->SetBranchAddress("ecalIso04",&fEleEMIso04);
|
472 |
|
|
tree_->SetBranchAddress("hcalIso04",&fEleHadIso04);
|
473 |
|
|
tree_->SetBranchAddress("pfIso04",&fElePFIso04);
|
474 |
|
|
tree_->SetBranchAddress("ChargedIso_DR0p0To0p1",&fChargedIso_DR0p0To0p1);
|
475 |
|
|
tree_->SetBranchAddress("ChargedIso_DR0p1To0p2",&fChargedIso_DR0p1To0p2);
|
476 |
|
|
tree_->SetBranchAddress("ChargedIso_DR0p2To0p3",&fChargedIso_DR0p2To0p3);
|
477 |
|
|
tree_->SetBranchAddress("ChargedIso_DR0p3To0p4",&fChargedIso_DR0p3To0p4);
|
478 |
|
|
tree_->SetBranchAddress("ChargedIso_DR0p4To0p5",&fChargedIso_DR0p4To0p5);
|
479 |
|
|
tree_->SetBranchAddress("GammaIso_DR0p0To0p1",&fGammaIso_DR0p0To0p1);
|
480 |
|
|
tree_->SetBranchAddress("GammaIso_DR0p1To0p2",&fGammaIso_DR0p1To0p2);
|
481 |
|
|
tree_->SetBranchAddress("GammaIso_DR0p2To0p3",&fGammaIso_DR0p2To0p3);
|
482 |
|
|
tree_->SetBranchAddress("GammaIso_DR0p3To0p4",&fGammaIso_DR0p3To0p4);
|
483 |
|
|
tree_->SetBranchAddress("GammaIso_DR0p4To0p5",&fGammaIso_DR0p4To0p5);
|
484 |
|
|
tree_->SetBranchAddress("NeutralHadronIso_DR0p0To0p1",&fNeutralHadronIso_DR0p0To0p1);
|
485 |
|
|
tree_->SetBranchAddress("NeutralHadronIso_DR0p1To0p2",&fNeutralHadronIso_DR0p1To0p2);
|
486 |
|
|
tree_->SetBranchAddress("NeutralHadronIso_DR0p2To0p3",&fNeutralHadronIso_DR0p2To0p3);
|
487 |
|
|
tree_->SetBranchAddress("NeutralHadronIso_DR0p3To0p4",&fNeutralHadronIso_DR0p3To0p4);
|
488 |
|
|
tree_->SetBranchAddress("NeutralHadronIso_DR0p4To0p5",&fNeutralHadronIso_DR0p4To0p5);
|
489 |
|
|
tree_->SetBranchAddress("PassTriggerDenominator",&fElePassTriggerDenominator);
|
490 |
sixie |
1.3 |
tree_->SetBranchAddress("IsEB",&fIsEB);
|
491 |
|
|
tree_->SetBranchAddress("IsEE",&fIsEE);
|
492 |
|
|
tree_->SetBranchAddress("SCRawEnergy",&fSCRawEnergy);
|
493 |
|
|
tree_->SetBranchAddress("NClusters",&fNClusters);
|
494 |
|
|
tree_->SetBranchAddress("EtaSeed",&fEtaSeed);
|
495 |
|
|
tree_->SetBranchAddress("PhiSeed",&fPhiSeed);
|
496 |
|
|
tree_->SetBranchAddress("ESeed",&fESeed);
|
497 |
|
|
tree_->SetBranchAddress("E3x3Seed",&fE3x3Seed);
|
498 |
|
|
tree_->SetBranchAddress("E5x5Seed",&fE5x5Seed);
|
499 |
|
|
tree_->SetBranchAddress("EMaxSeed",&fEMaxSeed);
|
500 |
|
|
tree_->SetBranchAddress("E2ndSeed",&fE2ndSeed);
|
501 |
|
|
tree_->SetBranchAddress("ETopSeed",&fETopSeed);
|
502 |
|
|
tree_->SetBranchAddress("EBottomSeed",&fEBottomSeed);
|
503 |
|
|
tree_->SetBranchAddress("ELeftSeed",&fELeftSeed);
|
504 |
|
|
tree_->SetBranchAddress("ERightSeed",&fERightSeed);
|
505 |
|
|
tree_->SetBranchAddress("E2x5MaxSeed",&fE2x5MaxSeed);
|
506 |
|
|
tree_->SetBranchAddress("E2x5TopSeed",&fE2x5TopSeed);
|
507 |
|
|
tree_->SetBranchAddress("E2x5BottomSeed",&fE2x5BottomSeed);
|
508 |
|
|
tree_->SetBranchAddress("E2x5LeftSeed",&fE2x5LeftSeed);
|
509 |
|
|
tree_->SetBranchAddress("E2x5RightSeed",&fE2x5RightSeed);
|
510 |
|
|
tree_->SetBranchAddress("IEtaSeed",&fIEtaSeed);
|
511 |
|
|
tree_->SetBranchAddress("IPhiSeed",&fIPhiSeed);
|
512 |
|
|
tree_->SetBranchAddress("EtaCrySeed",&fEtaCrySeed);
|
513 |
|
|
tree_->SetBranchAddress("PhiCrySeed",&fPhiCrySeed);
|
514 |
sixie |
1.5 |
tree_->SetBranchAddress("ecalenergyerror",&fEcalEnergyError);
|
515 |
emanuele |
1.4 |
tree_->SetBranchAddress("pmodegsf",&fGsfTrackPIn);
|
516 |
sixie |
1.5 |
tree_->SetBranchAddress("perror",&fTrackMomentumError);
|
517 |
emanuele |
1.4 |
tree_->SetBranchAddress("pmeangsf",&fpmeankf);
|
518 |
|
|
tree_->SetBranchAddress("pmeankf",&fpmeankf);
|
519 |
sixie |
1.3 |
tree_->SetBranchAddress("Charge",&fCharge);
|
520 |
|
|
tree_->SetBranchAddress("GeneratedEnergy",&fGeneratedEnergy);
|
521 |
|
|
tree_->SetBranchAddress("GeneratedEnergyStatus1",&fGeneratedEnergyStatus1);
|
522 |
|
|
tree_->SetBranchAddress("GeneratedEnergyStatus3",&fGeneratedEnergyStatus3);
|
523 |
sixie |
1.7 |
tree_->SetBranchAddress("EGammaNonTriggeringMVA",&fEGammaNonTriggeringMVA);
|
524 |
sixie |
1.1 |
|
525 |
sixie |
1.2 |
gErrorIgnoreLevel = currentState;
|
526 |
|
|
}
|
527 |
sixie |
1.1 |
|
528 |
sixie |
1.2 |
};
|
529 |
sixie |
1.1 |
|
530 |
sixie |
1.2 |
}
|
531 |
sixie |
1.1 |
|
532 |
|
|
#endif
|