12 |
|
|
13 |
|
#define analysisClass_cxx |
14 |
|
#include "analysisClass.h" |
15 |
+ |
|
16 |
|
#include <TH2.h> |
17 |
|
#include <TF2.h> |
18 |
|
#include <TH1F.h> |
38 |
|
std::cout << "analysisClass::~analysisClass(): ends " << std::endl; |
39 |
|
} |
40 |
|
|
41 |
+ |
|
42 |
+ |
|
43 |
+ |
|
44 |
|
void filler(myEvent electrons, TH1D *pt, TH1D *eta, TH1D *phi, TH1D *met, TH1D *charge, |
45 |
|
TH1D *deltaPhi, TH1D *deltaEta, TH1D *oneOverEminusOneOverP, TH1D *transMass, |
46 |
|
TH1D *ethIso, TH1D *trkIso, TH1D *ecalIso, TH1D *hcalIso, TH1D* HoverE, |
47 |
|
TH1D *sigmaIetaIeta, TH1D *numberOfMissingInnerHits |
48 |
|
) |
49 |
+ |
|
50 |
|
{ |
46 |
– |
// pt->Fill(electrons.fourvector[0].Pt()); |
51 |
|
pt->Fill(electrons.momentum[0]); |
52 |
|
eta->Fill(electrons.fourvector[0].Eta()); |
53 |
|
phi->Fill(electrons.fourvector[0].Phi()); |
80 |
|
} |
81 |
|
} |
82 |
|
|
79 |
– |
float detaCorrections(float etaEle,float phiEle) |
80 |
– |
{ |
81 |
– |
TF2 f12_fit2("f12_fit2","[0]+(TMath::TanH(y)/325.)*([1]-([2]*TMath::SinH(y)*TMath::Cos(x-[3])))",-TMath::Pi(),TMath::Pi(),-10.,10.); |
82 |
– |
|
83 |
– |
if (etaEle>1.479) |
84 |
– |
{ |
85 |
– |
f12_fit2.SetParameter(0,0.0013); |
86 |
– |
f12_fit2.SetParameter(1,-0.06); |
87 |
– |
f12_fit2.SetParameter(2,0.52); |
88 |
– |
f12_fit2.SetParameter(3,2.17); |
89 |
– |
} |
90 |
– |
else if (etaEle<-1.479) |
91 |
– |
{ |
92 |
– |
f12_fit2.SetParameter(0,-0.0013); |
93 |
– |
f12_fit2.SetParameter(1,-0.32); |
94 |
– |
f12_fit2.SetParameter(2,0.45); |
95 |
– |
f12_fit2.SetParameter(3,-1.58); |
96 |
– |
} |
97 |
– |
return f12_fit2.Eval(phiEle,etaEle); |
98 |
– |
} |
83 |
|
|
100 |
– |
float dphiCorrections(float etaEle,float phiEle) |
101 |
– |
{ |
102 |
– |
TF2 f12_fit2("f12_fit2","[0]+[1]*(TMath::SinH(y)/325.)*(TMath::Sin([2]-x))",-TMath::Pi(),TMath::Pi(),-10.,10.); |
103 |
– |
|
104 |
– |
if (etaEle>1.479) |
105 |
– |
{ |
106 |
– |
f12_fit2.SetParameter(0,0.0); |
107 |
– |
f12_fit2.SetParameter(1,0.52); |
108 |
– |
f12_fit2.SetParameter(2,2.17); |
109 |
– |
} |
110 |
– |
else if (etaEle<-1.479) |
111 |
– |
{ |
112 |
– |
f12_fit2.FixParameter(0,0.0); |
113 |
– |
f12_fit2.FixParameter(1,0.45); |
114 |
– |
f12_fit2.FixParameter(2,-1.58); |
115 |
– |
} |
116 |
– |
return f12_fit2.Eval(phiEle,etaEle); |
117 |
– |
} |
84 |
|
|
85 |
|
void analysisClass::Loop() |
86 |
|
{ |
88 |
|
|
89 |
|
if (fChain == 0) return; |
90 |
|
|
91 |
< |
int workingPoint = 80; |
91 |
> |
|
92 |
> |
//getHLTtable(); |
93 |
> |
|
94 |
> |
|
95 |
> |
double PtCorrection = 1.; |
96 |
> |
|
97 |
> |
|
98 |
> |
int counterSize=15; |
99 |
> |
int* counter = new int[counterSize]; |
100 |
> |
memset(counter,0,counterSize*sizeof(int)); |
101 |
> |
|
102 |
> |
int cNa = 0; |
103 |
> |
int cNb = 0; |
104 |
> |
|
105 |
> |
FILE *out=fopen("out.txt","w"); |
106 |
> |
FILE *out_Z=fopen("out_z.txt","w"); |
107 |
> |
fprintf(out_Z,"Run \tEvent \tLS \tDiLeptonMass \tPt_1 \tPt2 \tEta_1 \tEta_2 \tDiLeptonPt \tsumJetPt \n"); |
108 |
> |
|
109 |
> |
|
110 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
111 |
> |
// Analysis input parameters |
112 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
113 |
> |
int workingPoint = 95; // -1 takes hard coded values (which are the old robust tight values...) |
114 |
> |
double sampleSize=-1; |
115 |
|
|
116 |
|
bool isdata=false; |
117 |
|
bool printInfo=false; |
118 |
|
bool noInnerHitInfo=false; |
130 |
– |
bool writeBasicPlots=false; |
119 |
|
bool writeIdPlots=true; |
120 |
|
bool writeN1Plots=true; |
121 |
< |
bool writeWenuPlots=false; |
122 |
< |
bool normalize=false; |
123 |
< |
bool applyDeltaCorrection=true; |
121 |
> |
bool writeWenuPlots=true; |
122 |
> |
bool applyDeltaCorrection=false; |
123 |
> |
bool applyJetVeto=false; |
124 |
> |
|
125 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
126 |
> |
|
127 |
> |
double Pi=2*acos(0); // pi=3.14159... |
128 |
> |
double ptMin=20; |
129 |
> |
double jetEtaMax=2.5; |
130 |
> |
double jetPtMin=30.; |
131 |
> |
double deltaRMax=0.3; // delta R for jet veto |
132 |
> |
|
133 |
> |
|
134 |
> |
int MAXE=41; |
135 |
|
|
136 |
|
double totalNumberOfEvents=0; |
137 |
|
vector<double> WorkingPointCuts; |
138 |
+ |
vector<double> EthCuts; |
139 |
+ |
|
140 |
+ |
vector<int> electronIndex; |
141 |
+ |
vector<int> jetIndex; |
142 |
+ |
|
143 |
+ |
|
144 |
+ |
// -------------------------------------------------------------------------------------------------------------------- |
145 |
+ |
// tag and probe counters |
146 |
+ |
// -------------------------------------------------------------------------------------------------------------------- |
147 |
+ |
int N_tt=0; |
148 |
+ |
int N_t0=0; |
149 |
|
|
150 |
+ |
|
151 |
+ |
// -------------------------------------------------------------------------------------------------------------------- |
152 |
+ |
// Electron Cuts |
153 |
+ |
// -------------------------------------------------------------------------------------------------------------------- |
154 |
+ |
|
155 |
+ |
// Geometry |
156 |
+ |
double etaBarrelMax=1.44; |
157 |
+ |
double etaEndcapMin=1.56; |
158 |
+ |
double etaEndcapMax=2.5; |
159 |
+ |
// Preselection |
160 |
+ |
double Pre_HoverEMin=0.15; |
161 |
+ |
double Pre_deltaEtaMax=0.02; |
162 |
+ |
double Pre_deltaPhiMax=0.15; |
163 |
+ |
double Pre_pt=20.; |
164 |
+ |
// ETH ID |
165 |
+ |
double ETH_oneOverEminusOneOverP_B=0.005; |
166 |
+ |
double ETH_deltaEtaMax_B=0.004; |
167 |
+ |
double ETH_deltaPhiMax_B=0.02; |
168 |
+ |
double ETH_iso_B=0.1; |
169 |
+ |
int ETH_missingHits_B=1; |
170 |
+ |
double ETH_oneOverEminusOneOverP_E=0.007; |
171 |
+ |
double ETH_deltaEtaMax_E=0.006; |
172 |
+ |
double ETH_deltaPhiMax_E=0.02; |
173 |
+ |
double ETH_iso_E=0.1; |
174 |
+ |
int ETH_missingHits_E=1; |
175 |
+ |
|
176 |
+ |
// double Rob_HoverE_B=0.0201; |
177 |
+ |
// double Rob_SigmaIetaIeta_B=0.0102; |
178 |
+ |
// double Rob_deltaPhi_B=0.0211; |
179 |
+ |
// double Rob_deltaEta_B=0.00606; |
180 |
+ |
// double Rob_trkIso_B=2.34; |
181 |
+ |
// double Rob_ecalIso_B=3.24; |
182 |
+ |
// double Rob_hcalIso_B=4.51; |
183 |
+ |
// double Rob_combIso_B=0.; |
184 |
+ |
// int Rob_missingHits_B=1; |
185 |
+ |
|
186 |
+ |
// double Rob_HoverE_E=0.00253; |
187 |
+ |
// double Rob_SigmaIetaIeta_E=0.0291; |
188 |
+ |
// double Rob_deltaPhi_E=0.022; |
189 |
+ |
// double Rob_deltaEta_E=0.0032; |
190 |
+ |
// double Rob_trkIso_E=0.826; |
191 |
+ |
// double Rob_ecalIso_E=2.7; |
192 |
+ |
// double Rob_hcalIso_E=0.255; |
193 |
+ |
// double Rob_combIso_E=0.; |
194 |
+ |
// int Rob_missingHits_E=1; |
195 |
+ |
// double Rob_dist_E=0.02; |
196 |
+ |
// double Rob_cot_E=0.02; |
197 |
+ |
|
198 |
|
int debug=0; |
199 |
|
|
200 |
+ |
|
201 |
+ |
|
202 |
+ |
// fill the eth cuts vector |
203 |
+ |
EthCuts.push_back(ETH_deltaPhiMax_B); |
204 |
+ |
EthCuts.push_back(ETH_deltaEtaMax_B); |
205 |
+ |
EthCuts.push_back(ETH_oneOverEminusOneOverP_B); |
206 |
+ |
EthCuts.push_back(ETH_iso_B); |
207 |
+ |
EthCuts.push_back(ETH_missingHits_B); |
208 |
+ |
EthCuts.push_back(ETH_deltaPhiMax_E); |
209 |
+ |
EthCuts.push_back(ETH_deltaEtaMax_E); |
210 |
+ |
EthCuts.push_back(ETH_oneOverEminusOneOverP_E); |
211 |
+ |
EthCuts.push_back(ETH_iso_E); |
212 |
+ |
EthCuts.push_back(ETH_missingHits_E); |
213 |
+ |
|
214 |
+ |
|
215 |
+ |
|
216 |
+ |
|
217 |
|
// -------------------------------------------------------------------------------------------------------------------- |
218 |
|
// read the cut values from include/workingPoints.txt |
219 |
|
// -------------------------------------------------------------------------------------------------------------------- |
220 |
+ |
|
221 |
+ |
// check if it is a possible working point |
222 |
+ |
if(workingPoint>0 && ( |
223 |
+ |
workingPoint!=60 && |
224 |
+ |
workingPoint!=70 && |
225 |
+ |
workingPoint!=80 && |
226 |
+ |
workingPoint!=85 && |
227 |
+ |
workingPoint!=90 && |
228 |
+ |
workingPoint!=95 ) |
229 |
+ |
) { |
230 |
+ |
cerr<<"ERROR: "<<workingPoint<<" is NOT a valid working point!!!"<<endl; |
231 |
+ |
exit(0); |
232 |
+ |
} |
233 |
+ |
// read the file |
234 |
|
if(workingPoint>0) { |
235 |
|
const char *file="include/workingPoints.txt"; |
236 |
|
cout<<"Opening file: "<<file<<"..."<<endl; |
255 |
|
string line; |
256 |
|
float value; |
257 |
|
char name[100]; |
258 |
< |
cout<<"Reading input file"<<endl; |
258 |
> |
//cout<<"Reading working point input file"<<endl; |
259 |
|
while(!toread.eof()) { |
260 |
|
getline (toread, line); |
261 |
|
|
262 |
|
if(line.substr(0,1)=="#") continue; |
263 |
< |
cout<<line<<endl; |
263 |
> |
//cout<<line<<endl; |
264 |
|
|
265 |
|
char wp[20]; |
266 |
< |
float v0, v1, v2, v3, v4, v5, v6, v7; |
267 |
< |
sscanf (line.c_str(), "%s\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f", wp, &v0, &v1, &v2, &v3, &v4, &v5, &v6, &v7); |
266 |
> |
float v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10; |
267 |
> |
sscanf (line.c_str(), "%s\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%f", wp, &v0, &v1, &v2, &v3, &v4, &v5, &v6, &v7, &v8, &v9, &v10); |
268 |
|
// barrel values |
269 |
|
if(!strcmp(wp, wpB)) { |
270 |
< |
WorkingPointCuts.push_back(v0); |
271 |
< |
WorkingPointCuts.push_back(v1); |
272 |
< |
WorkingPointCuts.push_back(v2); |
273 |
< |
WorkingPointCuts.push_back(v3); |
274 |
< |
WorkingPointCuts.push_back(v4); |
275 |
< |
WorkingPointCuts.push_back(v5); |
276 |
< |
WorkingPointCuts.push_back(v6); |
277 |
< |
WorkingPointCuts.push_back(2); |
270 |
> |
WorkingPointCuts.push_back(v0); // 0 see |
271 |
> |
WorkingPointCuts.push_back(v1); // 1 dphi |
272 |
> |
WorkingPointCuts.push_back(v2); // 2 deta |
273 |
> |
WorkingPointCuts.push_back(v3); // 3 hoe |
274 |
> |
WorkingPointCuts.push_back(v4); // 4 tkIso |
275 |
> |
WorkingPointCuts.push_back(v5); // 5 ecalIso |
276 |
> |
WorkingPointCuts.push_back(v6); // 6 hcalIso |
277 |
> |
WorkingPointCuts.push_back(v7); // 7 combIso |
278 |
|
} |
279 |
|
// endcap values |
280 |
|
if(!strcmp(wp, wpE)) { |
281 |
< |
WorkingPointCuts.push_back(v0); |
282 |
< |
WorkingPointCuts.push_back(v1); |
283 |
< |
WorkingPointCuts.push_back(v2); |
284 |
< |
WorkingPointCuts.push_back(v3); |
285 |
< |
WorkingPointCuts.push_back(v4); |
286 |
< |
WorkingPointCuts.push_back(v5); |
287 |
< |
WorkingPointCuts.push_back(v6); |
288 |
< |
WorkingPointCuts.push_back(2); |
281 |
> |
WorkingPointCuts.push_back(v0); // 8 see |
282 |
> |
WorkingPointCuts.push_back(v1); // 9 dphi |
283 |
> |
WorkingPointCuts.push_back(v2); // 10 deta |
284 |
> |
WorkingPointCuts.push_back(v3); // 11 hoe |
285 |
> |
WorkingPointCuts.push_back(v4); // 12 tkIso |
286 |
> |
WorkingPointCuts.push_back(v5); // 13 ecalIso |
287 |
> |
WorkingPointCuts.push_back(v6); // 14 hcalIso |
288 |
> |
WorkingPointCuts.push_back(v7); // 15 combIso |
289 |
> |
WorkingPointCuts.push_back(v8); // 16 hits |
290 |
> |
WorkingPointCuts.push_back(v9); // 17 dist |
291 |
|
} |
292 |
|
|
293 |
|
} // read line |
294 |
|
} // read file |
295 |
< |
} |
205 |
< |
|
206 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
207 |
< |
// Electron Cuts |
208 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
295 |
> |
} // get working points |
296 |
|
|
297 |
< |
// Geometry |
298 |
< |
double etaBarrelMax=1.44; |
299 |
< |
double etaEndcapMax=2.6; |
300 |
< |
// Preselection |
301 |
< |
double Pre_HoverEMin=0.15; |
302 |
< |
double Pre_deltaEtaMax=0.02; |
216 |
< |
double Pre_deltaPhiMax=0.15; |
217 |
< |
double Pre_pt=20.; |
218 |
< |
// ETH ID |
219 |
< |
double ETH_oneOverEminusOneOverP_B=0.005; |
220 |
< |
double ETH_deltaEtaMax_B=0.004; |
221 |
< |
double ETH_deltaPhiMax_B=0.02; |
222 |
< |
double ETH_iso_B=0.1; |
223 |
< |
double ETH_oneOverEminusOneOverP_E=0.007; |
224 |
< |
double ETH_deltaEtaMax_E=0.006; |
225 |
< |
double ETH_deltaPhiMax_E=0.02; |
226 |
< |
double ETH_iso_E=0.1; |
297 |
> |
cout<<WorkingPointCuts[4]<<endl; |
298 |
> |
cout<<WorkingPointCuts[5]<<endl; |
299 |
> |
cout<<WorkingPointCuts[6]<<endl; |
300 |
> |
cout<<WorkingPointCuts[7]<<endl; |
301 |
> |
cout<<WorkingPointCuts[8]<<endl; |
302 |
> |
cout<<WorkingPointCuts[9]<<endl; |
303 |
|
|
228 |
– |
double Rob_HoverE_B; |
229 |
– |
double Rob_SigmaIetaIeta_B; |
230 |
– |
double Rob_deltaPhi_B; |
231 |
– |
double Rob_deltaEta_B; |
232 |
– |
double Rob_trkIso_B; |
233 |
– |
double Rob_ecalIso_B; |
234 |
– |
double Rob_hcalIso_B; |
235 |
– |
|
236 |
– |
double Rob_HoverE_E; |
237 |
– |
double Rob_SigmaIetaIeta_E; |
238 |
– |
double Rob_deltaPhi_E; |
239 |
– |
double Rob_deltaEta_E; |
240 |
– |
double Rob_trkIso_E; |
241 |
– |
double Rob_ecalIso_E; |
242 |
– |
double Rob_hcalIso_E; |
304 |
|
|
305 |
|
// Robust ID |
306 |
|
|
307 |
< |
if(workingPoint==-1) { |
308 |
< |
Rob_HoverE_B=0.0201; |
309 |
< |
Rob_SigmaIetaIeta_B=0.0102; |
310 |
< |
Rob_deltaPhi_B=0.0211; |
311 |
< |
Rob_deltaEta_B=0.00606; |
312 |
< |
Rob_trkIso_B=2.34; |
313 |
< |
Rob_ecalIso_B=3.24; |
314 |
< |
Rob_hcalIso_B=4.51; |
315 |
< |
|
316 |
< |
Rob_HoverE_E=0.00253; |
317 |
< |
Rob_SigmaIetaIeta_E=0.0291; |
318 |
< |
Rob_deltaPhi_E=0.022; |
319 |
< |
Rob_deltaEta_E=0.0032; |
320 |
< |
Rob_trkIso_E=0.826; |
321 |
< |
Rob_ecalIso_E=2.7; |
322 |
< |
Rob_hcalIso_E=0.255; |
323 |
< |
|
324 |
< |
WorkingPointCuts.push_back(Rob_SigmaIetaIeta_B); |
325 |
< |
WorkingPointCuts.push_back(Rob_deltaPhi_B); |
326 |
< |
WorkingPointCuts.push_back(Rob_deltaEta_B); |
327 |
< |
WorkingPointCuts.push_back(Rob_HoverE_B); |
328 |
< |
WorkingPointCuts.push_back(Rob_trkIso_B); |
329 |
< |
WorkingPointCuts.push_back(Rob_ecalIso_B); |
330 |
< |
WorkingPointCuts.push_back(Rob_hcalIso_B); |
331 |
< |
WorkingPointCuts.push_back(2); |
332 |
< |
WorkingPointCuts.push_back(Rob_SigmaIetaIeta_E); |
333 |
< |
WorkingPointCuts.push_back(Rob_deltaPhi_E); |
334 |
< |
WorkingPointCuts.push_back(Rob_deltaEta_E); |
335 |
< |
WorkingPointCuts.push_back(Rob_HoverE_E); |
336 |
< |
WorkingPointCuts.push_back(Rob_trkIso_E); |
337 |
< |
WorkingPointCuts.push_back(Rob_ecalIso_E); |
277 |
< |
WorkingPointCuts.push_back(Rob_hcalIso_E); |
278 |
< |
WorkingPointCuts.push_back(2); |
279 |
< |
// WorkingPointCuts.push_back(); |
280 |
< |
// WorkingPointCuts.push_back(); |
281 |
< |
} |
282 |
< |
|
283 |
< |
if(workingPoint>0) { |
284 |
< |
Rob_SigmaIetaIeta_B=WorkingPointCuts[0]; |
285 |
< |
Rob_deltaPhi_B=WorkingPointCuts[1]; |
286 |
< |
Rob_deltaEta_B=WorkingPointCuts[2]; |
287 |
< |
Rob_HoverE_B=WorkingPointCuts[3]; |
288 |
< |
Rob_trkIso_B=WorkingPointCuts[4]; |
289 |
< |
Rob_ecalIso_B=WorkingPointCuts[5]; |
290 |
< |
Rob_hcalIso_B=WorkingPointCuts[6]; |
307 |
> |
// if(workingPoint==-1) { |
308 |
> |
// WorkingPointCuts.push_back(Rob_SigmaIetaIeta_B); |
309 |
> |
// WorkingPointCuts.push_back(Rob_deltaPhi_B); |
310 |
> |
// WorkingPointCuts.push_back(Rob_deltaEta_B); |
311 |
> |
// WorkingPointCuts.push_back(Rob_HoverE_B); |
312 |
> |
// WorkingPointCuts.push_back(Rob_trkIso_B); |
313 |
> |
// WorkingPointCuts.push_back(Rob_ecalIso_B); |
314 |
> |
// WorkingPointCuts.push_back(Rob_hcalIso_B); |
315 |
> |
// WorkingPointCuts.push_back(Rob_missingHits_B); |
316 |
> |
// WorkingPointCuts.push_back(Rob_SigmaIetaIeta_E); |
317 |
> |
// WorkingPointCuts.push_back(Rob_deltaPhi_E); |
318 |
> |
// WorkingPointCuts.push_back(Rob_deltaEta_E); |
319 |
> |
// WorkingPointCuts.push_back(Rob_HoverE_E); |
320 |
> |
// WorkingPointCuts.push_back(Rob_trkIso_E); |
321 |
> |
// WorkingPointCuts.push_back(Rob_ecalIso_E); |
322 |
> |
// WorkingPointCuts.push_back(Rob_hcalIso_E); |
323 |
> |
// WorkingPointCuts.push_back(Rob_missingHits_E); |
324 |
> |
// WorkingPointCuts.push_back(Rob_dist_E); |
325 |
> |
// WorkingPointCuts.push_back(Rob_cot_E); |
326 |
> |
// } |
327 |
> |
|
328 |
> |
// if(workingPoint>0) { |
329 |
> |
// Rob_SigmaIetaIeta_B=WorkingPointCuts[0]; |
330 |
> |
// Rob_deltaPhi_B=WorkingPointCuts[1]; |
331 |
> |
// Rob_deltaEta_B=WorkingPointCuts[2]; |
332 |
> |
// Rob_HoverE_B=WorkingPointCuts[3]; |
333 |
> |
// Rob_trkIso_B=WorkingPointCuts[4]; |
334 |
> |
// Rob_ecalIso_B=WorkingPointCuts[5]; |
335 |
> |
// Rob_hcalIso_B=WorkingPointCuts[6]; |
336 |
> |
// Rob_combIso_B=WorkingPointCuts[7]; |
337 |
> |
// Rob_missingHits_B=WorkingPointCuts[16]; |
338 |
|
|
339 |
< |
Rob_SigmaIetaIeta_E=WorkingPointCuts[8]; |
340 |
< |
Rob_deltaPhi_E=WorkingPointCuts[9]; |
341 |
< |
Rob_deltaEta_E=WorkingPointCuts[10]; |
342 |
< |
Rob_HoverE_E=WorkingPointCuts[11]; |
343 |
< |
Rob_trkIso_E=WorkingPointCuts[12]; |
344 |
< |
Rob_ecalIso_E=WorkingPointCuts[13]; |
345 |
< |
Rob_hcalIso_E=WorkingPointCuts[14]; |
346 |
< |
} |
347 |
< |
|
348 |
< |
for(int i=0; i< WorkingPointCuts.size();i++) { |
349 |
< |
cout<<WorkingPointCuts[i]<<endl; |
339 |
> |
// Rob_SigmaIetaIeta_E=WorkingPointCuts[8]; |
340 |
> |
// Rob_deltaPhi_E=WorkingPointCuts[9]; |
341 |
> |
// Rob_deltaEta_E=WorkingPointCuts[10]; |
342 |
> |
// Rob_HoverE_E=WorkingPointCuts[11]; |
343 |
> |
// Rob_trkIso_E=WorkingPointCuts[12]; |
344 |
> |
// Rob_ecalIso_E=WorkingPointCuts[13]; |
345 |
> |
// Rob_hcalIso_E=WorkingPointCuts[14]; |
346 |
> |
// Rob_combIso_E=WorkingPointCuts[15]; |
347 |
> |
// Rob_missingHits_E=WorkingPointCuts[16]; |
348 |
> |
// Rob_dist_E=WorkingPointCuts[17]; |
349 |
> |
// Rob_cot_E=WorkingPointCuts[17]; |
350 |
> |
// } |
351 |
> |
|
352 |
> |
cout<<"Running the analysis with working point "<<workingPoint<<endl; |
353 |
> |
cout<<"Value for barrel / endcap"<<endl; |
354 |
> |
char *cutName[8] = {"sigmaIetaIeta", "delta phi at vtx", "delta eta at vtx", "H/E", "trkIso", "ecalIso", "hcalIso", "# inner hits"}; |
355 |
> |
for(int i=0; i< 8;i++) { |
356 |
> |
cout<<cutName[i]<<" < "<<WorkingPointCuts[i]<<" / "<<WorkingPointCuts[8+i]<<endl; |
357 |
|
} |
358 |
|
|
359 |
|
// -------------------------------------------------------------------------------------------------------------------- |
360 |
|
|
361 |
|
|
362 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
363 |
< |
// define some counters |
364 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
365 |
< |
int c_robust_B=0; |
366 |
< |
int c_robust_E=0; |
367 |
< |
int c_robust_tree=0; |
368 |
< |
int c_eth_1=0; |
369 |
< |
int c_eth_2=0; |
370 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
371 |
< |
|
372 |
< |
|
373 |
< |
|
374 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
321 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
322 |
< |
double lumi=6710; |
323 |
< |
double xsec=235500000.0; |
324 |
< |
double sampleSize=-1; |
325 |
< |
// double sampleSize=615; // Wenu |
326 |
< |
|
327 |
< |
// double sampleSize=171915; // QCD_EMEnriched_Pt20to30 |
328 |
< |
// double sampleSize=349870; // QCD_EMEnriched_Pt30to80 |
329 |
< |
// double sampleSize=13408; // QCD_EMEnriched_Pt80to170 |
330 |
< |
|
331 |
< |
// double sampleSize=11470; // PhotonJet_Pt15to20 |
332 |
< |
// double sampleSize=5718; // /PhotonJet_Pt20to30 |
333 |
< |
// double sampleSize=2007 ; // PhotonJet_Pt30 |
334 |
< |
|
335 |
< |
// double sampleSize= |
336 |
< |
// double sampleSize=10833; // QCD_BCtoE_Pt20to30 |
337 |
< |
// double sampleSize=13876; // QCD_BCtoE_Pt30to80 |
338 |
< |
// double sampleSize=942; // QCD_BCtoE_Pt80to170 |
339 |
< |
|
340 |
< |
// double sampleSize=790; // Wtaunu |
341 |
< |
// double sampleSize=130; // Zee |
342 |
< |
// double sampleSize=9; // TTbar |
343 |
< |
// double sampleSize= |
344 |
< |
|
345 |
< |
|
346 |
< |
|
347 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
348 |
< |
|
349 |
< |
|
350 |
< |
|
351 |
< |
double Pi=2*acos(0); |
352 |
< |
|
353 |
< |
|
354 |
< |
int counterTight=0; |
355 |
< |
int counterETH=0; |
356 |
< |
|
357 |
< |
double ptMin=20; |
358 |
< |
|
359 |
< |
double jetEtaMax=2.5; |
360 |
< |
double jetPtMin=30.; |
361 |
< |
double deltaRMax=0.3; |
362 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
363 |
> |
// define some counters |
364 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
365 |
> |
int c_robust_B=0; |
366 |
> |
int c_robust_E=0; |
367 |
> |
int c_robust_tree=0; |
368 |
> |
int c_eth_1=0; |
369 |
> |
int c_eth_2=0; |
370 |
> |
int counterTight=0; |
371 |
> |
int counterETH=0; |
372 |
> |
|
373 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
374 |
> |
|
375 |
|
|
376 |
|
|
377 |
< |
int MAXE=38; |
377 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
378 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
379 |
> |
// double lumi=6710; |
380 |
> |
// double xsec=235500000.0; |
381 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
382 |
|
|
383 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
384 |
< |
// choose which cut should be applyed |
385 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
383 |
> |
|
384 |
> |
|
385 |
> |
|
386 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
387 |
> |
// choose which cut should be applied |
388 |
> |
// this is only used for the sequential plots |
389 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
390 |
|
bool applyCut [] = {true, // 0: not used... |
391 |
|
true, // 1: Preselection, H/E |
392 |
|
true, // 2: Preselection, delta phi |
393 |
|
true, // 3: Preselection, delta eta |
394 |
|
true, // 4: Preselection, pt |
395 |
< |
false, // 5: Trigger |
395 |
> |
true, // 5: Trigger |
396 |
|
true, // 6: ETH Barrel only (flag can not be changed, cut is always applyed) |
397 |
|
true, // 7: ETH Barrel, ECAL driven |
398 |
|
true, // 8: ETH Barrel, |1/E-1/p| |
407 |
|
true, //17: ETH Endcap, delta phi |
408 |
|
true, //18: ETH Endcap, isolation |
409 |
|
true, //19: ETH Endcap, conversions |
410 |
< |
true, //20: Robust Barrel, |
411 |
< |
true, //21: Robust Barrel, H/E |
412 |
< |
true, //22: Robust Barrel, sigma ieta ieta |
413 |
< |
true, //23: Robust Barrel, delta phi |
414 |
< |
true, //24: Robust Barrel, delta eta |
415 |
< |
true, //25: Robust Barrel, track iso |
416 |
< |
true, //26: Robust Barrel, ecal iso |
417 |
< |
true, //27: Robust Barrel, hcal iso |
418 |
< |
false, //28: Robust Barrel, conversions |
419 |
< |
true, //29: Robust Endcap, |
420 |
< |
true, //30: Robust Endcap, H/E |
421 |
< |
true, //31: Robust Endcap, sigma ieta ieta |
422 |
< |
true, //32: Robust Endcap, delta phi |
423 |
< |
true, //33: Robust Endcap, delta eta |
424 |
< |
true, //34: Robust Endcap, track iso |
425 |
< |
true, //35: Robust Endcap, ecal iso |
426 |
< |
true, //36: Robust Endcap, hcal iso |
427 |
< |
false //37: Robust Endcap, conversions |
410 |
> |
// true, //20: Robust Barrel, |
411 |
> |
// true, //21: Robust Barrel, H/E |
412 |
> |
// true, //22: Robust Barrel, sigma ieta ieta |
413 |
> |
// true, //23: Robust Barrel, delta phi |
414 |
> |
// true, //24: Robust Barrel, delta eta |
415 |
> |
// true, //25: Robust Barrel, track iso |
416 |
> |
// true, //26: Robust Barrel, ecal iso |
417 |
> |
// true, //27: Robust Barrel, hcal iso |
418 |
> |
// true, //28: Robust Barrel, conversions |
419 |
> |
// true, //29: Robust Endcap, |
420 |
> |
// true, //30: Robust Endcap, H/E |
421 |
> |
// true, //31: Robust Endcap, sigma ieta ieta |
422 |
> |
// true, //32: Robust Endcap, delta phi |
423 |
> |
// true, //33: Robust Endcap, delta eta |
424 |
> |
// true, //34: Robust Endcap, track iso |
425 |
> |
// true, //35: Robust Endcap, ecal iso |
426 |
> |
// true, //36: Robust Endcap, hcal iso |
427 |
> |
// true //37: Robust Endcap, conversions |
428 |
|
}; |
429 |
|
|
430 |
|
//} |
433 |
|
|
434 |
|
// -------------------------------------------------------------------------------------------------------------------- |
435 |
|
// number of events |
436 |
+ |
// this histogram is filled for normalization purposes i.e. to keep track of the MC sample sizes |
437 |
|
// -------------------------------------------------------------------------------------------------------------------- |
438 |
|
TH1I *h_numberOfEvents; |
439 |
|
h_numberOfEvents=new TH1I("numberOfEvents", "numberOfEvents", 1, -0.01, 1.01); |
462 |
|
TH1D *hs_El_ElTrkIso[MAXE]; |
463 |
|
TH1D *hs_El_ElEcalIso[MAXE]; |
464 |
|
TH1D *hs_El_ElHcalIso[MAXE]; |
465 |
+ |
TH1D *hs_El_ElCombIso[MAXE]; |
466 |
|
TH1D *hs_El_ElHoverE[MAXE]; |
467 |
|
TH1D *hs_El_ElSigmaIetaIeta[MAXE]; |
468 |
|
TH1D *hs_El_ElNumberOfMissingInnerHits[MAXE]; |
472 |
|
hs_El_ElPt[i]->SetXTitle("p_{T} [GeV]"); |
473 |
|
hs_El_ElPt[i]->SetYTitle("events / bin"); |
474 |
|
sprintf(name,"s_El_ElEta_%d",i); |
475 |
< |
hs_El_ElEta[i]=new TH1D(name, name, 30, -5., 5.); |
475 |
> |
hs_El_ElEta[i]=new TH1D(name, name, 10, -2.5, 2.5); |
476 |
|
hs_El_ElEta[i]->SetXTitle("#eta"); |
477 |
|
hs_El_ElEta[i]->SetYTitle("events / bin"); |
478 |
|
sprintf(name,"s_El_ElPhi_%d",i); |
479 |
< |
hs_El_ElPhi[i]=new TH1D(name, name, 30, -Pi,Pi); |
479 |
> |
hs_El_ElPhi[i]=new TH1D(name, name, 15, -Pi,Pi); |
480 |
|
hs_El_ElPhi[i]->SetXTitle("#phi"); |
481 |
|
hs_El_ElPhi[i]->SetYTitle("events / bin"); |
482 |
|
sprintf(name,"s_El_ElDeltaPhi_%d",i); |
483 |
< |
hs_El_ElDeltaPhi[i]=new TH1D(name, name, 15, -0.0001, 0.05001); |
483 |
> |
hs_El_ElDeltaPhi[i]=new TH1D(name, name, 30, -0.05001, 0.05001); |
484 |
|
hs_El_ElDeltaPhi[i]->SetXTitle("#Delta #phi"); |
485 |
|
hs_El_ElDeltaPhi[i]->SetYTitle("events / bin"); |
486 |
|
sprintf(name,"s_El_ElDeltaEta_%d",i); |
487 |
< |
hs_El_ElDeltaEta[i]=new TH1D(name, name, 15, -0.0001, 0.05001); |
487 |
> |
hs_El_ElDeltaEta[i]=new TH1D(name, name, 30, -0.05001, 0.05001); |
488 |
|
hs_El_ElDeltaEta[i]->SetXTitle("#Delta #eta"); |
489 |
|
hs_El_ElDeltaEta[i]->SetYTitle("events / bin"); |
490 |
|
sprintf(name,"s_El_ElMet_%d",i); |
526 |
|
hs_El_ElHcalIso[i]=new TH1D(name, name, 20, -0.01, 10.); |
527 |
|
hs_El_ElHcalIso[i]->SetXTitle("HCAL Iso"); |
528 |
|
hs_El_ElHcalIso[i]->SetYTitle("events / bin"); |
529 |
+ |
|
530 |
+ |
sprintf(name,"s_El_ElCombIso_%d",i); |
531 |
+ |
hs_El_ElCombIso[i]=new TH1D(name, name, 20, -0.01, 3.1); |
532 |
+ |
hs_El_ElCombIso[i]->SetXTitle("Combined Iso"); |
533 |
+ |
hs_El_ElCombIso[i]->SetYTitle("events / bin"); |
534 |
+ |
|
535 |
|
sprintf(name,"s_El_ElHoverE_%d",i); |
536 |
|
hs_El_ElHoverE[i]=new TH1D(name, name, 30, -0.01, 0.5); |
537 |
|
hs_El_ElHoverE[i]->SetXTitle("H/E"); |
544 |
|
hs_El_ElNumberOfMissingInnerHits[i]=new TH1D(name, name, 10, 0., 10.); |
545 |
|
hs_El_ElNumberOfMissingInnerHits[i]->SetXTitle("Number of missing inner hits"); |
546 |
|
hs_El_ElNumberOfMissingInnerHits[i]->SetYTitle("events / bin"); |
547 |
+ |
} |
548 |
+ |
|
549 |
+ |
TH1D *hc_El_counter; |
550 |
+ |
hc_El_counter=new TH1D("c_El_counter", "c_El_counter",15, 0, 15); |
551 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(1,"# e preselection"); |
552 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(2,"# e presel, barrel"); |
553 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(3,"# e see"); |
554 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(4,"# e dphi"); |
555 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(5,"# e deta"); |
556 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(6,"# e hoe"); |
557 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(7,"# e combIso"); |
558 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(8,"# e conversion"); |
559 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(9,"# e presel, endcap"); |
560 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(10,"# e see"); |
561 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(11,"# e dphi"); |
562 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(12,"# e deta"); |
563 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(13,"# e hoe"); |
564 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(14,"# e combIso"); |
565 |
+ |
hc_El_counter->GetXaxis()->SetBinLabel(15,"# e conversion"); |
566 |
+ |
|
567 |
+ |
// acceptance plots |
568 |
+ |
TH2D *h_ElEtaVsScEta; |
569 |
+ |
h_ElEtaVsScEta = new TH2D("ElEtaVsScEta", "h_ElEtaVsScEta", 10, -2.5, 2.5, 10, -2.5, 2.5); |
570 |
+ |
// TH2D *h_ElPhiVsScPhi; |
571 |
+ |
// h_ElPhiVsScPhi = new TH2D("ElPhiVsScPhi", "h_ElPhiVsScPhi", 10, -Pi, Pi, 10, -Pi, Pi); |
572 |
+ |
TH2D *h_ElPtVsScEt; |
573 |
+ |
h_ElPtVsScEt = new TH2D("ElPtVsScEt", "ElPtVsScEt", 20, 0, 200, 20, 0, 200); |
574 |
+ |
|
575 |
|
|
576 |
|
|
520 |
– |
} |
577 |
|
// -------------------------------------------------------------------------------------------------------------------- |
578 |
|
|
579 |
|
|
585 |
|
TH1D *hn1_El_ElDeltaPhi[MAXN]; |
586 |
|
TH1D *hn1_El_ElDeltaEta[MAXN]; |
587 |
|
TH1D *hn1_El_ElOneOverEminusOneOverP[MAXN]; |
588 |
< |
//TH1D *hn1_El_ElEthIso[MAXN]; |
589 |
< |
|
590 |
< |
TH1D *hn1_El_ElPt[MAXN]; |
591 |
< |
TH1D *hn1_El_ElEta[MAXN]; |
592 |
< |
TH1D *hn1_El_ElPhi[MAXN]; |
593 |
< |
TH1D *hn1_El_ElMet[MAXN]; |
594 |
< |
TH1D *hn1_El_ElTransMass[MAXN]; |
539 |
< |
TH1D *hn1_El_ElCharge[MAXN]; |
540 |
< |
TH1D *hn1_El_Njets[MAXN]; |
588 |
> |
// TH1D *hn1_El_ElPt[MAXN]; |
589 |
> |
// TH1D *hn1_El_ElEta[MAXN]; |
590 |
> |
// TH1D *hn1_El_ElPhi[MAXN]; |
591 |
> |
// TH1D *hn1_El_ElMet[MAXN]; |
592 |
> |
// TH1D *hn1_El_ElTransMass[MAXN]; |
593 |
> |
// TH1D *hn1_El_ElCharge[MAXN]; |
594 |
> |
// TH1D *hn1_El_Njets[MAXN]; |
595 |
|
TH1D *hn1_El_ElEthIso[MAXN]; |
596 |
< |
TH1D *hn1_El_ElTrkIso[MAXN]; |
597 |
< |
TH1D *hn1_El_ElEcalIso[MAXN]; |
598 |
< |
TH1D *hn1_El_ElHcalIso[MAXN]; |
596 |
> |
// TH1D *hn1_El_ElTrkIso[MAXN]; |
597 |
> |
// TH1D *hn1_El_ElEcalIso[MAXN]; |
598 |
> |
// TH1D *hn1_El_ElHcalIso[MAXN]; |
599 |
> |
TH1D *hn1_El_ElCombIso[MAXN]; |
600 |
|
TH1D *hn1_El_ElHoverE[MAXN]; |
601 |
|
TH1D *hn1_El_ElSigmaIetaIeta[MAXN]; |
602 |
|
TH1D *hn1_El_ElNumberOfMissingInnerHits[MAXN]; |
604 |
|
|
605 |
|
for(int i=0; i<MAXN;i++) { |
606 |
|
sprintf(name,"n1_El_ElDeltaPhi_%d",i); |
607 |
< |
hn1_El_ElDeltaPhi[i]=new TH1D(name, name, 15, -0.0001, 0.05001); |
607 |
> |
hn1_El_ElDeltaPhi[i]=new TH1D(name, name, 30, -0.05001, 0.05001); // plotting absolut value |
608 |
> |
// hn1_El_ElDeltaPhi[i]=new TH1D(name, name, 15, -0.05001, 0.05001); // plotting real value |
609 |
|
hn1_El_ElDeltaPhi[i]->SetXTitle("#Delta #phi"); |
610 |
|
hn1_El_ElDeltaPhi[i]->SetYTitle("events / bin"); |
611 |
|
sprintf(name,"n1_El_ElDeltaEta_%d",i); |
612 |
< |
hn1_El_ElDeltaEta[i]=new TH1D(name, name, 15, -0.0001, 0.05001); |
612 |
> |
hn1_El_ElDeltaEta[i]=new TH1D(name, name, 30, -0.02001, 0.02001); // plotting absolut value |
613 |
> |
// hn1_El_ElDeltaEta[i]=new TH1D(name, name, 15, -0.05001, 0.05001); // plotting real value |
614 |
|
hn1_El_ElDeltaEta[i]->SetXTitle("#Delta #eta"); |
615 |
|
hn1_El_ElDeltaEta[i]->SetYTitle("events / bin"); |
616 |
|
sprintf(name,"n1_El_ElOneOverEminusOneOverP_%d",i); |
623 |
|
hn1_El_ElEthIso[i]->SetYTitle("events / bin"); |
624 |
|
|
625 |
|
|
626 |
< |
sprintf(name,"n1_El_ElPt_%d",i); |
627 |
< |
hn1_El_ElPt[i]=new TH1D(name, name, nbins, start, end); |
628 |
< |
hn1_El_ElPt[i]->SetXTitle("p_{T} [GeV]"); |
629 |
< |
hn1_El_ElPt[i]->SetYTitle("events / bin"); |
630 |
< |
sprintf(name,"n1_El_ElEta_%d",i); |
631 |
< |
hn1_El_ElEta[i]=new TH1D(name, name, 30, -5., 5.); |
632 |
< |
hn1_El_ElEta[i]->SetXTitle("#eta"); |
633 |
< |
hn1_El_ElEta[i]->SetYTitle("events / bin"); |
634 |
< |
sprintf(name,"n1_El_ElPhi_%d",i); |
635 |
< |
hn1_El_ElPhi[i]=new TH1D(name, name, 30, -Pi,Pi); |
636 |
< |
hn1_El_ElPhi[i]->SetXTitle("#phi"); |
637 |
< |
hn1_El_ElPhi[i]->SetYTitle("events / bin"); |
638 |
< |
sprintf(name,"n1_El_ElMet_%d",i); |
639 |
< |
hn1_El_ElMet[i]=new TH1D(name, name, nbins, start, end); |
640 |
< |
hn1_El_ElMet[i]->SetXTitle("#slash{E}_{T} [GeV]"); |
641 |
< |
hn1_El_ElMet[i]->SetYTitle("events / bin"); |
642 |
< |
sprintf(name,"n1_El_ElTransMass_%d",i); |
643 |
< |
hn1_El_ElTransMass[i]=new TH1D(name, name, nbins, start, end); |
644 |
< |
hn1_El_ElTransMass[i]->SetXTitle("m_{T} [GeV]"); |
645 |
< |
hn1_El_ElTransMass[i]->SetYTitle("events / bin"); |
646 |
< |
sprintf(name,"n1_El_ElCharge_%d",i); |
647 |
< |
hn1_El_ElCharge[i]=new TH1D(name, name, 2, -2, 2); |
648 |
< |
hn1_El_ElCharge[i]->SetXTitle("Charge"); |
649 |
< |
hn1_El_ElCharge[i]->SetYTitle("events / bin"); |
650 |
< |
sprintf(name,"n1_El_Njets_%d",i); |
651 |
< |
hn1_El_Njets[i]=new TH1D(name, name, 10, 0, 10); |
652 |
< |
hn1_El_Njets[i]->SetXTitle("number of jets"); |
653 |
< |
hn1_El_Njets[i]->SetYTitle("events / bin"); |
654 |
< |
sprintf(name,"n1_El_ElTrkIso_%d",i); |
626 |
> |
// sprintf(name,"n1_El_ElPt_%d",i); |
627 |
> |
// hn1_El_ElPt[i]=new TH1D(name, name, nbins, start, end); |
628 |
> |
// hn1_El_ElPt[i]->SetXTitle("p_{T} [GeV]"); |
629 |
> |
// hn1_El_ElPt[i]->SetYTitle("events / bin"); |
630 |
> |
// sprintf(name,"n1_El_ElEta_%d",i); |
631 |
> |
// hn1_El_ElEta[i]=new TH1D(name, name, 30, -5., 5.); |
632 |
> |
// hn1_El_ElEta[i]->SetXTitle("#eta"); |
633 |
> |
// hn1_El_ElEta[i]->SetYTitle("events / bin"); |
634 |
> |
// sprintf(name,"n1_El_ElPhi_%d",i); |
635 |
> |
// hn1_El_ElPhi[i]=new TH1D(name, name, 30, -Pi,Pi); |
636 |
> |
// hn1_El_ElPhi[i]->SetXTitle("#phi"); |
637 |
> |
// hn1_El_ElPhi[i]->SetYTitle("events / bin"); |
638 |
> |
// sprintf(name,"n1_El_ElMet_%d",i); |
639 |
> |
// hn1_El_ElMet[i]=new TH1D(name, name, nbins, start, end); |
640 |
> |
// hn1_El_ElMet[i]->SetXTitle("#slash{E}_{T} [GeV]"); |
641 |
> |
// hn1_El_ElMet[i]->SetYTitle("events / bin"); |
642 |
> |
// sprintf(name,"n1_El_ElTransMass_%d",i); |
643 |
> |
// hn1_El_ElTransMass[i]=new TH1D(name, name, nbins, start, end); |
644 |
> |
// hn1_El_ElTransMass[i]->SetXTitle("m_{T} [GeV]"); |
645 |
> |
// hn1_El_ElTransMass[i]->SetYTitle("events / bin"); |
646 |
> |
// sprintf(name,"n1_El_ElCharge_%d",i); |
647 |
> |
// hn1_El_ElCharge[i]=new TH1D(name, name, 2, -2, 2); |
648 |
> |
// hn1_El_ElCharge[i]->SetXTitle("Charge"); |
649 |
> |
// hn1_El_ElCharge[i]->SetYTitle("events / bin"); |
650 |
> |
// sprintf(name,"n1_El_Njets_%d",i); |
651 |
> |
// hn1_El_Njets[i]=new TH1D(name, name, 10, 0, 10); |
652 |
> |
// hn1_El_Njets[i]->SetXTitle("number of jets"); |
653 |
> |
// hn1_El_Njets[i]->SetYTitle("events / bin"); |
654 |
> |
|
655 |
|
// sprintf(name,"n1_El_ElTrkIso_%d",i); |
656 |
< |
hn1_El_ElTrkIso[i]=new TH1D(name, name, 20, -0.01, 1.1); |
657 |
< |
hn1_El_ElTrkIso[i]->SetXTitle("Trk Iso"); |
658 |
< |
hn1_El_ElTrkIso[i]->SetYTitle("events / bin"); |
659 |
< |
sprintf(name,"n1_El_ElEcalIso_%d",i); |
660 |
< |
hn1_El_ElEcalIso[i]=new TH1D(name, name, 20, -0.01, 1.1); |
661 |
< |
// hn1_El_ElEcalIso[i]=new TH1D(name, name, 40, -0.01, 20.); |
662 |
< |
hn1_El_ElEcalIso[i]->SetXTitle("ECAL Iso"); |
663 |
< |
hn1_El_ElEcalIso[i]->SetYTitle("events / bin"); |
664 |
< |
sprintf(name,"n1_El_ElHcalIso_%d",i); |
665 |
< |
hn1_El_ElHcalIso[i]=new TH1D(name, name, 20, -0.01, 1.1); |
666 |
< |
// hn1_El_ElHcalIso[i]=new TH1D(name, name, 20, -0.01, 10.); |
667 |
< |
hn1_El_ElHcalIso[i]->SetXTitle("HCAL Iso"); |
668 |
< |
hn1_El_ElHcalIso[i]->SetYTitle("events / bin"); |
656 |
> |
// // sprintf(name,"n1_El_ElTrkIso_%d",i); |
657 |
> |
// hn1_El_ElTrkIso[i]=new TH1D(name, name, 20, -0.01, 0.3); |
658 |
> |
// hn1_El_ElTrkIso[i]->SetXTitle("Trk Iso"); |
659 |
> |
// hn1_El_ElTrkIso[i]->SetYTitle("events / bin"); |
660 |
> |
// sprintf(name,"n1_El_ElEcalIso_%d",i); |
661 |
> |
// hn1_El_ElEcalIso[i]=new TH1D(name, name, 20, -0.01, 0.3); |
662 |
> |
// // hn1_El_ElEcalIso[i]=new TH1D(name, name, 40, -0.01, 20.); |
663 |
> |
// hn1_El_ElEcalIso[i]->SetXTitle("ECAL Iso"); |
664 |
> |
// hn1_El_ElEcalIso[i]->SetYTitle("events / bin"); |
665 |
> |
// sprintf(name,"n1_El_ElHcalIso_%d",i); |
666 |
> |
// hn1_El_ElHcalIso[i]=new TH1D(name, name, 20, -0.01, 0.3); |
667 |
> |
// // hn1_El_ElHcalIso[i]=new TH1D(name, name, 20, -0.01, 10.); |
668 |
> |
// hn1_El_ElHcalIso[i]->SetXTitle("HCAL Iso"); |
669 |
> |
// hn1_El_ElHcalIso[i]->SetYTitle("events / bin"); |
670 |
> |
|
671 |
> |
sprintf(name,"n1_El_ElCombIso_%d",i); |
672 |
> |
hn1_El_ElCombIso[i]=new TH1D(name, name, 20, -0.01, 0.5); |
673 |
> |
// hn1_El_ElCombIso[i]=new TH1D(name, name, 20, -0.01, 10.); |
674 |
> |
hn1_El_ElCombIso[i]->SetXTitle("Combined Iso"); |
675 |
> |
hn1_El_ElCombIso[i]->SetYTitle("events / bin"); |
676 |
> |
|
677 |
|
sprintf(name,"n1_El_ElHoverE_%d",i); |
678 |
< |
hn1_El_ElHoverE[i]=new TH1D(name, name, 30, -0.01, 0.5); |
678 |
> |
hn1_El_ElHoverE[i]=new TH1D(name, name, 30, -0.01, 0.2); |
679 |
|
hn1_El_ElHoverE[i]->SetXTitle("H/E"); |
680 |
|
hn1_El_ElHoverE[i]->SetYTitle("events / bin"); |
681 |
|
sprintf(name,"n1_El_ElSigmaIetaIeta_%d",i); |
698 |
|
// -------------------------------------------------------------------------------------------------------------------- |
699 |
|
// W Selection plots |
700 |
|
// -------------------------------------------------------------------------------------------------------------------- |
701 |
< |
int MAXS=8; |
701 |
> |
int MAXS=29; |
702 |
|
// char name [50]; |
703 |
|
// int nbins=20; |
704 |
|
// double start=0.; |
744 |
|
hs_W_Njets[i]=new TH1D(name, name, 10, 0, 10); |
745 |
|
hs_W_Njets[i]->SetXTitle("number of jets"); |
746 |
|
hs_W_Njets[i]->SetYTitle("events / bin"); |
682 |
– |
|
683 |
– |
// sprintf(name,"_%d",i); |
684 |
– |
// [i]=new TH1D(name, name, nbins, start, end); |
685 |
– |
// [i]->SetXTitle(""); |
686 |
– |
// [i]->SetYTitle("events / bin"); |
747 |
|
} |
688 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
689 |
– |
|
748 |
|
|
749 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
750 |
< |
// BASIC electron plots |
751 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
752 |
< |
|
753 |
< |
// binning and ranges |
749 |
> |
int MAXWcounter=16; |
750 |
> |
int *Wcounter = new int[MAXWcounter]; |
751 |
> |
memset(Wcounter,0,MAXWcounter*sizeof(int)); |
752 |
> |
|
753 |
> |
|
754 |
> |
TH1D *hc_W_counter; |
755 |
> |
hc_W_counter=new TH1D("c_W_counter", "c_W_counter",16, 0, 16 ); |
756 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(1,"# e, N jets, Preselection"); |
757 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(2,"# W, N jets"); |
758 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(3,"# W+, N jets"); |
759 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(4,"# W-, N jets"); |
760 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(5,"# e, 0 jets, Preselection"); |
761 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(6,"# W, 0 jets"); |
762 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(7,"# W+, 0 jets"); |
763 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(8,"# W-, 0 jets"); |
764 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(9,"# e, 1 jet, Preselection"); |
765 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(10,"# W, 1 jet"); |
766 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(11,"# W+, 1 jet"); |
767 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(12,"# W-, 1 jet"); |
768 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(13,"# e, >1 jets, Preselection"); |
769 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(14,"# W, >1 jets"); |
770 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(15,"# W+, >1 jets"); |
771 |
> |
hc_W_counter->GetXaxis()->SetBinLabel(16,"# W-, >1jets"); |
772 |
|
|
697 |
– |
//deltaPhiSuperCluster |
698 |
– |
double deltaPhiSCMin=0.; |
699 |
– |
double deltaPhiSCMax=1.; |
700 |
– |
|
701 |
– |
|
702 |
– |
|
703 |
– |
double etaMin=-3.; |
704 |
– |
double etaMax=3.; |
705 |
– |
|
706 |
– |
// gsf variables for barrel |
707 |
– |
TH1D *h_el_B_gsf_deltaPhiSuperCluster=new TH1D("el_B_gsf_deltaPhiSuperCluster","el_B_gsf_deltaPhiSuperCluster", 30, 0, 1); |
708 |
– |
h_el_B_gsf_deltaPhiSuperCluster->SetXTitle("#Delta #phi"); |
709 |
– |
TH1D *h_el_B_gsf_deltaEtaSuperCluster=new TH1D("el_B_gsf_deltaEtaSuperCluster","el_B_gsf_deltaEtaSuperCluster", 30, 0, 1); |
710 |
– |
h_el_B_gsf_deltaEtaSuperCluster->SetXTitle("#Delta #eta"); |
711 |
– |
TH1D *h_el_B_gsf_deltaPhiSuperCluster2=new TH1D("el_B_gsf_deltaPhiSuperCluster2","el_B_gsf_deltaPhiSuperCluster2", 30, 0, 0.1); |
712 |
– |
h_el_B_gsf_deltaPhiSuperCluster2->SetXTitle("#Delta #phi"); |
713 |
– |
TH1D *h_el_B_gsf_deltaEtaSuperCluster2=new TH1D("el_B_gsf_deltaEtaSuperCluster2","el_B_gsf_deltaEtaSuperCluster2", 30, 0, 0.05); |
714 |
– |
h_el_B_gsf_deltaEtaSuperCluster2->SetXTitle("#Delta #eta"); |
715 |
– |
TH1D *h_el_B_gsf_caloenergy=new TH1D("el_B_gsf_caloenergy","el_B_gsf_caloenergy", 30,0.,50); |
716 |
– |
h_el_B_gsf_caloenergy->SetXTitle("E [GeV]"); |
717 |
– |
TH1D *h_el_B_gsf_trkmomatvtx=new TH1D("el_B_gsf_trkmomatvtx","el_B_gsf_trkmomatvtx", 30,0.,50); |
718 |
– |
h_el_B_gsf_trkmomatvtx->SetXTitle("p [GeV]"); |
719 |
– |
TH1D *h_el_B_gsf_oneOverEminusOneOverP=new TH1D("el_B_gsf_oneOverEminusOneOverP","el_B_gsf_oneOverEminusOneOverP",30,0.,3); |
720 |
– |
h_el_B_gsf_oneOverEminusOneOverP->SetXTitle("|1 / E - 1 / p|"); |
721 |
– |
TH1D *h_el_B_gsf_oneOverEminusOneOverP2=new TH1D("el_B_gsf_oneOverEminusOneOverP2","el_B_gsf_oneOverEminusOneOverP2",30,0.,0.1); |
722 |
– |
h_el_B_gsf_oneOverEminusOneOverP2->SetXTitle("|1 / E - 1 / p|"); |
723 |
– |
TH1D *h_el_B_gsf_sumPtOverE=new TH1D("el_B_gsf_sumPtOverE","el_B_gsf_sumPtOverE",30,0.,5); |
724 |
– |
h_el_B_gsf_sumPtOverE->SetXTitle("#Sigma p_{T} / E"); |
725 |
– |
TH1D *h_el_B_gsf_sigmaIetaIeta=new TH1D("el_B_gsf_sigmaIetaIeta","el_B_gsf_sigmaIetaIeta",30,0.,0.1); |
726 |
– |
h_el_B_gsf_sigmaIetaIeta->SetXTitle("#sigma_{#eta #eta}"); |
727 |
– |
TH1D *h_el_B_gsf_pt=new TH1D("el_B_gsf_pt","el_B_gsf_pt",50,0.,50); |
728 |
– |
h_el_B_gsf_pt->SetXTitle("p_{T} [GeV]"); |
729 |
– |
TH1D *h_el_B_gsf_eta=new TH1D("el_B_gsf_eta","el_B_gsf_eta",20,-3,3); |
730 |
– |
h_el_B_gsf_eta->SetXTitle("#eta"); |
731 |
– |
TH1D *h_el_B_gsf_phi=new TH1D("el_B_gsf_phi","el_B_gsf_phi",20,0.,Pi); |
732 |
– |
h_el_B_gsf_phi->SetXTitle("#phi"); |
733 |
– |
TH1D *h_el_B_gsf_fbrem=new TH1D("el_B_gsf_fbrem","el_B_gsf_fbrem",30,-0.2,1); |
734 |
– |
h_el_B_gsf_fbrem->SetXTitle("f_{brem}"); |
735 |
– |
TH1D *h_el_B_gsf_basicclustersize=new TH1D("el_B_gsf_basicclustersize","el_B_gsf_basicclustersize",10,0,10); |
736 |
– |
h_el_B_gsf_basicclustersize->SetXTitle("N"); |
737 |
– |
TH1D *h_el_B_gsf_chi2=new TH1D("el_B_gsf_chi2","el_B_gsf_chi2",30,0,5); |
738 |
– |
h_el_B_gsf_chi2->SetXTitle("#chi^{2}"); |
739 |
– |
TH1D *h_el_B_gsf_charge=new TH1D("el_B_gsf_charge","el_B_gsf_charge",3,-1,2); |
740 |
– |
h_el_B_gsf_charge->SetXTitle("charge"); |
741 |
– |
TH1D *h_el_B_gsf_pfmet=new TH1D("el_B_gsf_pfmet","el_B_gsf_pfmet", 50, 0., 50); |
742 |
– |
TH1D *h_el_B_gsf_HoverE=new TH1D("el_B_gsf_HoverE","el_B_gsf_HoverE", 50, 0, 3); |
743 |
– |
// gsf variables for endcaps |
744 |
– |
TH1D *h_el_E_gsf_deltaPhiSuperCluster=new TH1D("el_E_gsf_deltaPhiSuperCluster","el_E_gsf_deltaPhiSuperCluster", 30, 0, 1); |
745 |
– |
h_el_E_gsf_deltaPhiSuperCluster->SetXTitle("#Delta #phi"); |
746 |
– |
TH1D *h_el_E_gsf_deltaEtaSuperCluster=new TH1D("el_E_gsf_deltaEtaSuperCluster","el_E_gsf_deltaEtaSuperCluster", 30, 0, 1); |
747 |
– |
h_el_E_gsf_deltaEtaSuperCluster->SetXTitle("#Delta #eta"); |
748 |
– |
TH1D *h_el_E_gsf_deltaPhiSuperCluster2=new TH1D("el_E_gsf_deltaPhiSuperCluster2","el_E_gsf_deltaPhiSuperCluster2", 30, 0, 0.1); |
749 |
– |
h_el_E_gsf_deltaPhiSuperCluster2->SetXTitle("#Delta #phi"); |
750 |
– |
TH1D *h_el_E_gsf_deltaEtaSuperCluster2=new TH1D("el_E_gsf_deltaEtaSuperCluster2","el_E_gsf_deltaEtaSuperCluster2", 30, 0, 0.05); |
751 |
– |
h_el_E_gsf_deltaEtaSuperCluster2->SetXTitle("#Delta #eta"); |
752 |
– |
TH1D *h_el_E_gsf_caloenergy=new TH1D("el_E_gsf_caloenergy","el_E_gsf_caloenergy", 30,0.,50); |
753 |
– |
h_el_E_gsf_caloenergy->SetXTitle("E [GeV]"); |
754 |
– |
TH1D *h_el_E_gsf_trkmomatvtx=new TH1D("el_E_gsf_trkmomatvtx","el_E_gsf_trkmomatvtx", 30,0.,50); |
755 |
– |
h_el_E_gsf_trkmomatvtx->SetXTitle("p [GeV]"); |
756 |
– |
TH1D *h_el_E_gsf_oneOverEminusOneOverP=new TH1D("el_E_gsf_oneOverEminusOneOverP","el_E_gsf_oneOverEminusOneOverP",30,0.,3); |
757 |
– |
h_el_E_gsf_oneOverEminusOneOverP->SetXTitle("|1 / E - 1 / p|"); |
758 |
– |
TH1D *h_el_E_gsf_oneOverEminusOneOverP2=new TH1D("el_E_gsf_oneOverEminusOneOverP2","el_E_gsf_oneOverEminusOneOverP2",30,0.,0.1); |
759 |
– |
h_el_E_gsf_oneOverEminusOneOverP2->SetXTitle("|1 / E - 1 / p|"); |
760 |
– |
TH1D *h_el_E_gsf_sumPtOverE=new TH1D("el_E_gsf_sumPtOverE","el_E_gsf_sumPtOverE",30,0.,5); |
761 |
– |
h_el_E_gsf_sumPtOverE->SetXTitle("#Sigma p_{T} / E"); |
762 |
– |
TH1D *h_el_E_gsf_sigmaIetaIeta=new TH1D("el_E_gsf_sigmaIetaIeta","el_E_gsf_sigmaIetaIeta",30,0.,0.1); |
763 |
– |
h_el_E_gsf_sigmaIetaIeta->SetXTitle("#sigma_{#eta #eta}"); |
764 |
– |
TH1D *h_el_E_gsf_pt=new TH1D("el_E_gsf_pt","el_E_gsf_pt",50,0.,50); |
765 |
– |
h_el_E_gsf_pt->SetXTitle("p_{T} [GeV]"); |
766 |
– |
TH1D *h_el_E_gsf_eta=new TH1D("el_E_gsf_eta","el_E_gsf_eta",20,-3,3); |
767 |
– |
h_el_E_gsf_eta->SetXTitle("#eta"); |
768 |
– |
TH1D *h_el_E_gsf_phi=new TH1D("el_E_gsf_phi","el_E_gsf_phi",20,0.,Pi); |
769 |
– |
h_el_E_gsf_phi->SetXTitle("#phi"); |
770 |
– |
TH1D *h_el_E_gsf_fbrem=new TH1D("el_E_gsf_fbrem","el_E_gsf_fbrem",30,-0.2,1); |
771 |
– |
h_el_E_gsf_fbrem->SetXTitle("f_{brem}"); |
772 |
– |
TH1D *h_el_E_gsf_basicclustersize=new TH1D("el_E_gsf_basicclustersize","el_E_gsf_basicclustersize",10,0,10); |
773 |
– |
h_el_E_gsf_basicclustersize->SetXTitle("N"); |
774 |
– |
TH1D *h_el_E_gsf_chi2=new TH1D("el_E_gsf_chi2","el_E_gsf_chi2",30,0,5); |
775 |
– |
h_el_E_gsf_chi2->SetXTitle("#chi^{2}"); |
776 |
– |
TH1D *h_el_E_gsf_charge=new TH1D("el_E_gsf_charge","el_E_gsf_charge",3,-1,2); |
777 |
– |
h_el_E_gsf_charge->SetXTitle("charge"); |
778 |
– |
TH1D *h_el_E_gsf_pfmet=new TH1D("el_E_gsf_pfmet","el_E_gsf_pfmet", 50, 0., 50); |
779 |
– |
TH1D *h_el_E_gsf_HoverE=new TH1D("el_E_gsf_HoverE","el_E_gsf_HoverE", 50, 0, 3); |
773 |
|
// -------------------------------------------------------------------------------------------------------------------- |
781 |
– |
// tight electrons in the barrel |
782 |
– |
TH1D *h_el_B_tight_deltaPhiSuperCluster=new TH1D("el_B_tight_deltaPhiSuperCluster","el_B_tight_deltaPhiSuperCluster", 30, 0, 1); |
783 |
– |
h_el_B_tight_deltaPhiSuperCluster->SetXTitle("#Delta #phi"); |
784 |
– |
TH1D *h_el_B_tight_deltaEtaSuperCluster=new TH1D("el_B_tight_deltaEtaSuperCluster","el_B_tight_deltaEtaSuperCluster", 30, 0, 1); |
785 |
– |
h_el_B_tight_deltaEtaSuperCluster->SetXTitle("#Delta #eta"); |
786 |
– |
TH1D *h_el_B_tight_deltaPhiSuperCluster2=new TH1D("el_B_tight_deltaPhiSuperCluster2","el_B_tight_deltaPhiSuperCluster2", 30, 0, 0.1); |
787 |
– |
h_el_B_tight_deltaPhiSuperCluster2->SetXTitle("#Delta #phi"); |
788 |
– |
TH1D *h_el_B_tight_deltaEtaSuperCluster2=new TH1D("el_B_tight_deltaEtaSuperCluster2","el_B_tight_deltaEtaSuperCluster2", 30, 0, 0.05); |
789 |
– |
h_el_B_tight_deltaEtaSuperCluster2->SetXTitle("#Delta #eta"); |
790 |
– |
TH1D *h_el_B_tight_caloenergy=new TH1D("el_B_tight_caloenergy","el_B_tight_caloenergy", 30,0.,50); |
791 |
– |
h_el_B_tight_caloenergy->SetXTitle("E [GeV]"); |
792 |
– |
TH1D *h_el_B_tight_trkmomatvtx=new TH1D("el_B_tight_trkmomatvtx","el_B_tight_trkmomatvtx", 30,0.,50); |
793 |
– |
h_el_B_tight_trkmomatvtx->SetXTitle("p [GeV]"); |
794 |
– |
TH1D *h_el_B_tight_oneOverEminusOneOverP=new TH1D("el_B_tight_oneOverEminusOneOverP","el_B_tight_oneOverEminusOneOverP",30,0.,3); |
795 |
– |
h_el_B_tight_oneOverEminusOneOverP->SetXTitle("|1 / E - 1 / p|"); |
796 |
– |
TH1D *h_el_B_tight_oneOverEminusOneOverP2=new TH1D("el_B_tight_oneOverEminusOneOverP2","el_B_tight_oneOverEminusOneOverP2",30,0.,0.1); |
797 |
– |
h_el_B_tight_oneOverEminusOneOverP2->SetXTitle("|1 / E - 1 / p|"); |
798 |
– |
TH1D *h_el_B_tight_sumPtOverE=new TH1D("el_B_tight_sumPtOverE","el_B_tight_sumPtOverE",30,0.,5); |
799 |
– |
h_el_B_tight_sumPtOverE->SetXTitle("#Sigma p_{T} / E"); |
800 |
– |
TH1D *h_el_B_tight_sigmaIetaIeta=new TH1D("el_B_tight_sigmaIetaIeta","el_B_tight_sigmaIetaIeta",30,0.,0.1); |
801 |
– |
h_el_B_tight_sigmaIetaIeta->SetXTitle("#sigma_{#eta #eta}"); |
802 |
– |
TH1D *h_el_B_tight_pt=new TH1D("el_B_tight_pt","el_B_tight_pt",50,0.,50); |
803 |
– |
h_el_B_tight_pt->SetXTitle("p_{T} [GeV]"); |
804 |
– |
TH1D *h_el_B_tight_eta=new TH1D("el_B_tight_eta","el_B_tight_eta",20,-3,3); |
805 |
– |
h_el_B_tight_eta->SetXTitle("#eta"); |
806 |
– |
TH1D *h_el_B_tight_phi=new TH1D("el_B_tight_phi","el_B_tight_phi",20,0.,Pi); |
807 |
– |
h_el_B_tight_phi->SetXTitle("#phi"); |
808 |
– |
TH1D *h_el_B_tight_fbrem=new TH1D("el_B_tight_fbrem","el_B_tight_fbrem",30,-0.2,1); |
809 |
– |
h_el_B_tight_fbrem->SetXTitle("f_{brem}"); |
810 |
– |
TH1D *h_el_B_tight_basicclustersize=new TH1D("el_B_tight_basicclustersize","el_B_tight_basicclustersize",10,0,10); |
811 |
– |
h_el_B_tight_basicclustersize->SetXTitle("N"); |
812 |
– |
TH1D *h_el_B_tight_chi2=new TH1D("el_B_tight_chi2","el_B_tight_chi2",30,0,5); |
813 |
– |
h_el_B_tight_chi2->SetXTitle("#chi^{2}"); |
814 |
– |
TH1D *h_el_B_tight_charge=new TH1D("el_B_tight_charge","el_B_tight_charge",3,-1,2); |
815 |
– |
h_el_B_tight_charge->SetXTitle("charge"); |
816 |
– |
TH1D *h_el_B_tight_pfmet=new TH1D("el_B_tight_pfmet","el_B_tight_pfmet", 50, 0., 50); |
817 |
– |
TH1D *h_el_B_tight_HoverE=new TH1D("el_B_tight_HoverE","el_B_tight_HoverE", 50, 0, 3); |
818 |
– |
// tight electrons in the endcaps |
819 |
– |
TH1D *h_el_E_tight_deltaPhiSuperCluster=new TH1D("el_E_tight_deltaPhiSuperCluster","el_E_tight_deltaPhiSuperCluster", 30, 0, 1); |
820 |
– |
h_el_E_tight_deltaPhiSuperCluster->SetXTitle("#Delta #phi"); |
821 |
– |
TH1D *h_el_E_tight_deltaEtaSuperCluster=new TH1D("el_E_tight_deltaEtaSuperCluster","el_E_tight_deltaEtaSuperCluster", 30, 0, 1); |
822 |
– |
h_el_E_tight_deltaEtaSuperCluster->SetXTitle("#Delta #eta"); |
823 |
– |
TH1D *h_el_E_tight_deltaPhiSuperCluster2=new TH1D("el_E_tight_deltaPhiSuperCluster2","el_E_tight_deltaPhiSuperCluster2", 30, 0, 0.1); |
824 |
– |
h_el_E_tight_deltaPhiSuperCluster2->SetXTitle("#Delta #phi"); |
825 |
– |
TH1D *h_el_E_tight_deltaEtaSuperCluster2=new TH1D("el_E_tight_deltaEtaSuperCluster2","el_E_tight_deltaEtaSuperCluster2", 30, 0, 0.05); |
826 |
– |
h_el_E_tight_deltaEtaSuperCluster2->SetXTitle("#Delta #eta"); |
827 |
– |
TH1D *h_el_E_tight_caloenergy=new TH1D("el_E_tight_caloenergy","el_E_tight_caloenergy", 30,0.,50); |
828 |
– |
h_el_E_tight_caloenergy->SetXTitle("E [GeV]"); |
829 |
– |
TH1D *h_el_E_tight_trkmomatvtx=new TH1D("el_E_tight_trkmomatvtx","el_E_tight_trkmomatvtx", 30,0.,50); |
830 |
– |
h_el_E_tight_trkmomatvtx->SetXTitle("p [GeV]"); |
831 |
– |
TH1D *h_el_E_tight_oneOverEminusOneOverP=new TH1D("el_E_tight_oneOverEminusOneOverP","el_E_tight_oneOverEminusOneOverP",30,0.,3); |
832 |
– |
h_el_E_tight_oneOverEminusOneOverP->SetXTitle("|1 / E - 1 / p|"); |
833 |
– |
TH1D *h_el_E_tight_oneOverEminusOneOverP2=new TH1D("el_E_tight_oneOverEminusOneOverP2","el_E_tight_oneOverEminusOneOverP2",30,0.,0.1); |
834 |
– |
h_el_E_tight_oneOverEminusOneOverP2->SetXTitle("|1 / E - 1 / p|"); |
835 |
– |
TH1D *h_el_E_tight_sumPtOverE=new TH1D("el_E_tight_sumPtOverE","el_E_tight_sumPtOverE",30,0.,5); |
836 |
– |
h_el_E_tight_sumPtOverE->SetXTitle("#Sigma p_{T} / E"); |
837 |
– |
TH1D *h_el_E_tight_sigmaIetaIeta=new TH1D("el_E_tight_sigmaIetaIeta","el_E_tight_sigmaIetaIeta",30,0.,0.1); |
838 |
– |
h_el_E_tight_sigmaIetaIeta->SetXTitle("#sigma_{#eta #eta}"); |
839 |
– |
TH1D *h_el_E_tight_pt=new TH1D("el_E_tight_pt","el_E_tight_pt",50,0.,50); |
840 |
– |
h_el_E_tight_pt->SetXTitle("p_{T} [GeV]"); |
841 |
– |
TH1D *h_el_E_tight_eta=new TH1D("el_E_tight_eta","el_E_tight_eta",20,-3,3); |
842 |
– |
h_el_E_tight_eta->SetXTitle("#eta"); |
843 |
– |
TH1D *h_el_E_tight_phi=new TH1D("el_E_tight_phi","el_E_tight_phi",20,0.,Pi); |
844 |
– |
h_el_E_tight_phi->SetXTitle("#phi"); |
845 |
– |
TH1D *h_el_E_tight_fbrem=new TH1D("el_E_tight_fbrem","el_E_tight_fbrem",30,-0.2,1); |
846 |
– |
h_el_E_tight_fbrem->SetXTitle("f_{brem}"); |
847 |
– |
TH1D *h_el_E_tight_basicclustersize=new TH1D("el_E_tight_basicclustersize","el_E_tight_basicclustersize",10,0,10); |
848 |
– |
h_el_E_tight_basicclustersize->SetXTitle("N"); |
849 |
– |
TH1D *h_el_E_tight_chi2=new TH1D("el_E_tight_chi2","el_E_tight_chi2",30,0,5); |
850 |
– |
h_el_E_tight_chi2->SetXTitle("#chi^{2}"); |
851 |
– |
TH1D *h_el_E_tight_charge=new TH1D("el_E_tight_charge","el_E_tight_charge",3,-1,2); |
852 |
– |
h_el_E_tight_charge->SetXTitle("charge"); |
853 |
– |
TH1D *h_el_E_tight_pfmet=new TH1D("el_E_tight_pfmet","el_E_tight_pfmet", 50, 0., 50); |
854 |
– |
TH1D *h_el_E_tight_HoverE=new TH1D("el_E_tight_HoverE","el_E_tight_HoverE", 50, 0, 3); |
855 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
856 |
– |
// eth electrons in the barrel |
857 |
– |
TH1D *h_el_B_eth_deltaPhiSuperCluster=new TH1D("el_B_eth_deltaPhiSuperCluster","el_B_eth_deltaPhiSuperCluster", 30, 0, 1); |
858 |
– |
h_el_B_eth_deltaPhiSuperCluster->SetXTitle("#Delta #phi"); |
859 |
– |
TH1D *h_el_B_eth_deltaEtaSuperCluster=new TH1D("el_B_eth_deltaEtaSuperCluster","el_B_eth_deltaEtaSuperCluster", 30, 0, 1); |
860 |
– |
h_el_B_eth_deltaEtaSuperCluster->SetXTitle("#Delta #eta"); |
861 |
– |
TH1D *h_el_B_eth_deltaPhiSuperCluster2=new TH1D("el_B_eth_deltaPhiSuperCluster2","el_B_eth_deltaPhiSuperCluster2", 30, 0, 0.1); |
862 |
– |
h_el_B_eth_deltaPhiSuperCluster2->SetXTitle("#Delta #phi"); |
863 |
– |
TH1D *h_el_B_eth_deltaEtaSuperCluster2=new TH1D("el_B_eth_deltaEtaSuperCluster2","el_B_eth_deltaEtaSuperCluster2", 30, 0, 0.05); |
864 |
– |
h_el_B_eth_deltaEtaSuperCluster2->SetXTitle("#Delta #eta"); |
865 |
– |
TH1D *h_el_B_eth_caloenergy=new TH1D("el_B_eth_caloenergy","el_B_eth_caloenergy", 30,0.,50); |
866 |
– |
h_el_B_eth_caloenergy->SetXTitle("E [GeV]"); |
867 |
– |
TH1D *h_el_B_eth_trkmomatvtx=new TH1D("el_B_eth_trkmomatvtx","el_B_eth_trkmomatvtx", 30,0.,50); |
868 |
– |
h_el_B_eth_trkmomatvtx->SetXTitle("p [GeV]"); |
869 |
– |
TH1D *h_el_B_eth_oneOverEminusOneOverP=new TH1D("el_B_eth_oneOverEminusOneOverP","el_B_eth_oneOverEminusOneOverP",30,0.,3); |
870 |
– |
h_el_B_eth_oneOverEminusOneOverP->SetXTitle("|1 / E - 1 / p|"); |
871 |
– |
TH1D *h_el_B_eth_oneOverEminusOneOverP2=new TH1D("el_B_eth_oneOverEminusOneOverP2","el_B_eth_oneOverEminusOneOverP2",30,0.,0.1); |
872 |
– |
h_el_B_eth_oneOverEminusOneOverP2->SetXTitle("|1 / E - 1 / p|"); |
873 |
– |
TH1D *h_el_B_eth_sumPtOverE=new TH1D("el_B_eth_sumPtOverE","el_B_eth_sumPtOverE",30,0.,5); |
874 |
– |
h_el_B_eth_sumPtOverE->SetXTitle("#Sigma p_{T} / E"); |
875 |
– |
TH1D *h_el_B_eth_sigmaIetaIeta=new TH1D("el_B_eth_sigmaIetaIeta","el_B_eth_sigmaIetaIeta",30,0.,0.1); |
876 |
– |
h_el_B_eth_sigmaIetaIeta->SetXTitle("#sigma_{#eta #eta}"); |
877 |
– |
TH1D *h_el_B_eth_pt=new TH1D("el_B_eth_pt","el_B_eth_pt",50,0.,50); |
878 |
– |
h_el_B_eth_pt->SetXTitle("p_{T} [GeV]"); |
879 |
– |
TH1D *h_el_B_eth_eta=new TH1D("el_B_eth_eta","el_B_eth_eta",20,-3,3); |
880 |
– |
h_el_B_eth_eta->SetXTitle("#eta"); |
881 |
– |
TH1D *h_el_B_eth_phi=new TH1D("el_B_eth_phi","el_B_eth_phi",20,0.,Pi); |
882 |
– |
h_el_B_eth_phi->SetXTitle("#phi"); |
883 |
– |
TH1D *h_el_B_eth_fbrem=new TH1D("el_B_eth_fbrem","el_B_eth_fbrem",30,-0.2,1); |
884 |
– |
h_el_B_eth_fbrem->SetXTitle("f_{brem}"); |
885 |
– |
TH1D *h_el_B_eth_basicclustersize=new TH1D("el_B_eth_basicclustersize","el_B_eth_basicclustersize",10,0,10); |
886 |
– |
h_el_B_eth_basicclustersize->SetXTitle("N"); |
887 |
– |
TH1D *h_el_B_eth_chi2=new TH1D("el_B_eth_chi2","el_B_eth_chi2",30,0,5); |
888 |
– |
h_el_B_eth_chi2->SetXTitle("#chi^{2}"); |
889 |
– |
TH1D *h_el_B_eth_charge=new TH1D("el_B_eth_charge","el_B_eth_charge",3,-1,2); |
890 |
– |
h_el_B_eth_charge->SetXTitle("charge"); |
891 |
– |
TH1D *h_el_B_eth_pfmet=new TH1D("el_B_eth_pfmet","el_B_eth_pfmet", 50, 0., 50); |
892 |
– |
TH1D *h_el_B_eth_HoverE=new TH1D("el_B_eth_HoverE","el_B_eth_HoverE", 50, 0, 3); |
893 |
– |
// eth electrons in the endcaps |
894 |
– |
TH1D *h_el_E_eth_deltaPhiSuperCluster=new TH1D("el_E_eth_deltaPhiSuperCluster","el_E_eth_deltaPhiSuperCluster", 30, 0, 1); |
895 |
– |
h_el_E_eth_deltaPhiSuperCluster->SetXTitle("#Delta #phi"); |
896 |
– |
TH1D *h_el_E_eth_deltaEtaSuperCluster=new TH1D("el_E_eth_deltaEtaSuperCluster","el_E_eth_deltaEtaSuperCluster", 30, 0, 1); |
897 |
– |
h_el_E_eth_deltaEtaSuperCluster->SetXTitle("#Delta #eta"); |
898 |
– |
TH1D *h_el_E_eth_deltaPhiSuperCluster2=new TH1D("el_E_eth_deltaPhiSuperCluster2","el_E_eth_deltaPhiSuperCluster2", 30, 0, 0.1); |
899 |
– |
h_el_E_eth_deltaPhiSuperCluster2->SetXTitle("#Delta #phi"); |
900 |
– |
TH1D *h_el_E_eth_deltaEtaSuperCluster2=new TH1D("el_E_eth_deltaEtaSuperCluster2","el_E_eth_deltaEtaSuperCluster2", 30, 0, 0.05); |
901 |
– |
h_el_E_eth_deltaEtaSuperCluster2->SetXTitle("#Delta #eta"); |
902 |
– |
TH1D *h_el_E_eth_caloenergy=new TH1D("el_E_eth_caloenergy","el_E_eth_caloenergy", 30,0.,50); |
903 |
– |
h_el_E_eth_caloenergy->SetXTitle("E [GeV]"); |
904 |
– |
TH1D *h_el_E_eth_trkmomatvtx=new TH1D("el_E_eth_trkmomatvtx","el_E_eth_trkmomatvtx", 30,0.,50); |
905 |
– |
h_el_E_eth_trkmomatvtx->SetXTitle("p [GeV]"); |
906 |
– |
TH1D *h_el_E_eth_oneOverEminusOneOverP=new TH1D("el_E_eth_oneOverEminusOneOverP","el_E_eth_oneOverEminusOneOverP",30,0.,3); |
907 |
– |
h_el_E_eth_oneOverEminusOneOverP->SetXTitle("|1 / E - 1 / p|"); |
908 |
– |
TH1D *h_el_E_eth_oneOverEminusOneOverP2=new TH1D("el_E_eth_oneOverEminusOneOverP2","el_E_eth_oneOverEminusOneOverP2",30,0.,0.1); |
909 |
– |
h_el_E_eth_oneOverEminusOneOverP2->SetXTitle("|1 / E - 1 / p|"); |
910 |
– |
TH1D *h_el_E_eth_sumPtOverE=new TH1D("el_E_eth_sumPtOverE","el_E_eth_sumPtOverE",30,0.,5); |
911 |
– |
h_el_E_eth_sumPtOverE->SetXTitle("#Sigma p_{T} / E"); |
912 |
– |
TH1D *h_el_E_eth_sigmaIetaIeta=new TH1D("el_E_eth_sigmaIetaIeta","el_E_eth_sigmaIetaIeta",30,0.,0.1); |
913 |
– |
h_el_E_eth_sigmaIetaIeta->SetXTitle("#sigma_{#eta #eta}"); |
914 |
– |
TH1D *h_el_E_eth_pt=new TH1D("el_E_eth_pt","el_E_eth_pt",50,0.,50); |
915 |
– |
h_el_E_eth_pt->SetXTitle("p_{T} [GeV]"); |
916 |
– |
TH1D *h_el_E_eth_eta=new TH1D("el_E_eth_eta","el_E_eth_eta",20,-3,3); |
917 |
– |
h_el_E_eth_eta->SetXTitle("#eta"); |
918 |
– |
TH1D *h_el_E_eth_phi=new TH1D("el_E_eth_phi","el_E_eth_phi",20,0.,Pi); |
919 |
– |
h_el_E_eth_phi->SetXTitle("#phi"); |
920 |
– |
TH1D *h_el_E_eth_fbrem=new TH1D("el_E_eth_fbrem","el_E_eth_fbrem",30,-0.2,1); |
921 |
– |
h_el_E_eth_fbrem->SetXTitle("f_{brem}"); |
922 |
– |
TH1D *h_el_E_eth_basicclustersize=new TH1D("el_E_eth_basicclustersize","el_E_eth_basicclustersize",10,0,10); |
923 |
– |
h_el_E_eth_basicclustersize->SetXTitle("N"); |
924 |
– |
TH1D *h_el_E_eth_chi2=new TH1D("el_E_eth_chi2","el_E_eth_chi2",30,0,5); |
925 |
– |
h_el_E_eth_chi2->SetXTitle("#chi^{2}"); |
926 |
– |
TH1D *h_el_E_eth_charge=new TH1D("el_E_eth_charge","el_E_eth_charge",3,-1,2); |
927 |
– |
h_el_E_eth_charge->SetXTitle("charge"); |
928 |
– |
TH1D *h_el_E_eth_pfmet=new TH1D("el_E_eth_pfmet","el_E_eth_pfmet", 50, 0., 50); |
929 |
– |
TH1D *h_el_E_eth_HoverE=new TH1D("el_E_eth_HoverE","el_E_eth_HoverE", 50, 0, 3); |
930 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
931 |
– |
|
932 |
– |
TH1D *h_jetPt = new TH1D("h_jetPt", "jet_Pt",100,0,100); |
933 |
– |
|
934 |
– |
/////////initialize variables |
774 |
|
|
936 |
– |
Long64_t nentries = fChain->GetEntriesFast(); |
937 |
– |
std::cout << "analysisClass::Loop(): nentries = " << nentries << std::endl; |
775 |
|
|
776 |
< |
////// The following ~7 lines have been taken from rootNtupleClass->Loop() ///// |
777 |
< |
////// If the root version is updated and rootNtupleClass regenerated, ///// |
778 |
< |
////// these lines may need to be updated. ///// |
779 |
< |
Long64_t nb = 0; |
780 |
< |
|
781 |
< |
for (Long64_t jentry=0; jentry<nentries;jentry++) |
782 |
< |
{ |
783 |
< |
Long64_t ientry = fChain->LoadTree(jentry); |
784 |
< |
if (ientry < 0) break; |
785 |
< |
nb=fChain->GetEntry(jentry); |
776 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
777 |
> |
// Z plots |
778 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
779 |
> |
int MAXZ=4; |
780 |
> |
TH1D *h_Z_invMass[MAXZ]; |
781 |
> |
TH1D *h_Z_ptAll[MAXZ]; |
782 |
> |
TH1D *h_Z_etaAll[MAXZ]; |
783 |
> |
TH1D *h_Z_phiAll[MAXZ]; |
784 |
> |
TH1D *h_Z_deltaPhi[MAXZ]; |
785 |
> |
TH1D *h_Z_ptDiLepton[MAXZ]; |
786 |
> |
TH1D *h_Z_etaDiLepton[MAXZ]; |
787 |
> |
TH1D *h_Z_phiDiLepton[MAXZ]; |
788 |
> |
|
789 |
> |
TH1D *h_Z_leadingJetPt[MAXZ]; |
790 |
> |
TH1D *h_Z_summedJetPt[MAXZ]; |
791 |
> |
TH1D *h_Z_leadingJetEta[MAXZ]; |
792 |
> |
TH1D *h_Z_summedJetEta[MAXZ]; |
793 |
> |
TH1D *h_Z_leadingJetPhi[MAXZ]; |
794 |
> |
TH1D *h_Z_summedJetPhi[MAXZ]; |
795 |
> |
TH1D *h_Z_nJets[MAXZ]; |
796 |
> |
TH1D *h_Z_leadingJetDeltaPt[MAXZ]; |
797 |
> |
TH1D *h_Z_leadingJetDeltaEta[MAXZ]; |
798 |
> |
TH1D *h_Z_leadingJetDeltaPhi[MAXZ]; |
799 |
> |
TH1D *h_Z_summedJetDeltaPt[MAXZ]; |
800 |
> |
TH1D *h_Z_summedJetDeltaEta[MAXZ]; |
801 |
> |
TH1D *h_Z_summedJetDeltaPhi[MAXZ]; |
802 |
> |
TH1D *h_Z_recoilPt[MAXZ]; |
803 |
> |
TH1D *h_Z_recoilEta[MAXZ]; |
804 |
> |
TH1D *h_Z_recoilPhi[MAXZ]; |
805 |
> |
TH1D *h_Z_metPt[MAXZ]; |
806 |
> |
TH1D *h_Z_metEta[MAXZ]; |
807 |
> |
TH1D *h_Z_metPhi[MAXZ]; |
808 |
> |
|
809 |
> |
|
810 |
> |
|
811 |
> |
for(int i=0; i<MAXZ; i++) { |
812 |
> |
sprintf(name,"h_Z_invMass_%d",i); |
813 |
> |
h_Z_invMass[i] = new TH1D(name,name,80,0,200); |
814 |
> |
h_Z_invMass[i]->SetXTitle("m_{ee} [GeV/c^{2}]"); |
815 |
> |
h_Z_invMass[i]->SetYTitle("events / bin"); |
816 |
> |
|
817 |
> |
sprintf(name,"h_Z_ptAll_%d",i); |
818 |
> |
h_Z_ptAll[i] = new TH1D(name,name,20,0,200); |
819 |
> |
h_Z_ptAll[i]->SetXTitle("p_{T} [GeV]"); |
820 |
> |
h_Z_ptAll[i]->SetYTitle("events / bin"); |
821 |
> |
sprintf(name,"h_Z_etaAll_%d",i); |
822 |
> |
h_Z_etaAll[i] = new TH1D(name,name,12,-3.,3.); |
823 |
> |
h_Z_etaAll[i]->SetXTitle("#eta"); |
824 |
> |
h_Z_etaAll[i]->SetYTitle("events / bin"); |
825 |
> |
sprintf(name,"h_Z_phiAll_%d",i); |
826 |
> |
h_Z_phiAll[i] = new TH1D(name,name,30,-Pi,Pi); |
827 |
> |
h_Z_phiAll[i]->SetXTitle("#phi"); |
828 |
> |
h_Z_phiAll[i]->SetYTitle("events / bin"); |
829 |
> |
sprintf(name,"h_Z_deltaPhi_%d",i); |
830 |
> |
h_Z_deltaPhi[i] = new TH1D(name,name,15,0,Pi); |
831 |
> |
h_Z_deltaPhi[i]->SetXTitle("#Delta #phi_{ee}"); |
832 |
> |
h_Z_deltaPhi[i]->SetYTitle("events / bin"); |
833 |
> |
|
834 |
> |
sprintf(name,"h_Z_ptDiLepton_%d",i); |
835 |
> |
h_Z_ptDiLepton[i] = new TH1D(name,name,20,0,200); |
836 |
> |
h_Z_ptDiLepton[i]->SetXTitle("p_{T} [GeV]"); |
837 |
> |
h_Z_ptDiLepton[i]->SetYTitle("events / bin"); |
838 |
> |
sprintf(name,"h_Z_etaDiLepton_%d",i); |
839 |
> |
h_Z_etaDiLepton[i] = new TH1D(name,name,16,-8.,8.); |
840 |
> |
h_Z_etaDiLepton[i]->SetXTitle("#eta"); |
841 |
> |
h_Z_etaDiLepton[i]->SetYTitle("events / bin"); |
842 |
> |
sprintf(name,"h_Z_phiDiLepton_%d",i); |
843 |
> |
h_Z_phiDiLepton[i] = new TH1D(name,name,30,-Pi,Pi); |
844 |
> |
h_Z_phiDiLepton[i]->SetXTitle("#phi"); |
845 |
> |
h_Z_phiDiLepton[i]->SetYTitle("events / bin"); |
846 |
> |
|
847 |
> |
|
848 |
> |
sprintf(name,"h_Z_leadingJetPt_%d",i); |
849 |
> |
h_Z_leadingJetPt[i] = new TH1D(name,name,20,0,200); |
850 |
> |
h_Z_leadingJetPt[i]->SetXTitle("p_{T} [GeV]"); |
851 |
> |
h_Z_leadingJetPt[i]->SetYTitle("events / bin"); |
852 |
> |
sprintf(name,"h_Z_summedJetPt_%d",i); |
853 |
> |
h_Z_summedJetPt[i] = new TH1D(name,name,20,0,200); |
854 |
> |
h_Z_summedJetPt[i]->SetXTitle("p_{T} [GeV]"); |
855 |
> |
h_Z_summedJetPt[i]->SetYTitle("events / bin"); |
856 |
> |
sprintf(name,"h_Z_leadingJetEta_%d",i); |
857 |
> |
h_Z_leadingJetEta[i] = new TH1D(name,name,12,-3,3); |
858 |
> |
h_Z_leadingJetEta[i]->SetXTitle("#eta"); |
859 |
> |
h_Z_leadingJetEta[i]->SetYTitle("events / bin"); |
860 |
> |
sprintf(name,"h_Z_summedJetEta_%d",i); |
861 |
> |
h_Z_summedJetEta[i] = new TH1D(name,name,16,-8,8); |
862 |
> |
h_Z_summedJetEta[i]->SetXTitle("#eta"); |
863 |
> |
h_Z_summedJetEta[i]->SetYTitle("events / bin"); |
864 |
> |
sprintf(name,"h_Z_leadingJetPhi_%d",i); |
865 |
> |
h_Z_leadingJetPhi[i] = new TH1D(name,name,30,-Pi,Pi); |
866 |
> |
h_Z_leadingJetPhi[i]->SetXTitle("#phi"); |
867 |
> |
h_Z_leadingJetPhi[i]->SetYTitle("events / bin"); |
868 |
> |
sprintf(name,"h_Z_summedJetPhi_%d",i); |
869 |
> |
h_Z_summedJetPhi[i] = new TH1D(name,name,30,-Pi,Pi); |
870 |
> |
h_Z_summedJetPhi[i]->SetXTitle("#phi"); |
871 |
> |
h_Z_summedJetPhi[i]->SetYTitle("events / bin"); |
872 |
> |
|
873 |
> |
sprintf(name,"h_Z_nJets_%d",i); |
874 |
> |
h_Z_nJets[i] = new TH1D(name,name,11,0,11); |
875 |
> |
h_Z_nJets[i]->SetXTitle("jet number"); |
876 |
> |
h_Z_nJets[i]->SetYTitle("events / bin"); |
877 |
> |
|
878 |
> |
sprintf(name,"h_Z_leadingJetDeltaPt_%d",i); |
879 |
> |
h_Z_leadingJetDeltaPt[i] = new TH1D(name,name,60,-150,150); |
880 |
> |
h_Z_leadingJetDeltaPt[i]->SetXTitle("#Delta p_{T,jZ} [GeV]"); |
881 |
> |
h_Z_leadingJetDeltaPt[i]->SetYTitle("events / bin"); |
882 |
> |
sprintf(name,"h_Z_leadingJetDeltaEta_%d",i); |
883 |
> |
h_Z_leadingJetDeltaEta[i] = new TH1D(name,name,16,-8,8); |
884 |
> |
h_Z_leadingJetDeltaEta[i]->SetXTitle("#Delta #eta_{jZ}"); |
885 |
> |
h_Z_leadingJetDeltaEta[i]->SetYTitle("events / bin"); |
886 |
> |
sprintf(name,"h_Z_leadingJetDeltaPhi_%d",i); |
887 |
> |
h_Z_leadingJetDeltaPhi[i] = new TH1D(name,name,15,0,Pi); |
888 |
> |
h_Z_leadingJetDeltaPhi[i]->SetXTitle("#Delta #phi_{jZ}"); |
889 |
> |
h_Z_leadingJetDeltaPhi[i]->SetYTitle("events / bin"); |
890 |
> |
|
891 |
> |
sprintf(name,"h_Z_summedJetDeltaPt_%d",i); |
892 |
> |
h_Z_summedJetDeltaPt[i] = new TH1D(name,name,60,-150,150); |
893 |
> |
h_Z_summedJetDeltaPt[i]->SetXTitle("#Delta p_{T,jZ} [GeV]"); |
894 |
> |
h_Z_summedJetDeltaPt[i]->SetYTitle("events / bin"); |
895 |
> |
sprintf(name,"h_Z_summedJetDeltaEta_%d",i); |
896 |
> |
h_Z_summedJetDeltaEta[i] = new TH1D(name,name,16,-8,8); |
897 |
> |
h_Z_summedJetDeltaEta[i]->SetXTitle("#Delta #eta_{jZ}"); |
898 |
> |
h_Z_summedJetDeltaEta[i]->SetYTitle("events / bin"); |
899 |
> |
sprintf(name,"h_Z_summedJetDeltaPhi_%d",i); |
900 |
> |
h_Z_summedJetDeltaPhi[i] = new TH1D(name,name,15,0,Pi); |
901 |
> |
h_Z_summedJetDeltaPhi[i]->SetXTitle("#Delta #phi_{jZ}"); |
902 |
> |
h_Z_summedJetDeltaPhi[i]->SetYTitle("events / bin"); |
903 |
> |
|
904 |
> |
sprintf(name,"h_Z_recoilPt_%d",i); |
905 |
> |
h_Z_recoilPt[i] = new TH1D(name,name,20,0,200); |
906 |
> |
h_Z_recoilPt[i]->SetXTitle("p_{T,j+Z} [GeV]"); |
907 |
> |
h_Z_recoilPt[i]->SetYTitle("events / bin"); |
908 |
> |
sprintf(name,"h_Z_recoilEta_%d",i); |
909 |
> |
h_Z_recoilEta[i] = new TH1D(name,name,16,-8,8); |
910 |
> |
h_Z_recoilEta[i]->SetXTitle("#eta_{j+Z}"); |
911 |
> |
h_Z_recoilEta[i]->SetYTitle("events / bin"); |
912 |
> |
sprintf(name,"h_Z_recoilPhi_%d",i); |
913 |
> |
h_Z_recoilPhi[i] = new TH1D(name,name,30,-Pi,Pi); |
914 |
> |
h_Z_recoilPhi[i]->SetXTitle("#phi_{j+Z}"); |
915 |
> |
h_Z_recoilPhi[i]->SetYTitle("events / bin"); |
916 |
> |
|
917 |
> |
sprintf(name,"h_Z_metPt_%d",i); |
918 |
> |
h_Z_metPt[i] = new TH1D(name,name,20,0,200); |
919 |
> |
h_Z_metPt[i]->SetXTitle("#slash{p}_{T} [GeV]"); |
920 |
> |
h_Z_metPt[i]->SetYTitle("events / bin"); |
921 |
> |
sprintf(name,"h_Z_metEta_%d",i); |
922 |
> |
h_Z_metEta[i] = new TH1D(name,name,16,-8,8); |
923 |
> |
h_Z_metEta[i]->SetXTitle("#eta_{#slash{p}_{T}}"); |
924 |
> |
h_Z_metEta[i]->SetYTitle("events / bin"); |
925 |
> |
sprintf(name,"h_Z_metPhi_%d",i); |
926 |
> |
h_Z_metPhi[i] = new TH1D(name,name,30,-Pi,Pi); |
927 |
> |
h_Z_metPhi[i]->SetXTitle("#phi_{#slash{p}_{T}}"); |
928 |
> |
h_Z_metPhi[i]->SetYTitle("events / bin"); |
929 |
|
|
930 |
< |
if(jentry < 10 || jentry%1000 == 0) std::cout << "analysisClass::Loop(): jentry = " << jentry << std::endl; |
951 |
< |
|
952 |
< |
|
953 |
< |
if(sampleSize!=-1 && sampleSize==jentry) { |
954 |
< |
goto END; |
955 |
< |
} |
956 |
< |
totalNumberOfEvents++; |
957 |
< |
h_numberOfEvents->Fill(1); |
958 |
< |
|
959 |
< |
//////////////////////////////////////////////////////////////////// |
960 |
< |
////////////////////// User's code starts here /////////////////////// |
961 |
< |
//////////////////////////////////////////////////////////////////// |
962 |
< |
|
963 |
< |
// check the methods defined in baseClass |
964 |
< |
|
965 |
< |
|
966 |
< |
vector<TLorentzVector> electronsTight; |
967 |
< |
vector<TLorentzVector> electronsETH; |
968 |
< |
vector<TLorentzVector> electronsTightIsolated; |
969 |
< |
vector<TLorentzVector> electronsETHIsolated; |
970 |
< |
vector<TLorentzVector> jets; |
971 |
< |
electronsTight.clear(); |
972 |
< |
electronsETH.clear(); |
973 |
< |
jets.clear(); |
974 |
< |
|
975 |
< |
|
976 |
< |
int BSC_techbit = 0; |
977 |
< |
int BeamHalo = 0; |
978 |
< |
|
979 |
< |
// -------------------------------------------------------------------------------- |
980 |
< |
// Event Selection |
981 |
< |
// -------------------------------------------------------------------------------- |
982 |
< |
|
983 |
< |
// Trigger Bit Selection |
984 |
< |
bool passedTrigger=false; |
985 |
< |
if(isdata==true && triggerBitSelection(HLTResults, L1PhysResults, L1TechResults)==true) passedTrigger=true; |
986 |
< |
// NB: no trigger for MC!!! |
987 |
< |
else if(isdata==false) passedTrigger=true; |
988 |
< |
|
989 |
< |
// Primary Vertex Selection |
990 |
< |
// bool goodPV=false; |
991 |
< |
bool goodPV=true; |
992 |
< |
// if(goodPrimaryVertexSelection(PrimVtxNTracks, PrimVtxz)==true) goodPV=true; |
993 |
< |
|
994 |
< |
// No Beam Scraping |
995 |
< |
// bool noBeamScraping=false; |
996 |
< |
// if(noBeamScrapingSelection(NTracks, TrkGood, )==true) noBeamScraping=true; |
997 |
< |
|
998 |
< |
// for(int i=0;i<NTracks;i++) { |
999 |
< |
// cout<<"*"<<TrkGood[i]<<endl; |
1000 |
< |
// } |
930 |
> |
// TH2D *h_Z_summedJetDeltaPhi_VS_deltaPhi("summedJetDeltaPhi_VS_deltaPhi", "summedJetDeltaPhi_VS_deltaPhi", 30,-Pi,Pi,15,0,Pi); |
931 |
|
|
932 |
+ |
} |
933 |
+ |
// -------------------------------------------------------------------------------------------------------------------- |
934 |
|
|
1003 |
– |
// final event selection |
1004 |
– |
bool selectedEvent=false; |
1005 |
– |
if(passedTrigger==true && goodPV==true) selectedEvent=true; |
935 |
|
|
936 |
< |
// -------------------------------------------------------------------------------- |
936 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
937 |
> |
// get the trigger map this is done once per input file |
938 |
> |
// check that all files in the same input file have the |
939 |
> |
// same trigger table |
940 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
941 |
> |
getHLTtable(); |
942 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
943 |
|
|
944 |
|
|
945 |
< |
if(selectedEvent==true) { |
945 |
> |
//////////////////////////////////////////////////////////////////// |
946 |
> |
////////////////////Loop over entries starts here ////////////////// |
947 |
> |
//////////////////////////////////////////////////////////////////// |
948 |
> |
|
949 |
|
|
950 |
|
|
951 |
< |
// -------------------------------------------------------------------------------- |
952 |
< |
// get the MET |
953 |
< |
// -------------------------------------------------------------------------------- |
954 |
< |
double met; |
955 |
< |
double metPhi; |
956 |
< |
double delPhiMet; |
957 |
< |
met=PFMET; |
958 |
< |
metPhi=PFMETphi; |
959 |
< |
|
951 |
> |
|
952 |
> |
TH1D *h_jetPt = new TH1D("h_jetPt", "jet_Pt",100,0,100); |
953 |
> |
|
954 |
> |
/////////initialize variables |
955 |
> |
|
956 |
> |
Long64_t nentries = fChain->GetEntriesFast(); |
957 |
> |
std::cout << "analysisClass::Loop(): nentries = " << nentries << std::endl; |
958 |
> |
|
959 |
> |
////// The following ~7 lines have been taken from rootNtupleClass->Loop() ///// |
960 |
> |
////// If the root version is updated and rootNtupleClass regenerated, ///// |
961 |
> |
////// these lines may need to be updated. ///// |
962 |
> |
Long64_t nb = 0; |
963 |
> |
|
964 |
|
|
965 |
+ |
for (Long64_t jentry=0; jentry<nentries;jentry++) { // loop over all events (entries) in the tree/chain |
966 |
|
|
1024 |
– |
// -------------------------------------------------------------------------------- |
1025 |
– |
// get the number of jets |
1026 |
– |
// -------------------------------------------------------------------------------- |
1027 |
– |
int njets=0; |
967 |
|
|
968 |
+ |
Long64_t ientry = fChain->LoadTree(jentry); // ientry: this is a counter over each single file in the input list |
969 |
|
|
970 |
< |
vector<TLorentzVector> jets; |
971 |
< |
for(int j=0;j<NJets;j++) { |
972 |
< |
TLorentzVector vec; |
973 |
< |
vec.SetPxPyPzE(JPx[j],JPy[j],JPz[j],JE[j]); |
974 |
< |
if(JPx[j]>jetPtMin) { |
970 |
> |
if (ientry < 0) {cerr<<"WARNING: ientry = "<<ientry<<" is smaller than 0! (this is ok if the end of the file is reached...)"<<endl; break; } |
971 |
> |
|
972 |
> |
nb=fChain->GetEntry(jentry); |
973 |
> |
//fChain->GetEntry(jentry); |
974 |
> |
|
975 |
> |
if(jentry < 10 || jentry%1000 == 0) { |
976 |
> |
std::cout << "analysisClass::Loop(): Events processed = " << jentry << std::endl; |
977 |
> |
} |
978 |
> |
|
979 |
> |
if(sampleSize!=-1 && sampleSize==jentry) { |
980 |
> |
goto END; |
981 |
> |
} |
982 |
> |
totalNumberOfEvents++; |
983 |
> |
h_numberOfEvents->Fill(1); |
984 |
> |
|
985 |
> |
//////////////////////////////////////////////////////////////////// |
986 |
> |
////////////////////// User's code starts here ///////////////////// |
987 |
> |
//////////////////////////////////////////////////////////////////// |
988 |
> |
|
989 |
> |
// check the methods defined in baseClass |
990 |
> |
|
991 |
> |
testEvent lepton; |
992 |
> |
lepton = fillTestEvent(); |
993 |
> |
for(int ii=0;ii<NEles;ii++) { |
994 |
> |
// cout<<"pt: "<<lepton.fourMomentum[ii].Perp()<<endl; |
995 |
> |
} |
996 |
> |
|
997 |
> |
jetIndex.clear(); |
998 |
> |
electronIndex.clear(); |
999 |
> |
|
1000 |
> |
|
1001 |
> |
vector<TLorentzVector> electronsTight; |
1002 |
> |
vector<TLorentzVector> electronsETH; |
1003 |
> |
vector<TLorentzVector> electronsTightIsolated; |
1004 |
> |
vector<TLorentzVector> electronsETHIsolated; |
1005 |
> |
vector<TLorentzVector> jets; |
1006 |
> |
electronsTight.clear(); |
1007 |
> |
electronsETH.clear(); |
1008 |
> |
jets.clear(); |
1009 |
> |
|
1010 |
> |
|
1011 |
> |
int BSC_techbit = 0; |
1012 |
> |
int BeamHalo = 0; |
1013 |
> |
|
1014 |
> |
|
1015 |
> |
// -------------------------------------------------------------------------------- |
1016 |
> |
// get the MET |
1017 |
> |
// -------------------------------------------------------------------------------- |
1018 |
> |
double met; |
1019 |
> |
double metPhi; |
1020 |
> |
// double metEta; |
1021 |
> |
double delPhiMet; |
1022 |
> |
met=PFMET; |
1023 |
> |
metPhi=PFMETphi; |
1024 |
> |
// metEta=PFMETeta; |
1025 |
> |
|
1026 |
> |
// -------------------------------------------------------------------------------- |
1027 |
> |
// get the number of jets |
1028 |
> |
// -------------------------------------------------------------------------------- |
1029 |
> |
int njets=0; |
1030 |
> |
|
1031 |
> |
|
1032 |
> |
// vector<TLorentzVector> jets; |
1033 |
> |
for(int j=0;j<NJets;j++) { |
1034 |
> |
TLorentzVector vec; |
1035 |
> |
vec.SetPxPyPzE(JPx[j],JPy[j],JPz[j],JE[j]); |
1036 |
> |
if(JPx[j]>jetPtMin) { |
1037 |
|
jets.push_back(vec); |
1038 |
< |
} |
1039 |
< |
} |
1040 |
< |
vector<TLorentzVector> eles; |
1041 |
< |
for(int e=0;e<NEles;e++) { |
1042 |
< |
TLorentzVector vec; |
1043 |
< |
vec.SetPxPyPzE(ElPx[e],ElPy[e],ElPz[e],ElE[e]); |
1044 |
< |
myEvent ele; |
1045 |
< |
ele.fourvector.push_back(vec); |
1046 |
< |
ele.momentum.push_back(ElPt[e]); |
1047 |
< |
ele.missinget=met; |
1048 |
< |
ele.charge.push_back(ElCharge[e]); |
1049 |
< |
double dEtaCorrection=0; |
1050 |
< |
double dPhiCorrection=0; |
1051 |
< |
if(isdata==true && applyDeltaCorrection==true) { |
1052 |
< |
dEtaCorrection=detaCorrections(ElEta[e], ElPhi[e]); |
1053 |
< |
dPhiCorrection=dphiCorrections(ElEta[e], ElPhi[e]); |
1054 |
< |
} |
1055 |
< |
ele.deltaPhi.push_back(ElDeltaPhiSuperClusterAtVtx[e] - dPhiCorrection); |
1056 |
< |
ele.deltaEta.push_back(ElDeltaEtaSuperClusterAtVtx[e] - dEtaCorrection); |
1057 |
< |
ele.oneOverEminusOverP.push_back(fabs(1/ElCaloEnergy[e]-1/ElTrkMomAtVtx[e])); |
1058 |
< |
ele.transverseMass.push_back(transverseMass(ElPt[e], met, deltaPhi(ElPhi[e],metPhi))); |
1059 |
< |
ele.ethIso.push_back(ElDR03TkSumPt[e]/ElCaloEnergy[e]); |
1060 |
< |
if(workingPoint>0) { |
1061 |
< |
ele.trkIso.push_back(ElDR03TkSumPt[e]/ElPt[e]); |
1062 |
< |
ele.ecalIso.push_back(ElDR03EcalRecHitSumEt[e]/ElPt[e]); |
1063 |
< |
ele.hcalIso.push_back(ElDR03HcalTowerSumEt[e]/ElPt[e]); |
1064 |
< |
} |
1065 |
< |
if(workingPoint<0) { |
1066 |
< |
ele.trkIso.push_back(ElDR03TkSumPt[e]); |
1067 |
< |
ele.ecalIso.push_back(ElDR04EcalRecHitSumEt[e]); |
1068 |
< |
ele.hcalIso.push_back(ElDR04HcalTowerSumEt[e]); |
1069 |
< |
} |
1070 |
< |
ele.HoverE.push_back(ElHcalOverEcal[e]); |
1071 |
< |
ele.sigmaIetaIeta.push_back(ElSigmaIetaIeta[e]); |
1072 |
< |
if(noInnerHitInfo==false) { |
1073 |
< |
ele.numberOfMissingInnerHits.push_back(ElNumberOfMissingInnerHits[e]); |
1074 |
< |
} |
1075 |
< |
else if(noInnerHitInfo==true) { |
1076 |
< |
ele.numberOfMissingInnerHits.push_back(0); |
1077 |
< |
} |
1078 |
< |
// check if really only one electron is filled |
1079 |
< |
if(ele.fourvector.size()>1) { |
1080 |
< |
cout<<"ele size to large!!!: "<<ele.fourvector.size()<<endl; |
1081 |
< |
break; |
1082 |
< |
} |
1083 |
< |
|
1084 |
< |
if(WorkingPointID(ele, WorkingPointCuts)==true && ele.momentum[0]>20) { |
1085 |
< |
eles.push_back(vec); |
1086 |
< |
//debug++; |
1087 |
< |
} |
1088 |
< |
} |
1089 |
< |
if(eles.size()>0) {cout<<"????????????"<<eles.size()<<endl; } |
1038 |
> |
} |
1039 |
> |
} |
1040 |
> |
vector<TLorentzVector> eles; |
1041 |
> |
for(int e=0;e<NEles;e++) { |
1042 |
> |
TLorentzVector vec; |
1043 |
> |
vec.SetPxPyPzE(ElPx[e],ElPy[e],ElPz[e],ElE[e]); |
1044 |
> |
myEvent ele; |
1045 |
> |
ele.fourvector.push_back(vec); |
1046 |
> |
ele.momentum.push_back(ElPt[e]); |
1047 |
> |
ele.missinget=met; |
1048 |
> |
ele.charge.push_back(ElCharge[e]); |
1049 |
> |
double dEtaCorrection=0; |
1050 |
> |
double dPhiCorrection=0; |
1051 |
> |
if(isdata==true && applyDeltaCorrection==true) { |
1052 |
> |
dEtaCorrection=detaCorrections(ElEta[e], ElPhi[e]); |
1053 |
> |
dPhiCorrection=dphiCorrections(ElEta[e], ElPhi[e]); |
1054 |
> |
} |
1055 |
> |
ele.deltaPhi.push_back(ElDeltaPhiSuperClusterAtVtx[e] - dPhiCorrection); |
1056 |
> |
ele.deltaEta.push_back(ElDeltaEtaSuperClusterAtVtx[e] - dEtaCorrection); |
1057 |
> |
ele.oneOverEminusOverP.push_back(fabs(1/ElCaloEnergy[e]-1/ElTrkMomAtVtx[e])); |
1058 |
> |
ele.transverseMass.push_back(transverseMass(ElPt[e], met, deltaPhi(ElPhi[e],metPhi))); |
1059 |
> |
ele.ethIso.push_back(ElDR03TkSumPt[e]/ElCaloEnergy[e]); |
1060 |
> |
if(workingPoint>0) { |
1061 |
> |
ele.trkIso.push_back(ElDR03TkSumPt[e]/ElPt[e]); |
1062 |
> |
ele.ecalIso.push_back(ElDR03EcalRecHitSumEt[e]/ElPt[e]); |
1063 |
> |
ele.hcalIso.push_back(ElDR03HcalTowerSumEt[e]/ElPt[e]); |
1064 |
> |
} |
1065 |
> |
if(workingPoint<0) { |
1066 |
> |
ele.trkIso.push_back(ElDR03TkSumPt[e]); |
1067 |
> |
ele.ecalIso.push_back(ElDR04EcalRecHitSumEt[e]); |
1068 |
> |
ele.hcalIso.push_back(ElDR04HcalTowerSumEt[e]); |
1069 |
> |
} |
1070 |
> |
ele.HoverE.push_back(ElHcalOverEcal[e]); |
1071 |
> |
ele.sigmaIetaIeta.push_back(ElSigmaIetaIeta[e]); |
1072 |
> |
if(noInnerHitInfo==false) { |
1073 |
> |
ele.numberOfMissingInnerHits.push_back(ElNumberOfMissingInnerHits[e]); |
1074 |
> |
} |
1075 |
> |
else if(noInnerHitInfo==true) { |
1076 |
> |
ele.numberOfMissingInnerHits.push_back(0); |
1077 |
> |
} |
1078 |
> |
// check if really only one electron is filled |
1079 |
> |
if(ele.fourvector.size()>1) { |
1080 |
> |
cout<<"ele size to large!!!: "<<ele.fourvector.size()<<endl; |
1081 |
> |
break; |
1082 |
> |
} |
1083 |
> |
|
1084 |
> |
if(WorkingPointID(ele, WorkingPointCuts)==true && ele.momentum[0]>20) { |
1085 |
> |
eles.push_back(vec); |
1086 |
> |
//debug++; |
1087 |
> |
} |
1088 |
> |
} |
1089 |
> |
|
1090 |
> |
int matched=0; |
1091 |
> |
double dR=9999.; |
1092 |
> |
for(int nj=0;nj<jets.size();nj++) { |
1093 |
> |
for(int ne=0;ne<eles.size();ne++) { |
1094 |
|
|
1095 |
< |
int matched=0; |
1096 |
< |
double dR=9999.; |
1097 |
< |
for(int nj=0;nj<jets.size();nj++) { |
1098 |
< |
for(int ne=0;ne<eles.size();ne++) { |
1095 |
> |
double deltaR=fabs(jets[nj].DeltaR(eles[ne])); |
1096 |
> |
if(deltaR<dR) dR=deltaR; |
1097 |
> |
} |
1098 |
> |
if(dR>deltaRMax) njets++; |
1099 |
> |
} |
1100 |
> |
|
1101 |
> |
// -------------------------------------------------------------------------------- |
1102 |
> |
// ugly implemented JET VETO and MET cut |
1103 |
> |
// -------------------------------------------------------------------------------- |
1104 |
|
|
1094 |
– |
double deltaR=fabs(jets[nj].DeltaR(eles[ne])); |
1095 |
– |
if(deltaR<dR) dR=deltaR; |
1096 |
– |
} |
1097 |
– |
if(dR>deltaRMax) njets++; |
1098 |
– |
} |
1099 |
– |
// cout<<"*******"<<endl; |
1100 |
– |
// cout<<"raw: "<<jets.size()<<endl; |
1101 |
– |
// cout<<"cleaned: "<<njets<<endl; |
1102 |
– |
// cout<<jets.size()<<njets<<endl; |
1105 |
|
|
1106 |
< |
// if(njets>0 || met<25) continue; |
1106 |
> |
if(applyJetVeto==true && (njets>0 || met<25)) continue; |
1107 |
|
|
1108 |
|
// -------------------------------------------------------------------------------- |
1109 |
|
|
1125 |
|
double oneOverEminusOneOverPCut=0.005; |
1126 |
|
bool ethIDpassed=false; |
1127 |
|
|
1128 |
+ |
|
1129 |
+ |
|
1130 |
|
// loop over all electrons in one event |
1131 |
|
for(int i=0; i<NEles; i++) { |
1132 |
|
|
1133 |
+ |
// if(ElectronPreselection(i)==0) debug++; |
1134 |
+ |
|
1135 |
+ |
|
1136 |
+ |
// -------------------------------------------------------------------------------- |
1137 |
+ |
// check acceptance region of the electrons... |
1138 |
+ |
// -------------------------------------------------------------------------------- |
1139 |
+ |
double accEta; |
1140 |
+ |
// accEta = ElEta[i]; |
1141 |
+ |
accEta = ElSCEta[i]; // use the SC eta to define acceptance |
1142 |
+ |
// -------------------------------------------------------------------------------- |
1143 |
+ |
|
1144 |
+ |
|
1145 |
|
|
1146 |
+ |
|
1147 |
+ |
// -------------------------------------------------------------------------------- |
1148 |
|
// apply corrections for delta eta and delta phi |
1149 |
+ |
// -------------------------------------------------------------------------------- |
1150 |
|
double dEtaCorrection=0; |
1151 |
|
double dPhiCorrection=0; |
1152 |
|
if(isdata==true && applyDeltaCorrection==true) { |
1153 |
< |
dEtaCorrection=detaCorrections(ElEta[i], ElPhi[i]); |
1154 |
< |
dPhiCorrection=dphiCorrections(ElEta[i], ElPhi[i]); |
1153 |
> |
dEtaCorrection=detaCorrections(accEta, ElPhi[i]); |
1154 |
> |
dPhiCorrection=dphiCorrections(accEta, ElPhi[i]); |
1155 |
|
} |
1156 |
+ |
// -------------------------------------------------------------------------------- |
1157 |
|
|
1158 |
< |
cout<<"*************************"<<endl; |
1139 |
< |
cout<<"ElEta: "<<ElPhi[i]<<endl; |
1140 |
< |
cout<<"DEta: "<<dPhiCorrection<<endl; |
1141 |
< |
cout<<"CorrEta: "<<ElPhi[i]-dPhiCorrection<<endl; |
1142 |
< |
cout<<"*************************"<<endl; |
1143 |
< |
|
1144 |
< |
|
1145 |
< |
|
1158 |
> |
// -------------------------------------------------------------------------------- |
1159 |
|
// fill the myevent |
1160 |
+ |
// -------------------------------------------------------------------------------- |
1161 |
|
TLorentzVector vec; |
1162 |
|
vec.SetPxPyPzE(ElPx[i],ElPy[i],ElPz[i],ElE[i]); |
1163 |
|
myEvent candidate; |
1194 |
|
cout<<"candidate size to large!!!: "<<candidate.fourvector.size()<<endl; |
1195 |
|
break; |
1196 |
|
} |
1197 |
+ |
// -------------------------------------------------------------------------------- |
1198 |
+ |
|
1199 |
+ |
// check if electron is in acceptance region of the detector |
1200 |
+ |
if(fabs(accEta)<etaEndcapMax) { |
1201 |
+ |
|
1202 |
|
|
1203 |
< |
// fill a set of plots for the gsf electron candidates |
1204 |
< |
int cut=0; |
1186 |
< |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1187 |
< |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1188 |
< |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1189 |
< |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1190 |
< |
); |
1191 |
< |
|
1192 |
< |
// make the electron preselection |
1193 |
< |
if(applyCut[1]==false || ElHcalOverEcal[i]<Pre_HoverEMin) { |
1194 |
< |
cut=1; |
1195 |
< |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1203 |
> |
// fill a set of plots for the gsf electron candidates |
1204 |
> |
int cut=0; |
1205 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1206 |
|
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1207 |
|
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1208 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1209 |
< |
); |
1210 |
< |
if(applyCut[2]==false || fabs(ElDeltaPhiSuperClusterAtVtx[i] -dPhiCorrection)<Pre_deltaPhiMax) { |
1211 |
< |
cut=2; |
1212 |
< |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1209 |
> |
); |
1210 |
> |
|
1211 |
> |
// make the electron preselection |
1212 |
> |
if(applyCut[1]==false || ElHcalOverEcal[i]<Pre_HoverEMin) { |
1213 |
> |
cut=1; |
1214 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1215 |
|
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1216 |
|
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1217 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1218 |
< |
); |
1219 |
< |
if(applyCut[3]==false || fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)<Pre_deltaEtaMax) { |
1220 |
< |
cut=3; |
1211 |
< |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1218 |
> |
); |
1219 |
> |
if(applyCut[2]==false || fabs(ElDeltaPhiSuperClusterAtVtx[i] -dPhiCorrection)<Pre_deltaPhiMax) { |
1220 |
> |
cut=2; |
1221 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1222 |
|
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1223 |
|
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1224 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1225 |
|
); |
1226 |
< |
|
1227 |
< |
if(applyCut[4]==false || ElPt[i]>Pre_pt) { |
1219 |
< |
cut=4; |
1220 |
< |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1226 |
> |
if(applyCut[3]==false || fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)<Pre_deltaEtaMax) { |
1227 |
> |
cut=3; |
1228 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1229 |
|
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1230 |
|
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1231 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1232 |
|
); |
1226 |
– |
|
1227 |
– |
// now the preselection is done... |
1233 |
|
|
1234 |
< |
// ask for triggers HLT_Photon10 |
1235 |
< |
// cout<<"Trigger: 53: "<<HLTResults[53]<<"/ 54: "<<HLTResults[54]<<"/ 55: "<<HLTResults[55]<<endl; |
1231 |
< |
if(applyCut[5]==false || HLTResults[71]==1) { // 54 |
1232 |
< |
cut=5; |
1233 |
< |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1234 |
> |
if(applyCut[4]==false || ElPt[i]>Pre_pt) { |
1235 |
> |
cut=4; |
1236 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1237 |
|
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1238 |
|
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1239 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1240 |
|
); |
1241 |
+ |
|
1242 |
+ |
|
1243 |
+ |
// now the preselection is done... |
1244 |
+ |
|
1245 |
+ |
// ask for triggers HLT_Photon10 |
1246 |
+ |
// cout<<"Trigger: 53: "<<HLTResults[53]<<"/ 54: "<<HLTResults[54]<<"/ 55: "<<HLTResults[55]<<endl; |
1247 |
+ |
|
1248 |
+ |
// get the right trigger bit |
1249 |
+ |
int Photon10; |
1250 |
+ |
int Photon15; |
1251 |
+ |
int Photon10_Cleaned; |
1252 |
+ |
int Ele15; |
1253 |
+ |
Photon10 = getHLTtriggerBit("HLT_Photon10_L1R"); |
1254 |
+ |
Photon15 = getHLTtriggerBit("HLT_Photon15_L1R"); |
1255 |
+ |
// Photon10_Cleaned = getHLTtriggerBit("HLT_Photon10_Cleaned_L1R"); |
1256 |
+ |
Ele15 = getHLTtriggerBit("HLT_Ele15_LW_L1R"); |
1257 |
+ |
|
1258 |
+ |
if(applyCut[5]==false || HLTResults[Photon10]==1 || HLTResults[Photon15]==1 || HLTResults[Ele15]==1) { |
1259 |
+ |
// if(true) { |
1260 |
+ |
cut=5; |
1261 |
+ |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1262 |
+ |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1263 |
+ |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1264 |
+ |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1265 |
+ |
); |
1266 |
+ |
|
1267 |
+ |
|
1268 |
+ |
// now the different IDs |
1269 |
+ |
|
1270 |
+ |
// check if electron from conversion... |
1271 |
+ |
bool isConversion; |
1272 |
+ |
if((fabs(ElConvPartnerTrkDist[i])<0.02 && fabs(ElConvPartnerTrkDCot[i])<0.02) || ElNumberOfMissingInnerHits[i]>1) isConversion=true; |
1273 |
+ |
else isConversion=false; |
1274 |
|
|
1240 |
– |
// now the different IDs |
1275 |
|
|
1242 |
– |
// cout<<"***"<<ElPhi[i]-candidate.fourvector[0].Phi()<<endl; |
1276 |
|
|
1277 |
|
|
1278 |
|
// first the ETH one for the barrel |
1279 |
|
double OneoverEminusOneoverP=fabs(1/ElCaloEnergy[i]-1/ElTrkMomAtVtx[i]); |
1280 |
< |
if(fabs(ElEta[i])<etaBarrelMax) { |
1280 |
> |
if(fabs(accEta)<etaBarrelMax) { |
1281 |
|
cut=6; |
1282 |
|
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1283 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1332 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1333 |
|
); |
1334 |
|
// remove conversions |
1335 |
< |
if(applyCut[12]==false || ElNumberOfMissingInnerHits[i]<2) { |
1335 |
> |
// if(applyCut[12]==false || (ElNumberOfMissingInnerHits[i]<2 && ElConvPartnerTrkDist[i]<Rob_dist_E && ElConvPartnerTrkDCot[i]<Rob_cot_E) ) { |
1336 |
> |
if(applyCut[12]==false || isConversion==false) { |
1337 |
|
cut=12; |
1338 |
|
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1339 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1350 |
|
} // ETH barrel |
1351 |
|
|
1352 |
|
// now the ETH ID for the endcaps |
1353 |
< |
else if(fabs(ElEta[i])>etaBarrelMax && fabs(ElEta[i])<etaEndcapMax) { |
1353 |
> |
else if(fabs(accEta)>etaEndcapMin && fabs(accEta)<etaEndcapMax) { |
1354 |
|
cut=13; |
1355 |
|
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1356 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1405 |
|
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1406 |
|
); |
1407 |
|
// remove conversions |
1408 |
< |
if(applyCut[19]==false || ElNumberOfMissingInnerHits[i]<2) { |
1408 |
> |
if(applyCut[19]==false || isConversion==false) { |
1409 |
|
cut=19; |
1410 |
|
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1411 |
|
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1424 |
|
|
1425 |
|
// now let's do the Robust one |
1426 |
|
|
1393 |
– |
double tkIso; |
1394 |
– |
double ecalIso; |
1395 |
– |
double hcalIso; |
1396 |
– |
if(workingPoint>0) { |
1397 |
– |
tkIso=ElDR03TkSumPt[i]/ElPt[i]; |
1398 |
– |
ecalIso=ElDR03EcalRecHitSumEt[i]/ElPt[i]; |
1399 |
– |
hcalIso=ElDR03HcalTowerSumEt[i]/ElPt[i]; |
1400 |
– |
} |
1401 |
– |
else if(workingPoint<0) { |
1402 |
– |
tkIso=ElDR03TkSumPt[i]; |
1403 |
– |
ecalIso=ElDR04EcalRecHitSumEt[i]; |
1404 |
– |
hcalIso=ElDR04HcalTowerSumEt[i]; |
1405 |
– |
} |
1406 |
– |
|
1407 |
– |
// divide into barrel and endcap |
1408 |
– |
cut=20; |
1409 |
– |
if(fabs(ElEta[i])<etaBarrelMax) { |
1410 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1411 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1412 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1413 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1414 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1415 |
– |
); |
1416 |
– |
|
1417 |
– |
if(ElIDRobustTight[i]==1) { |
1418 |
– |
c_robust_tree++; |
1419 |
– |
} |
1420 |
– |
|
1421 |
– |
// H/E |
1422 |
– |
cut=21; |
1423 |
– |
if(applyCut[cut]==false || ElHcalOverEcal[i]<Rob_HoverE_B) { |
1424 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1425 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1426 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1427 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1428 |
– |
); |
1429 |
– |
cut=22; |
1430 |
– |
//Sigma Ieta Ieta |
1431 |
– |
if(applyCut[cut]==false || ElSigmaIetaIeta[i]<Rob_SigmaIetaIeta_B) { |
1432 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1433 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1434 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1435 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1436 |
– |
); |
1437 |
– |
cut=23; |
1438 |
– |
// deltaPhi |
1439 |
– |
if(applyCut[cut]==false || fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)<Rob_deltaPhi_B) { |
1440 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1441 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1442 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1443 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1444 |
– |
); |
1445 |
– |
cut=24; |
1446 |
– |
// delta eta |
1447 |
– |
if(applyCut[cut]==false || fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)<Rob_deltaEta_B) { |
1448 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1449 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1450 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1451 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1452 |
– |
); |
1453 |
– |
cut=25; |
1454 |
– |
// track iso |
1455 |
– |
if(applyCut[cut]==false || tkIso<Rob_trkIso_B) { |
1456 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1457 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1458 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1459 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1460 |
– |
); |
1461 |
– |
cut=26; |
1462 |
– |
// ecal iso |
1463 |
– |
if(applyCut[cut]==false || ecalIso<Rob_ecalIso_B) { |
1464 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1465 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1466 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1467 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1468 |
– |
); |
1469 |
– |
cut=27; |
1470 |
– |
// hcal iso |
1471 |
– |
if(applyCut[cut]==false || hcalIso<Rob_hcalIso_B) { |
1472 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1473 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1474 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1475 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1476 |
– |
); |
1477 |
– |
cut=28; |
1478 |
– |
// conversion removal |
1479 |
– |
if(applyCut[cut]==true || ElNumberOfMissingInnerHits[i]<2) { |
1480 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1481 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1482 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1483 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1484 |
– |
); |
1485 |
– |
|
1486 |
– |
c_robust_B++; |
1487 |
– |
|
1488 |
– |
} // conversions |
1489 |
– |
} //trk iso |
1490 |
– |
} // ecal iso |
1491 |
– |
} //trk iso |
1492 |
– |
} //delta eta |
1493 |
– |
} //delta phi |
1494 |
– |
} // Sigma Ieta Ieta |
1495 |
– |
} // H/E |
1496 |
– |
} // Robust barrel |
1497 |
– |
|
1498 |
– |
|
1499 |
– |
// finally the robust endcap... |
1500 |
– |
else if(fabs(ElEta[i])>etaBarrelMax && fabs(ElEta[i])<etaEndcapMax) { |
1501 |
– |
cut=29; |
1502 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1503 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1504 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1505 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1506 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1507 |
– |
); |
1508 |
– |
// H/E |
1509 |
– |
cut=30; |
1510 |
– |
if(applyCut[cut]==false || ElHcalOverEcal[i]<Rob_HoverE_E) { |
1511 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1512 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1513 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1514 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1515 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1516 |
– |
); |
1517 |
– |
cut=31; |
1518 |
– |
//Sigma Ieta Ieta |
1519 |
– |
if(applyCut[cut]==false || ElSigmaIetaIeta[i]<Rob_SigmaIetaIeta_E) { |
1520 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1521 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1522 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1523 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1524 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1525 |
– |
); |
1526 |
– |
cut=32; |
1527 |
– |
// deltaPhi |
1528 |
– |
if(applyCut[cut]==false || fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)<Rob_deltaPhi_E) { |
1529 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1530 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1531 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1532 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1533 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1534 |
– |
); |
1535 |
– |
cut=33; |
1536 |
– |
// delta eta |
1537 |
– |
if(applyCut[cut]==false || fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)<Rob_deltaEta_E) { |
1538 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1539 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1540 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1541 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1542 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1543 |
– |
); |
1544 |
– |
cut=34; |
1545 |
– |
// track iso |
1546 |
– |
if(applyCut[cut]==false || tkIso<Rob_trkIso_E) { |
1547 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1548 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1549 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1550 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1551 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1552 |
– |
); |
1553 |
– |
cut=35; |
1554 |
– |
// ecal iso |
1555 |
– |
if(applyCut[cut]==false || ecalIso<Rob_ecalIso_E) { |
1556 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1557 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1558 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1559 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1560 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1561 |
– |
); |
1562 |
– |
cut=36; |
1563 |
– |
// hcal iso |
1564 |
– |
if(applyCut[cut]==false || hcalIso<Rob_hcalIso_E) { |
1565 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1566 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1567 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1568 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1569 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1570 |
– |
); |
1571 |
– |
cut=37; |
1572 |
– |
//conversions |
1573 |
– |
if(applyCut[cut]==false || ElNumberOfMissingInnerHits[i]<2) { |
1574 |
– |
//filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut]); |
1575 |
– |
filler(candidate, hs_El_ElPt[cut], hs_El_ElEta[cut], hs_El_ElPhi[cut], hs_El_ElMet[cut], hs_El_ElCharge[cut], |
1576 |
– |
hs_El_ElDeltaPhi[cut], hs_El_ElDeltaEta[cut], hs_El_ElOneOverEminusOneOverP[cut], hs_El_ElTransMass[cut], |
1577 |
– |
hs_El_ElEthIso[cut], hs_El_ElTrkIso[cut], hs_El_ElEcalIso[cut], hs_El_ElHcalIso[cut], |
1578 |
– |
hs_El_ElHoverE[cut], hs_El_ElSigmaIetaIeta[cut], hs_El_ElNumberOfMissingInnerHits[cut] |
1579 |
– |
); |
1580 |
– |
|
1581 |
– |
c_robust_E++; |
1582 |
– |
|
1583 |
– |
} //cpnversions |
1584 |
– |
} //trk iso |
1585 |
– |
} // ecal iso |
1586 |
– |
} //trk iso |
1587 |
– |
} //delta eta |
1588 |
– |
} //delta phi |
1589 |
– |
} // Sigma Ieta Ieta |
1590 |
– |
} // H/E |
1591 |
– |
} // Robust endcap |
1592 |
– |
|
1593 |
– |
// puh, done!!! |
1594 |
– |
|
1595 |
– |
|
1596 |
– |
|
1597 |
– |
|
1598 |
– |
|
1599 |
– |
// if(WorkingPointID(candidate, WorkingPointCuts)==true) { |
1600 |
– |
// debug++; |
1601 |
– |
// } |
1602 |
– |
|
1603 |
– |
|
1604 |
– |
|
1427 |
|
|
1428 |
|
// -------------------------------------------------------------------------------------------------------------------- |
1429 |
|
// Fill the N-1 plots |
1482 |
|
} |
1483 |
|
//-------------------------------------------------------------------------------------------------------------------- |
1484 |
|
|
1663 |
– |
|
1664 |
– |
// Working Points |
1665 |
– |
|
1666 |
– |
if(fabs(ElEta[i])<etaBarrelMax) { |
1667 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "sigmaIetaIeta")) hn1_El_ElSigmaIetaIeta[2]->Fill(candidate.sigmaIetaIeta[0]); |
1668 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "deltaPhi")) hn1_El_ElDeltaPhi[2]->Fill(fabs(candidate.deltaPhi[0]/* - dPhiCorrection*/)); |
1669 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "deltaEta")) hn1_El_ElDeltaEta[2]->Fill(fabs(candidate.deltaEta[0]/* - dEtaCorrection*/)); |
1670 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "HoverE")) hn1_El_ElHoverE[2]->Fill(candidate.HoverE[0]); |
1671 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "trkIso")) hn1_El_ElTrkIso[2]->Fill(candidate.trkIso[0]); |
1672 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "ecalIso")) hn1_El_ElEcalIso[2]->Fill(candidate.ecalIso[0]); |
1673 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "hcalIso")) hn1_El_ElHcalIso[2]->Fill(candidate.hcalIso[0]); |
1674 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "conversions")) hn1_El_ElNumberOfMissingInnerHits[2]->Fill(candidate.numberOfMissingInnerHits[0]); |
1675 |
– |
} |
1676 |
– |
else if(fabs(ElEta[i])>etaBarrelMax && fabs(ElEta[i])<etaEndcapMax) { |
1677 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "sigmaIetaIeta")) hn1_El_ElSigmaIetaIeta[3]->Fill(candidate.sigmaIetaIeta[0]); |
1678 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "deltaPhi")) hn1_El_ElDeltaPhi[3]->Fill(fabs(candidate.deltaPhi[0]/* - dPhiCorrection*/)); |
1679 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "deltaEta")) hn1_El_ElDeltaEta[3]->Fill(fabs(candidate.deltaEta[0]/* - dEtaCorrection*/)); |
1680 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "HoverE")) hn1_El_ElHoverE[3]->Fill(candidate.HoverE[0]); |
1681 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "trkIso")) hn1_El_ElTrkIso[3]->Fill(candidate.trkIso[0]); |
1682 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "ecalIso")) hn1_El_ElEcalIso[3]->Fill(candidate.ecalIso[0]); |
1683 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "hcalIso")) hn1_El_ElHcalIso[3]->Fill(candidate.hcalIso[0]); |
1684 |
– |
if(WorkingPointNminus1(candidate, WorkingPointCuts, "conversions")) hn1_El_ElNumberOfMissingInnerHits[3]->Fill(candidate.numberOfMissingInnerHits[0]); |
1685 |
– |
} |
1686 |
– |
|
1485 |
|
|
1486 |
< |
|
1689 |
< |
} // HLT_Photon10 trigger |
1486 |
> |
} //HLT_Photon10 trigger |
1487 |
|
}// pt |
1488 |
|
} // delta eta |
1489 |
|
} // delta phi |
1490 |
|
} // H/E |
1491 |
+ |
} // acceptance region |
1492 |
+ |
|
1493 |
+ |
|
1494 |
+ |
|
1495 |
+ |
|
1496 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1497 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1498 |
+ |
// new code with WPelectronID function |
1499 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1500 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1501 |
+ |
|
1502 |
+ |
int cut; |
1503 |
+ |
double Pt=ElPt[i] * PtCorrection; |
1504 |
+ |
double Eta=ElEta[i]; |
1505 |
+ |
double Phi=ElPhi[i]; |
1506 |
+ |
double Charge=ElCharge[i]; |
1507 |
+ |
double delPhi=ElDeltaPhiSuperClusterAtVtx[i]-dphiCorrections(ElEta[i], ElPhi[i]); |
1508 |
+ |
double delEta=ElDeltaEtaSuperClusterAtVtx[i]-detaCorrections(ElEta[i], ElPhi[i]); |
1509 |
+ |
double transMass=transverseMass(ElPt[i] * PtCorrection, PFMET, deltaPhi(ElPhi[i],metPhi)); |
1510 |
+ |
double Hoe=ElHcalOverEcal[i]; |
1511 |
+ |
double trkIso = ElDR03TkSumPt[i]; |
1512 |
+ |
double ecalIso = ElDR03EcalRecHitSumEt[i]; |
1513 |
+ |
double hcalIso = ElDR03HcalTowerSumEt[i]; |
1514 |
+ |
double combIso_B=(trkIso + max(0., ecalIso - 1.) + hcalIso) / ( ElPt[i] * PtCorrection); |
1515 |
+ |
double combIso_E=(trkIso + ecalIso + hcalIso) / (ElPt[i] * PtCorrection); |
1516 |
+ |
double See=ElSigmaIetaIeta[i]; |
1517 |
+ |
double missingHits=ElNumberOfMissingInnerHits[i]; |
1518 |
+ |
|
1519 |
+ |
|
1520 |
+ |
|
1521 |
+ |
// check if trigger fired |
1522 |
+ |
int Photon10 = getHLTtriggerBit("HLT_Photon10_L1R"); |
1523 |
+ |
int Photon15 = getHLTtriggerBit("HLT_Photon15_L1R"); |
1524 |
+ |
// int bit = getHLTtriggerBit("HLT_Photon10_Cleaned_L1R"); |
1525 |
+ |
int Ele15 = getHLTtriggerBit("HLT_Ele15_LW_L1R"); |
1526 |
+ |
|
1527 |
+ |
if(HLTResults[Photon10]!=1 && HLTResults[Photon15]!=1 && HLTResults[Ele15]!=1) continue; |
1528 |
+ |
|
1529 |
+ |
|
1530 |
+ |
if(Event==27837545 || Event==73939173 || Event==15512525 || Event==191815699 || Event==29377895 || Event==29377895 || Event==74868952 || Event==76643965 || Event==62016483 || Event==4352136) { |
1531 |
+ |
cout<<"##################################"<<endl; |
1532 |
+ |
cout<<"Event: "<<Event<<" Run: "<<Run<<endl; |
1533 |
+ |
cout<<"Preselection: "<<ElectronPreselection(i)<<endl; |
1534 |
+ |
cout<<"Selection: "<<WPElectronID(i, all, WorkingPointCuts)<<endl; |
1535 |
|
|
1536 |
|
|
1537 |
+ |
cout<<"##################################"<<endl; |
1538 |
|
|
1539 |
+ |
} |
1540 |
+ |
|
1541 |
+ |
// check if electron is preselected |
1542 |
+ |
if(ElectronPreselection(i)!=0) continue; |
1543 |
+ |
|
1544 |
+ |
|
1545 |
+ |
// cout<<"acc: "<<accEta<<endl; |
1546 |
+ |
// cout<<"eta: "<<ElEta[i]<<endl; |
1547 |
+ |
// cout<<"SC: "<<ElSCEta[i]<<endl; |
1548 |
+ |
|
1549 |
+ |
// the N-1 plots |
1550 |
+ |
if(fabs(accEta)<etaBarrelMax) { |
1551 |
+ |
if(WPElectronID(i, see, WorkingPointCuts)==0) hn1_El_ElSigmaIetaIeta[2]->Fill(See); |
1552 |
+ |
if(WPElectronID(i, dphi, WorkingPointCuts)==0) hn1_El_ElDeltaPhi[2]->Fill(delPhi); |
1553 |
+ |
if(WPElectronID(i, deta, WorkingPointCuts)==0) hn1_El_ElDeltaEta[2]->Fill(delEta); |
1554 |
+ |
if(WPElectronID(i, hoe, WorkingPointCuts)==0) hn1_El_ElHoverE[2]->Fill(Hoe); |
1555 |
+ |
if(WPElectronID(i, combiso, WorkingPointCuts)==0) hn1_El_ElCombIso[2]->Fill(combIso_B); |
1556 |
+ |
if(WPElectronID(i, conversion, WorkingPointCuts)==0) hn1_El_ElNumberOfMissingInnerHits[2]->Fill(missingHits); |
1557 |
+ |
} |
1558 |
+ |
if(fabs(accEta)>etaEndcapMin && fabs(accEta)<etaEndcapMax) { |
1559 |
+ |
if(WPElectronID(i, see, WorkingPointCuts)==0) hn1_El_ElSigmaIetaIeta[3]->Fill(See); |
1560 |
+ |
if(WPElectronID(i, dphi, WorkingPointCuts)==0) hn1_El_ElDeltaPhi[3]->Fill(delPhi); |
1561 |
+ |
if(WPElectronID(i, deta, WorkingPointCuts)==0) hn1_El_ElDeltaEta[3]->Fill(delEta); |
1562 |
+ |
if(WPElectronID(i, hoe, WorkingPointCuts)==0) hn1_El_ElHoverE[3]->Fill(Hoe); |
1563 |
+ |
if(WPElectronID(i, combiso, WorkingPointCuts)==0) hn1_El_ElCombIso[3]->Fill(combIso_E); |
1564 |
+ |
if(WPElectronID(i, conversion, WorkingPointCuts)==0) hn1_El_ElNumberOfMissingInnerHits[3]->Fill(missingHits); |
1565 |
+ |
} |
1566 |
+ |
|
1567 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)==0) { |
1568 |
+ |
// count the number of electrons in one event |
1569 |
+ |
electronIndex.push_back(i); |
1570 |
+ |
|
1571 |
+ |
fprintf(out,"%i\t%i\n",Run, Event); |
1572 |
+ |
// cout<<"Run: "<<Run<<" Event: "<<Event<<endl; |
1573 |
+ |
|
1574 |
+ |
// look at the charges of the IDed electrons |
1575 |
+ |
int cGsf=ElCharge[i]; |
1576 |
+ |
int cSc=ElScPixCharge[i]; |
1577 |
+ |
|
1578 |
+ |
if(cGsf==cSc) cNa++; |
1579 |
+ |
else cNb++; |
1580 |
+ |
|
1581 |
+ |
// check the acceptance (etc.) variables |
1582 |
+ |
h_ElEtaVsScEta->Fill(ElEta[i], ElSCEta[i]); |
1583 |
+ |
// h_ElPhiVsScPhi->Fill(ElPhi[i], El); |
1584 |
+ |
TVector3 track; |
1585 |
+ |
track.SetXYZ(ElPx[i], ElPy[i], ElPz[i]); |
1586 |
+ |
double trackEta=track.Eta(); |
1587 |
+ |
h_ElPtVsScEt->Fill(ElPt[i] * PtCorrection , ElCaloEnergy[i]/cosh(trackEta)); |
1588 |
+ |
|
1589 |
+ |
|
1590 |
+ |
|
1591 |
+ |
|
1592 |
+ |
} |
1593 |
+ |
|
1594 |
+ |
|
1595 |
+ |
|
1596 |
+ |
|
1597 |
+ |
|
1598 |
+ |
|
1599 |
+ |
// the sequential counting and filling |
1600 |
+ |
// preselection |
1601 |
+ |
counter[0]++; |
1602 |
+ |
// split in barrel and endcap |
1603 |
+ |
if(fabs(accEta)<etaBarrelMax) { |
1604 |
+ |
// preselected in barrel |
1605 |
+ |
counter[1]++; |
1606 |
+ |
//fillIt(i, 20); |
1607 |
+ |
// fill the (right) histos |
1608 |
+ |
cut=20; |
1609 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1610 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1611 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1612 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1613 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1614 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1615 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1616 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1617 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1618 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1619 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1620 |
+ |
// hs_El_ElMet[cut] |
1621 |
+ |
// hs_El_ElOneOverEminusOneOverP[cut] |
1622 |
+ |
// hs_El_ElEthIso[cut] |
1623 |
+ |
// hs_El_ElTrkIso[cut] |
1624 |
+ |
// hs_El_ElEcalIso[cut] |
1625 |
+ |
// hs_El_ElHcalIso[cut] |
1626 |
+ |
|
1627 |
+ |
// after see cut |
1628 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>1 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1629 |
+ |
counter[2]++; |
1630 |
+ |
cut=21; |
1631 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1632 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1633 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1634 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1635 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1636 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1637 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1638 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1639 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1640 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1641 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1642 |
+ |
} |
1643 |
+ |
|
1644 |
+ |
// after dphi |
1645 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>2 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1646 |
+ |
counter[3]++; |
1647 |
+ |
cut=22; |
1648 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1649 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1650 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1651 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1652 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1653 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1654 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1655 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1656 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1657 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1658 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1659 |
+ |
} |
1660 |
+ |
// after deta |
1661 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>3 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1662 |
+ |
counter[4]++; |
1663 |
+ |
cut=23; |
1664 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1665 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1666 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1667 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1668 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1669 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1670 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1671 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1672 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1673 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1674 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1675 |
+ |
} |
1676 |
+ |
// after hoe |
1677 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>4 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1678 |
+ |
counter[5]++; |
1679 |
+ |
cut=24; |
1680 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1681 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1682 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1683 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1684 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1685 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1686 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1687 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1688 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1689 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1690 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1691 |
+ |
} |
1692 |
+ |
// after iso |
1693 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>5 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1694 |
+ |
counter[6]++; |
1695 |
+ |
cut=25; |
1696 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1697 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1698 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1699 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1700 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1701 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1702 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1703 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1704 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1705 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1706 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1707 |
+ |
} |
1708 |
+ |
// after conversion == total IDed |
1709 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)==0) { |
1710 |
+ |
counter[7]++; |
1711 |
+ |
cut=26; |
1712 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1713 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1714 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1715 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1716 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1717 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1718 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1719 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1720 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1721 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1722 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_B); |
1723 |
+ |
} |
1724 |
+ |
} //barrel |
1725 |
+ |
if(fabs(accEta)>etaEndcapMin && fabs(accEta)<etaEndcapMax) { |
1726 |
+ |
// preselected in endcaps |
1727 |
+ |
counter[8]++; |
1728 |
+ |
cut=27; |
1729 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1730 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1731 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1732 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1733 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1734 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1735 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1736 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1737 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1738 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1739 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1740 |
+ |
|
1741 |
+ |
// after see cut |
1742 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>1 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1743 |
+ |
counter[9]++; |
1744 |
+ |
cut=28; |
1745 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1746 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1747 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1748 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1749 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1750 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1751 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1752 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1753 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1754 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1755 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1756 |
+ |
} |
1757 |
+ |
// after dphi |
1758 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>2 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1759 |
+ |
counter[10]++; |
1760 |
+ |
cut=29; |
1761 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1762 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1763 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1764 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1765 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1766 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1767 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1768 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1769 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1770 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1771 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1772 |
+ |
} |
1773 |
+ |
// after deta |
1774 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>3 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1775 |
+ |
counter[11]++; |
1776 |
+ |
cut=30; |
1777 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1778 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1779 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1780 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1781 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1782 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1783 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1784 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1785 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1786 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1787 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1788 |
+ |
} |
1789 |
+ |
// after hoe |
1790 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>4 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1791 |
+ |
counter[12]++; |
1792 |
+ |
cut=31; |
1793 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1794 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1795 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1796 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1797 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1798 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1799 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1800 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1801 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1802 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1803 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1804 |
+ |
} |
1805 |
+ |
// after iso |
1806 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)>5 || WPElectronID(i, all, WorkingPointCuts)==0) { |
1807 |
+ |
counter[13]++; |
1808 |
+ |
cut=32; |
1809 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1810 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1811 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1812 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1813 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1814 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1815 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1816 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1817 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1818 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1819 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1820 |
+ |
} |
1821 |
+ |
// after conversion == total IDed |
1822 |
+ |
if(WPElectronID(i, all, WorkingPointCuts)==0) { |
1823 |
+ |
counter[14]++; |
1824 |
+ |
cut=33; |
1825 |
+ |
hs_El_ElPt[cut]->Fill(Pt); |
1826 |
+ |
hs_El_ElEta[cut]->Fill(Eta); |
1827 |
+ |
hs_El_ElPhi[cut]->Fill(Phi); |
1828 |
+ |
hs_El_ElCharge[cut]->Fill(Charge); |
1829 |
+ |
hs_El_ElDeltaPhi[cut]->Fill(delPhi); |
1830 |
+ |
hs_El_ElDeltaEta[cut]->Fill(delEta); |
1831 |
+ |
hs_El_ElTransMass[cut]->Fill(transMass); |
1832 |
+ |
hs_El_ElHoverE[cut]->Fill(Hoe); |
1833 |
+ |
hs_El_ElSigmaIetaIeta[cut]->Fill(See); |
1834 |
+ |
hs_El_ElNumberOfMissingInnerHits[cut]->Fill(missingHits); |
1835 |
+ |
hs_El_ElCombIso[cut]->Fill(combIso_E); |
1836 |
+ |
} |
1837 |
+ |
} // endcaps |
1838 |
+ |
|
1839 |
+ |
|
1840 |
+ |
|
1841 |
+ |
|
1842 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1843 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1844 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
1845 |
+ |
|
1846 |
+ |
|
1847 |
|
// ID the electrons |
1848 |
|
bool tightid=false; |
1849 |
|
bool ethid=false; |
1850 |
|
if(ElIDTight[i]==1) tightid=true; |
1851 |
|
if(ethID(ElEcalDriven[i], ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection, ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection, ElCaloEnergy[i], ElTrkMomAtVtx[i], ElEta[i])==true) ethid=true; |
1852 |
< |
|
1852 |
> |
|
1853 |
|
// check wether the elcetrons are in the barrel or the endcaps |
1854 |
|
bool isbarrel=false; |
1855 |
|
bool isendcap=false; |
1859 |
|
// Isolate the electrons |
1860 |
|
double isolated=false; |
1861 |
|
if(isolation(ElDR04TkSumPt[i], ElCaloEnergy[i])==true) isolated=true; |
1862 |
< |
|
1862 |
> |
|
1863 |
|
|
1714 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
1715 |
– |
// for gsf electron candidates... |
1716 |
– |
// fill the plots for the barrel |
1717 |
– |
// if(fabs(ElEta[i]) < etaMaxBarrel) { |
1718 |
– |
if(isbarrel==true) { |
1719 |
– |
h_el_B_gsf_deltaPhiSuperCluster->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1720 |
– |
h_el_B_gsf_deltaEtaSuperCluster->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1721 |
– |
h_el_B_gsf_deltaPhiSuperCluster2->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1722 |
– |
h_el_B_gsf_deltaEtaSuperCluster2->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1723 |
– |
h_el_B_gsf_caloenergy->Fill(ElCaloEnergy[i]); |
1724 |
– |
h_el_B_gsf_trkmomatvtx->Fill(ElTrkMomAtVtx[i]); |
1725 |
– |
h_el_B_gsf_oneOverEminusOneOverP->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1726 |
– |
h_el_B_gsf_oneOverEminusOneOverP2->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1727 |
– |
h_el_B_gsf_sumPtOverE->Fill(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1728 |
– |
h_el_B_gsf_sigmaIetaIeta->Fill(ElSigmaIetaIeta[i]); |
1729 |
– |
h_el_B_gsf_pt->Fill(ElPt[i]); |
1730 |
– |
h_el_B_gsf_eta->Fill(ElEta[i]); |
1731 |
– |
h_el_B_gsf_phi->Fill(ElPhi[i]); |
1732 |
– |
h_el_B_gsf_fbrem->Fill(Elfbrem[i]); |
1733 |
– |
h_el_B_gsf_basicclustersize->Fill(ElBasicClustersSize[i]); |
1734 |
– |
h_el_B_gsf_chi2->Fill(ElNChi2[i]); |
1735 |
– |
h_el_B_gsf_charge->Fill(ElCharge[i]); |
1736 |
– |
h_el_B_gsf_pfmet->Fill(PFMET); |
1737 |
– |
h_el_B_gsf_HoverE->Fill(ElHcalOverEcal[i]); |
1738 |
– |
} |
1739 |
– |
// fill the plots for the endcaps |
1740 |
– |
// if(fabs(ElEta[i]) > etaMaxBarrel && fabs(ElEta[i] < etaMaxEndcap)) { |
1741 |
– |
if(isendcap==true) { |
1742 |
– |
h_el_E_gsf_deltaPhiSuperCluster->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1743 |
– |
h_el_E_gsf_deltaEtaSuperCluster->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1744 |
– |
h_el_E_gsf_deltaPhiSuperCluster2->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1745 |
– |
h_el_E_gsf_deltaEtaSuperCluster2->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1746 |
– |
h_el_E_gsf_caloenergy->Fill(ElCaloEnergy[i]); |
1747 |
– |
h_el_E_gsf_trkmomatvtx->Fill(ElTrkMomAtVtx[i]); |
1748 |
– |
h_el_E_gsf_oneOverEminusOneOverP->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1749 |
– |
h_el_E_gsf_oneOverEminusOneOverP2->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1750 |
– |
h_el_E_gsf_sumPtOverE->Fill(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1751 |
– |
h_el_E_gsf_sigmaIetaIeta->Fill(ElSigmaIetaIeta[i]); |
1752 |
– |
h_el_E_gsf_pt->Fill(ElPt[i]); |
1753 |
– |
h_el_E_gsf_eta->Fill(ElEta[i]); |
1754 |
– |
h_el_E_gsf_phi->Fill(ElPhi[i]); |
1755 |
– |
h_el_E_gsf_fbrem->Fill(Elfbrem[i]); |
1756 |
– |
h_el_E_gsf_basicclustersize->Fill(ElBasicClustersSize[i]); |
1757 |
– |
h_el_E_gsf_chi2->Fill(ElNChi2[i]); |
1758 |
– |
h_el_E_gsf_charge->Fill(ElCharge[i]); |
1759 |
– |
h_el_E_gsf_pfmet->Fill(PFMET); |
1760 |
– |
h_el_E_gsf_HoverE->Fill(ElHcalOverEcal[i]); |
1761 |
– |
} |
1762 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
1763 |
– |
// fill histos for tight ID |
1864 |
|
|
1765 |
– |
if(tightid==true) { |
1766 |
– |
TLorentzVector vec; |
1767 |
– |
vec.SetPxPyPzE(ElPx[i],ElPy[i],ElPz[i],ElE[i]); |
1768 |
– |
electronsTight.push_back(vec); |
1769 |
– |
if(isolated==true) { |
1770 |
– |
electronsTightIsolated.push_back(vec); |
1771 |
– |
} |
1865 |
|
|
1866 |
< |
// fill the myEvent |
1867 |
< |
if(vec.Pt()>ptMin) { |
1868 |
< |
tightElectrons.fourvector.push_back(vec); |
1869 |
< |
tightElectrons.charge.push_back(ElCharge[i]); |
1870 |
< |
if(isolated==true) tightElectrons.isolation.push_back(true); |
1871 |
< |
else if(isolated==false) tightElectrons.isolation.push_back(false); |
1866 |
> |
// fill histos for tight ID |
1867 |
> |
|
1868 |
> |
if(tightid==true) { |
1869 |
> |
TLorentzVector vec; |
1870 |
> |
vec.SetPxPyPzE(ElPx[i],ElPy[i],ElPz[i],ElE[i]); |
1871 |
> |
electronsTight.push_back(vec); |
1872 |
> |
if(isolated==true) { |
1873 |
> |
electronsTightIsolated.push_back(vec); |
1874 |
> |
} |
1875 |
> |
|
1876 |
> |
// fill the myEvent |
1877 |
> |
if(vec.Pt()>ptMin) { |
1878 |
> |
tightElectrons.fourvector.push_back(vec); |
1879 |
> |
tightElectrons.charge.push_back(ElCharge[i]); |
1880 |
> |
if(isolated==true) tightElectrons.isolation.push_back(true); |
1881 |
> |
else if(isolated==false) tightElectrons.isolation.push_back(false); |
1882 |
> |
} |
1883 |
> |
|
1884 |
|
} |
1885 |
+ |
|
1886 |
|
|
1887 |
< |
if(isbarrel==true) { |
1888 |
< |
h_el_B_tight_deltaPhiSuperCluster->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1783 |
< |
h_el_B_tight_deltaEtaSuperCluster->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1784 |
< |
h_el_B_tight_deltaPhiSuperCluster2->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1785 |
< |
h_el_B_tight_deltaEtaSuperCluster2->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1786 |
< |
h_el_B_tight_caloenergy->Fill(ElCaloEnergy[i]); |
1787 |
< |
h_el_B_tight_trkmomatvtx->Fill(ElTrkMomAtVtx[i]); |
1788 |
< |
h_el_B_tight_oneOverEminusOneOverP->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1789 |
< |
h_el_B_tight_oneOverEminusOneOverP2->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1790 |
< |
h_el_B_tight_sumPtOverE->Fill(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1791 |
< |
h_el_B_tight_sigmaIetaIeta->Fill(ElSigmaIetaIeta[i]); |
1792 |
< |
h_el_B_tight_pt->Fill(ElPt[i]); |
1793 |
< |
h_el_B_tight_eta->Fill(ElEta[i]); |
1794 |
< |
h_el_B_tight_phi->Fill(ElPhi[i]); |
1795 |
< |
h_el_B_tight_fbrem->Fill(Elfbrem[i]); |
1796 |
< |
h_el_B_tight_basicclustersize->Fill(ElBasicClustersSize[i]); |
1797 |
< |
h_el_B_tight_chi2->Fill(ElNChi2[i]); |
1798 |
< |
h_el_B_tight_charge->Fill(ElCharge[i]); |
1799 |
< |
h_el_B_tight_pfmet->Fill(PFMET); |
1800 |
< |
h_el_B_tight_HoverE->Fill(ElHcalOverEcal[i]); |
1801 |
< |
} |
1802 |
< |
if(isendcap==true) { |
1803 |
< |
h_el_E_tight_deltaPhiSuperCluster->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1804 |
< |
h_el_E_tight_deltaEtaSuperCluster->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1805 |
< |
h_el_E_tight_deltaPhiSuperCluster2->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1806 |
< |
h_el_E_tight_deltaEtaSuperCluster2->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1807 |
< |
h_el_E_tight_caloenergy->Fill(ElCaloEnergy[i]); |
1808 |
< |
h_el_E_tight_trkmomatvtx->Fill(ElTrkMomAtVtx[i]); |
1809 |
< |
h_el_E_tight_oneOverEminusOneOverP->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1810 |
< |
h_el_E_tight_oneOverEminusOneOverP2->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1811 |
< |
h_el_E_tight_sumPtOverE->Fill(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1812 |
< |
h_el_E_tight_sigmaIetaIeta->Fill(ElSigmaIetaIeta[i]); |
1813 |
< |
h_el_E_tight_pt->Fill(ElPt[i]); |
1814 |
< |
h_el_E_tight_eta->Fill(ElEta[i]); |
1815 |
< |
h_el_E_tight_phi->Fill(ElPhi[i]); |
1816 |
< |
h_el_E_tight_fbrem->Fill(Elfbrem[i]); |
1817 |
< |
h_el_E_tight_basicclustersize->Fill(ElBasicClustersSize[i]); |
1818 |
< |
h_el_E_tight_chi2->Fill(ElNChi2[i]); |
1819 |
< |
h_el_E_tight_charge->Fill(ElCharge[i]); |
1820 |
< |
h_el_E_tight_pfmet->Fill(PFMET); |
1821 |
< |
h_el_E_tight_HoverE->Fill(ElHcalOverEcal[i]); |
1822 |
< |
} |
1823 |
< |
} |
1824 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
1825 |
< |
// fill histos for eth ID |
1826 |
< |
|
1827 |
< |
if(ethid==true) { |
1828 |
< |
TLorentzVector vec; |
1829 |
< |
vec.SetPxPyPzE(ElPx[i],ElPy[i],ElPz[i],ElE[i]); |
1830 |
< |
electronsETH.push_back(vec); |
1831 |
< |
if(isolated==true) { |
1832 |
< |
electronsETHIsolated.push_back(vec); |
1833 |
< |
} |
1834 |
< |
|
1835 |
< |
// fill the myEvent |
1836 |
< |
if(vec.Pt()>ptMin) { |
1837 |
< |
ethElectrons.fourvector.push_back(vec); |
1838 |
< |
ethElectrons.charge.push_back(ElCharge[i]); |
1839 |
< |
ethElectrons.ethIso.push_back(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1840 |
< |
ethElectrons.trkIso.push_back(ElDR03TkSumPt[i]); |
1841 |
< |
ethElectrons.ecalIso.push_back(ElDR04EcalRecHitSumEt[i]); |
1842 |
< |
ethElectrons.hcalIso.push_back(ElDR04HcalTowerSumEt[i]); |
1843 |
< |
if(isolated==true) ethElectrons.isolation.push_back(true); |
1844 |
< |
else if(isolated==false) ethElectrons.isolation.push_back(false); |
1845 |
< |
} |
1846 |
< |
if(isbarrel==true) { |
1847 |
< |
h_el_B_eth_deltaPhiSuperCluster->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1848 |
< |
h_el_B_eth_deltaEtaSuperCluster->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1849 |
< |
h_el_B_eth_deltaPhiSuperCluster2->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1850 |
< |
h_el_B_eth_deltaEtaSuperCluster2->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1851 |
< |
h_el_B_eth_caloenergy->Fill(ElCaloEnergy[i]); |
1852 |
< |
h_el_B_eth_trkmomatvtx->Fill(ElTrkMomAtVtx[i]); |
1853 |
< |
h_el_B_eth_oneOverEminusOneOverP->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1854 |
< |
h_el_B_eth_oneOverEminusOneOverP2->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1855 |
< |
h_el_B_eth_sumPtOverE->Fill(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1856 |
< |
h_el_B_eth_sigmaIetaIeta->Fill(ElSigmaIetaIeta[i]); |
1857 |
< |
h_el_B_eth_pt->Fill(ElPt[i]); |
1858 |
< |
h_el_B_eth_eta->Fill(ElEta[i]); |
1859 |
< |
h_el_B_eth_phi->Fill(ElPhi[i]); |
1860 |
< |
h_el_B_eth_fbrem->Fill(Elfbrem[i]); |
1861 |
< |
h_el_B_eth_basicclustersize->Fill(ElBasicClustersSize[i]); |
1862 |
< |
h_el_B_eth_chi2->Fill(ElNChi2[i]); |
1863 |
< |
h_el_B_eth_charge->Fill(ElCharge[i]); |
1864 |
< |
h_el_B_eth_pfmet->Fill(PFMET); |
1865 |
< |
h_el_B_eth_HoverE->Fill(ElHcalOverEcal[i]); |
1866 |
< |
} |
1867 |
< |
if(isendcap==true) { |
1868 |
< |
h_el_E_eth_deltaPhiSuperCluster->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1869 |
< |
h_el_E_eth_deltaEtaSuperCluster->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1870 |
< |
h_el_E_eth_deltaPhiSuperCluster2->Fill(fabs(ElDeltaPhiSuperClusterAtVtx[i] - dPhiCorrection)); |
1871 |
< |
h_el_E_eth_deltaEtaSuperCluster2->Fill(fabs(ElDeltaEtaSuperClusterAtVtx[i] - dEtaCorrection)); |
1872 |
< |
h_el_E_eth_caloenergy->Fill(ElCaloEnergy[i]); |
1873 |
< |
h_el_E_eth_trkmomatvtx->Fill(ElTrkMomAtVtx[i]); |
1874 |
< |
h_el_E_eth_oneOverEminusOneOverP->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1875 |
< |
h_el_E_eth_oneOverEminusOneOverP2->Fill( fabs(1/ElCaloEnergy[i] - 1/ElTrkMomAtVtx[i]) ); |
1876 |
< |
h_el_E_eth_sumPtOverE->Fill(ElDR04TkSumPt[i]/ElCaloEnergy[i]); |
1877 |
< |
h_el_E_eth_sigmaIetaIeta->Fill(ElSigmaIetaIeta[i]); |
1878 |
< |
h_el_E_eth_pt->Fill(ElPt[i]); |
1879 |
< |
h_el_E_eth_eta->Fill(ElEta[i]); |
1880 |
< |
h_el_E_eth_phi->Fill(ElPhi[i]); |
1881 |
< |
h_el_E_eth_fbrem->Fill(Elfbrem[i]); |
1882 |
< |
h_el_E_eth_basicclustersize->Fill(ElBasicClustersSize[i]); |
1883 |
< |
h_el_E_eth_chi2->Fill(ElNChi2[i]); |
1884 |
< |
h_el_E_eth_charge->Fill(ElCharge[i]); |
1885 |
< |
h_el_E_eth_pfmet->Fill(PFMET); |
1886 |
< |
h_el_E_eth_HoverE->Fill(ElHcalOverEcal[i]); |
1887 |
< |
} |
1888 |
< |
} |
1887 |
> |
|
1888 |
> |
|
1889 |
|
|
1890 |
|
} // loop over all electrons in one event |
1891 |
|
|
1892 |
– |
// if(electronsTight.size()!=0 || electronsETH.size()!=0) { |
1893 |
– |
// cout<<"Number of tight electrons: "<<electronsTight.size()<<endl; |
1894 |
– |
// cout<<"Number of eth electrons: "<<electronsETH.size()<<endl; |
1895 |
– |
// } |
1892 |
|
|
1893 |
< |
// if(tightElectrons.fourvector.size()!=0) { |
1894 |
< |
// cout<<"Number of tight electrons: "<<tightElectrons.fourvector.size()<<endl; |
1895 |
< |
// cout<<"electron pt: "<<tightElectrons.fourvector[0].Pt()<<endl; |
1896 |
< |
// cout<<"Charge: "<<tightElectrons.charge[0]<<endl; |
1893 |
> |
//-------------------------------------------------------------------------------------------------------------------- |
1894 |
> |
// jet cleaning (new) |
1895 |
> |
//-------------------------------------------------------------------------------------------------------------------- |
1896 |
> |
|
1897 |
> |
// the new number of jets is the size of the jetIndex vector |
1898 |
> |
// use that for jet veto... |
1899 |
> |
TLorentzVector electron; |
1900 |
> |
TLorentzVector jet; |
1901 |
> |
for(int j=0; j<NJets; j++) { |
1902 |
> |
if(JPt[j]<jetPtMin || fabs(JEta[j])>jetEtaMax) continue; |
1903 |
> |
jet.SetPxPyPzE(JPx[j],JPy[j],JPz[j],JE[j]); |
1904 |
> |
|
1905 |
> |
double deltaR=999; // have to calculate the minimal deltaR for EACH jet! |
1906 |
> |
for(int e=0;e<electronIndex.size();e++) { |
1907 |
> |
int index=electronIndex[e]; |
1908 |
> |
electron.SetPtEtaPhiE(ElPt[index] * PtCorrection ,ElEta[index],ElPhi[index],ElE[index]); |
1909 |
> |
|
1910 |
> |
double dR=fabs(jet.DeltaR(electron)); |
1911 |
> |
if(dR<deltaR) deltaR=dR; |
1912 |
> |
// cout<<"delta R: "<<deltaR<<endl; |
1913 |
> |
} |
1914 |
> |
if(deltaR<deltaRMax) continue; |
1915 |
> |
jetIndex.push_back(j); |
1916 |
> |
} |
1917 |
> |
|
1918 |
> |
|
1919 |
> |
////////////////////// |
1920 |
> |
// now check the ordering of the jets! |
1921 |
> |
////////////////////// |
1922 |
> |
|
1923 |
> |
|
1924 |
> |
// for(int ji=0; ji<jetIndex.size; ji++) { |
1925 |
> |
|
1926 |
|
// } |
1927 |
|
|
1928 |
|
|
1929 |
< |
|
1930 |
< |
// -------------------------------------------------------------------------------- |
1931 |
< |
// get the jets |
1932 |
< |
// -------------------------------------------------------------------------------- |
1933 |
< |
for(int j=0;j<NJets;j++) { |
1934 |
< |
if(JPt[j]>jetPtMin && JEta[j]<jetEtaMax) { |
1935 |
< |
TLorentzVector vec; |
1936 |
< |
vec.SetPxPyPzE(JPx[j],JPy[j],JPz[j],JE[j]); |
1937 |
< |
// now, one needs a cleaning of the jet... |
1938 |
< |
// loop over all isolated electrons |
1939 |
< |
for(int e=0; e<electronsETHIsolated.size();e++) { |
1940 |
< |
if(electronsETHIsolated[e].DeltaR(vec)>deltaRMax) { |
1941 |
< |
jets.push_back(vec); |
1942 |
< |
} |
1943 |
< |
} |
1929 |
> |
//-------------------------------------------------------------------------------------------------------------------- |
1930 |
> |
|
1931 |
> |
|
1932 |
> |
//-------------------------------------------------------------------------------------------------------------------- |
1933 |
> |
// Tag and Probe efficiency measurement |
1934 |
> |
//-------------------------------------------------------------------------------------------------------------------- |
1935 |
> |
|
1936 |
> |
// an event gets tagged, if it consists of one IDed and isolated electron |
1937 |
> |
// AND a gsf candidate with pt>20 GeV in the fiducial region |
1938 |
> |
// AND the invariant mass is close to the Z mass |
1939 |
> |
|
1940 |
> |
bool isTagged=false; |
1941 |
> |
if(electronIndex.size()>0 && NEles>1) { |
1942 |
> |
for(int i=0; i<NEles; i++) { |
1943 |
> |
// should also cut on the invariant mass !!!!! |
1944 |
> |
if(i==electronIndex[0] || ElPt[i]<20 || (fabs(ElEta[i])>1.44 && fabs(ElEta[i])<1.56 )|| fabs(ElEta[i])>2.5) continue; |
1945 |
> |
isTagged=true; |
1946 |
|
} |
1947 |
|
} |
1948 |
< |
// -------------------------------------------------------------------------------- |
1948 |
> |
// now the Z event is tagged |
1949 |
> |
if(isTagged==true) { |
1950 |
> |
// increment the various counters |
1951 |
> |
N_t0++; |
1952 |
> |
// check the event contains two IDed electrons |
1953 |
> |
if(electronIndex.size()==2) N_tt++; |
1954 |
|
|
1955 |
|
|
1956 |
< |
// -------------------------------------------------------------------------------- |
1957 |
< |
// get the MET |
1958 |
< |
// -------------------------------------------------------------------------------- |
1959 |
< |
// double met; |
1928 |
< |
// double metPhi; |
1929 |
< |
// double delPhi; |
1930 |
< |
// met=PFMET; |
1931 |
< |
// metPhi=PFMETphi; |
1932 |
< |
// myEvent |
1933 |
< |
for(int k=0; k<tightElectrons.fourvector.size(); k++) { |
1934 |
< |
delPhiMet=deltaPhi(tightElectrons.fourvector[k].Phi(), metPhi); |
1935 |
< |
tightElectrons.deltaPhiMet.push_back(delPhiMet); |
1936 |
< |
} |
1937 |
< |
for(int k=0; k<ethElectrons.fourvector.size(); k++) { |
1938 |
< |
delPhiMet=deltaPhi(ethElectrons.fourvector[k].Phi(), metPhi); |
1939 |
< |
ethElectrons.deltaPhiMet.push_back(delPhiMet); |
1940 |
< |
} |
1941 |
< |
tightElectrons.missinget=met; |
1942 |
< |
ethElectrons.missinget=met; |
1956 |
> |
} |
1957 |
> |
|
1958 |
> |
|
1959 |
> |
//-------------------------------------------------------------------------------------------------------------------- |
1960 |
|
|
1944 |
– |
// -------------------------------------------------------------------------------- |
1945 |
– |
// print some info about the found electrons |
1946 |
– |
// -------------------------------------------------------------------------------- |
1961 |
|
|
1948 |
– |
if(printInfo==true) { |
1949 |
– |
for(int el=0;el<ethElectrons.fourvector.size();el++) { |
1950 |
– |
cout<<"-----------------------------------------------------"<<endl; |
1951 |
– |
cout<<ethElectrons.fourvector.size()<<" ETH IDed electron(s) found"<<endl; |
1952 |
– |
if(ethElectrons.isolation[el]==true) cout<<"isolated"<<endl; |
1953 |
– |
if(ethElectrons.isolation[el]==false) cout<<"non isolated"<<endl; |
1954 |
– |
cout<<"pt= "<<ethElectrons.fourvector[el].Pt()<<endl; |
1955 |
– |
cout<<"eta= "<<ethElectrons.fourvector[el].Eta()<<endl; |
1956 |
– |
cout<<"phi= "<<ethElectrons.fourvector[el].Phi()<<endl; |
1957 |
– |
cout<<"MET= "<<ethElectrons.missinget<<endl; |
1958 |
– |
} |
1962 |
|
|
1963 |
< |
for(int el=0;el<tightElectrons.fourvector.size();el++) { |
1964 |
< |
cout<<"-----------------------------------------------------"<<endl; |
1965 |
< |
cout<<tightElectrons.fourvector.size()<<" TIGHT IDed electron(s) found"<<endl; |
1966 |
< |
if(tightElectrons.isolation[el]==true) cout<<"isolated"<<endl; |
1967 |
< |
if(tightElectrons.isolation[el]==false) cout<<"non isolated"<<endl; |
1968 |
< |
cout<<"pt= "<<tightElectrons.fourvector[el].Pt()<<endl; |
1969 |
< |
cout<<"eta= "<<tightElectrons.fourvector[el].Eta()<<endl; |
1970 |
< |
cout<<"phi= "<<tightElectrons.fourvector[el].Phi()<<endl; |
1971 |
< |
cout<<"MET= "<<tightElectrons.missinget<<endl; |
1963 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
1964 |
> |
// Z Selection (new) |
1965 |
> |
// -------------------------------------------------------------------------------------------------------------------- |
1966 |
> |
if(electronIndex.size()==2) { |
1967 |
> |
// calculate the invariant mass |
1968 |
> |
double invMass; |
1969 |
> |
TLorentzVector e1, e2; |
1970 |
> |
e1.SetPtEtaPhiE(ElPt[electronIndex[0]] * PtCorrection ,ElEta[electronIndex[0]],ElPhi[electronIndex[0]],ElE[electronIndex[0]]); |
1971 |
> |
e2.SetPtEtaPhiE(ElPt[electronIndex[1]] * PtCorrection ,ElEta[electronIndex[1]],ElPhi[electronIndex[1]],ElE[electronIndex[1]]); |
1972 |
> |
invMass = (e1+e2).M(); |
1973 |
> |
|
1974 |
> |
double summedJetPt; |
1975 |
> |
double summedJetEta; |
1976 |
> |
double summedJetPhi; |
1977 |
> |
double recoilPt; |
1978 |
> |
double recoilEta; |
1979 |
> |
double recoilPhi; |
1980 |
> |
|
1981 |
> |
// these variables are only defined if there really are jets... |
1982 |
> |
TLorentzVector jsum; |
1983 |
> |
if(jetIndex.size()>0) { |
1984 |
> |
for(int ji=0; ji<jetIndex.size(); ji++) { |
1985 |
> |
TLorentzVector vec; |
1986 |
> |
vec.SetPxPyPzE(JPx[ji], JPy[ji], JPz[ji], JE[ji]); |
1987 |
> |
jsum=jsum+vec; |
1988 |
|
} |
1989 |
< |
} |
1990 |
< |
// -------------------------------------------------------------------------------- |
1989 |
> |
summedJetPt = jsum.Pt(); |
1990 |
> |
summedJetEta = jsum.Eta(); |
1991 |
> |
summedJetPhi = jsum.Phi(); |
1992 |
> |
// add also the Z |
1993 |
> |
jsum+=e1; |
1994 |
> |
jsum+=e2; |
1995 |
> |
recoilPt = jsum.Pt(); |
1996 |
> |
recoilEta = jsum.Eta(); |
1997 |
> |
recoilPhi = jsum.Phi(); |
1998 |
> |
} |
1999 |
> |
|
2000 |
> |
fprintf(out_Z,"%i \t%i \t%i \t%f \t%f \t%f \t%f \t%f\n",Run, Event, LumiSection, invMass, ElPt[electronIndex[0]], ElPt[electronIndex[1]], (e1+e2).Pt(), summedJetPt); |
2001 |
> |
|
2002 |
> |
h_Z_invMass[0]->Fill(invMass); |
2003 |
> |
h_Z_ptAll[0]->Fill(ElPt[electronIndex[0]]); |
2004 |
> |
h_Z_ptAll[0]->Fill(ElPt[electronIndex[1]]); |
2005 |
> |
h_Z_etaAll[0]->Fill(ElEta[electronIndex[0]]); |
2006 |
> |
h_Z_etaAll[0]->Fill(ElEta[electronIndex[1]]); |
2007 |
> |
h_Z_phiAll[0]->Fill(ElPhi[electronIndex[0]]); |
2008 |
> |
h_Z_phiAll[0]->Fill(ElPhi[electronIndex[1]]); |
2009 |
> |
h_Z_deltaPhi[0]->Fill(deltaPhi(ElPhi[electronIndex[0]], ElPhi[electronIndex[1]])); |
2010 |
> |
h_Z_ptDiLepton[0]->Fill((e1+e2).Pt()); |
2011 |
> |
h_Z_etaDiLepton[0]->Fill((e1+e2).Eta()); |
2012 |
> |
h_Z_phiDiLepton[0]->Fill((e1+e2).Phi()); |
2013 |
> |
|
2014 |
> |
// now variables with "jetty" content |
2015 |
> |
|
2016 |
> |
h_Z_nJets[0]->Fill(jetIndex.size()); |
2017 |
> |
if(jetIndex.size()>0) { |
2018 |
> |
h_Z_leadingJetPt[0]->Fill(JPt[jetIndex[0]]); |
2019 |
> |
h_Z_leadingJetEta[0]->Fill(JEta[jetIndex[0]]); |
2020 |
> |
h_Z_leadingJetPhi[0]->Fill(JPhi[jetIndex[0]]); |
2021 |
> |
h_Z_summedJetPt[0]->Fill(summedJetPt); |
2022 |
> |
h_Z_summedJetEta[0]->Fill(summedJetEta); |
2023 |
> |
h_Z_summedJetPhi[0]->Fill(summedJetPhi); |
2024 |
> |
|
2025 |
> |
h_Z_leadingJetDeltaPt[0]->Fill(JPt[jetIndex[0]] - (e1+e2).Pt()); |
2026 |
> |
h_Z_leadingJetDeltaEta[0]->Fill(JEta[jetIndex[0]] - (e1+e2).Eta()); |
2027 |
> |
h_Z_leadingJetDeltaPhi[0]->Fill(deltaPhi(JPhi[jetIndex[0]],(e1+e2).Phi())); |
2028 |
> |
h_Z_summedJetDeltaPt[0]->Fill(summedJetPt - (e1+e2).Pt()); |
2029 |
> |
h_Z_summedJetDeltaEta[0]->Fill(summedJetEta - (e1+e2).Eta()); |
2030 |
> |
h_Z_summedJetDeltaPhi[0]->Fill(deltaPhi(summedJetPhi, (e1+e2).Phi())); |
2031 |
> |
|
2032 |
> |
h_Z_recoilPt[0]->Fill(recoilPt); |
2033 |
> |
h_Z_recoilEta[0]->Fill(recoilEta); |
2034 |
> |
h_Z_recoilPhi[0]->Fill(recoilPhi); |
2035 |
> |
h_Z_metPt[0]->Fill(met); |
2036 |
> |
// h_Z_metEta[0]->Fill(metEta); |
2037 |
> |
h_Z_metPhi[0]->Fill(metPhi); |
2038 |
> |
} |
2039 |
|
|
2040 |
|
|
1974 |
– |
// -------------------------------------------------------------------------------- |
1975 |
– |
// W selection |
1976 |
– |
// -------------------------------------------------------------------------------- |
1977 |
– |
double minPt=25.; |
1978 |
– |
double etaMax=1.44; |
1979 |
– |
double metMin=30.; |
1980 |
– |
double mtMin=60.; |
1981 |
– |
double delphinMax=2.8; |
1982 |
– |
|
1983 |
– |
bool makeCut [] = {true, // 0: not used |
1984 |
– |
true, // 1: barrel only |
1985 |
– |
true, // 2: met cut |
1986 |
– |
false, // 3: transverse mass cut |
1987 |
– |
true, // 4: 0 jets |
1988 |
– |
true, // 5: 1 jet |
1989 |
– |
true, // 6: 1 jets delta phi cut |
1990 |
– |
true, // 7: >1 jet |
1991 |
– |
}; |
1992 |
– |
|
1993 |
– |
// preselection |
1994 |
– |
int cut; |
1995 |
– |
if(ethElectrons.fourvector.size()==1 && ethElectrons.fourvector[0].Pt()>20 && ethElectrons.missinget>20 && ethElectrons.ethIso[0]<0.1) { |
1996 |
– |
double trMass=transverseMass(ethElectrons.fourvector[0].Pt(), ethElectrons.missinget, ethElectrons.deltaPhiMet[0]); |
1997 |
– |
|
1998 |
– |
// these electrons have already pt > ptMin !!! |
1999 |
– |
cut=0; |
2000 |
– |
//filler(ethElectrons, hs_W_ElPt[cut], hs_W_ElEta[cut], hs_W_ElPhi[cut], hs_W_ElMet[cut], hs_W_ElCharge[cut]); |
2001 |
– |
hs_W_ElTransMass[cut]->Fill(trMass); |
2002 |
– |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2003 |
– |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2004 |
– |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2005 |
– |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2006 |
– |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2007 |
– |
hs_W_Njets[cut]->Fill(jets.size()); |
2008 |
– |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2041 |
|
|
2042 |
+ |
// check both in barrel |
2043 |
+ |
if(fabs(ElEta[electronIndex[0]]) < etaBarrelMax && fabs(ElEta[electronIndex[1]]) < etaBarrelMax) { |
2044 |
+ |
h_Z_invMass[1]->Fill(invMass); |
2045 |
+ |
|
2046 |
+ |
h_Z_ptAll[1]->Fill(ElPt[electronIndex[0]]); |
2047 |
+ |
h_Z_ptAll[1]->Fill(ElPt[electronIndex[1]]); |
2048 |
+ |
h_Z_etaAll[1]->Fill(ElEta[electronIndex[0]]); |
2049 |
+ |
h_Z_etaAll[1]->Fill(ElEta[electronIndex[1]]); |
2050 |
+ |
h_Z_phiAll[1]->Fill(ElPhi[electronIndex[0]]); |
2051 |
+ |
h_Z_phiAll[1]->Fill(ElPhi[electronIndex[1]]); |
2052 |
+ |
h_Z_deltaPhi[1]->Fill(deltaPhi(ElPhi[electronIndex[0]], ElPhi[electronIndex[1]])); |
2053 |
+ |
h_Z_ptDiLepton[1]->Fill((e1+e2).Pt()); |
2054 |
+ |
h_Z_etaDiLepton[1]->Fill((e1+e2).Eta()); |
2055 |
+ |
h_Z_phiDiLepton[1]->Fill((e1+e2).Phi()); |
2056 |
+ |
|
2057 |
+ |
// now variables with "jetty" content |
2058 |
+ |
h_Z_nJets[1]->Fill(jetIndex.size()); |
2059 |
+ |
if(jetIndex.size()>0) { |
2060 |
+ |
h_Z_leadingJetPt[1]->Fill(JPt[jetIndex[0]]); |
2061 |
+ |
h_Z_leadingJetEta[1]->Fill(JEta[jetIndex[0]]); |
2062 |
+ |
h_Z_leadingJetPhi[1]->Fill(JPhi[jetIndex[0]]); |
2063 |
+ |
h_Z_summedJetPt[1]->Fill(summedJetPt); |
2064 |
+ |
h_Z_summedJetEta[1]->Fill(summedJetEta); |
2065 |
+ |
h_Z_summedJetPhi[1]->Fill(summedJetPhi); |
2066 |
+ |
|
2067 |
+ |
h_Z_leadingJetDeltaPt[1]->Fill(JPt[jetIndex[0]] - (e1+e2).Pt()); |
2068 |
+ |
h_Z_leadingJetDeltaEta[1]->Fill(JEta[jetIndex[0]] - (e1+e2).Eta()); |
2069 |
+ |
h_Z_leadingJetDeltaPhi[1]->Fill(deltaPhi(JPhi[jetIndex[0]],(e1+e2).Phi())); |
2070 |
+ |
h_Z_summedJetDeltaPt[1]->Fill(summedJetPt - (e1+e2).Pt()); |
2071 |
+ |
h_Z_summedJetDeltaEta[1]->Fill(summedJetEta - (e1+e2).Eta()); |
2072 |
+ |
h_Z_summedJetDeltaPhi[1]->Fill(deltaPhi(summedJetPhi, (e1+e2).Phi())); |
2073 |
+ |
|
2074 |
+ |
h_Z_recoilPt[1]->Fill(recoilPt); |
2075 |
+ |
h_Z_recoilEta[1]->Fill(recoilEta); |
2076 |
+ |
h_Z_recoilPhi[1]->Fill(recoilPhi); |
2077 |
+ |
h_Z_metPt[1]->Fill(met); |
2078 |
+ |
// h_Z_metEta[1]->Fill(metEta); |
2079 |
+ |
h_Z_metPhi[1]->Fill(metPhi); |
2080 |
+ |
} |
2081 |
|
|
2082 |
|
|
2012 |
– |
// cut on the barrel |
2013 |
– |
cut=1; |
2014 |
– |
if(makeCut[cut]==false || fabs(ethElectrons.fourvector[0].Eta()) < etaMax && ethElectrons.fourvector[0].Pt()>minPt) { |
2015 |
– |
hs_W_ElTransMass[cut]->Fill(trMass); |
2016 |
– |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2017 |
– |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2018 |
– |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2019 |
– |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2020 |
– |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2021 |
– |
hs_W_Njets[cut]->Fill(jets.size()); |
2022 |
– |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2023 |
– |
|
2024 |
– |
|
2025 |
– |
// make a met cut |
2026 |
– |
cut=2; |
2027 |
– |
if(makeCut[cut]==false || ethElectrons.missinget>metMin) { |
2028 |
– |
hs_W_ElTransMass[cut]->Fill(trMass); |
2029 |
– |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2030 |
– |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2031 |
– |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2032 |
– |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2033 |
– |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2034 |
– |
hs_W_Njets[cut]->Fill(jets.size()); |
2035 |
– |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2036 |
– |
|
2083 |
|
|
2084 |
< |
// make a transverse mass cut |
2085 |
< |
cut=3; |
2086 |
< |
if(makeCut[cut]==false || trMass>mtMin) { |
2087 |
< |
hs_W_ElTransMass[cut]->Fill(trMass); |
2088 |
< |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2089 |
< |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2090 |
< |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2091 |
< |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2092 |
< |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2093 |
< |
hs_W_Njets[cut]->Fill(jets.size()); |
2094 |
< |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2095 |
< |
|
2096 |
< |
|
2097 |
< |
// check the number of jets |
2098 |
< |
cut=4; |
2099 |
< |
if(makeCut[cut]==false || jets.size()==0) { |
2100 |
< |
hs_W_ElTransMass[cut]->Fill(trMass); |
2101 |
< |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2102 |
< |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2103 |
< |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2104 |
< |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2105 |
< |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2106 |
< |
hs_W_Njets[cut]->Fill(jets.size()); |
2107 |
< |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2108 |
< |
|
2109 |
< |
} |
2110 |
< |
cut=5; |
2111 |
< |
if(makeCut[cut]==false || jets.size()==1) { |
2112 |
< |
double delphin; |
2113 |
< |
delphin=ethElectrons.fourvector[0].DeltaPhi(jets[0]); |
2114 |
< |
hs_W_ElTransMass[cut]->Fill(trMass); |
2115 |
< |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2116 |
< |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2117 |
< |
hs_W_ElDeltaPhi[cut]->Fill(fabs(delphin)); |
2118 |
< |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2119 |
< |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2120 |
< |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2121 |
< |
hs_W_Njets[cut]->Fill(jets.size()); |
2122 |
< |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2123 |
< |
|
2124 |
< |
// delta phi cut |
2125 |
< |
//cout<<"delphin = "<<delphin<<endl; |
2126 |
< |
cut=6; |
2127 |
< |
if(makeCut[cut]==false || fabs(delphin)<delphinMax) { |
2128 |
< |
hs_W_ElTransMass[cut]->Fill(trMass); |
2129 |
< |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2130 |
< |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2131 |
< |
hs_W_ElDeltaPhi[cut]->Fill(fabs(delphin)); |
2132 |
< |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2133 |
< |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2134 |
< |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2135 |
< |
hs_W_Njets[cut]->Fill(jets.size()); |
2136 |
< |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2137 |
< |
} |
2138 |
< |
} |
2139 |
< |
cut=7; |
2140 |
< |
if(makeCut[cut]==false || jets.size()>1) { |
2141 |
< |
hs_W_ElTransMass[cut]->Fill(trMass); |
2142 |
< |
hs_W_ElPt[cut]->Fill(ethElectrons.fourvector[0].Pt()); |
2143 |
< |
hs_W_ElEta [cut]->Fill(ethElectrons.fourvector[0].Eta()); |
2144 |
< |
// hs_W_ElDeltaPhi[cut]->Fill(ethElectrons.deltaPhiMet[0]); |
2145 |
< |
hs_W_ElMet[cut]->Fill(ethElectrons.missinget); |
2146 |
< |
hs_W_ElCharge[cut]->Fill(ethElectrons.charge[0]); |
2147 |
< |
hs_W_Njets[cut]->Fill(jets.size()); |
2148 |
< |
hs_W_ElPhi[cut]->Fill(ethElectrons.fourvector[0].Phi()); |
2084 |
> |
} |
2085 |
> |
// check both in endcaps |
2086 |
> |
if(fabs(ElEta[electronIndex[0]]) > etaBarrelMax && fabs(ElEta[electronIndex[1]]) > etaBarrelMax) { |
2087 |
> |
h_Z_invMass[2]->Fill(invMass); |
2088 |
> |
|
2089 |
> |
h_Z_ptAll[2]->Fill(ElPt[electronIndex[0]]); |
2090 |
> |
h_Z_ptAll[2]->Fill(ElPt[electronIndex[1]]); |
2091 |
> |
h_Z_etaAll[2]->Fill(ElEta[electronIndex[0]]); |
2092 |
> |
h_Z_etaAll[2]->Fill(ElEta[electronIndex[1]]); |
2093 |
> |
h_Z_phiAll[2]->Fill(ElPhi[electronIndex[0]]); |
2094 |
> |
h_Z_phiAll[2]->Fill(ElPhi[electronIndex[1]]); |
2095 |
> |
h_Z_deltaPhi[2]->Fill(deltaPhi(ElPhi[electronIndex[0]], ElPhi[electronIndex[1]])); |
2096 |
> |
h_Z_ptDiLepton[2]->Fill((e1+e2).Pt()); |
2097 |
> |
h_Z_etaDiLepton[2]->Fill((e1+e2).Eta()); |
2098 |
> |
h_Z_phiDiLepton[2]->Fill((e1+e2).Phi()); |
2099 |
> |
|
2100 |
> |
// now variables with "jetty" content |
2101 |
> |
h_Z_nJets[2]->Fill(jetIndex.size()); |
2102 |
> |
if(jetIndex.size()>0) { |
2103 |
> |
h_Z_leadingJetPt[2]->Fill(JPt[jetIndex[0]]); |
2104 |
> |
h_Z_leadingJetEta[2]->Fill(JEta[jetIndex[0]]); |
2105 |
> |
h_Z_leadingJetPhi[2]->Fill(JPhi[jetIndex[0]]); |
2106 |
> |
h_Z_summedJetPt[2]->Fill(summedJetPt); |
2107 |
> |
h_Z_summedJetEta[2]->Fill(summedJetEta); |
2108 |
> |
h_Z_summedJetPhi[2]->Fill(summedJetPhi); |
2109 |
> |
|
2110 |
> |
h_Z_leadingJetDeltaPt[2]->Fill(JPt[jetIndex[0]] - (e1+e2).Pt()); |
2111 |
> |
h_Z_leadingJetDeltaEta[2]->Fill(JEta[jetIndex[0]] - (e1+e2).Eta()); |
2112 |
> |
h_Z_leadingJetDeltaPhi[2]->Fill(deltaPhi(JPhi[jetIndex[0]],(e1+e2).Phi())); |
2113 |
> |
h_Z_summedJetDeltaPt[2]->Fill(summedJetPt - (e1+e2).Pt()); |
2114 |
> |
h_Z_summedJetDeltaEta[2]->Fill(summedJetEta - (e1+e2).Eta()); |
2115 |
> |
h_Z_summedJetDeltaPhi[2]->Fill(deltaPhi(summedJetPhi, (e1+e2).Phi())); |
2116 |
> |
|
2117 |
> |
h_Z_recoilPt[2]->Fill(recoilPt); |
2118 |
> |
h_Z_recoilEta[2]->Fill(recoilEta); |
2119 |
> |
h_Z_recoilPhi[2]->Fill(recoilPhi); |
2120 |
> |
h_Z_metPt[2]->Fill(met); |
2121 |
> |
// h_Z_metEta[2]->Fill(metEta); |
2122 |
> |
h_Z_metPhi[2]->Fill(metPhi); |
2123 |
> |
} |
2124 |
> |
|
2125 |
> |
} |
2126 |
> |
// check one in barrel the other in endcap |
2127 |
> |
if((fabs(ElEta[electronIndex[0]]) < etaBarrelMax && fabs(ElEta[electronIndex[1]]) > etaBarrelMax) || |
2128 |
> |
(fabs(ElEta[electronIndex[1]]) < etaBarrelMax && fabs(ElEta[electronIndex[0]]) > etaBarrelMax) ) { |
2129 |
> |
h_Z_invMass[3]->Fill(invMass); |
2130 |
> |
|
2131 |
> |
h_Z_ptAll[3]->Fill(ElPt[electronIndex[0]]); |
2132 |
> |
h_Z_ptAll[3]->Fill(ElPt[electronIndex[1]]); |
2133 |
> |
h_Z_etaAll[3]->Fill(ElEta[electronIndex[0]]); |
2134 |
> |
h_Z_etaAll[3]->Fill(ElEta[electronIndex[1]]); |
2135 |
> |
h_Z_phiAll[3]->Fill(ElPhi[electronIndex[0]]); |
2136 |
> |
h_Z_phiAll[3]->Fill(ElPhi[electronIndex[1]]); |
2137 |
> |
h_Z_deltaPhi[3]->Fill(deltaPhi(ElPhi[electronIndex[0]], ElPhi[electronIndex[1]])); |
2138 |
> |
h_Z_ptDiLepton[3]->Fill((e1+e2).Pt()); |
2139 |
> |
h_Z_etaDiLepton[3]->Fill((e1+e2).Eta()); |
2140 |
> |
h_Z_phiDiLepton[3]->Fill((e1+e2).Phi()); |
2141 |
> |
|
2142 |
> |
// now variables with "jetty" content |
2143 |
> |
h_Z_nJets[3]->Fill(jetIndex.size()); |
2144 |
> |
if(jetIndex.size()>0) { |
2145 |
> |
h_Z_leadingJetPt[3]->Fill(JPt[jetIndex[0]]); |
2146 |
> |
h_Z_leadingJetEta[3]->Fill(JEta[jetIndex[0]]); |
2147 |
> |
h_Z_leadingJetPhi[3]->Fill(JPhi[jetIndex[0]]); |
2148 |
> |
h_Z_summedJetPt[3]->Fill(summedJetPt); |
2149 |
> |
h_Z_summedJetEta[3]->Fill(summedJetEta); |
2150 |
> |
h_Z_summedJetPhi[3]->Fill(summedJetPhi); |
2151 |
> |
|
2152 |
> |
h_Z_leadingJetDeltaPt[3]->Fill(JPt[jetIndex[0]] - (e1+e2).Pt()); |
2153 |
> |
h_Z_leadingJetDeltaEta[3]->Fill(JEta[jetIndex[0]] - (e1+e2).Eta()); |
2154 |
> |
h_Z_leadingJetDeltaPhi[3]->Fill(deltaPhi(JPhi[jetIndex[0]],(e1+e2).Phi())); |
2155 |
> |
h_Z_summedJetDeltaPt[3]->Fill(summedJetPt - (e1+e2).Pt()); |
2156 |
> |
h_Z_summedJetDeltaEta[3]->Fill(summedJetEta - (e1+e2).Eta()); |
2157 |
> |
h_Z_summedJetDeltaPhi[3]->Fill(deltaPhi(summedJetPhi, (e1+e2).Phi())); |
2158 |
> |
|
2159 |
> |
h_Z_recoilPt[3]->Fill(recoilPt); |
2160 |
> |
h_Z_recoilEta[3]->Fill(recoilEta); |
2161 |
> |
h_Z_recoilPhi[3]->Fill(recoilPhi); |
2162 |
> |
h_Z_metPt[3]->Fill(met); |
2163 |
> |
// h_Z_metEta[3]->Fill(metEta); |
2164 |
> |
h_Z_metPhi[3]->Fill(metPhi); |
2165 |
> |
} |
2166 |
> |
} |
2167 |
|
|
2104 |
– |
} |
2105 |
– |
} |
2106 |
– |
} |
2107 |
– |
} |
2108 |
– |
} |
2168 |
|
|
2169 |
+ |
// debug++; |
2170 |
+ |
} |
2171 |
|
// -------------------------------------------------------------------------------------------------------------------- |
2172 |
|
|
2173 |
+ |
|
2174 |
+ |
// //-------------------------------------------------------------------------------------------------------------------- |
2175 |
+ |
// // jet cleaning (new) |
2176 |
+ |
// //-------------------------------------------------------------------------------------------------------------------- |
2177 |
+ |
|
2178 |
+ |
// // the new number of jets is the size of the jetIndex vector |
2179 |
+ |
// // use that for jet veto... |
2180 |
+ |
// TLorentzVector electron; |
2181 |
+ |
// TLorentzVector jet; |
2182 |
+ |
// double deltaR=999; |
2183 |
+ |
// for(int j=0; j<NJets; j++) { |
2184 |
+ |
// if(JPt[j]<jetPtMin || fabs(JEta[j])>jetEtaMax) continue; |
2185 |
+ |
// jet.SetPxPyPzE(JPx[j],JPy[j],JPz[j],JE[j]); |
2186 |
+ |
|
2187 |
+ |
// for(int e=0;e<electronIndex.size();e++) { |
2188 |
+ |
// int index=electronIndex[e]; |
2189 |
+ |
// electron.SetPtEtaPhiE(ElPt[index] * PtCorrection ,ElEta[index],ElPhi[index],ElE[index]); |
2190 |
+ |
|
2191 |
+ |
|
2192 |
+ |
// deltaR=jet.DeltaR(electron); |
2193 |
+ |
// // cout<<deltaR<<endl; |
2194 |
+ |
// } |
2195 |
+ |
// if(deltaR<deltaRMax) continue; |
2196 |
+ |
// jetIndex.push_back(j); |
2197 |
+ |
// } |
2198 |
+ |
|
2199 |
+ |
// //-------------------------------------------------------------------------------------------------------------------- |
2200 |
+ |
|
2201 |
|
|
2202 |
|
|
2203 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
2204 |
+ |
// W selection (new) |
2205 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
2206 |
+ |
if(electronIndex.size()==1) { |
2207 |
|
|
2208 |
|
|
2209 |
+ |
int Wcut; |
2210 |
+ |
double dphiMax=2.8; |
2211 |
+ |
double delPhiMet=deltaPhi(ElPhi[electronIndex[0]], PFMETphi); |
2212 |
+ |
double Mt=transverseMass(ElPt[electronIndex[0]] * PtCorrection, met, delPhiMet); |
2213 |
+ |
double Pt=ElPt[electronIndex[0]] * PtCorrection; |
2214 |
+ |
double Eta=ElEta[electronIndex[0]]; |
2215 |
+ |
double Phi=ElPhi[electronIndex[0]]; |
2216 |
+ |
double Charge=ElCharge[electronIndex[0]]; |
2217 |
+ |
int Njets=jetIndex.size(); |
2218 |
|
|
2219 |
+ |
/////////////////// |
2220 |
+ |
// plots for barrel |
2221 |
+ |
/////////////////// |
2222 |
|
|
2223 |
|
|
2224 |
+ |
// if(WSelection(electronIndex[0], full)==0) { |
2225 |
+ |
// fprintf(out,"%i\t%i\n",Run, Event); |
2226 |
+ |
// cout<<"Run: "<<Run<<" Event: "<<Event<<endl; |
2227 |
+ |
// } |
2228 |
|
|
2229 |
|
|
2230 |
|
|
2231 |
< |
|
2232 |
< |
// find some Zs?? |
2233 |
< |
if(electronsETH.size()==2) { |
2234 |
< |
double mass; |
2235 |
< |
mass=(electronsETH[0]+electronsETH[1]).M(); |
2236 |
< |
// cout<<"************"<<mass<<endl; |
2231 |
> |
if(fabs(ElEta[electronIndex[0]])<etaBarrelMax) { |
2232 |
> |
|
2233 |
> |
/////////// |
2234 |
> |
// N jets |
2235 |
> |
////////// |
2236 |
> |
|
2237 |
> |
// fill plots after preselection |
2238 |
> |
if(WSelection(electronIndex[0], full)>1 || WSelection(electronIndex[0], full)==0) { |
2239 |
> |
Wcounter[0]++; |
2240 |
> |
Wcut=0; |
2241 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2242 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2243 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2244 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2245 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2246 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2247 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2248 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2249 |
> |
} |
2250 |
> |
|
2251 |
> |
// fill N-1 plots |
2252 |
> |
|
2253 |
> |
if(WSelection(electronIndex[0], misset)==0) { |
2254 |
> |
Wcut=1; |
2255 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2256 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2257 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2258 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2259 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2260 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2261 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2262 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2263 |
> |
} |
2264 |
> |
if(WSelection(electronIndex[0], pt)==0) { |
2265 |
> |
Wcut=2; |
2266 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2267 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2268 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2269 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2270 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2271 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2272 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2273 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2274 |
> |
} |
2275 |
> |
if(WSelection(electronIndex[0], mt)==0) { |
2276 |
> |
Wcut=3; |
2277 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2278 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2279 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2280 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2281 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2282 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2283 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2284 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2285 |
> |
} |
2286 |
> |
if(WSelection(electronIndex[0], full)==0) { |
2287 |
> |
Wcounter[1]++; |
2288 |
> |
Wcut=4; |
2289 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2290 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2291 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2292 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2293 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2294 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2295 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2296 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2297 |
> |
// split charge |
2298 |
> |
if(Charge==1) { |
2299 |
> |
Wcounter[2]++; |
2300 |
> |
Wcut=5 ; |
2301 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2302 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2303 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2304 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2305 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2306 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2307 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2308 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2309 |
> |
} |
2310 |
> |
else if(Charge==-1) { |
2311 |
> |
Wcounter[3]++; |
2312 |
> |
Wcut=6 ; |
2313 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2314 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2315 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2316 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2317 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2318 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2319 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2320 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2321 |
> |
} // charge |
2322 |
> |
} // W selection |
2323 |
> |
|
2324 |
> |
|
2325 |
> |
/////////// |
2326 |
> |
// 0 jets |
2327 |
> |
////////// |
2328 |
> |
|
2329 |
> |
if(njets==0) { |
2330 |
> |
|
2331 |
> |
// fill plots after preselection |
2332 |
> |
if(WSelection(electronIndex[0], full)>1 || WSelection(electronIndex[0], full)==0) { |
2333 |
> |
Wcounter[4]++; |
2334 |
> |
Wcut=7; |
2335 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2336 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2337 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2338 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2339 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2340 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2341 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2342 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2343 |
> |
} |
2344 |
> |
|
2345 |
> |
// fill N-1 plots |
2346 |
> |
|
2347 |
> |
if(WSelection(electronIndex[0], misset)==0) { |
2348 |
> |
Wcut=8; |
2349 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2350 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2351 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2352 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2353 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2354 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2355 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2356 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2357 |
> |
} |
2358 |
> |
if(WSelection(electronIndex[0], pt)==0) { |
2359 |
> |
Wcut=9; |
2360 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2361 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2362 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2363 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2364 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2365 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2366 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2367 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2368 |
> |
} |
2369 |
> |
if(WSelection(electronIndex[0], mt)==0) { |
2370 |
> |
Wcut=10; |
2371 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2372 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2373 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2374 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2375 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2376 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2377 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2378 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2379 |
> |
} |
2380 |
> |
if(WSelection(electronIndex[0], full)==0) { |
2381 |
> |
Wcounter[5]++; |
2382 |
> |
Wcut=11; |
2383 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2384 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2385 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2386 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2387 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2388 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2389 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2390 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2391 |
> |
|
2392 |
> |
// split charge |
2393 |
> |
if(Charge==1) { |
2394 |
> |
Wcounter[6]++; |
2395 |
> |
Wcut=12; |
2396 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2397 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2398 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2399 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2400 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2401 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2402 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2403 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2404 |
> |
} |
2405 |
> |
else if(Charge==-1) { |
2406 |
> |
Wcounter[7]++; |
2407 |
> |
Wcut=13; |
2408 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2409 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2410 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2411 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2412 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2413 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2414 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2415 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2416 |
> |
} |
2417 |
> |
} // W selection |
2418 |
> |
} // 0 jets |
2419 |
> |
|
2420 |
> |
/////////// |
2421 |
> |
// 1 jet |
2422 |
> |
////////// |
2423 |
> |
|
2424 |
> |
if(njets==1) { |
2425 |
> |
|
2426 |
> |
// fill plots after preselection |
2427 |
> |
if(WSelection(electronIndex[0], full)>1 || WSelection(electronIndex[0], full)==0) { |
2428 |
> |
Wcounter[8]++; |
2429 |
> |
Wcut=14; |
2430 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2431 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2432 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2433 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2434 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2435 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2436 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2437 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2438 |
> |
} |
2439 |
> |
|
2440 |
> |
// fill N-1 plots |
2441 |
> |
|
2442 |
> |
// leaving the delta phi Wcut |
2443 |
> |
double dphi = deltaPhi(ElPhi[electronIndex[0]], JPhi[jetIndex[0]]); |
2444 |
> |
if(WSelection(electronIndex[0], full)==0) { |
2445 |
> |
Wcut=15; |
2446 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2447 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2448 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2449 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2450 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2451 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2452 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2453 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2454 |
> |
} |
2455 |
> |
|
2456 |
> |
// now I have to apply the delta phi Wcut! |
2457 |
> |
|
2458 |
> |
if(fabs(dphi)<dphiMax) { |
2459 |
> |
|
2460 |
> |
if(WSelection(electronIndex[0], misset)==0) { |
2461 |
> |
Wcut=16; |
2462 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2463 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2464 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2465 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2466 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2467 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2468 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2469 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2470 |
> |
} |
2471 |
> |
if(WSelection(electronIndex[0], pt)==0) { |
2472 |
> |
Wcut=17; |
2473 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2474 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2475 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2476 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2477 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2478 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2479 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2480 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2481 |
> |
} |
2482 |
> |
if(WSelection(electronIndex[0], mt)==0) { |
2483 |
> |
Wcut=18; |
2484 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2485 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2486 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2487 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2488 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2489 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2490 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2491 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2492 |
> |
} |
2493 |
> |
if(WSelection(electronIndex[0], full)==0) { |
2494 |
> |
Wcounter[9]++; |
2495 |
> |
Wcut=19; |
2496 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2497 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2498 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2499 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2500 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2501 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2502 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2503 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2504 |
> |
// split charge |
2505 |
> |
if(Charge==1) { |
2506 |
> |
Wcounter[10]++; |
2507 |
> |
Wcut=20; |
2508 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2509 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2510 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2511 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2512 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2513 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2514 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2515 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2516 |
> |
} |
2517 |
> |
else if(Charge==-1) { |
2518 |
> |
Wcounter[11]++; |
2519 |
> |
Wcut=21; |
2520 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2521 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2522 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2523 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2524 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2525 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2526 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2527 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2528 |
> |
} // charge |
2529 |
> |
} // W sel |
2530 |
> |
} // dphi Wcut |
2531 |
> |
} // 1 jet |
2532 |
> |
|
2533 |
> |
////////// |
2534 |
> |
// >1 jet |
2535 |
> |
////////// |
2536 |
> |
|
2537 |
> |
if(njets>1) { |
2538 |
> |
|
2539 |
> |
// fill plots after preselection |
2540 |
> |
if(WSelection(electronIndex[0], full)>1 || WSelection(electronIndex[0], full)==0) { |
2541 |
> |
Wcounter[12]++; |
2542 |
> |
Wcut=22; |
2543 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2544 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2545 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2546 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2547 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2548 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2549 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2550 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2551 |
> |
} |
2552 |
> |
|
2553 |
> |
// fill N-1 plots |
2554 |
> |
|
2555 |
> |
if(WSelection(electronIndex[0], misset)==0) { |
2556 |
> |
Wcut=23; |
2557 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2558 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2559 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2560 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2561 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2562 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2563 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2564 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2565 |
> |
} |
2566 |
> |
if(WSelection(electronIndex[0], pt)==0) { |
2567 |
> |
Wcut=24; |
2568 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2569 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2570 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2571 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2572 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2573 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2574 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2575 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2576 |
> |
} |
2577 |
> |
if(WSelection(electronIndex[0], mt)==0) { |
2578 |
> |
Wcut=25; |
2579 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2580 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2581 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2582 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2583 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2584 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2585 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2586 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2587 |
> |
} |
2588 |
> |
if(WSelection(electronIndex[0], full)==0) { |
2589 |
> |
Wcounter[13]++; |
2590 |
> |
Wcut=26; |
2591 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2592 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2593 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2594 |
> |
// hs_W_ElDeltaPhi[Wcut]->Fill(); |
2595 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2596 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2597 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2598 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2599 |
> |
// split charge |
2600 |
> |
if(Charge==1) { |
2601 |
> |
Wcounter[14]++; |
2602 |
> |
Wcut=27; |
2603 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2604 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2605 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2606 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2607 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2608 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2609 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2610 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2611 |
> |
} |
2612 |
> |
else if(Charge==-1) { |
2613 |
> |
Wcounter[15]++; |
2614 |
> |
Wcut=28; |
2615 |
> |
hs_W_ElTransMass[Wcut]->Fill(Mt); |
2616 |
> |
hs_W_ElPt[Wcut]->Fill(Pt); |
2617 |
> |
hs_W_ElEta[Wcut]->Fill(Eta); |
2618 |
> |
hs_W_ElDeltaPhi[Wcut]->Fill(dphi); |
2619 |
> |
hs_W_ElMet[Wcut]->Fill(met); |
2620 |
> |
hs_W_ElCharge[Wcut]->Fill(Charge); |
2621 |
> |
hs_W_Njets[Wcut]->Fill(njets); |
2622 |
> |
hs_W_ElPhi[Wcut]->Fill(Phi); |
2623 |
> |
} //charge |
2624 |
> |
} // w sel |
2625 |
> |
} // > 1 jets |
2626 |
> |
|
2627 |
> |
} // barrel |
2628 |
> |
|
2629 |
> |
else if(fabs(ElEta[electronIndex[0]])>etaBarrelMax && fabs(ElEta[electronIndex[0]])<etaEndcapMax) { |
2630 |
> |
if(WSelection(electronIndex[0], pre)==0) {debug++; cout<<"W found"<<endl;} |
2631 |
> |
// cout<<"Run: "<<Run<<" Event: "<<Event<<endl; |
2632 |
> |
|
2633 |
> |
} |
2634 |
|
|
2635 |
|
} |
2636 |
+ |
//-------------------------------------------------------------------------------------------------------------------- |
2637 |
|
|
2638 |
|
|
2639 |
< |
|
2133 |
< |
} // loop over selected events |
2639 |
> |
|
2640 |
|
|
2641 |
|
//////////////////////////////////////////////////////////////////// |
2642 |
|
////////////////////// User's code ends here /////////////////////// |
2648 |
|
cerr<<"Program ended after "<<sampleSize<<" events ..."<<endl; |
2649 |
|
|
2650 |
|
|
2651 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2652 |
< |
// calculate the NORMALIZATION factors etc... |
2653 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2654 |
< |
// double xsec=9676.9*0.725; |
2655 |
< |
cout<<"total number of events: "<<totalNumberOfEvents<<endl; |
2656 |
< |
float n_numberOfEvents=xsec*lumi; //normalized number of events |
2657 |
< |
float normalizationFactor=n_numberOfEvents/totalNumberOfEvents; |
2152 |
< |
cout<<"normalization factor: "<<normalizationFactor<<endl; |
2153 |
< |
// if(isdata!=true) { |
2154 |
< |
// for(int i=0;i<MAXH;i++) { |
2155 |
< |
// ns_counter[i]=s_counter[i]*normalizationFactor; |
2156 |
< |
// } |
2157 |
< |
// ...efficiency... |
2158 |
< |
// s_effy[0]=s_counter[0]/numberOfEvents*100; |
2159 |
< |
// for(int i=1;i<MAXH;i++) { |
2160 |
< |
// if(s_counter[i-1]>0) { |
2161 |
< |
// s_effy[i]=s_counter[i]/s_counter[i-1]*100; |
2162 |
< |
// ns_effyerror[i]=sqrt(s_counter[i])/s_counter[i-1]*100; |
2163 |
< |
// } |
2164 |
< |
// else s_effy[i]=0; |
2165 |
< |
// } |
2166 |
< |
// // ...and errors... |
2167 |
< |
// for(int i=0;i<MAXH;i++) { |
2168 |
< |
// ns_error[i]=sqrt(s_counter[i])*normalizationFactor; |
2169 |
< |
// } |
2170 |
< |
// } |
2171 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2172 |
< |
|
2173 |
< |
// if(isdata!=true) { |
2174 |
< |
// for(int i=0;i<MAXS;i++) { |
2175 |
< |
// scaleHisto( hs_W_ElPt[i], normalizationFactor); |
2176 |
< |
// scaleHisto(hs_W_ElEta[i], normalizationFactor); |
2177 |
< |
// scaleHisto(hs_W_ElPhi[i], normalizationFactor); |
2178 |
< |
// scaleHisto(hs_W_ElDeltaPhi[i], normalizationFactor); |
2179 |
< |
// scaleHisto(hs_W_ElMet[i], normalizationFactor); |
2180 |
< |
// scaleHisto(hs_W_ElTransMass[i], normalizationFactor); |
2181 |
< |
// scaleHisto(hs_W_ElCharge[i], normalizationFactor); |
2182 |
< |
// scaleHisto(hs_W_Njets[i], normalizationFactor); |
2183 |
< |
// } |
2184 |
< |
// } |
2185 |
< |
|
2186 |
< |
|
2651 |
> |
for(int b=0;b<MAXWcounter;b++) { |
2652 |
> |
hc_W_counter->SetBinContent(b+1,Wcounter[b]); |
2653 |
> |
} |
2654 |
> |
for(int b=0;b<counterSize;b++) { |
2655 |
> |
hc_El_counter->SetBinContent(b+1,counter[b]); |
2656 |
> |
} |
2657 |
> |
|
2658 |
|
|
2659 |
+ |
fclose(out); |
2660 |
+ |
fclose(out_Z); |
2661 |
|
|
2662 |
|
|
2663 |
|
|
2667 |
|
cout<<"Total number of robust electrons (sequential cuts): "<<c_robust_B/*+c_robust_E*/<<endl; |
2668 |
|
cout<<"Total number of robust electrons (out of tree): "<<c_robust_tree<<endl; |
2669 |
|
|
2670 |
+ |
cout<<"# of electrons with cGsf == cSC: "<<cNa<<endl; |
2671 |
+ |
cout<<"# of electrons with cGsf != cSC: "<<cNb<<endl; |
2672 |
+ |
|
2673 |
+ |
cout<<"N_t: "<<N_tt<<" N_t0: "<<N_t0<<endl; |
2674 |
+ |
if(N_tt>0) { |
2675 |
+ |
double effy = ((double) 2*N_tt/(N_t0+N_tt)); |
2676 |
+ |
cout<<"Electron ID efficiency (tag&probe): "<<effy<<endl; |
2677 |
+ |
} |
2678 |
+ |
else cout<<"No tag & probe available!"<<endl; |
2679 |
|
cout<<"debug: "<<debug<<endl; |
2680 |
|
|
2681 |
+ |
for(int ci=0; ci<15; ci++) { |
2682 |
+ |
cout<<ci<<": "<<counter[ci]<<endl; |
2683 |
+ |
} |
2684 |
+ |
|
2685 |
+ |
|
2686 |
+ |
|
2687 |
+ |
delete [] counter; |
2688 |
+ |
counter=NULL; |
2689 |
+ |
delete [] Wcounter; |
2690 |
+ |
Wcounter=NULL; |
2691 |
|
|
2692 |
|
//////////write histos |
2693 |
|
h_jetPt->Write(); |
2202 |
– |
|
2694 |
|
|
2695 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2696 |
< |
// scale the histos to the lumi |
2697 |
< |
// gsf/barrel |
2698 |
< |
if(normalize==true) { |
2699 |
< |
h_el_B_gsf_deltaPhiSuperCluster->Scale(normalizationFactor); |
2700 |
< |
h_el_B_gsf_deltaEtaSuperCluster->Scale(normalizationFactor); |
2701 |
< |
h_el_B_gsf_deltaPhiSuperCluster2->Scale(normalizationFactor); |
2702 |
< |
h_el_B_gsf_deltaEtaSuperCluster2->Scale(normalizationFactor); |
2703 |
< |
h_el_B_gsf_caloenergy->Scale(normalizationFactor); |
2704 |
< |
h_el_B_gsf_trkmomatvtx->Scale(normalizationFactor); |
2705 |
< |
h_el_B_gsf_oneOverEminusOneOverP->Scale(normalizationFactor); |
2706 |
< |
h_el_B_gsf_oneOverEminusOneOverP2->Scale(normalizationFactor); |
2707 |
< |
h_el_B_gsf_sumPtOverE->Scale(normalizationFactor); |
2708 |
< |
h_el_B_gsf_HoverE->Scale(normalizationFactor); |
2709 |
< |
h_el_B_gsf_sigmaIetaIeta->Scale(normalizationFactor); |
2710 |
< |
h_el_B_gsf_pt->Scale(normalizationFactor); |
2711 |
< |
h_el_B_gsf_eta->Scale(normalizationFactor); |
2712 |
< |
h_el_B_gsf_phi->Scale(normalizationFactor); |
2713 |
< |
h_el_B_gsf_fbrem->Scale(normalizationFactor); |
2714 |
< |
h_el_B_gsf_basicclustersize->Scale(normalizationFactor); |
2715 |
< |
h_el_B_gsf_chi2->Scale(normalizationFactor); |
2716 |
< |
h_el_B_gsf_charge->Scale(normalizationFactor); |
2717 |
< |
// gsf/endcaps |
2718 |
< |
h_el_E_gsf_deltaPhiSuperCluster->Scale(normalizationFactor); |
2719 |
< |
h_el_E_gsf_deltaEtaSuperCluster->Scale(normalizationFactor); |
2720 |
< |
h_el_E_gsf_deltaPhiSuperCluster2->Scale(normalizationFactor); |
2721 |
< |
h_el_E_gsf_deltaEtaSuperCluster2->Scale(normalizationFactor); |
2722 |
< |
h_el_E_gsf_caloenergy->Scale(normalizationFactor); |
2723 |
< |
h_el_E_gsf_trkmomatvtx->Scale(normalizationFactor); |
2233 |
< |
h_el_E_gsf_oneOverEminusOneOverP->Scale(normalizationFactor); |
2234 |
< |
h_el_E_gsf_oneOverEminusOneOverP2->Scale(normalizationFactor); |
2235 |
< |
h_el_E_gsf_sumPtOverE->Scale(normalizationFactor); |
2236 |
< |
h_el_E_gsf_HoverE->Scale(normalizationFactor); |
2237 |
< |
h_el_E_gsf_sigmaIetaIeta->Scale(normalizationFactor); |
2238 |
< |
h_el_E_gsf_pt->Scale(normalizationFactor); |
2239 |
< |
h_el_E_gsf_eta->Scale(normalizationFactor); |
2240 |
< |
h_el_E_gsf_phi->Scale(normalizationFactor); |
2241 |
< |
h_el_E_gsf_fbrem->Scale(normalizationFactor); |
2242 |
< |
h_el_E_gsf_basicclustersize->Scale(normalizationFactor); |
2243 |
< |
h_el_E_gsf_chi2->Scale(normalizationFactor); |
2244 |
< |
h_el_E_gsf_charge->Scale(normalizationFactor); |
2245 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2246 |
< |
// tight/barrel |
2247 |
< |
h_el_B_tight_deltaPhiSuperCluster->Scale(normalizationFactor); |
2248 |
< |
h_el_B_tight_deltaEtaSuperCluster->Scale(normalizationFactor); |
2249 |
< |
h_el_B_tight_deltaPhiSuperCluster2->Scale(normalizationFactor); |
2250 |
< |
h_el_B_tight_deltaEtaSuperCluster2->Scale(normalizationFactor); |
2251 |
< |
h_el_B_tight_caloenergy->Scale(normalizationFactor); |
2252 |
< |
h_el_B_tight_trkmomatvtx->Scale(normalizationFactor); |
2253 |
< |
h_el_B_tight_oneOverEminusOneOverP->Scale(normalizationFactor); |
2254 |
< |
h_el_B_tight_oneOverEminusOneOverP2->Scale(normalizationFactor); |
2255 |
< |
h_el_B_tight_sumPtOverE->Scale(normalizationFactor); |
2256 |
< |
h_el_B_tight_HoverE->Scale(normalizationFactor); |
2257 |
< |
h_el_B_tight_sigmaIetaIeta->Scale(normalizationFactor); |
2258 |
< |
h_el_B_tight_pt->Scale(normalizationFactor); |
2259 |
< |
h_el_B_tight_eta->Scale(normalizationFactor); |
2260 |
< |
h_el_B_tight_phi->Scale(normalizationFactor); |
2261 |
< |
h_el_B_tight_fbrem->Scale(normalizationFactor); |
2262 |
< |
h_el_B_tight_basicclustersize->Scale(normalizationFactor); |
2263 |
< |
h_el_B_tight_chi2->Scale(normalizationFactor); |
2264 |
< |
h_el_B_tight_charge->Scale(normalizationFactor); |
2265 |
< |
// tight/endcaps |
2266 |
< |
h_el_E_tight_deltaPhiSuperCluster->Scale(normalizationFactor); |
2267 |
< |
h_el_E_tight_deltaEtaSuperCluster->Scale(normalizationFactor); |
2268 |
< |
h_el_E_tight_deltaPhiSuperCluster2->Scale(normalizationFactor); |
2269 |
< |
h_el_E_tight_deltaEtaSuperCluster2->Scale(normalizationFactor); |
2270 |
< |
h_el_E_tight_caloenergy->Scale(normalizationFactor); |
2271 |
< |
h_el_E_tight_trkmomatvtx->Scale(normalizationFactor); |
2272 |
< |
h_el_E_tight_oneOverEminusOneOverP->Scale(normalizationFactor); |
2273 |
< |
h_el_E_tight_oneOverEminusOneOverP2->Scale(normalizationFactor); |
2274 |
< |
h_el_E_tight_sumPtOverE->Scale(normalizationFactor); |
2275 |
< |
h_el_E_tight_HoverE->Scale(normalizationFactor); |
2276 |
< |
h_el_E_tight_sigmaIetaIeta->Scale(normalizationFactor); |
2277 |
< |
h_el_E_tight_pt->Scale(normalizationFactor); |
2278 |
< |
h_el_E_tight_eta->Scale(normalizationFactor); |
2279 |
< |
h_el_E_tight_phi->Scale(normalizationFactor); |
2280 |
< |
h_el_E_tight_fbrem->Scale(normalizationFactor); |
2281 |
< |
h_el_E_tight_basicclustersize->Scale(normalizationFactor); |
2282 |
< |
h_el_E_tight_chi2->Scale(normalizationFactor); |
2283 |
< |
h_el_E_tight_charge->Scale(normalizationFactor); |
2284 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2285 |
< |
// eth/barrel |
2286 |
< |
h_el_B_eth_deltaPhiSuperCluster->Scale(normalizationFactor); |
2287 |
< |
h_el_B_eth_deltaEtaSuperCluster->Scale(normalizationFactor); |
2288 |
< |
h_el_B_eth_deltaPhiSuperCluster2->Scale(normalizationFactor); |
2289 |
< |
h_el_B_eth_deltaEtaSuperCluster2->Scale(normalizationFactor); |
2290 |
< |
h_el_B_eth_caloenergy->Scale(normalizationFactor); |
2291 |
< |
h_el_B_eth_trkmomatvtx->Scale(normalizationFactor); |
2292 |
< |
h_el_B_eth_oneOverEminusOneOverP->Scale(normalizationFactor); |
2293 |
< |
h_el_B_eth_oneOverEminusOneOverP2->Scale(normalizationFactor); |
2294 |
< |
h_el_B_eth_HoverE->Scale(normalizationFactor); |
2295 |
< |
h_el_B_eth_sumPtOverE->Scale(normalizationFactor); |
2296 |
< |
h_el_B_eth_sigmaIetaIeta->Scale(normalizationFactor); |
2297 |
< |
h_el_B_eth_pt->Scale(normalizationFactor); |
2298 |
< |
h_el_B_eth_eta->Scale(normalizationFactor); |
2299 |
< |
h_el_B_eth_phi->Scale(normalizationFactor); |
2300 |
< |
h_el_B_eth_fbrem->Scale(normalizationFactor); |
2301 |
< |
h_el_B_eth_basicclustersize->Scale(normalizationFactor); |
2302 |
< |
h_el_B_eth_chi2->Scale(normalizationFactor); |
2303 |
< |
h_el_B_eth_charge->Scale(normalizationFactor); |
2304 |
< |
// eth/endcaps |
2305 |
< |
h_el_E_eth_deltaPhiSuperCluster->Scale(normalizationFactor); |
2306 |
< |
h_el_E_eth_deltaEtaSuperCluster->Scale(normalizationFactor); |
2307 |
< |
h_el_E_eth_deltaPhiSuperCluster2->Scale(normalizationFactor); |
2308 |
< |
h_el_E_eth_deltaEtaSuperCluster2->Scale(normalizationFactor); |
2309 |
< |
h_el_E_eth_caloenergy->Scale(normalizationFactor); |
2310 |
< |
h_el_E_eth_trkmomatvtx->Scale(normalizationFactor); |
2311 |
< |
h_el_E_eth_oneOverEminusOneOverP->Scale(normalizationFactor); |
2312 |
< |
h_el_E_eth_oneOverEminusOneOverP2->Scale(normalizationFactor); |
2313 |
< |
h_el_E_eth_HoverE->Scale(normalizationFactor); |
2314 |
< |
h_el_E_eth_sumPtOverE->Scale(normalizationFactor); |
2315 |
< |
h_el_E_eth_sigmaIetaIeta->Scale(normalizationFactor); |
2316 |
< |
h_el_E_eth_pt->Scale(normalizationFactor); |
2317 |
< |
h_el_E_eth_eta->Scale(normalizationFactor); |
2318 |
< |
h_el_E_eth_phi->Scale(normalizationFactor); |
2319 |
< |
h_el_E_eth_fbrem->Scale(normalizationFactor); |
2320 |
< |
h_el_E_eth_basicclustersize->Scale(normalizationFactor); |
2321 |
< |
h_el_E_eth_chi2->Scale(normalizationFactor); |
2322 |
< |
h_el_E_eth_charge->Scale(normalizationFactor); |
2323 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2324 |
< |
for(int i=0;i<MAXE;i++) { |
2325 |
< |
hs_El_ElPt[i]->Scale(normalizationFactor); |
2326 |
< |
hs_El_ElEta[i]->Scale(normalizationFactor); |
2327 |
< |
hs_El_ElPhi[i]->Scale(normalizationFactor); |
2328 |
< |
hs_El_ElDeltaPhi[i]->Scale(normalizationFactor); |
2329 |
< |
hs_El_ElMet[i]->Scale(normalizationFactor); |
2330 |
< |
hs_El_ElTransMass[i]->Scale(normalizationFactor); |
2331 |
< |
hs_El_ElCharge[i]->Scale(normalizationFactor); |
2332 |
< |
hs_El_Njets[i]->Scale(normalizationFactor); |
2333 |
< |
hs_El_ElDeltaPhi[i]->Scale(normalizationFactor); |
2334 |
< |
hs_El_ElDeltaEta[i]->Scale(normalizationFactor); |
2335 |
< |
hs_El_ElOneOverEminusOneOverP[i]->Scale(normalizationFactor); |
2336 |
< |
hs_El_ElTransMass[i]->Scale(normalizationFactor); |
2337 |
< |
hs_El_Njets[i]->Scale(normalizationFactor); |
2338 |
< |
hs_El_ElEthIso[i]->Scale(normalizationFactor); |
2339 |
< |
hs_El_ElTrkIso[i]->Scale(normalizationFactor); |
2340 |
< |
hs_El_ElEcalIso[i]->Scale(normalizationFactor); |
2341 |
< |
hs_El_ElHcalIso[i]->Scale(normalizationFactor); |
2342 |
< |
hs_El_ElHoverE[i]->Scale(normalizationFactor); |
2343 |
< |
hs_El_ElSigmaIetaIeta[i]->Scale(normalizationFactor); |
2344 |
< |
hs_El_ElNumberOfMissingInnerHits[i]->Scale(normalizationFactor); |
2345 |
< |
} |
2346 |
< |
for(int i=0;i<MAXS;i++) { |
2347 |
< |
hs_W_ElPt[i]->Scale(normalizationFactor); |
2348 |
< |
hs_W_ElEta[i]->Scale(normalizationFactor); |
2349 |
< |
hs_W_ElPhi[i]->Scale(normalizationFactor); |
2350 |
< |
hs_W_ElDeltaPhi[i]->Scale(normalizationFactor); |
2351 |
< |
hs_W_ElMet[i]->Scale(normalizationFactor); |
2352 |
< |
hs_W_ElTransMass[i]->Scale(normalizationFactor); |
2353 |
< |
hs_W_ElCharge[i]->Scale(normalizationFactor); |
2354 |
< |
hs_W_Njets[i]->Scale(normalizationFactor); |
2355 |
< |
} |
2695 |
> |
// acceptance plots |
2696 |
> |
h_ElEtaVsScEta->Write(); |
2697 |
> |
// h_ElPhiVsScPhi->Write(); |
2698 |
> |
h_ElPtVsScEt->Write(); |
2699 |
> |
|
2700 |
> |
// sum barrel and endcap into general plots |
2701 |
> |
for(int a=34; a<MAXE; a++) { |
2702 |
> |
hs_El_ElPt[a]->Add(hs_El_ElPt[a-7]); |
2703 |
> |
hs_El_ElPt[a]->Add(hs_El_ElPt[a-14]); |
2704 |
> |
hs_El_ElEta[a]->Add(hs_El_ElEta[a-7]); |
2705 |
> |
hs_El_ElEta[a]->Add(hs_El_ElEta[a-14]); |
2706 |
> |
hs_El_ElPhi[a]->Add(hs_El_ElPhi[a-7]); |
2707 |
> |
hs_El_ElPhi[a]->Add(hs_El_ElPhi[a-14]); |
2708 |
> |
hs_El_ElCharge[a]->Add(hs_El_ElCharge[a-7]); |
2709 |
> |
hs_El_ElCharge[a]->Add(hs_El_ElCharge[a-14]); |
2710 |
> |
hs_El_ElDeltaPhi[a]->Add(hs_El_ElDeltaPhi[a-7]); |
2711 |
> |
hs_El_ElDeltaPhi[a]->Add(hs_El_ElDeltaPhi[a-14]); |
2712 |
> |
hs_El_ElDeltaEta[a]->Add(hs_El_ElDeltaEta[a-7]); |
2713 |
> |
hs_El_ElDeltaEta[a]->Add(hs_El_ElDeltaEta[a-14]); |
2714 |
> |
hs_El_ElTransMass[a]->Add(hs_El_ElTransMass[a-7]); |
2715 |
> |
hs_El_ElTransMass[a]->Add(hs_El_ElTransMass[a-14]); |
2716 |
> |
hs_El_ElHoverE[a]->Add(hs_El_ElHoverE[a-7]); |
2717 |
> |
hs_El_ElHoverE[a]->Add(hs_El_ElHoverE[a-14]); |
2718 |
> |
hs_El_ElSigmaIetaIeta[a]->Add(hs_El_ElSigmaIetaIeta[a-7]); |
2719 |
> |
hs_El_ElSigmaIetaIeta[a]->Add(hs_El_ElSigmaIetaIeta[a-14]); |
2720 |
> |
hs_El_ElNumberOfMissingInnerHits[a]->Add(hs_El_ElNumberOfMissingInnerHits[a-7]); |
2721 |
> |
hs_El_ElNumberOfMissingInnerHits[a]->Add(hs_El_ElNumberOfMissingInnerHits[a-14]); |
2722 |
> |
hs_El_ElCombIso[a]->Add(hs_El_ElCombIso[a-7]); |
2723 |
> |
hs_El_ElCombIso[a]->Add(hs_El_ElCombIso[a-14]); |
2724 |
|
} |
2725 |
< |
// -------------------------------------------------------------------------------------------------------------------- |
2725 |
> |
|
2726 |
> |
|
2727 |
|
|
2728 |
|
// write the plots to the *.root file |
2729 |
|
|
2730 |
|
h_numberOfEvents->Write(); |
2731 |
|
|
2363 |
– |
if(writeBasicPlots==true) { |
2364 |
– |
// gsf/barrel |
2365 |
– |
h_el_B_gsf_deltaPhiSuperCluster->Write(); |
2366 |
– |
h_el_B_gsf_deltaEtaSuperCluster->Write(); |
2367 |
– |
h_el_B_gsf_deltaPhiSuperCluster2->Write(); |
2368 |
– |
h_el_B_gsf_deltaEtaSuperCluster2->Write(); |
2369 |
– |
h_el_B_gsf_caloenergy->Write(); |
2370 |
– |
h_el_B_gsf_trkmomatvtx->Write(); |
2371 |
– |
h_el_B_gsf_oneOverEminusOneOverP->Write(); |
2372 |
– |
h_el_B_gsf_oneOverEminusOneOverP2->Write(); |
2373 |
– |
h_el_B_gsf_sumPtOverE->Write(); |
2374 |
– |
h_el_B_gsf_HoverE->Write(); |
2375 |
– |
h_el_B_gsf_sigmaIetaIeta->Write(); |
2376 |
– |
h_el_B_gsf_pt->Write(); |
2377 |
– |
h_el_B_gsf_eta->Write(); |
2378 |
– |
h_el_B_gsf_phi->Write(); |
2379 |
– |
h_el_B_gsf_fbrem->Write(); |
2380 |
– |
h_el_B_gsf_basicclustersize->Write(); |
2381 |
– |
h_el_B_gsf_chi2->Write(); |
2382 |
– |
h_el_B_gsf_charge->Write(); |
2383 |
– |
// gsf/endcaps |
2384 |
– |
h_el_E_gsf_deltaPhiSuperCluster->Write(); |
2385 |
– |
h_el_E_gsf_deltaEtaSuperCluster->Write(); |
2386 |
– |
h_el_E_gsf_deltaPhiSuperCluster2->Write(); |
2387 |
– |
h_el_E_gsf_deltaEtaSuperCluster2->Write(); |
2388 |
– |
h_el_E_gsf_caloenergy->Write(); |
2389 |
– |
h_el_E_gsf_trkmomatvtx->Write(); |
2390 |
– |
h_el_E_gsf_oneOverEminusOneOverP->Write(); |
2391 |
– |
h_el_E_gsf_oneOverEminusOneOverP2->Write(); |
2392 |
– |
h_el_E_gsf_sumPtOverE->Write(); |
2393 |
– |
h_el_E_gsf_HoverE->Write(); |
2394 |
– |
h_el_E_gsf_sigmaIetaIeta->Write(); |
2395 |
– |
h_el_E_gsf_pt->Write(); |
2396 |
– |
h_el_E_gsf_eta->Write(); |
2397 |
– |
h_el_E_gsf_phi->Write(); |
2398 |
– |
h_el_E_gsf_fbrem->Write(); |
2399 |
– |
h_el_E_gsf_basicclustersize->Write(); |
2400 |
– |
h_el_E_gsf_chi2->Write(); |
2401 |
– |
h_el_E_gsf_charge->Write(); |
2402 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
2403 |
– |
// tight/barrel |
2404 |
– |
h_el_B_tight_deltaPhiSuperCluster->Write(); |
2405 |
– |
h_el_B_tight_deltaEtaSuperCluster->Write(); |
2406 |
– |
h_el_B_tight_deltaPhiSuperCluster2->Write(); |
2407 |
– |
h_el_B_tight_deltaEtaSuperCluster2->Write(); |
2408 |
– |
h_el_B_tight_caloenergy->Write(); |
2409 |
– |
h_el_B_tight_trkmomatvtx->Write(); |
2410 |
– |
h_el_B_tight_oneOverEminusOneOverP->Write(); |
2411 |
– |
h_el_B_tight_oneOverEminusOneOverP2->Write(); |
2412 |
– |
h_el_B_tight_sumPtOverE->Write(); |
2413 |
– |
h_el_B_tight_HoverE->Write(); |
2414 |
– |
h_el_B_tight_sigmaIetaIeta->Write(); |
2415 |
– |
h_el_B_tight_pt->Write(); |
2416 |
– |
h_el_B_tight_eta->Write(); |
2417 |
– |
h_el_B_tight_phi->Write(); |
2418 |
– |
h_el_B_tight_fbrem->Write(); |
2419 |
– |
h_el_B_tight_basicclustersize->Write(); |
2420 |
– |
h_el_B_tight_chi2->Write(); |
2421 |
– |
h_el_B_tight_charge->Write(); |
2422 |
– |
// tight/endcaps |
2423 |
– |
h_el_E_tight_deltaPhiSuperCluster->Write(); |
2424 |
– |
h_el_E_tight_deltaEtaSuperCluster->Write(); |
2425 |
– |
h_el_E_tight_deltaPhiSuperCluster2->Write(); |
2426 |
– |
h_el_E_tight_deltaEtaSuperCluster2->Write(); |
2427 |
– |
h_el_E_tight_caloenergy->Write(); |
2428 |
– |
h_el_E_tight_trkmomatvtx->Write(); |
2429 |
– |
h_el_E_tight_oneOverEminusOneOverP->Write(); |
2430 |
– |
h_el_E_tight_oneOverEminusOneOverP2->Write(); |
2431 |
– |
h_el_E_tight_sumPtOverE->Write(); |
2432 |
– |
h_el_E_tight_HoverE->Write(); |
2433 |
– |
h_el_E_tight_sigmaIetaIeta->Write(); |
2434 |
– |
h_el_E_tight_pt->Write(); |
2435 |
– |
h_el_E_tight_eta->Write(); |
2436 |
– |
h_el_E_tight_phi->Write(); |
2437 |
– |
h_el_E_tight_fbrem->Write(); |
2438 |
– |
h_el_E_tight_basicclustersize->Write(); |
2439 |
– |
h_el_E_tight_chi2->Write(); |
2440 |
– |
h_el_E_tight_charge->Write(); |
2441 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
2442 |
– |
// eth/barrel |
2443 |
– |
h_el_B_eth_deltaPhiSuperCluster->Write(); |
2444 |
– |
h_el_B_eth_deltaEtaSuperCluster->Write(); |
2445 |
– |
h_el_B_eth_deltaPhiSuperCluster2->Write(); |
2446 |
– |
h_el_B_eth_deltaEtaSuperCluster2->Write(); |
2447 |
– |
h_el_B_eth_caloenergy->Write(); |
2448 |
– |
h_el_B_eth_trkmomatvtx->Write(); |
2449 |
– |
h_el_B_eth_oneOverEminusOneOverP->Write(); |
2450 |
– |
h_el_B_eth_oneOverEminusOneOverP2->Write(); |
2451 |
– |
h_el_B_eth_HoverE->Write(); |
2452 |
– |
h_el_B_eth_sumPtOverE->Write(); |
2453 |
– |
h_el_B_eth_sigmaIetaIeta->Write(); |
2454 |
– |
h_el_B_eth_pt->Write(); |
2455 |
– |
h_el_B_eth_eta->Write(); |
2456 |
– |
h_el_B_eth_phi->Write(); |
2457 |
– |
h_el_B_eth_fbrem->Write(); |
2458 |
– |
h_el_B_eth_basicclustersize->Write(); |
2459 |
– |
h_el_B_eth_chi2->Write(); |
2460 |
– |
h_el_B_eth_charge->Write(); |
2461 |
– |
// eth/endcaps |
2462 |
– |
h_el_E_eth_deltaPhiSuperCluster->Write(); |
2463 |
– |
h_el_E_eth_deltaEtaSuperCluster->Write(); |
2464 |
– |
h_el_E_eth_deltaPhiSuperCluster2->Write(); |
2465 |
– |
h_el_E_eth_deltaEtaSuperCluster2->Write(); |
2466 |
– |
h_el_E_eth_caloenergy->Write(); |
2467 |
– |
h_el_E_eth_trkmomatvtx->Write(); |
2468 |
– |
h_el_E_eth_oneOverEminusOneOverP->Write(); |
2469 |
– |
h_el_E_eth_oneOverEminusOneOverP2->Write(); |
2470 |
– |
h_el_E_eth_HoverE->Write(); |
2471 |
– |
h_el_E_eth_sumPtOverE->Write(); |
2472 |
– |
h_el_E_eth_sigmaIetaIeta->Write(); |
2473 |
– |
h_el_E_eth_pt->Write(); |
2474 |
– |
h_el_E_eth_eta->Write(); |
2475 |
– |
h_el_E_eth_phi->Write(); |
2476 |
– |
h_el_E_eth_fbrem->Write(); |
2477 |
– |
h_el_E_eth_basicclustersize->Write(); |
2478 |
– |
h_el_E_eth_chi2->Write(); |
2479 |
– |
h_el_E_eth_charge->Write(); |
2480 |
– |
} |
2481 |
– |
// -------------------------------------------------------------------------------------------------------------------- |
2732 |
|
if(writeIdPlots==true) { |
2733 |
|
for(int i=0;i<MAXE;i++) { |
2734 |
|
hs_El_ElPt[i]->Write(); |
2748 |
|
hs_El_ElTrkIso[i]->Write(); |
2749 |
|
hs_El_ElEcalIso[i]->Write(); |
2750 |
|
hs_El_ElHcalIso[i]->Write(); |
2751 |
+ |
hs_El_ElCombIso[i]->Write(); |
2752 |
|
hs_El_ElHoverE[i]->Write(); |
2753 |
|
hs_El_ElSigmaIetaIeta[i]->Write(); |
2754 |
|
hs_El_ElNumberOfMissingInnerHits[i]->Write(); |
2755 |
|
} |
2756 |
+ |
hc_El_counter->Write(); |
2757 |
|
} |
2758 |
+ |
|
2759 |
+ |
|
2760 |
|
if(writeN1Plots==true) { |
2761 |
|
for(int i=0; i<MAXN; i++) { |
2762 |
|
hn1_El_ElDeltaPhi[i]->Write(); |
2763 |
|
hn1_El_ElDeltaEta[i]->Write(); |
2764 |
|
hn1_El_ElOneOverEminusOneOverP[i]->Write(); |
2765 |
|
|
2766 |
< |
hn1_El_ElPt[i]->Write(); |
2767 |
< |
hn1_El_ElEta[i]->Write(); |
2768 |
< |
hn1_El_ElPhi[i]->Write(); |
2769 |
< |
hn1_El_ElMet[i]->Write(); |
2770 |
< |
hn1_El_ElTransMass[i]->Write(); |
2771 |
< |
hn1_El_ElCharge[i]->Write(); |
2772 |
< |
hn1_El_Njets[i]->Write(); |
2773 |
< |
hn1_El_ElTransMass[i]->Write(); |
2774 |
< |
hn1_El_Njets[i]->Write(); |
2766 |
> |
// hn1_El_ElPt[i]->Write(); |
2767 |
> |
// hn1_El_ElEta[i]->Write(); |
2768 |
> |
// hn1_El_ElPhi[i]->Write(); |
2769 |
> |
// hn1_El_ElMet[i]->Write(); |
2770 |
> |
// hn1_El_ElTransMass[i]->Write(); |
2771 |
> |
// hn1_El_ElCharge[i]->Write(); |
2772 |
> |
// hn1_El_Njets[i]->Write(); |
2773 |
> |
// hn1_El_ElTransMass[i]->Write(); |
2774 |
> |
// hn1_El_Njets[i]->Write(); |
2775 |
|
hn1_El_ElEthIso[i]->Write(); |
2776 |
< |
hn1_El_ElTrkIso[i]->Write(); |
2777 |
< |
hn1_El_ElEcalIso[i]->Write(); |
2778 |
< |
hn1_El_ElHcalIso[i]->Write(); |
2776 |
> |
// hn1_El_ElTrkIso[i]->Write(); |
2777 |
> |
// hn1_El_ElEcalIso[i]->Write(); |
2778 |
> |
// hn1_El_ElHcalIso[i]->Write(); |
2779 |
> |
hn1_El_ElCombIso[i]->Write(); |
2780 |
|
hn1_El_ElHoverE[i]->Write(); |
2781 |
|
hn1_El_ElSigmaIetaIeta[i]->Write(); |
2782 |
|
hn1_El_ElNumberOfMissingInnerHits[i]->Write(); |
2793 |
|
hs_W_ElCharge[i]->Write(); |
2794 |
|
hs_W_Njets[i]->Write(); |
2795 |
|
} |
2796 |
+ |
hc_W_counter->Write(); |
2797 |
+ |
} |
2798 |
+ |
|
2799 |
+ |
for(int i=0;i<MAXZ;i++) { |
2800 |
+ |
h_Z_invMass[i]->Write(); |
2801 |
+ |
h_Z_ptAll[i]->Write(); |
2802 |
+ |
h_Z_etaAll[i]->Write(); |
2803 |
+ |
h_Z_phiAll[i]->Write(); |
2804 |
+ |
h_Z_deltaPhi[i]->Write(); |
2805 |
+ |
h_Z_ptDiLepton[i]->Write(); |
2806 |
+ |
h_Z_etaDiLepton[i]->Write(); |
2807 |
+ |
h_Z_phiDiLepton[i]->Write(); |
2808 |
+ |
|
2809 |
+ |
h_Z_leadingJetPt[i]->Write(); |
2810 |
+ |
h_Z_summedJetPt[i]->Write(); |
2811 |
+ |
h_Z_leadingJetEta[i]->Write(); |
2812 |
+ |
h_Z_summedJetEta[i]->Write(); |
2813 |
+ |
h_Z_leadingJetPhi[i]->Write(); |
2814 |
+ |
h_Z_summedJetPhi[i]->Write(); |
2815 |
+ |
h_Z_nJets[i]->Write(); |
2816 |
+ |
h_Z_leadingJetDeltaPt[i]->Write(); |
2817 |
+ |
h_Z_leadingJetDeltaEta[i]->Write(); |
2818 |
+ |
h_Z_leadingJetDeltaPhi[i]->Write(); |
2819 |
+ |
h_Z_summedJetDeltaPt[i]->Write(); |
2820 |
+ |
h_Z_summedJetDeltaEta[i]->Write(); |
2821 |
+ |
h_Z_summedJetDeltaPhi[i]->Write(); |
2822 |
+ |
h_Z_recoilPt[i]->Write(); |
2823 |
+ |
h_Z_recoilEta[i]->Write(); |
2824 |
+ |
h_Z_recoilPhi[i]->Write(); |
2825 |
+ |
h_Z_metPt[i]->Write(); |
2826 |
+ |
h_Z_metEta[i]->Write(); |
2827 |
+ |
h_Z_metPhi[i]->Write(); |
2828 |
+ |
|
2829 |
|
} |
2830 |
|
std::cout << "analysisClass::Loop() ends" <<std::endl; |
2831 |
|
} |