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