3 |
|
#include "MitPhysics/Utils/interface/ElectronTools.h" |
4 |
|
#include "MitAna/DataTree/interface/StableData.h" |
5 |
|
#include <TFile.h> |
6 |
+ |
#include "MitPhysics/ElectronLikelihood/interface/ElectronLikelihood.h" |
7 |
+ |
#include "MitPhysics/ElectronLikelihood/interface/LikelihoodSwitches.h" |
8 |
+ |
#include "MitPhysics/ElectronLikelihood/interface/LikelihoodMeasurements.h" |
9 |
|
|
10 |
|
ClassImp(mithep::ElectronTools) |
11 |
|
|
38 |
|
{0.3, 0.92, 0.211, 0.0, 0.42, 0.88, 0.68, 0.0}, //eoverp |
39 |
|
{0.8,0.2,0,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P |
40 |
|
|
41 |
+ |
Double_t VBTFWorkingPointFakeable[6][8] = { |
42 |
+ |
{0.12, 0.12, 0.12, 0.12, 0.10, 0.10, 0.10, 0.10 }, //hovere |
43 |
+ |
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
44 |
+ |
{0.15, 0.15, 0.15, 0.15, 0.10, 0.10, 0.10, 0.10 }, //deltaphiin |
45 |
+ |
{0.007, 0.007, 0.007, 0.007, 0.009, 0.009, 0.009, 0.009 }, //deltaetain |
46 |
+ |
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
47 |
+ |
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
48 |
+ |
}; |
49 |
+ |
|
50 |
|
Double_t VBTFWorkingPoint95[6][8] = { |
51 |
< |
{0.5, 0.5, 0.5, 0.5, 0.07, 0.07, 0.07, 0.07 }, //hovere |
51 |
> |
{0.15, 0.15, 0.15, 0.15, 0.07, 0.07, 0.07, 0.07 }, //hovere |
52 |
|
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
53 |
|
{0.8, 0.8, 0.8, 0.8, 0.7, 0.7, 0.7, 0.7 }, //deltaphiin |
54 |
|
{0.007, 0.007, 0.007, 0.007, 0.010, 0.010, 0.010, 0.010 }, //deltaetain |
75 |
|
}; |
76 |
|
|
77 |
|
Double_t VBTFWorkingPoint80[6][8] = { |
78 |
< |
{0.04, 0.04, 0.04, 0.04, 0.025, 0.025, 0.025, 0.025}, //hovere |
78 |
> |
{0.04, 0.04, 0.04, 0.04, 0.10, 0.10, 0.10, 0.10 }, //hovere |
79 |
|
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
80 |
|
{0.06, 0.06, 0.06, 0.06, 0.03, 0.03, 0.03, 0.03 }, //deltaphiin |
81 |
|
{0.004, 0.004, 0.004, 0.004, 0.007, 0.007, 0.007, 0.007}, //deltaetain |
87 |
|
{0.025, 0.025, 0.025, 0.025, 0.012, 0.012, 0.012, 0.012}, //hovere |
88 |
|
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
89 |
|
{0.03, 0.03, 0.03, 0.03, 0.02, 0.02, 0.02, 0.02 }, //deltaphiin |
90 |
< |
{0.003, 0.003, 0.003, 0.003, 0.005, 0.005, 0.005, 0.005}, //deltaetain |
90 |
> |
{0.004, 0.004, 0.004, 0.004, 0.005, 0.005, 0.005, 0.005}, //deltaetain |
91 |
> |
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
92 |
> |
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
93 |
> |
}; |
94 |
> |
|
95 |
> |
Double_t VBTFWorkingPoint80NoHOverEE[6][8] = { |
96 |
> |
{0.04, 0.04, 0.04, 0.04, 0.10, 0.10, 0.10, 0.10 }, //hovere |
97 |
> |
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
98 |
> |
{0.06, 0.06, 0.06, 0.06, 0.03, 0.03, 0.03, 0.03 }, //deltaphiin |
99 |
> |
{0.004, 0.004, 0.004, 0.004, 0.007, 0.007, 0.007, 0.007}, //deltaetain |
100 |
> |
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
101 |
> |
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
102 |
> |
}; |
103 |
> |
|
104 |
> |
Double_t VBTFWorkingPoint70NoHOverEE[6][8] = { |
105 |
> |
{0.025, 0.025, 0.025, 0.025, 0.10, 0.10, 0.10, 0.10 }, //hovere |
106 |
> |
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
107 |
> |
{0.03, 0.03, 0.03, 0.03, 0.02, 0.02, 0.02, 0.02 }, //deltaphiin |
108 |
> |
{0.004, 0.004, 0.004, 0.004, 0.005, 0.005, 0.005, 0.005}, //deltaetain |
109 |
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
110 |
|
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
111 |
|
}; |
117 |
|
case kCustomIdLoose: |
118 |
|
memcpy(fCuts,loosecuts,sizeof(fCuts)); |
119 |
|
break; |
120 |
+ |
case kVBTFWorkingPointFakeableId: |
121 |
+ |
memcpy(fCuts,VBTFWorkingPointFakeable,sizeof(fCuts)); |
122 |
+ |
break; |
123 |
|
case kVBTFWorkingPoint95Id: |
124 |
|
memcpy(fCuts,VBTFWorkingPoint95,sizeof(fCuts)); |
125 |
|
break; |
132 |
|
case kVBTFWorkingPoint80Id: |
133 |
|
memcpy(fCuts,VBTFWorkingPoint80,sizeof(fCuts)); |
134 |
|
break; |
135 |
+ |
case kVBTFWorkingPointLowPtId: |
136 |
+ |
if(ele->Pt() < 20) |
137 |
+ |
memcpy(fCuts,VBTFWorkingPoint70NoHOverEE,sizeof(fCuts)); |
138 |
+ |
else |
139 |
+ |
memcpy(fCuts,VBTFWorkingPoint80NoHOverEE,sizeof(fCuts)); |
140 |
+ |
break; |
141 |
|
case kVBTFWorkingPoint70Id: |
142 |
|
memcpy(fCuts,VBTFWorkingPoint70,sizeof(fCuts)); |
143 |
|
break; |
146 |
|
break; |
147 |
|
} |
148 |
|
|
110 |
– |
|
149 |
|
// Based on RecoEgamma/ElectronIdentification/src/CutBasedElectronID.cc. |
150 |
|
Double_t eOverP = ele->ESuperClusterOverP(); |
151 |
|
Double_t fBrem = ele->FBrem(); |
152 |
|
|
153 |
< |
if ((eOverP < fCuts[5][0]) && (fBrem < fCuts[5][1])) |
153 |
> |
if ( (fCuts[5][0]>0.0) && (eOverP < fCuts[5][0]) && (fCuts[5][1]>0.0) && (fBrem < fCuts[5][1])) |
154 |
|
return kFALSE; |
155 |
|
|
156 |
< |
if (eOverP < fCuts[5][2]*(1-fBrem)) |
156 |
> |
if ( (fCuts[5][2]>0.0) && (eOverP < fCuts[5][2]*(1-fBrem))) |
157 |
|
return kFALSE; |
158 |
|
|
159 |
|
Int_t cat = 2; |
161 |
|
cat=1; |
162 |
|
else if (eOverP < 1.2 && eOverP > 0.8) |
163 |
|
cat=0; |
164 |
< |
|
165 |
< |
Double_t eSeedOverPin = ele->ESeedClusterOverPIn(); |
164 |
> |
|
165 |
> |
if(ele->SCluster() == 0) |
166 |
> |
return kFALSE; |
167 |
> |
Double_t eSeedOverPin = ele->ESeedClusterOverPIn(); |
168 |
|
Double_t hOverE = ele->HadronicOverEm(); |
169 |
|
Double_t sigmaee = ele->CoviEtaiEta(); |
170 |
|
Double_t deltaPhiIn = TMath::Abs(ele->DeltaPhiSuperClusterTrackAtVtx()); |
173 |
|
Int_t eb = 1; |
174 |
|
if (ele->IsEB()) |
175 |
|
eb = 0; |
176 |
< |
|
176 |
> |
|
177 |
|
if (hOverE>fCuts[0][cat+4*eb]) |
178 |
|
return kFALSE; |
179 |
|
|
189 |
|
if(eSeedOverPin<fCuts[4][cat+4*eb]) |
190 |
|
return kFALSE; |
191 |
|
|
192 |
+ |
// Apply detector isolation at high pt only |
193 |
+ |
Bool_t isoCut = kTRUE; |
194 |
+ |
if(idType == kVBTFWorkingPointFakeableId){ |
195 |
+ |
double isoEcal = ele->EcalRecHitIsoDr03(); |
196 |
+ |
if(ele->IsEB()) isoEcal = isoEcal - 1.0; |
197 |
+ |
isoCut = (ele->TrackIsolationDr03() < ele->Pt()*0.2) && |
198 |
+ |
(isoEcal < ele->Pt()*0.2) && |
199 |
+ |
(ele->HcalTowerSumEtDr03() < ele->Pt()*0.2); |
200 |
+ |
} |
201 |
+ |
if(isoCut == kFALSE) return kFALSE; |
202 |
+ |
|
203 |
+ |
// Cuts only for pt<20 region and kVBTFWorkingPointLowPtId |
204 |
+ |
if(ele->Pt() < 20 && idType == kVBTFWorkingPointLowPtId) { |
205 |
+ |
Bool_t isGoodLowPtEl = fBrem > 0.15 || |
206 |
+ |
(ele->SCluster()->AbsEta() < 1.0 && eOverP > 0.95); |
207 |
+ |
if(!isGoodLowPtEl) return kFALSE; |
208 |
+ |
} |
209 |
+ |
|
210 |
|
return kTRUE; |
211 |
|
} |
212 |
|
|
245 |
|
}; |
246 |
|
|
247 |
|
Double_t VBTFWorkingPoint70[4][2] = { |
248 |
< |
{0.06 , 0.03 }, //TrkIso |
249 |
< |
{0.06 , 0.03 }, //ECALIso |
250 |
< |
{0.05 , 0.015 }, //HCALIso |
251 |
< |
{0.05, 0.04 } //Combined |
248 |
> |
{0.05 , 0.025 }, //TrkIso |
249 |
> |
{0.06 , 0.025 }, //ECALIso |
250 |
> |
{0.03 , 0.020 }, //HCALIso |
251 |
> |
{0.04, 0.030 } //Combined |
252 |
|
}; |
253 |
|
|
254 |
|
switch (isoType) { |
272 |
|
break; |
273 |
|
} |
274 |
|
|
275 |
< |
Double_t trkIso = ele->TrackIsolationDr03(); |
276 |
< |
Double_t ecalIso = ele->EcalRecHitIsoDr03(); |
277 |
< |
Double_t hcalIso = ele->HcalTowerSumEtDr03(); |
278 |
< |
Double_t combinedIso = trkIso + ecalIso + hcalIso; |
279 |
< |
if(ele->IsEB()) combinedIso = combinedIso - 1.0; |
275 |
> |
Double_t trkIso = ele->TrackIsolationDr03() / ele->Pt(); |
276 |
> |
Double_t ecalIso = ele->EcalRecHitIsoDr03() / ele->Pt(); |
277 |
> |
Double_t hcalIso = ele->HcalTowerSumEtDr03() / ele->Pt(); |
278 |
> |
Double_t combinedIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr03() + ele->HcalTowerSumEtDr03(); |
279 |
> |
if(ele->IsEB()) combinedIso = ele->TrackIsolationDr03() + TMath::Max(ele->EcalRecHitIsoDr03() - 1.0, 0.0) + ele->HcalTowerSumEtDr03(); |
280 |
|
combinedIso = combinedIso / ele->Pt(); |
281 |
|
|
282 |
|
Int_t eb = 1; |
302 |
|
|
303 |
|
//-------------------------------------------------------------------------------------------------- |
304 |
|
Bool_t ElectronTools::PassConversionFilter(const Electron *ele, |
305 |
< |
const DecayParticleCol *conversions, |
306 |
< |
Bool_t WrongHitsRequirement) |
305 |
> |
const DecayParticleCol *conversions, |
306 |
> |
const BaseVertex *vtx, |
307 |
> |
UInt_t nWrongHitsMax, |
308 |
> |
Double_t probMin, |
309 |
> |
Double_t lxyMin, |
310 |
> |
Bool_t matchCkf, |
311 |
> |
Bool_t requireArbitratedMerged, |
312 |
> |
Double_t trkptMin) |
313 |
|
{ |
314 |
|
Bool_t isGoodConversion = kFALSE; |
315 |
|
|
318 |
|
for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) { |
319 |
|
const Track *trk = dynamic_cast<const ChargedParticle*> |
320 |
|
(conversions->At(ifc)->Daughter(d))->Trk(); |
321 |
< |
if (ele->GsfTrk() == trk) { |
321 |
> |
if (ele->GsfTrk() == trk || (matchCkf && ele->TrackerTrk()==trk) ) { |
322 |
|
ConversionMatchFound = kTRUE; |
323 |
|
break; |
324 |
|
} |
326 |
|
|
327 |
|
// if match between the e-track and one of the conversion legs |
328 |
|
if (ConversionMatchFound == kTRUE){ |
329 |
< |
isGoodConversion = (conversions->At(ifc)->Prob() > 1e-6) && |
330 |
< |
(conversions->At(ifc)->Lxy() > 0) && |
331 |
< |
(conversions->At(ifc)->Lz() > 0) && |
268 |
< |
(conversions->At(ifc)->Position().Rho() > 2.0); |
329 |
> |
isGoodConversion = (conversions->At(ifc)->Prob() > probMin) && |
330 |
> |
(!requireArbitratedMerged || conversions->At(ifc)->Quality().Quality(ConversionQuality::arbitratedMerged)) && |
331 |
> |
(conversions->At(ifc)->LxyCorrected(vtx) > lxyMin); |
332 |
|
|
333 |
|
if (isGoodConversion == kTRUE) { |
334 |
|
for (UInt_t d=0; d<conversions->At(ifc)->NDaughters(); d++) { |
335 |
|
const Track *trk = dynamic_cast<const ChargedParticle*> |
336 |
|
(conversions->At(ifc)->Daughter(d))->Trk(); |
337 |
|
if (trk) { |
338 |
< |
// These requirements are not used for the GSF track |
276 |
< |
if (!(trk->NHits() >= 3 && trk->Prob() > 1e-6) && trk!=ele->GsfTrk()) |
277 |
< |
isGoodConversion = kFALSE; |
338 |
> |
if (trk->Pt()<trkptMin) isGoodConversion = kFALSE; |
339 |
|
const StableData *sd = dynamic_cast<const StableData*> |
340 |
|
(conversions->At(ifc)->DaughterDat(d)); |
341 |
< |
if (WrongHitsRequirement && sd->NWrongHits() != 0) |
341 |
> |
if (sd->NWrongHits() > nWrongHitsMax) |
342 |
|
isGoodConversion = kFALSE; |
343 |
|
} else { |
344 |
|
isGoodConversion = kFALSE; |
346 |
|
} |
347 |
|
} |
348 |
|
} |
349 |
+ |
|
350 |
|
if (isGoodConversion == kTRUE) break; |
351 |
|
|
352 |
|
} // loop over all conversions |
355 |
|
} |
356 |
|
|
357 |
|
//-------------------------------------------------------------------------------------------------- |
358 |
< |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const VertexCol *vertices, Double_t fD0Cut, |
297 |
< |
Bool_t fReverseD0Cut) |
358 |
> |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const VertexCol *vertices, Double_t fD0Cut, Int_t nVertex) |
359 |
|
{ |
360 |
|
Bool_t d0cut = kFALSE; |
361 |
< |
// d0 cut |
362 |
< |
Double_t d0_real = 99999; |
363 |
< |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
364 |
< |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
365 |
< |
if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0); |
361 |
> |
|
362 |
> |
Double_t d0_real = 1e30; |
363 |
> |
|
364 |
> |
if( nVertex >= (int) vertices->GetEntries() ) |
365 |
> |
nVertex = vertices->GetEntries() - 1; |
366 |
> |
|
367 |
> |
if(nVertex >= 0) d0_real = TMath::Abs(ele->GsfTrk()->D0Corrected(*vertices->At(nVertex))); |
368 |
> |
else { |
369 |
> |
Double_t distVtx = 999.0; |
370 |
> |
Int_t closestVtx = 0; |
371 |
> |
for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){ |
372 |
> |
double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv))); |
373 |
> |
if(dz < distVtx) { |
374 |
> |
distVtx = dz; |
375 |
> |
closestVtx = nv; |
376 |
> |
} |
377 |
> |
} |
378 |
> |
d0_real = TMath::Abs(ele->GsfTrk()->D0Corrected(*vertices->At(closestVtx))); |
379 |
|
} |
380 |
|
if(d0_real < fD0Cut) d0cut = kTRUE; |
381 |
|
|
308 |
– |
if (fReverseD0Cut == kTRUE && |
309 |
– |
d0cut == kFALSE && d0_real < 0.05) |
310 |
– |
d0cut = kTRUE; |
311 |
– |
else if(fReverseD0Cut == kTRUE) |
312 |
– |
d0cut = kFALSE; |
313 |
– |
|
382 |
|
return d0cut; |
383 |
|
} |
384 |
|
|
385 |
|
//-------------------------------------------------------------------------------------------------- |
386 |
< |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const BeamSpotCol *beamspots, Double_t fD0Cut, |
319 |
< |
Bool_t fReverseD0Cut) |
386 |
> |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const BeamSpotCol *beamspots, Double_t fD0Cut) |
387 |
|
{ |
388 |
|
Bool_t d0cut = kFALSE; |
389 |
|
// d0 cut |
394 |
|
} |
395 |
|
if(d0_real < fD0Cut) d0cut = kTRUE; |
396 |
|
|
330 |
– |
if (fReverseD0Cut == kTRUE && |
331 |
– |
d0cut == kFALSE && d0_real < 0.05) |
332 |
– |
d0cut = kTRUE; |
333 |
– |
else if(fReverseD0Cut == kTRUE) |
334 |
– |
d0cut = kFALSE; |
335 |
– |
|
397 |
|
return d0cut; |
398 |
|
} |
399 |
|
|
400 |
|
//-------------------------------------------------------------------------------------------------- |
401 |
+ |
Bool_t ElectronTools::PassDZCut(const Electron *ele, const VertexCol *vertices, Double_t fDZCut, Int_t nVertex) |
402 |
+ |
{ |
403 |
+ |
Bool_t dzcut = kFALSE; |
404 |
+ |
|
405 |
+ |
Double_t distVtx = 999.0; |
406 |
+ |
|
407 |
+ |
if( nVertex >= (int) vertices->GetEntries() ) |
408 |
+ |
nVertex = vertices->GetEntries()-1; |
409 |
+ |
|
410 |
+ |
if(nVertex >= 0) distVtx = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nVertex))); |
411 |
+ |
else { |
412 |
+ |
for(UInt_t nv=0; nv<vertices->GetEntries(); nv++){ |
413 |
+ |
double dz = TMath::Abs(ele->GsfTrk()->DzCorrected(*vertices->At(nv))); |
414 |
+ |
if(dz < distVtx) { |
415 |
+ |
distVtx = dz; |
416 |
+ |
} |
417 |
+ |
} |
418 |
+ |
} |
419 |
+ |
|
420 |
+ |
if(distVtx < fDZCut) dzcut = kTRUE; |
421 |
+ |
|
422 |
+ |
return dzcut; |
423 |
+ |
} |
424 |
+ |
|
425 |
+ |
//-------------------------------------------------------------------------------------------------- |
426 |
|
Bool_t ElectronTools::PassChargeFilter(const Electron *ele) |
427 |
|
{ |
428 |
|
Bool_t passChargeFilter = kTRUE; |
436 |
|
Bool_t ElectronTools::PassSpikeRemovalFilter(const Electron *ele) |
437 |
|
{ |
438 |
|
Bool_t passSpikeRemovalFilter = kTRUE; |
439 |
< |
if(ele->SCluster()->Seed()->Energy() > 5.0 && |
439 |
> |
if(ele->SCluster() && |
440 |
> |
ele->SCluster()->Seed()->Energy() > 5.0 && |
441 |
|
ele->SCluster()->Seed()->EMax() / ele->SCluster()->Seed()->E3x3() > 0.95 |
442 |
|
) { |
443 |
|
passSpikeRemovalFilter = kFALSE; |
453 |
|
return passSpikeRemovalFilter; |
454 |
|
} |
455 |
|
|
456 |
+ |
Bool_t ElectronTools::PassTriggerMatching(const Electron *ele, const TriggerObjectCol *trigobjs) |
457 |
+ |
{ |
458 |
+ |
|
459 |
+ |
for (UInt_t i=0; i<trigobjs->GetEntries(); ++i) { |
460 |
+ |
const TriggerObject *trigobj = trigobjs->At(i); |
461 |
+ |
if (trigobj->TriggerType()==TriggerObject::TriggerCluster || trigobj->TriggerType()==TriggerObject::TriggerElectron || trigobj->TriggerType()==TriggerObject::TriggerPhoton) { |
462 |
+ |
if (MathUtils::DeltaR(ele->SCluster(),trigobj)<0.3) { |
463 |
+ |
return kTRUE; |
464 |
+ |
} |
465 |
+ |
} |
466 |
+ |
} |
467 |
+ |
|
468 |
+ |
return kFALSE; |
469 |
+ |
|
470 |
+ |
|
471 |
+ |
} |
472 |
+ |
|
473 |
|
//-------------------------------------------------------------------------------------------------- |
474 |
|
Int_t ElectronTools::Classify(const Electron *ele) { |
475 |
|
|
510 |
|
|
511 |
|
//-------------------------------------------------------------------------------------------------- |
512 |
|
Int_t ElectronTools::PassTightId(const Electron *ele, const VertexCol *vertices, |
513 |
< |
const DecayParticleCol *conversions, const Int_t typeCuts){ |
513 |
> |
const DecayParticleCol *conversions, const Int_t typeCuts, |
514 |
> |
Double_t beta){ |
515 |
|
|
516 |
< |
Double_t scEt = ele->SCluster()->Et(); |
517 |
< |
Double_t eOverP = ele->ESuperClusterOverP(); |
516 |
> |
// original code on |
517 |
> |
// http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/RecoEgamma/ElectronIdentification/src/CutBasedElectronID.cc |
518 |
> |
// beta must be computed with a DR cone of 0.4 |
519 |
> |
|
520 |
> |
Double_t scEt = ele->SCluster()->Et(); |
521 |
> |
Double_t scEta = ele->SCluster()->Eta(); |
522 |
|
|
523 |
|
Double_t fBrem = ele->FBrem(); |
524 |
|
Double_t hOverE = ele->HadronicOverEm(); |
529 |
|
|
530 |
|
Int_t mishits = ele->BestTrk()->NExpectedHitsInner(); |
531 |
|
Double_t tkIso = ele->TrackIsolationDr03(); |
532 |
< |
Double_t ecalIso = ele->EcalRecHitIsoDr04(); |
533 |
< |
Double_t ecalIsoPed = (ele->IsEB())?std::max(0.,ecalIso-1.):ecalIso; |
425 |
< |
Double_t hcalIso = ele->HcalTowerSumEtDr04(); |
426 |
< |
Double_t hcalIso1 = ele->HcalDepth1TowerSumEtDr04(); |
427 |
< |
Double_t hcalIso2 = ele->HcalDepth2TowerSumEtDr04(); |
428 |
< |
Double_t e25Max = ele->E25Max(); |
429 |
< |
Double_t e15 = ele->E15(); |
430 |
< |
Double_t e55 = ele->E55(); |
431 |
< |
Double_t e25Maxoe55 = e25Max/e55; |
432 |
< |
Double_t e15oe55 = e15/e55; |
532 |
> |
Double_t ecalIso = ele->EcalRecHitIsoDr04()*beta; |
533 |
> |
Double_t hcalIso = ele->HcalTowerSumEtDr04()*beta; |
534 |
|
|
535 |
|
int cat = Classify(ele); |
536 |
|
int eb; |
540 |
|
else |
541 |
|
eb = 1; |
542 |
|
|
543 |
< |
Int_t result = 0.; |
543 |
> |
// Medium cuts |
544 |
> |
Double_t cutdcotdistMedium[9] = { |
545 |
> |
3.32e-02, 2.92e-02, 2.49e-02, 3.92e-02, 3.41e-02, 3.96e-02, 2.91e-02, 3.95e-02, 7.71e-03}; |
546 |
> |
Double_t cutdetainMedium[9] = { |
547 |
> |
1.33e-02, 4.48e-03, 9.22e-03, 1.54e-02, 7.26e-03, 1.24e-02, 1.29e-02, 3.84e-02, 1.88e-02}; |
548 |
> |
Double_t cutdetainlMedium[9] = { |
549 |
> |
1.21e-02, 4.22e-03, 9.18e-03, 1.61e-02, 6.45e-03, 1.16e-02, 1.23e-02, 6.20e-02, 2.43e-02}; |
550 |
> |
Double_t cutdphiinMedium[9] = { |
551 |
> |
7.09e-02, 2.43e-01, 2.96e-01, 7.98e-02, 2.35e-01, 2.76e-01, 3.42e-01, 4.04e-01, 2.99e-01}; |
552 |
> |
Double_t cutdphiinlMedium[9] = { |
553 |
> |
7.42e-02, 2.43e-01, 2.97e-01, 9.12e-02, 2.26e-01, 2.76e-01, 3.34e-01, 5.58e-01, 2.91e-01}; |
554 |
> |
Double_t cuteseedopcorMedium[9] = { |
555 |
> |
6.42e-01, 9.44e-01, 4.53e-01, 7.62e-01, 3.67e-01, 5.57e-01, 1.98e-01, 9.15e-01, 6.28e-02}; |
556 |
> |
Double_t cutfmishitsMedium[9] = { |
557 |
> |
4.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 5.00e-01, 1.50e+00, 5.00e-01, 5.00e-01}; |
558 |
> |
Double_t cuthoeMedium[9] = { |
559 |
> |
1.96e-01, 6.30e-02, 1.48e-01, 3.66e-01, 5.66e-02, 1.45e-01, 4.29e-01, 4.28e-01, 3.99e-01}; |
560 |
> |
Double_t cuthoelMedium[9] = { |
561 |
> |
2.19e-01, 6.19e-02, 1.47e-01, 3.58e-01, 4.61e-02, 1.46e-01, 3.26e-01, 3.81e-01, 3.89e-01}; |
562 |
> |
Double_t cutip_gsfMedium[9] = { |
563 |
> |
2.45e-02, 9.74e-02, 1.48e-01, 5.49e-02, 5.65e-01, 3.33e-01, 2.04e-01, 5.41e-01, 1.21e-01}; |
564 |
> |
Double_t cutip_gsflMedium[9] = { |
565 |
> |
1.92e-02, 9.81e-02, 1.33e-01, 4.34e-02, 5.65e-01, 3.24e-01, 2.33e-01, 4.30e-01, 6.44e-02}; |
566 |
> |
Double_t cutiso_sumMedium[9] = { |
567 |
> |
1.44e+01, 1.12e+01, 1.09e+01, 1.08e+01, 6.35e+00, 9.78e+00, 1.30e+01, 1.62e+01, 1.96e+00}; |
568 |
> |
Double_t cutiso_sumoetMedium[9] = { |
569 |
> |
1.01e+01, 6.41e+00, 6.00e+00, 8.14e+00, 3.90e+00, 4.76e+00, 6.86e+00, 6.48e+00, 1.74e+01}; |
570 |
> |
Double_t cutiso_sumoetlMedium[9] = { |
571 |
> |
9.44e+00, 7.67e+00, 7.15e+00, 7.34e+00, 3.35e+00, 4.70e+00, 8.32e+00, 7.55e+00, 6.25e+00}; |
572 |
> |
Double_t cutseeMedium[9] = { |
573 |
> |
1.30e-02, 1.09e-02, 1.18e-02, 3.94e-02, 3.04e-02, 3.28e-02, 1.00e-02, 3.73e-02, 6.69e-02}; |
574 |
> |
Double_t cutseelMedium[9] = { |
575 |
> |
1.42e-02, 1.11e-02, 1.29e-02, 4.32e-02, 2.96e-02, 3.82e-02, 1.01e-02, 4.45e-02, 1.19e-01}; |
576 |
> |
|
577 |
> |
// Tight cuts |
578 |
> |
Double_t cutdcotdistTight[9] = { |
579 |
> |
2.68e-02, 2.36e-02, 2.21e-02, 3.72e-02, 3.17e-02, 3.61e-02, 2.55e-02, 3.75e-02, 2.16e-04}; |
580 |
> |
Double_t cutdetainTight[9] = { |
581 |
> |
8.92e-03, 3.96e-03, 8.50e-03, 1.34e-02, 6.27e-03, 1.05e-02, 1.12e-02, 3.09e-02, 1.88e-02}; |
582 |
> |
Double_t cutdetainlTight[9] = { |
583 |
> |
9.23e-03, 3.77e-03, 8.70e-03, 1.39e-02, 5.60e-03, 9.40e-03, 1.07e-02, 6.20e-02, 4.10e-03}; |
584 |
> |
Double_t cutdphiinTight[9] = { |
585 |
> |
6.37e-02, 1.53e-01, 2.90e-01, 7.69e-02, 1.81e-01, 2.34e-01, 3.42e-01, 3.93e-01, 2.84e-01}; |
586 |
> |
Double_t cutdphiinlTight[9] = { |
587 |
> |
6.92e-02, 2.33e-01, 2.96e-01, 8.65e-02, 1.85e-01, 2.76e-01, 3.34e-01, 3.53e-01, 2.90e-01}; |
588 |
> |
Double_t cuteseedopcorTight[9] = { |
589 |
> |
6.52e-01, 9.69e-01, 9.12e-01, 7.79e-01, 3.67e-01, 6.99e-01, 3.28e-01, 9.67e-01, 5.89e-01}; |
590 |
> |
Double_t cutfmishitsTight[9] = { |
591 |
> |
4.50e+00, 1.50e+00, 5.00e-01, 1.50e+00, 1.50e+00, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01}; |
592 |
> |
Double_t cuthoeTight[9] = { |
593 |
> |
1.74e-01, 4.88e-02, 1.46e-01, 3.64e-01, 4.93e-02, 1.45e-01, 4.29e-01, 4.20e-01, 3.99e-01}; |
594 |
> |
Double_t cuthoelTight[9] = { |
595 |
> |
2.19e-01, 5.25e-02, 1.47e-01, 3.57e-01, 4.25e-02, 1.45e-01, 3.26e-01, 3.80e-01, 1.32e-01}; |
596 |
> |
Double_t cutip_gsfTight[9] = { |
597 |
> |
1.58e-02, 8.25e-02, 1.15e-01, 4.05e-02, 5.40e-01, 1.51e-01, 7.74e-02, 4.17e-01, 7.80e-02}; |
598 |
> |
Double_t cutip_gsflTight[9] = { |
599 |
> |
1.27e-02, 6.26e-02, 9.68e-02, 3.02e-02, 5.65e-01, 1.46e-01, 7.90e-02, 4.10e-01, 4.79e-02}; |
600 |
> |
Double_t cutiso_sumTight[9] = { |
601 |
> |
1.23e+01, 9.77e+00, 1.01e+01, 9.77e+00, 6.13e+00, 7.55e+00, 1.30e+01, 1.62e+01, 1.78e+00}; |
602 |
> |
Double_t cutiso_sumoetTight[9] = { |
603 |
> |
7.75e+00, 5.45e+00, 5.67e+00, 5.97e+00, 3.17e+00, 3.86e+00, 6.06e+00, 5.31e+00, 1.05e+01}; |
604 |
> |
Double_t cutiso_sumoetlTight[9] = { |
605 |
> |
7.56e+00, 5.08e+00, 5.77e+00, 5.74e+00, 2.37e+00, 3.32e+00, 4.97e+00, 5.46e+00, 3.82e+00}; |
606 |
> |
Double_t cutseeTight[9] = { |
607 |
> |
1.16e-02, 1.07e-02, 1.08e-02, 3.49e-02, 2.89e-02, 3.08e-02, 9.87e-03, 3.37e-02, 4.40e-02}; |
608 |
> |
Double_t cutseelTight[9] = { |
609 |
> |
1.27e-02, 1.08e-02, 1.13e-02, 4.19e-02, 2.81e-02, 3.02e-02, 9.76e-03, 4.28e-02, 2.98e-02}; |
610 |
|
|
611 |
< |
Int_t bin = 0; |
611 |
> |
// SuperTight cuts |
612 |
> |
Double_t cutdcotdistSuperTight[9] = { |
613 |
> |
2.11e-02, 1.86e-02, 1.55e-02, 3.40e-02, 2.85e-02, 3.32e-02, 1.64e-02, 3.75e-02, 1.30e-04}; |
614 |
> |
Double_t cutdetainSuperTight[9] = { |
615 |
> |
7.84e-03, 3.67e-03, 7.00e-03, 1.28e-02, 5.65e-03, 9.53e-03, 1.08e-02, 2.97e-02, 7.24e-03}; |
616 |
> |
Double_t cutdetainlSuperTight[9] = { |
617 |
> |
7.61e-03, 3.28e-03, 6.57e-03, 1.03e-02, 5.05e-03, 8.55e-03, 1.07e-02, 2.94e-02, 4.10e-03}; |
618 |
> |
Double_t cutdphiinSuperTight[9] = { |
619 |
> |
4.83e-02, 7.39e-02, 2.38e-01, 5.74e-02, 1.29e-01, 2.13e-01, 3.31e-01, 3.93e-01, 2.84e-01}; |
620 |
> |
Double_t cutdphiinlSuperTight[9] = { |
621 |
> |
5.79e-02, 7.21e-02, 2.18e-01, 7.70e-02, 1.41e-01, 2.11e-01, 2.43e-01, 3.53e-01, 2.89e-01}; |
622 |
> |
Double_t cuteseedopcorSuperTight[9] = { |
623 |
> |
7.32e-01, 9.77e-01, 9.83e-01, 8.55e-01, 4.31e-01, 7.35e-01, 4.18e-01, 9.99e-01, 5.89e-01}; |
624 |
> |
Double_t cutfmishitsSuperTight[9] = { |
625 |
> |
3.50e+00, 1.50e+00, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01}; |
626 |
> |
Double_t cuthoeSuperTight[9] = { |
627 |
> |
9.19e-02, 4.11e-02, 1.42e-01, 3.35e-01, 3.82e-02, 1.41e-01, 4.29e-01, 4.01e-01, 3.99e-01}; |
628 |
> |
Double_t cuthoelSuperTight[9] = { |
629 |
> |
7.51e-02, 3.81e-02, 1.41e-01, 3.32e-01, 3.10e-02, 1.43e-01, 2.35e-01, 3.80e-01, 1.32e-01}; |
630 |
> |
Double_t cutip_gsfSuperTight[9] = { |
631 |
> |
1.42e-02, 2.66e-02, 1.06e-01, 3.38e-02, 3.23e-01, 1.07e-01, 7.74e-02, 2.32e-01, 7.80e-02}; |
632 |
> |
Double_t cutip_gsflSuperTight[9] = { |
633 |
> |
1.15e-02, 2.72e-02, 8.41e-02, 2.49e-02, 4.17e-01, 1.02e-01, 7.90e-02, 1.69e-01, 4.79e-02}; |
634 |
> |
Double_t cutiso_sumSuperTight[9] = { |
635 |
> |
8.95e+00, 8.18e+00, 8.75e+00, 7.47e+00, 5.43e+00, 5.87e+00, 8.16e+00, 1.02e+01, 1.78e+00}; |
636 |
> |
Double_t cutiso_sumoetSuperTight[9] = { |
637 |
> |
6.45e+00, 5.14e+00, 4.99e+00, 5.21e+00, 2.65e+00, 3.12e+00, 4.52e+00, 4.72e+00, 3.68e+00}; |
638 |
> |
Double_t cutiso_sumoetlSuperTight[9] = { |
639 |
> |
6.02e+00, 3.96e+00, 4.23e+00, 4.73e+00, 1.99e+00, 2.64e+00, 3.72e+00, 3.81e+00, 1.44e+00}; |
640 |
> |
Double_t cutseeSuperTight[9] = { |
641 |
> |
1.09e-02, 1.05e-02, 1.05e-02, 3.24e-02, 2.81e-02, 2.95e-02, 9.77e-03, 2.75e-02, 2.95e-02}; |
642 |
> |
Double_t cutseelSuperTight[9] = { |
643 |
> |
1.12e-02, 1.05e-02, 1.07e-02, 3.51e-02, 2.75e-02, 2.87e-02, 9.59e-03, 2.67e-02, 2.98e-02}; |
644 |
> |
|
645 |
> |
// HyperTight1 cuts |
646 |
> |
Double_t cutdcotdistHyperTight1[9] = { |
647 |
> |
1.48e-02, 1.50e-02, 8.25e-03, 3.16e-02, 2.85e-02, 3.15e-02, 6.62e-03, 3.48e-02, 3.63e-06}; |
648 |
> |
Double_t cutdetainHyperTight1[9] = { |
649 |
> |
6.51e-03, 3.51e-03, 5.53e-03, 9.16e-03, 5.30e-03, 8.28e-03, 1.08e-02, 2.97e-02, 7.24e-03}; |
650 |
> |
Double_t cutdetainlHyperTight1[9] = { |
651 |
> |
6.05e-03, 3.23e-03, 4.93e-03, 8.01e-03, 4.93e-03, 7.91e-03, 1.03e-02, 2.94e-02, 4.10e-03}; |
652 |
> |
Double_t cutdphiinHyperTight1[9] = { |
653 |
> |
4.83e-02, 4.91e-02, 2.30e-01, 3.48e-02, 7.44e-02, 2.04e-01, 9.95e-02, 3.93e-01, 2.84e-01}; |
654 |
> |
Double_t cutdphiinlHyperTight1[9] = { |
655 |
> |
4.74e-02, 4.51e-02, 2.18e-01, 2.99e-02, 7.37e-02, 2.11e-01, 9.99e-02, 3.53e-01, 2.89e-01}; |
656 |
> |
Double_t cuteseedopcorHyperTight1[9] = { |
657 |
> |
7.72e-01, 9.90e-01, 1.01e+00, 8.55e-01, 9.11e-01, 7.72e-01, 9.17e-01, 1.06e+00, 7.63e-01}; |
658 |
> |
Double_t cutfmishitsHyperTight1[9] = { |
659 |
> |
3.50e+00, 1.50e+00, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01}; |
660 |
> |
Double_t cuthoeHyperTight1[9] = { |
661 |
> |
6.17e-02, 3.70e-02, 1.41e-01, 2.91e-01, 3.82e-02, 1.34e-01, 4.19e-01, 3.87e-01, 3.93e-01}; |
662 |
> |
Double_t cuthoelHyperTight1[9] = { |
663 |
> |
4.43e-02, 3.57e-02, 1.41e-01, 2.81e-01, 3.07e-02, 1.28e-01, 2.27e-01, 3.80e-01, 1.32e-01}; |
664 |
> |
Double_t cutip_gsfHyperTight1[9] = { |
665 |
> |
1.21e-02, 1.76e-02, 6.01e-02, 2.96e-02, 1.74e-01, 9.70e-02, 7.74e-02, 1.33e-01, 7.80e-02}; |
666 |
> |
Double_t cutip_gsflHyperTight1[9] = { |
667 |
> |
1.01e-02, 1.56e-02, 6.87e-02, 2.13e-02, 1.25e-01, 8.16e-02, 7.90e-02, 1.30e-01, 4.79e-02}; |
668 |
> |
Double_t cutiso_sumHyperTight1[9] = { |
669 |
> |
7.92e+00, 6.85e+00, 7.87e+00, 6.77e+00, 4.47e+00, 5.28e+00, 6.57e+00, 1.02e+01, 1.78e+00}; |
670 |
> |
Double_t cutiso_sumoetHyperTight1[9] = { |
671 |
> |
5.20e+00, 3.93e+00, 3.88e+00, 4.10e+00, 2.40e+00, 2.43e+00, 3.49e+00, 3.94e+00, 3.01e+00}; |
672 |
> |
Double_t cutiso_sumoetlHyperTight1[9] = { |
673 |
> |
4.18e+00, 3.12e+00, 3.44e+00, 3.25e+00, 1.77e+00, 2.06e+00, 2.83e+00, 3.12e+00, 1.43e+00}; |
674 |
> |
Double_t cutseeHyperTight1[9] = { |
675 |
> |
1.05e-02, 1.04e-02, 1.01e-02, 3.24e-02, 2.80e-02, 2.85e-02, 9.67e-03, 2.61e-02, 2.95e-02}; |
676 |
> |
Double_t cutseelHyperTight1[9] = { |
677 |
> |
1.04e-02, 1.03e-02, 1.01e-02, 3.04e-02, 2.74e-02, 2.78e-02, 9.58e-03, 2.54e-02, 2.83e-02}; |
678 |
> |
|
679 |
> |
// HyperTight2 cuts |
680 |
> |
Double_t cutdcotdistHyperTight2[9] = { |
681 |
> |
1.15e-02, 1.07e-02, 4.01e-03, 2.97e-02, 2.85e-02, 3.10e-02, 9.34e-04, 3.40e-02, 2.82e-07}; |
682 |
> |
Double_t cutdetainHyperTight2[9] = { |
683 |
> |
5.29e-03, 2.56e-03, 4.89e-03, 7.89e-03, 5.30e-03, 7.37e-03, 8.91e-03, 9.36e-03, 5.94e-03}; |
684 |
> |
Double_t cutdetainlHyperTight2[9] = { |
685 |
> |
4.48e-03, 2.59e-03, 4.42e-03, 6.54e-03, 4.93e-03, 6.98e-03, 8.49e-03, 9.06e-03, -4.81e-03}; |
686 |
> |
Double_t cutdphiinHyperTight2[9] = { |
687 |
> |
2.41e-02, 3.83e-02, 1.48e-01, 2.91e-02, 3.15e-02, 1.57e-01, 8.90e-02, 1.02e-01, 2.81e-01}; |
688 |
> |
Double_t cutdphiinlHyperTight2[9] = { |
689 |
> |
2.13e-02, 3.79e-02, 1.25e-01, 2.24e-02, 3.69e-02, 1.64e-01, 9.99e-02, 9.23e-02, 2.37e-01}; |
690 |
> |
Double_t cuteseedopcorHyperTight2[9] = { |
691 |
> |
1.03e+00, 9.95e-01, 1.03e+00, 1.01e+00, 9.46e-01, 9.03e-01, 9.97e-01, 1.14e+00, 8.00e-01}; |
692 |
> |
Double_t cutfmishitsHyperTight2[9] = { |
693 |
> |
1.50e+00, 1.50e+00, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, -5.00e-01}; |
694 |
> |
Double_t cuthoeHyperTight2[9] = { |
695 |
> |
4.94e-02, 3.45e-02, 1.40e-01, 2.02e-01, 3.82e-02, 1.19e-01, 1.23e-01, 3.82e-01, 2.50e-01}; |
696 |
> |
Double_t cuthoelHyperTight2[9] = { |
697 |
> |
4.04e-02, 3.42e-02, 1.31e-01, 1.85e-01, 3.01e-02, 1.27e-01, 2.27e-01, 3.80e-01, 1.32e-01}; |
698 |
> |
Double_t cutip_gsfHyperTight2[9] = { |
699 |
> |
1.14e-02, 1.38e-02, 5.29e-02, 1.87e-02, 1.31e-01, 8.63e-02, 7.74e-02, 1.04e-01, 2.42e-02}; |
700 |
> |
Double_t cutip_gsflHyperTight2[9] = { |
701 |
> |
9.83e-03, 1.35e-02, 4.27e-02, 1.72e-02, 1.25e-01, 7.92e-02, 7.90e-02, 1.30e-01, 3.40e-02}; |
702 |
> |
Double_t cutiso_sumHyperTight2[9] = { |
703 |
> |
6.40e+00, 5.77e+00, 6.54e+00, 5.22e+00, 3.86e+00, 4.63e+00, 6.31e+00, 1.02e+01, 1.78e+00}; |
704 |
> |
Double_t cutiso_sumoetHyperTight2[9] = { |
705 |
> |
4.03e+00, 3.03e+00, 3.24e+00, 3.13e+00, 2.05e+00, 2.01e+00, 2.99e+00, 3.44e+00, 2.76e+00}; |
706 |
> |
Double_t cutiso_sumoetlHyperTight2[9] = { |
707 |
> |
3.08e+00, 2.31e+00, 2.84e+00, 2.53e+00, 1.65e+00, 1.72e+00, 2.34e+00, 3.11e+00, 1.35e+00}; |
708 |
> |
Double_t cutseeHyperTight2[9] = { |
709 |
> |
1.03e-02, 1.03e-02, 9.88e-03, 3.03e-02, 2.79e-02, 2.79e-02, 9.67e-03, 2.52e-02, 2.58e-02}; |
710 |
> |
Double_t cutseelHyperTight2[9] = { |
711 |
> |
1.02e-02, 1.02e-02, 9.80e-03, 2.90e-02, 2.74e-02, 2.75e-02, 9.58e-03, 2.49e-02, 2.50e-02}; |
712 |
> |
|
713 |
> |
// HyperTight3 cuts |
714 |
> |
Double_t cutdcotdistHyperTight3[9] = { |
715 |
> |
9.63e-03, 5.11e-03, 1.95e-04, 2.97e-02, 2.85e-02, 2.18e-02, 2.61e-05, 2.57e-02, 2.82e-07}; |
716 |
> |
Double_t cutdetainHyperTight3[9] = { |
717 |
> |
4.86e-03, 2.29e-03, 4.40e-03, 7.79e-03, 4.07e-03, 6.33e-03, 7.70e-03, 7.93e-03, 5.94e-03}; |
718 |
> |
Double_t cutdetainlHyperTight3[9] = { |
719 |
> |
4.48e-03, 2.30e-03, 4.14e-03, 6.04e-03, 3.87e-03, 6.09e-03, 7.97e-03, 8.04e-03, -4.81e-03}; |
720 |
> |
Double_t cutdphiinHyperTight3[9] = { |
721 |
> |
2.41e-02, 2.88e-02, 7.39e-02, 2.91e-02, 1.91e-02, 1.14e-01, 3.61e-02, 8.92e-02, 2.81e-01}; |
722 |
> |
Double_t cutdphiinlHyperTight3[9] = { |
723 |
> |
1.95e-02, 3.42e-02, 8.06e-02, 2.22e-02, 2.26e-02, 9.73e-02, 4.51e-02, 9.23e-02, 2.37e-01}; |
724 |
> |
Double_t cuteseedopcorHyperTight3[9] = { |
725 |
> |
1.07e+00, 1.01e+00, 1.08e+00, 1.01e+00, 9.69e-01, 9.10e-01, 1.04e+00, 1.20e+00, 8.00e-01}; |
726 |
> |
Double_t cutfmishitsHyperTight3[9] = { |
727 |
> |
5.00e-01, 1.50e+00, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, -5.00e-01}; |
728 |
> |
Double_t cuthoeHyperTight3[9] = { |
729 |
> |
3.52e-02, 3.45e-02, 1.33e-01, 1.88e-01, 2.72e-02, 1.19e-01, 9.28e-02, 2.46e-01, 2.50e-01}; |
730 |
> |
Double_t cuthoelHyperTight3[9] = { |
731 |
> |
4.04e-02, 3.40e-02, 1.31e-01, 1.84e-01, 2.64e-02, 1.18e-01, 9.76e-02, 2.53e-01, 1.32e-01}; |
732 |
> |
Double_t cutip_gsfHyperTight3[9] = { |
733 |
> |
1.14e-02, 1.26e-02, 3.79e-02, 1.68e-02, 1.21e-01, 5.29e-02, 7.74e-02, 3.35e-02, 2.42e-02}; |
734 |
> |
Double_t cutip_gsflHyperTight3[9] = { |
735 |
> |
9.83e-03, 1.18e-02, 3.59e-02, 1.56e-02, 1.20e-01, 5.36e-02, 7.90e-02, 2.88e-02, 3.40e-02}; |
736 |
> |
Double_t cutiso_sumHyperTight3[9] = { |
737 |
> |
5.40e+00, 5.41e+00, 5.88e+00, 4.32e+00, 3.86e+00, 4.33e+00, 5.87e+00, 9.05e+00, 1.78e+00}; |
738 |
> |
Double_t cutiso_sumoetHyperTight3[9] = { |
739 |
> |
3.03e+00, 2.50e+00, 2.58e+00, 2.44e+00, 1.91e+00, 1.76e+00, 2.92e+00, 3.13e+00, 2.76e+00}; |
740 |
> |
Double_t cutiso_sumoetlHyperTight3[9] = { |
741 |
> |
2.36e+00, 2.02e+00, 2.29e+00, 1.89e+00, 1.65e+00, 1.69e+00, 2.03e+00, 2.79e+00, 1.35e+00}; |
742 |
> |
Double_t cutseeHyperTight3[9] = { |
743 |
> |
1.03e-02, 1.01e-02, 9.84e-03, 2.89e-02, 2.74e-02, 2.73e-02, 9.47e-03, 2.44e-02, 2.58e-02}; |
744 |
> |
Double_t cutseelHyperTight3[9] = { |
745 |
> |
1.02e-02, 1.00e-02, 9.73e-03, 2.79e-02, 2.73e-02, 2.69e-02, 9.40e-03, 2.46e-02, 2.50e-02}; |
746 |
> |
|
747 |
> |
// HyperTight4 cuts |
748 |
> |
Double_t cutdcotdistHyperTight4[9] = { |
749 |
> |
2.70e-04, 1.43e-04, 1.95e-04, 2.64e-03, 2.82e-02, 1.64e-02, 2.61e-05, 2.57e-02, 2.82e-07}; |
750 |
> |
Double_t cutdetainHyperTight4[9] = { |
751 |
> |
2.44e-03, 1.67e-03, 2.26e-03, 3.43e-03, 3.51e-03, 3.52e-03, 2.98e-03, 4.79e-03, 5.94e-03}; |
752 |
> |
Double_t cutdetainlHyperTight4[9] = { |
753 |
> |
2.34e-03, 1.29e-03, 2.30e-03, 3.30e-03, 3.61e-03, 3.84e-03, 2.53e-03, 3.66e-03, -4.81e-03}; |
754 |
> |
Double_t cutdphiinHyperTight4[9] = { |
755 |
> |
8.44e-03, 5.21e-03, 2.18e-02, 1.39e-02, 7.82e-03, 1.52e-02, 2.59e-02, 3.87e-02, 2.81e-01}; |
756 |
> |
Double_t cutdphiinlHyperTight4[9] = { |
757 |
> |
5.77e-03, 3.20e-03, 2.85e-02, 2.22e-02, 7.00e-03, 1.84e-02, 2.91e-02, 4.40e-02, 2.37e-01}; |
758 |
> |
Double_t cuteseedopcorHyperTight4[9] = { |
759 |
> |
1.15e+00, 1.01e+00, 1.21e+00, 1.07e+00, 9.69e-01, 9.10e-01, 1.08e+00, 1.36e+00, 8.00e-01}; |
760 |
> |
Double_t cutfmishitsHyperTight4[9] = { |
761 |
> |
5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, 5.00e-01, -5.00e-01}; |
762 |
> |
Double_t cuthoeHyperTight4[9] = { |
763 |
> |
2.39e-02, 2.68e-02, 2.12e-02, 1.03e-01, 9.92e-03, 7.07e-02, 7.12e-02, 1.48e-01, 2.50e-01}; |
764 |
> |
Double_t cuthoelHyperTight4[9] = { |
765 |
> |
2.87e-02, 1.94e-02, 2.16e-02, 5.68e-02, 1.35e-02, 4.04e-02, 7.98e-02, 1.50e-01, 1.32e-01}; |
766 |
> |
Double_t cutip_gsfHyperTight4[9] = { |
767 |
> |
7.61e-03, 5.22e-03, 3.79e-02, 1.02e-02, 4.62e-02, 1.82e-02, 7.74e-02, 3.35e-02, 2.42e-02}; |
768 |
> |
Double_t cutip_gsflHyperTight4[9] = { |
769 |
> |
7.81e-03, 4.25e-03, 3.08e-02, 1.04e-02, 2.35e-02, 2.45e-02, 7.90e-02, 2.88e-02, 3.40e-02}; |
770 |
> |
Double_t cutiso_sumHyperTight4[9] = { |
771 |
> |
5.40e+00, 5.41e+00, 5.88e+00, 4.32e+00, 3.86e+00, 4.33e+00, 5.86e+00, 9.05e+00, 1.78e+00}; |
772 |
> |
Double_t cutiso_sumoetHyperTight4[9] = { |
773 |
> |
2.53e+00, 2.10e+00, 1.87e+00, 1.84e+00, 1.79e+00, 1.61e+00, 2.53e+00, 1.98e+00, 2.76e+00}; |
774 |
> |
Double_t cutiso_sumoetlHyperTight4[9] = { |
775 |
> |
2.28e+00, 2.02e+00, 2.04e+00, 1.69e+00, 1.65e+00, 1.61e+00, 2.03e+00, 1.82e+00, 1.35e+00}; |
776 |
> |
Double_t cutseeHyperTight4[9] = { |
777 |
> |
9.99e-03, 9.61e-03, 9.65e-03, 2.75e-02, 2.61e-02, 2.64e-02, 9.18e-03, 2.44e-02, 2.58e-02}; |
778 |
> |
Double_t cutseelHyperTight4[9] = { |
779 |
> |
9.66e-03, 9.69e-03, 9.58e-03, 2.73e-02, 2.66e-02, 2.66e-02, 8.64e-03, 2.46e-02, 2.50e-02}; |
780 |
> |
|
781 |
> |
Double_t cutdcotdist[9]; |
782 |
> |
Double_t cutdetain[9]; |
783 |
> |
Double_t cutdetainl[9]; |
784 |
> |
Double_t cutdphiin[9]; |
785 |
> |
Double_t cutdphiinl[9]; |
786 |
> |
Double_t cuteseedopcor[9]; |
787 |
> |
Double_t cutfmishits[9]; |
788 |
> |
Double_t cuthoe[9]; |
789 |
> |
Double_t cuthoel[9]; |
790 |
> |
Double_t cutip_gsf[9]; |
791 |
> |
Double_t cutip_gsfl[9]; |
792 |
> |
Double_t cutiso_sum[9]; |
793 |
> |
Double_t cutiso_sumoet[9]; |
794 |
> |
Double_t cutiso_sumoetl[9]; |
795 |
> |
Double_t cutsee[9]; |
796 |
> |
Double_t cutseel[9]; |
797 |
> |
if (typeCuts == 0) { |
798 |
> |
memcpy(cutdcotdist ,cutdcotdistMedium ,sizeof(cutdcotdistMedium)); |
799 |
> |
memcpy(cutdetain ,cutdetainMedium ,sizeof(cutdetainMedium)); |
800 |
> |
memcpy(cutdetainl ,cutdetainlMedium ,sizeof(cutdetainlMedium)); |
801 |
> |
memcpy(cutdphiin ,cutdphiinMedium ,sizeof(cutdphiinMedium)); |
802 |
> |
memcpy(cutdphiinl ,cutdphiinlMedium ,sizeof(cutdphiinlMedium)); |
803 |
> |
memcpy(cuteseedopcor ,cuteseedopcorMedium ,sizeof(cuteseedopcorMedium)); |
804 |
> |
memcpy(cutfmishits ,cutfmishitsMedium ,sizeof(cutfmishitsMedium)); |
805 |
> |
memcpy(cuthoe ,cuthoeMedium ,sizeof(cuthoeMedium)); |
806 |
> |
memcpy(cuthoel ,cuthoelMedium ,sizeof(cuthoelMedium)); |
807 |
> |
memcpy(cutip_gsf ,cutip_gsfMedium ,sizeof(cutip_gsfMedium)); |
808 |
> |
memcpy(cutip_gsfl ,cutip_gsflMedium ,sizeof(cutip_gsflMedium)); |
809 |
> |
memcpy(cutiso_sum ,cutiso_sumMedium ,sizeof(cutiso_sumMedium)); |
810 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetMedium ,sizeof(cutiso_sumoetMedium)); |
811 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlMedium,sizeof(cutiso_sumoetlMedium)); |
812 |
> |
memcpy(cutsee ,cutseeMedium ,sizeof(cutseeMedium)); |
813 |
> |
memcpy(cutseel ,cutseelMedium ,sizeof(cutseelMedium)); |
814 |
> |
} |
815 |
> |
else if(typeCuts == 1) { |
816 |
> |
memcpy(cutdcotdist ,cutdcotdistTight ,sizeof(cutdcotdistTight)); |
817 |
> |
memcpy(cutdetain ,cutdetainTight ,sizeof(cutdetainTight)); |
818 |
> |
memcpy(cutdetainl ,cutdetainlTight ,sizeof(cutdetainlTight)); |
819 |
> |
memcpy(cutdphiin ,cutdphiinTight ,sizeof(cutdphiinTight)); |
820 |
> |
memcpy(cutdphiinl ,cutdphiinlTight ,sizeof(cutdphiinlTight)); |
821 |
> |
memcpy(cuteseedopcor ,cuteseedopcorTight ,sizeof(cuteseedopcorTight)); |
822 |
> |
memcpy(cutfmishits ,cutfmishitsTight ,sizeof(cutfmishitsTight)); |
823 |
> |
memcpy(cuthoe ,cuthoeTight ,sizeof(cuthoeTight)); |
824 |
> |
memcpy(cuthoel ,cuthoelTight ,sizeof(cuthoelTight)); |
825 |
> |
memcpy(cutip_gsf ,cutip_gsfTight ,sizeof(cutip_gsfTight)); |
826 |
> |
memcpy(cutip_gsfl ,cutip_gsflTight ,sizeof(cutip_gsflTight)); |
827 |
> |
memcpy(cutiso_sum ,cutiso_sumTight ,sizeof(cutiso_sumTight)); |
828 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetTight ,sizeof(cutiso_sumoetTight)); |
829 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlTight,sizeof(cutiso_sumoetlTight)); |
830 |
> |
memcpy(cutsee ,cutseeTight ,sizeof(cutseeTight)); |
831 |
> |
memcpy(cutseel ,cutseelTight ,sizeof(cutseelTight)); |
832 |
> |
} |
833 |
> |
else if(typeCuts == 2) { |
834 |
> |
memcpy(cutdcotdist ,cutdcotdistSuperTight ,sizeof(cutdcotdistSuperTight)); |
835 |
> |
memcpy(cutdetain ,cutdetainSuperTight ,sizeof(cutdetainSuperTight)); |
836 |
> |
memcpy(cutdetainl ,cutdetainlSuperTight ,sizeof(cutdetainlSuperTight)); |
837 |
> |
memcpy(cutdphiin ,cutdphiinSuperTight ,sizeof(cutdphiinSuperTight)); |
838 |
> |
memcpy(cutdphiinl ,cutdphiinlSuperTight ,sizeof(cutdphiinlSuperTight)); |
839 |
> |
memcpy(cuteseedopcor ,cuteseedopcorSuperTight ,sizeof(cuteseedopcorSuperTight)); |
840 |
> |
memcpy(cutfmishits ,cutfmishitsSuperTight ,sizeof(cutfmishitsSuperTight)); |
841 |
> |
memcpy(cuthoe ,cuthoeSuperTight ,sizeof(cuthoeSuperTight)); |
842 |
> |
memcpy(cuthoel ,cuthoelSuperTight ,sizeof(cuthoelSuperTight)); |
843 |
> |
memcpy(cutip_gsf ,cutip_gsfSuperTight ,sizeof(cutip_gsfSuperTight)); |
844 |
> |
memcpy(cutip_gsfl ,cutip_gsflSuperTight ,sizeof(cutip_gsflSuperTight)); |
845 |
> |
memcpy(cutiso_sum ,cutiso_sumSuperTight ,sizeof(cutiso_sumSuperTight)); |
846 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetSuperTight ,sizeof(cutiso_sumoetSuperTight)); |
847 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlSuperTight,sizeof(cutiso_sumoetlSuperTight)); |
848 |
> |
memcpy(cutsee ,cutseeSuperTight ,sizeof(cutseeSuperTight)); |
849 |
> |
memcpy(cutseel ,cutseelSuperTight ,sizeof(cutseelSuperTight)); |
850 |
> |
} |
851 |
> |
else if(typeCuts == 3) { |
852 |
> |
memcpy(cutdcotdist ,cutdcotdistHyperTight1 ,sizeof(cutdcotdistHyperTight1)); |
853 |
> |
memcpy(cutdetain ,cutdetainHyperTight1 ,sizeof(cutdetainHyperTight1)); |
854 |
> |
memcpy(cutdetainl ,cutdetainlHyperTight1 ,sizeof(cutdetainlHyperTight1)); |
855 |
> |
memcpy(cutdphiin ,cutdphiinHyperTight1 ,sizeof(cutdphiinHyperTight1)); |
856 |
> |
memcpy(cutdphiinl ,cutdphiinlHyperTight1 ,sizeof(cutdphiinlHyperTight1)); |
857 |
> |
memcpy(cuteseedopcor ,cuteseedopcorHyperTight1 ,sizeof(cuteseedopcorHyperTight1)); |
858 |
> |
memcpy(cutfmishits ,cutfmishitsHyperTight1 ,sizeof(cutfmishitsHyperTight1)); |
859 |
> |
memcpy(cuthoe ,cuthoeHyperTight1 ,sizeof(cuthoeHyperTight1)); |
860 |
> |
memcpy(cuthoel ,cuthoelHyperTight1 ,sizeof(cuthoelHyperTight1)); |
861 |
> |
memcpy(cutip_gsf ,cutip_gsfHyperTight1 ,sizeof(cutip_gsfHyperTight1)); |
862 |
> |
memcpy(cutip_gsfl ,cutip_gsflHyperTight1 ,sizeof(cutip_gsflHyperTight1)); |
863 |
> |
memcpy(cutiso_sum ,cutiso_sumHyperTight1 ,sizeof(cutiso_sumHyperTight1)); |
864 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetHyperTight1 ,sizeof(cutiso_sumoetHyperTight1)); |
865 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlHyperTight1,sizeof(cutiso_sumoetlHyperTight1)); |
866 |
> |
memcpy(cutsee ,cutseeHyperTight1 ,sizeof(cutseeHyperTight1)); |
867 |
> |
memcpy(cutseel ,cutseelHyperTight1 ,sizeof(cutseelHyperTight1)); |
868 |
> |
} |
869 |
> |
else if(typeCuts == 4) { |
870 |
> |
memcpy(cutdcotdist ,cutdcotdistHyperTight2 ,sizeof(cutdcotdistHyperTight2)); |
871 |
> |
memcpy(cutdetain ,cutdetainHyperTight2 ,sizeof(cutdetainHyperTight2)); |
872 |
> |
memcpy(cutdetainl ,cutdetainlHyperTight2 ,sizeof(cutdetainlHyperTight2)); |
873 |
> |
memcpy(cutdphiin ,cutdphiinHyperTight2 ,sizeof(cutdphiinHyperTight2)); |
874 |
> |
memcpy(cutdphiinl ,cutdphiinlHyperTight2 ,sizeof(cutdphiinlHyperTight2)); |
875 |
> |
memcpy(cuteseedopcor ,cuteseedopcorHyperTight2 ,sizeof(cuteseedopcorHyperTight2)); |
876 |
> |
memcpy(cutfmishits ,cutfmishitsHyperTight2 ,sizeof(cutfmishitsHyperTight2)); |
877 |
> |
memcpy(cuthoe ,cuthoeHyperTight2 ,sizeof(cuthoeHyperTight2)); |
878 |
> |
memcpy(cuthoel ,cuthoelHyperTight2 ,sizeof(cuthoelHyperTight2)); |
879 |
> |
memcpy(cutip_gsf ,cutip_gsfHyperTight2 ,sizeof(cutip_gsfHyperTight2)); |
880 |
> |
memcpy(cutip_gsfl ,cutip_gsflHyperTight2 ,sizeof(cutip_gsflHyperTight2)); |
881 |
> |
memcpy(cutiso_sum ,cutiso_sumHyperTight2 ,sizeof(cutiso_sumHyperTight2)); |
882 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetHyperTight2 ,sizeof(cutiso_sumoetHyperTight2)); |
883 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlHyperTight2,sizeof(cutiso_sumoetlHyperTight2)); |
884 |
> |
memcpy(cutsee ,cutseeHyperTight2 ,sizeof(cutseeHyperTight2)); |
885 |
> |
memcpy(cutseel ,cutseelHyperTight2 ,sizeof(cutseelHyperTight2)); |
886 |
> |
} |
887 |
> |
else if(typeCuts == 5) { |
888 |
> |
memcpy(cutdcotdist ,cutdcotdistHyperTight3 ,sizeof(cutdcotdistHyperTight3)); |
889 |
> |
memcpy(cutdetain ,cutdetainHyperTight3 ,sizeof(cutdetainHyperTight3)); |
890 |
> |
memcpy(cutdetainl ,cutdetainlHyperTight3 ,sizeof(cutdetainlHyperTight3)); |
891 |
> |
memcpy(cutdphiin ,cutdphiinHyperTight3 ,sizeof(cutdphiinHyperTight3)); |
892 |
> |
memcpy(cutdphiinl ,cutdphiinlHyperTight3 ,sizeof(cutdphiinlHyperTight3)); |
893 |
> |
memcpy(cuteseedopcor ,cuteseedopcorHyperTight3 ,sizeof(cuteseedopcorHyperTight3)); |
894 |
> |
memcpy(cutfmishits ,cutfmishitsHyperTight3 ,sizeof(cutfmishitsHyperTight3)); |
895 |
> |
memcpy(cuthoe ,cuthoeHyperTight3 ,sizeof(cuthoeHyperTight3)); |
896 |
> |
memcpy(cuthoel ,cuthoelHyperTight3 ,sizeof(cuthoelHyperTight3)); |
897 |
> |
memcpy(cutip_gsf ,cutip_gsfHyperTight3 ,sizeof(cutip_gsfHyperTight3)); |
898 |
> |
memcpy(cutip_gsfl ,cutip_gsflHyperTight3 ,sizeof(cutip_gsflHyperTight3)); |
899 |
> |
memcpy(cutiso_sum ,cutiso_sumHyperTight3 ,sizeof(cutiso_sumHyperTight3)); |
900 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetHyperTight3 ,sizeof(cutiso_sumoetHyperTight3)); |
901 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlHyperTight3,sizeof(cutiso_sumoetlHyperTight3)); |
902 |
> |
memcpy(cutsee ,cutseeHyperTight3 ,sizeof(cutseeHyperTight3)); |
903 |
> |
memcpy(cutseel ,cutseelHyperTight3 ,sizeof(cutseelHyperTight3)); |
904 |
> |
} |
905 |
> |
else if(typeCuts == 6) { |
906 |
> |
memcpy(cutdcotdist ,cutdcotdistHyperTight4 ,sizeof(cutdcotdistHyperTight4)); |
907 |
> |
memcpy(cutdetain ,cutdetainHyperTight4 ,sizeof(cutdetainHyperTight4)); |
908 |
> |
memcpy(cutdetainl ,cutdetainlHyperTight4 ,sizeof(cutdetainlHyperTight4)); |
909 |
> |
memcpy(cutdphiin ,cutdphiinHyperTight4 ,sizeof(cutdphiinHyperTight4)); |
910 |
> |
memcpy(cutdphiinl ,cutdphiinlHyperTight4 ,sizeof(cutdphiinlHyperTight4)); |
911 |
> |
memcpy(cuteseedopcor ,cuteseedopcorHyperTight4 ,sizeof(cuteseedopcorHyperTight4)); |
912 |
> |
memcpy(cutfmishits ,cutfmishitsHyperTight4 ,sizeof(cutfmishitsHyperTight4)); |
913 |
> |
memcpy(cuthoe ,cuthoeHyperTight4 ,sizeof(cuthoeHyperTight4)); |
914 |
> |
memcpy(cuthoel ,cuthoelHyperTight4 ,sizeof(cuthoelHyperTight4)); |
915 |
> |
memcpy(cutip_gsf ,cutip_gsfHyperTight4 ,sizeof(cutip_gsfHyperTight4)); |
916 |
> |
memcpy(cutip_gsfl ,cutip_gsflHyperTight4 ,sizeof(cutip_gsflHyperTight4)); |
917 |
> |
memcpy(cutiso_sum ,cutiso_sumHyperTight4 ,sizeof(cutiso_sumHyperTight4)); |
918 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetHyperTight4 ,sizeof(cutiso_sumoetHyperTight4)); |
919 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlHyperTight4,sizeof(cutiso_sumoetlHyperTight4)); |
920 |
> |
memcpy(cutsee ,cutseeHyperTight4 ,sizeof(cutseeHyperTight4)); |
921 |
> |
memcpy(cutseel ,cutseelHyperTight4 ,sizeof(cutseelHyperTight4)); |
922 |
> |
} |
923 |
> |
else { |
924 |
> |
return 0; |
925 |
> |
} |
926 |
> |
int result = 0; |
927 |
|
|
928 |
< |
Double_t WantBin = kFALSE; |
929 |
< |
if(WantBin) { |
930 |
< |
if (scEt < 20.) |
931 |
< |
bin = 2; |
932 |
< |
else if (scEt > 30.) |
933 |
< |
bin = 0; |
934 |
< |
else |
935 |
< |
bin = 1; |
928 |
> |
const int ncuts = 10; |
929 |
> |
std::vector<bool> cut_results(ncuts, false); |
930 |
> |
|
931 |
> |
float iso_sum = tkIso + ecalIso + hcalIso; |
932 |
> |
if(fabs(scEta)>1.5) |
933 |
> |
iso_sum += (fabs(scEta)-1.5)*1.09; |
934 |
> |
|
935 |
> |
float iso_sumoet = iso_sum*(40./scEt); |
936 |
> |
|
937 |
> |
float eseedopincor = eSeedOverPin + fBrem; |
938 |
> |
if(fBrem < 0) |
939 |
> |
eseedopincor = eSeedOverPin; |
940 |
> |
|
941 |
> |
float dist = (TMath::Abs(ele->ConvPartnerDist()) == -9999.? 9999:TMath::Abs(ele->ConvPartnerDist())); |
942 |
> |
float dcot = (TMath::Abs(ele->ConvPartnerDCotTheta()) == -9999.? 9999:TMath::Abs(ele->ConvPartnerDCotTheta())); |
943 |
> |
|
944 |
> |
float dcotdistcomb = ((0.04 - std::max(dist, dcot)) > 0?(0.04 - std::max(dist, dcot)):0); |
945 |
> |
|
946 |
> |
Double_t ip = 99999; |
947 |
> |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
948 |
> |
if(vertices->At(i0)->NTracks() > 0){ |
949 |
> |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
950 |
> |
ip = TMath::Abs(pD0); |
951 |
> |
break; |
952 |
> |
} |
953 |
|
} |
954 |
|
|
955 |
< |
if (fBrem > 0) |
956 |
< |
eSeedOverPin = eSeedOverPin + fBrem; |
955 |
> |
for (int cut=0; cut<ncuts; cut++) { |
956 |
> |
switch (cut) { |
957 |
> |
case 0: |
958 |
> |
cut_results[cut] = compute_cut(fabs(deltaEtaIn), scEt, cutdetainl[cat], cutdetain[cat]); |
959 |
> |
break; |
960 |
> |
case 1: |
961 |
> |
cut_results[cut] = compute_cut(fabs(deltaPhiIn), scEt, cutdphiinl[cat], cutdphiin[cat]); |
962 |
> |
break; |
963 |
> |
case 2: |
964 |
> |
cut_results[cut] = (eseedopincor > cuteseedopcor[cat]); |
965 |
> |
break; |
966 |
> |
case 3: |
967 |
> |
cut_results[cut] = compute_cut(hOverE, scEt, cuthoel[cat], cuthoe[cat]); |
968 |
> |
break; |
969 |
> |
case 4: |
970 |
> |
cut_results[cut] = compute_cut(sigmaee, scEt, cutseel[cat], cutsee[cat]); |
971 |
> |
break; |
972 |
> |
case 5: |
973 |
> |
cut_results[cut] = compute_cut(iso_sumoet, scEt, cutiso_sumoetl[cat], cutiso_sumoet[cat]); |
974 |
> |
break; |
975 |
> |
case 6: |
976 |
> |
cut_results[cut] = (iso_sum < cutiso_sum[cat]); |
977 |
> |
break; |
978 |
> |
case 7: |
979 |
> |
cut_results[cut] = compute_cut(fabs(ip), scEt, cutip_gsfl[cat], cutip_gsf[cat]); |
980 |
> |
break; |
981 |
> |
case 8: |
982 |
> |
cut_results[cut] = (mishits < cutfmishits[cat]); |
983 |
> |
break; |
984 |
> |
case 9: |
985 |
> |
cut_results[cut] = (dcotdistcomb < cutdcotdist[cat]); |
986 |
> |
break; |
987 |
> |
} |
988 |
> |
} |
989 |
> |
|
990 |
> |
// ID part |
991 |
> |
if (cut_results[0] & cut_results[1] & cut_results[2] & cut_results[3] & cut_results[4]) |
992 |
> |
result = result + 1; |
993 |
> |
|
994 |
> |
// ISO part |
995 |
> |
if (cut_results[5] & cut_results[6]) |
996 |
> |
result = result + 2; |
997 |
> |
|
998 |
> |
// IP part |
999 |
> |
if (cut_results[7]) |
1000 |
> |
result = result + 8; |
1001 |
> |
|
1002 |
> |
// Conversion part |
1003 |
> |
if (cut_results[8] and cut_results[9]) |
1004 |
> |
result = result + 4; |
1005 |
> |
|
1006 |
> |
return result; |
1007 |
> |
} |
1008 |
|
|
1009 |
< |
if(typeCuts == 3 || typeCuts == 4){ |
1010 |
< |
// Loose robust cuts |
461 |
< |
Double_t robustlooseEleIDCuts[52] = { |
462 |
< |
0.05, 0.0103, 0.8, 0.00688, -1, -1, 7.33, 4.68, 9999., 9999., 9999.,9999., 9999.,9999., 9999., 9999.,9999., 9999., 0.000, -9999., 9999., 9999., 9999, -1, 0, 0, |
463 |
< |
0.0389, 0.0307, 0.7, 0.00944, -1, -1, 7.76, 3.09, 2.23, 9999., 9999.,9999., 9999.,9999., 9999., 9999.,9999., 9999., 0.000, -9999., 9999., 9999., 9999, -1, 0, 0 |
464 |
< |
}; |
465 |
< |
// Tight robust cuts |
466 |
< |
Double_t robusttightEleIDCuts[52] = { |
467 |
< |
0.0201, 0.0102, 0.0211, 0.00606, -1, -1, 2.34, 3.24, 4.51, 9999., 9999.,9999., 9999.,9999., 9999., 9999.,9999., 9999., 0.000, -9999., 9999., 9999., 9999, -1, 0, 0, |
468 |
< |
0.00253, 0.0291, 0.022, 0.0032, -1, -1, 0.826, 2.7, 0.255, 9999., 9999.,9999., 9999.,9999., 9999., 9999.,9999., 9999., 0.000, -9999., 9999., 9999., 9999, -1, 0, 0 |
469 |
< |
}; |
470 |
< |
Double_t cut[52]; |
471 |
< |
if (typeCuts == 3) { |
472 |
< |
memcpy(cut ,robustlooseEleIDCuts ,sizeof(cut)); |
473 |
< |
} |
474 |
< |
else { |
475 |
< |
memcpy(cut ,robusttightEleIDCuts ,sizeof(cut)); |
476 |
< |
} |
477 |
< |
|
478 |
< |
if ((tkIso > cut[26*eb+6]) || (ecalIso > cut[26*eb+7]) || (hcalIso > cut[26*eb+8]) || (hcalIso1 > cut[26*eb+9]) || (hcalIso2 > cut[26*eb+10]) || |
479 |
< |
(tkIso/ele->Pt() > cut[26*eb+11]) || (ecalIso/ele->Pt() > cut[26*eb+12]) || (hcalIso/ele->Pt() > cut[26*eb+13]) || |
480 |
< |
((tkIso+ecalIso+hcalIso)>cut[26*eb+14]) || (((tkIso+ecalIso+hcalIso)/ ele->Pt()) > cut[26*eb+15]) || |
481 |
< |
((tkIso+ecalIsoPed+hcalIso)>cut[26*eb+16]) || (((tkIso+ecalIsoPed+hcalIso)/ ele->Pt()) > cut[26*eb+17]) ) |
482 |
< |
result = 0.; |
483 |
< |
else |
484 |
< |
result = 2.; |
1009 |
> |
//-------------------------------------------------------------------------------------------------- |
1010 |
> |
bool ElectronTools::compute_cut(double x, double et, double cut_min, double cut_max, bool gtn) { |
1011 |
|
|
1012 |
< |
if (hOverE > cut[26*eb+0]) |
1013 |
< |
return result; |
1012 |
> |
float et_min = 10; |
1013 |
> |
float et_max = 40; |
1014 |
|
|
1015 |
< |
if (sigmaee > cut[26*eb+1]) |
1016 |
< |
return result; |
1015 |
> |
bool accept = false; |
1016 |
> |
float cut = cut_max; // the cut at et=40 GeV |
1017 |
|
|
1018 |
< |
if (fabs(deltaPhiIn) > cut[26*eb+2]) |
1019 |
< |
return result; |
1018 |
> |
if(et < et_max) { |
1019 |
> |
cut = cut_min + (1/et_min - 1/et)*(cut_max - cut_min)/(1/et_min - 1/et_max); |
1020 |
> |
} |
1021 |
> |
|
1022 |
> |
if(et < et_min) { |
1023 |
> |
cut = cut_min; |
1024 |
> |
} |
1025 |
> |
|
1026 |
> |
if(gtn) { // useful for e/p cut which is gt |
1027 |
> |
accept = (x >= cut); |
1028 |
> |
} |
1029 |
> |
else { |
1030 |
> |
accept = (x <= cut); |
1031 |
> |
} |
1032 |
|
|
1033 |
< |
if (fabs(deltaEtaIn) > cut[26*eb+3]) |
1034 |
< |
return result; |
497 |
< |
|
498 |
< |
if (e25Maxoe55 < cut[26*eb+4] && e15oe55 < cut[26*eb+5]) |
499 |
< |
return result; |
500 |
< |
// some extra electron id cuts |
501 |
< |
if (sigmaee < cut[26*eb+18]) // inverted sigmaee cut - spike removal related |
502 |
< |
return result; |
1033 |
> |
return accept; |
1034 |
> |
} |
1035 |
|
|
1036 |
< |
if ( eOverP < cut[26*eb+19] || eOverP > cut[26*eb+20]) // lower and upper cut in E/P |
1037 |
< |
return result; |
1038 |
< |
|
1039 |
< |
result = result + 1; |
1036 |
> |
//-------------------------------------------------------------------------------------------------- |
1037 |
> |
Double_t ElectronTools::Likelihood(ElectronLikelihood *LH, const Electron *ele) |
1038 |
> |
{ |
1039 |
> |
if (!LH) { |
1040 |
> |
std::cout << "Error: Likelihood not properly initialized\n"; |
1041 |
> |
return -9999; |
1042 |
> |
} |
1043 |
|
|
1044 |
< |
Double_t d0_real = 99999; |
1045 |
< |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
1046 |
< |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
1047 |
< |
if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0); |
1048 |
< |
} |
1049 |
< |
if (d0_real > cut[26*eb+21]) |
1050 |
< |
return result; |
1044 |
> |
LikelihoodMeasurements measurements; |
1045 |
> |
measurements.pt = ele->Pt(); |
1046 |
> |
if (ele->IsEB() && ele->AbsEta()<1.0) measurements.subdet = 0; |
1047 |
> |
else if (ele->IsEB()) measurements.subdet = 1; |
1048 |
> |
else measurements.subdet = 2; |
1049 |
> |
measurements.deltaPhi = TMath::Abs(ele->DeltaPhiSuperClusterTrackAtVtx()); |
1050 |
> |
measurements.deltaEta = TMath::Abs(ele->DeltaEtaSuperClusterTrackAtVtx()); |
1051 |
> |
measurements.eSeedClusterOverPout = ele->ESeedClusterOverPout(); |
1052 |
> |
measurements.eSuperClusterOverP = ele->ESuperClusterOverP(); |
1053 |
> |
measurements.hadronicOverEm = ele->HadronicOverEm(); |
1054 |
> |
measurements.sigmaIEtaIEta = ele->CoviEtaiEta(); |
1055 |
> |
measurements.sigmaIPhiIPhi = TMath::Sqrt(ele->SCluster()->Seed()->CoviPhiiPhi()); |
1056 |
> |
measurements.fBrem = ele->FBrem(); |
1057 |
> |
measurements.nBremClusters = ele->NumberOfClusters() - 1; |
1058 |
> |
//measurements.OneOverEMinusOneOverP = (1.0 / ele->SCluster()->Energy()) - (1.0 / ele->BestTrk()->P()); |
1059 |
> |
measurements.OneOverEMinusOneOverP = (1.0 / ele->ESuperClusterOverP() / ele->BestTrk()->P()) - (1.0 / ele->BestTrk()->P()); |
1060 |
> |
double likelihood = LH->result(measurements); |
1061 |
> |
|
1062 |
> |
double newLik = 0.0; |
1063 |
> |
if (likelihood<=0) newLik = -20.0; |
1064 |
> |
else if(likelihood>=1) newLik = 20.0; |
1065 |
> |
else newLik = log(likelihood/(1.0-likelihood)); |
1066 |
> |
|
1067 |
> |
Bool_t isDebug = kFALSE; |
1068 |
> |
if(isDebug == kTRUE){ |
1069 |
> |
printf("LIKELIHOOD: %f %d %f %f %f %f %f %f %f %f %d %f %f %f - %f %f\n",measurements.pt,measurements.subdet, |
1070 |
> |
measurements.deltaPhi ,measurements.deltaEta ,measurements.eSeedClusterOverPout, |
1071 |
> |
measurements.eSuperClusterOverP,measurements.hadronicOverEm,measurements.sigmaIEtaIEta, |
1072 |
> |
measurements.sigmaIPhiIPhi ,measurements.fBrem ,measurements.nBremClusters, |
1073 |
> |
measurements.OneOverEMinusOneOverP,ele->SCluster()->Energy(),ele->BestTrk()->P(), |
1074 |
> |
likelihood,newLik); |
1075 |
> |
} |
1076 |
> |
|
1077 |
> |
return newLik; |
1078 |
|
|
1079 |
< |
if (mishits > cut[26*eb+22]) // expected missing hits |
1080 |
< |
return result; |
1079 |
> |
} |
1080 |
> |
|
1081 |
> |
Double_t ElectronTools::ElectronEffectiveArea(EElectronEffectiveAreaType type, Double_t SCEta, EElectronEffectiveAreaTarget EffectiveAreaTarget) { |
1082 |
|
|
1083 |
< |
Bool_t passConvVeto = PassConversionFilter(ele, conversions, kTRUE); |
1084 |
< |
if (passConvVeto == kFALSE) |
1085 |
< |
return result; |
1086 |
< |
|
1087 |
< |
result += 4; |
1088 |
< |
} |
1089 |
< |
else if(typeCuts == 0 || typeCuts == 1 || typeCuts == 2){ |
1090 |
< |
// Loose cuts |
1091 |
< |
Double_t cutdcotdistLoose[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
1092 |
< |
}; |
1093 |
< |
Double_t cutdetainLoose[9] = {1.30e-02, 5.95e-03, 3.10e-02, 1.68e-02, 8.44e-03, 1.70e-02, 1.55e-02, 5.13e-02, 1.61e-02 |
1094 |
< |
}; |
1095 |
< |
Double_t cutdphiinLoose[9] = {7.51e-02, 3.30e-01, 4.20e-01, 9.86e-02, 2.84e-01, 3.28e-01, 3.77e-01, 4.32e-01, 3.74e-01 |
1096 |
< |
}; |
1097 |
< |
Double_t cuteseedopcorLoose[9] = {6.31e-01, 3.02e-01, 3.04e-01, 8.10e-01, 2.23e-01, 5.03e-01, 2.78e-01, 3.10e-01, 4.69e-01 |
1098 |
< |
}; |
1099 |
< |
Double_t cutetLoose[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0. |
1100 |
< |
}; |
1101 |
< |
Double_t cutfmishitsLoose[9] = {4.50e+00, 1.50e+00, 1.50e+00, 2.50e+00, 2.50e+00, 1.50e+00, 2.50e+00, 4.50e+00, 5.00e-01 |
1102 |
< |
}; |
1103 |
< |
Double_t cuthoeLoose[9] = {2.47e-01, 7.78e-02, 1.49e-01, 3.82e-01, 4.70e-02, 1.12e-01, 1.16e+00, 5.04e+00, 1.35e+00 |
1104 |
< |
}; |
1105 |
< |
Double_t cutip_gsfLoose[9] = {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 |
1106 |
< |
}; |
1107 |
< |
Double_t cutiso_sumLoose[9] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 |
1108 |
< |
}; |
1109 |
< |
Double_t cutiso_sumoetLoose[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
1110 |
< |
}; |
1111 |
< |
Double_t cutseeLoose[9] = {1.92e-02, 1.31e-02, 2.53e-02, 5.27e-02, 3.29e-02, 4.19e-02, 2.65e-02, 6.58e-02, 1.38e-01 |
1112 |
< |
}; |
1113 |
< |
|
1114 |
< |
// Medium cuts |
1115 |
< |
Double_t cutdcotdistMedium[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
1116 |
< |
}; |
1117 |
< |
Double_t cutdetainMedium[9] = {1.19e-02, 4.20e-03, 1.07e-02, 1.49e-02, 6.56e-03, 1.19e-02, 1.16e-02, 5.13e-02, 6.37e-03 |
1118 |
< |
}; |
1119 |
< |
Double_t cutdphiinMedium[9] = {7.51e-02, 2.93e-01, 3.58e-01, 9.53e-02, 1.62e-01, 2.99e-01, 2.76e-01, 4.32e-01, 2.57e-01 |
1120 |
< |
}; |
1121 |
< |
Double_t cuteseedopcorMedium[9] = {6.31e-01, 8.14e-01, 7.60e-01, 8.18e-01, 7.56e-01, 5.35e-01, 6.20e-01, 7.88e-01, 8.85e-01 |
1122 |
< |
}; |
1123 |
< |
Double_t cutetMedium[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0. |
1124 |
< |
}; |
1125 |
< |
Double_t cutfmishitsMedium[9] = {1.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 2.50e+00, 1.50e+00, 5.00e-01 |
1126 |
< |
}; |
1127 |
< |
Double_t cuthoeMedium[9] = {2.46e-01, 6.80e-02, 1.35e-01, 3.73e-01, 2.33e-02, 5.58e-02, 8.80e-01, 5.04e+00, 3.78e-02 |
1128 |
< |
}; |
1129 |
< |
Double_t cutip_gsfMedium[9] = {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 |
1130 |
< |
}; |
1131 |
< |
Double_t cutiso_sumMedium[9] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 |
1132 |
< |
}; |
1133 |
< |
Double_t cutiso_sumoetMedium[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
1134 |
< |
}; |
1135 |
< |
Double_t cutseeMedium[9] = {1.92e-02, 1.13e-02, 1.47e-02, 3.84e-02, 3.05e-02, 3.36e-02, 1.35e-02, 5.05e-02, 2.79e-02 |
1136 |
< |
}; |
1137 |
< |
|
1138 |
< |
// Tight cuts |
1139 |
< |
Double_t cutdcotdistTight[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
1140 |
< |
}; |
1141 |
< |
Double_t cutdetainTight[9] = {9.28e-03, 3.56e-03, 7.16e-03, 1.31e-02, 5.81e-03, 9.79e-03, 1.15e-02, 1.66e-02, 3.19e-03 |
1142 |
< |
}; |
1143 |
< |
Double_t cutdphiinTight[9] = {4.66e-02, 7.80e-02, 2.64e-01, 4.42e-02, 3.20e-02, 2.37e-01, 8.25e-02, 2.07e-01, 5.39e-02 |
1144 |
< |
}; |
1145 |
< |
Double_t cuteseedopcorTight[9] = {6.48e-01, 8.97e-01, 8.91e-01, 8.39e-01, 8.35e-01, 6.49e-01, 6.76e-01, 8.70e-01, 9.91e-01 |
1146 |
< |
}; |
1147 |
< |
Double_t cutetTight[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0. |
1148 |
< |
}; |
1149 |
< |
Double_t cutfmishitsTight[9] = {1.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 1.50e+00, 5.00e-01, 2.50e+00, 5.00e-01, 5.00e-01 |
1150 |
< |
}; |
1151 |
< |
Double_t cuthoeTight[9] = {9.94e-02, 5.61e-02, 1.05e-01, 9.73e-02, 1.81e-02, 3.06e-02, 5.57e-01, 5.04e+00, 1.06e-03 |
1152 |
< |
}; |
1153 |
< |
Double_t cutip_gsfTight[9] = {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 |
1154 |
< |
}; |
1155 |
< |
Double_t cutiso_sumTight[9] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 |
1156 |
< |
}; |
1157 |
< |
Double_t cutiso_sumoetTight[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
1158 |
< |
}; |
1159 |
< |
Double_t cutseeTight[9] = {1.56e-02, 1.07e-02, 1.23e-02, 3.35e-02, 2.98e-02, 3.06e-02, 1.07e-02, 3.79e-02, 1.01e-02 |
1160 |
< |
}; |
1161 |
< |
|
1162 |
< |
Double_t cutdcotdist[9]; |
1163 |
< |
Double_t cutdetain[9]; |
1164 |
< |
Double_t cutdphiin[9]; |
1165 |
< |
Double_t cuteseedopcor[9]; |
1166 |
< |
Double_t cutet[9]; |
1167 |
< |
Double_t cutfmishits[9]; |
1168 |
< |
Double_t cuthoe[9]; |
1169 |
< |
Double_t cutip_gsf[9]; |
1170 |
< |
Double_t cutiso_sum[9]; |
1171 |
< |
Double_t cutiso_sumoet[9]; |
1172 |
< |
Double_t cutsee[9]; |
1173 |
< |
if (typeCuts == 0) { |
1174 |
< |
memcpy(cutdcotdist ,cutdcotdistLoose ,sizeof(cutdcotdistLoose)); |
1175 |
< |
memcpy(cutdetain ,cutdetainLoose ,sizeof(cutdetainLoose)); |
1176 |
< |
memcpy(cutdphiin ,cutdphiinLoose ,sizeof(cutdphiinLoose)); |
1177 |
< |
memcpy(cuteseedopcor,cuteseedopcorLoose,sizeof(cuteseedopcorLoose)); |
1178 |
< |
memcpy(cutet ,cutetLoose ,sizeof(cutetLoose)); |
1179 |
< |
memcpy(cutfmishits ,cutfmishitsLoose ,sizeof(cutfmishitsLoose)); |
1180 |
< |
memcpy(cuthoe ,cuthoeLoose ,sizeof(cuthoeLoose)); |
1181 |
< |
memcpy(cutip_gsf ,cutip_gsfLoose ,sizeof(cutip_gsfLoose)); |
1182 |
< |
memcpy(cutiso_sum ,cutiso_sumLoose ,sizeof(cutiso_sumLoose)); |
1183 |
< |
memcpy(cutiso_sumoet,cutiso_sumoetLoose,sizeof(cutiso_sumoetLoose)); |
1184 |
< |
memcpy(cutsee ,cutseeLoose ,sizeof(cutseeLoose)); |
1185 |
< |
} |
1186 |
< |
else if(typeCuts == 1) { |
1187 |
< |
memcpy(cutdcotdist ,cutdcotdistMedium ,sizeof(cutdcotdistMedium)); |
1188 |
< |
memcpy(cutdetain ,cutdetainMedium ,sizeof(cutdetainMedium)); |
1189 |
< |
memcpy(cutdphiin ,cutdphiinMedium ,sizeof(cutdphiinMedium)); |
1190 |
< |
memcpy(cuteseedopcor,cuteseedopcorMedium,sizeof(cuteseedopcorMedium)); |
1191 |
< |
memcpy(cutet ,cutetMedium ,sizeof(cutetMedium)); |
1192 |
< |
memcpy(cutfmishits ,cutfmishitsMedium ,sizeof(cutfmishitsMedium)); |
1193 |
< |
memcpy(cuthoe ,cuthoeMedium ,sizeof(cuthoeMedium)); |
1194 |
< |
memcpy(cutip_gsf ,cutip_gsfMedium ,sizeof(cutip_gsfMedium)); |
1195 |
< |
memcpy(cutiso_sum ,cutiso_sumMedium ,sizeof(cutiso_sumMedium)); |
1196 |
< |
memcpy(cutiso_sumoet,cutiso_sumoetMedium,sizeof(cutiso_sumoetMedium)); |
1197 |
< |
memcpy(cutsee ,cutseeMedium ,sizeof(cutseeMedium)); |
1198 |
< |
} |
1199 |
< |
else { |
1200 |
< |
memcpy(cutdcotdist ,cutdcotdistTight ,sizeof(cutdcotdistTight)); |
1201 |
< |
memcpy(cutdetain ,cutdetainTight ,sizeof(cutdetainTight)); |
1202 |
< |
memcpy(cutdphiin ,cutdphiinTight ,sizeof(cutdphiinTight)); |
1203 |
< |
memcpy(cuteseedopcor,cuteseedopcorTight,sizeof(cuteseedopcorTight)); |
1204 |
< |
memcpy(cutet ,cutetTight ,sizeof(cutetTight)); |
1205 |
< |
memcpy(cutfmishits ,cutfmishitsTight ,sizeof(cutfmishitsTight)); |
1206 |
< |
memcpy(cuthoe ,cuthoeTight ,sizeof(cuthoeTight)); |
1207 |
< |
memcpy(cutip_gsf ,cutip_gsfTight ,sizeof(cutip_gsfTight)); |
1208 |
< |
memcpy(cutiso_sum ,cutiso_sumTight ,sizeof(cutiso_sumTight)); |
1209 |
< |
memcpy(cutiso_sumoet,cutiso_sumoetTight,sizeof(cutiso_sumoetTight)); |
1210 |
< |
memcpy(cutsee ,cutseeTight ,sizeof(cutseeTight)); |
1211 |
< |
} |
1212 |
< |
|
1213 |
< |
// CAREFUL, I HAVE COMMENTED OUT WHAT SANI IS DOING |
1214 |
< |
//Double_t iso_sum = tkIso + ecalIso + hcalIso; |
1215 |
< |
Double_t iso_sum = (ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr03() + |
1216 |
< |
ele->HcalTowerSumEtDr03() - 1.0) / ele->Pt(); |
1217 |
< |
Double_t iso_sum_corrected = iso_sum*pow(40./scEt, 2); |
1218 |
< |
if ((iso_sum < cutiso_sum[cat+bin*9]) && |
1219 |
< |
(iso_sum_corrected < cutiso_sumoet[cat+bin*9])) |
1220 |
< |
result += 2; |
1221 |
< |
|
1222 |
< |
if (fBrem > -2) { |
1223 |
< |
if ((hOverE < cuthoe[cat+bin*9]) and |
1224 |
< |
(sigmaee < cutsee[cat+bin*9]) and |
1225 |
< |
(fabs(deltaPhiIn) < cutdphiin[cat+bin*9]) and |
1226 |
< |
(fabs(deltaEtaIn) < cutdetain[cat+bin*9]) and |
1227 |
< |
(eSeedOverPin > cuteseedopcor[cat+bin*9]) and |
1228 |
< |
(scEt > cutet[cat+bin*9])) |
1229 |
< |
result += 1.; |
1083 |
> |
Double_t EffectiveArea = 0; |
1084 |
> |
|
1085 |
> |
if(type == ElectronTools::kEleNeutralIso04){ |
1086 |
> |
if (fabs(SCEta) < 1.0 ) EffectiveArea = 0.19; |
1087 |
> |
else if(fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.25; |
1088 |
> |
else if(fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.000 ) EffectiveArea = 0.12; |
1089 |
> |
else if(fabs(SCEta) >= 2.000 && fabs(SCEta) < 2.200 ) EffectiveArea = 0.21; |
1090 |
> |
else if(fabs(SCEta) >= 2.200 && fabs(SCEta) < 2.300 ) EffectiveArea = 0.27; |
1091 |
> |
else if(fabs(SCEta) >= 2.300 && fabs(SCEta) < 2.400 ) EffectiveArea = 0.44; |
1092 |
> |
else EffectiveArea = 0.52; |
1093 |
> |
return EffectiveArea; |
1094 |
> |
} |
1095 |
> |
|
1096 |
> |
if (fabs(SCEta) < 1.0) { |
1097 |
> |
if (type == ElectronTools::kEleChargedIso03) EffectiveArea = 0.000; |
1098 |
> |
if (type == ElectronTools::kEleNeutralHadronIso03) EffectiveArea = 0.017; |
1099 |
> |
if (type == ElectronTools::kEleGammaIso03) EffectiveArea = 0.045; |
1100 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.014; |
1101 |
> |
if (type == ElectronTools::kEleChargedIso04) EffectiveArea = 0.000; |
1102 |
> |
if (type == ElectronTools::kEleNeutralHadronIso04) EffectiveArea = 0.034; |
1103 |
> |
if (type == ElectronTools::kEleGammaIso04) EffectiveArea = 0.079; |
1104 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.014; |
1105 |
> |
if (type == ElectronTools::kEleNeutralHadronIso007) EffectiveArea = 0.000; |
1106 |
> |
if (type == ElectronTools::kEleHoverE) EffectiveArea = 0.00016; |
1107 |
> |
if (type == ElectronTools::kEleHcalDepth1OverEcal) EffectiveArea = 0.00016; |
1108 |
> |
if (type == ElectronTools::kEleHcalDepth2OverEcal) EffectiveArea = 0.00000; |
1109 |
> |
} else if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) { |
1110 |
> |
if (type == ElectronTools::kEleChargedIso03) EffectiveArea = 0.000; |
1111 |
> |
if (type == ElectronTools::kEleNeutralHadronIso03) EffectiveArea = 0.025; |
1112 |
> |
if (type == ElectronTools::kEleGammaIso03) EffectiveArea = 0.052; |
1113 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.030; |
1114 |
> |
if (type == ElectronTools::kEleChargedIso04) EffectiveArea = 0.000; |
1115 |
> |
if (type == ElectronTools::kEleNeutralHadronIso04) EffectiveArea = 0.050; |
1116 |
> |
if (type == ElectronTools::kEleGammaIso04) EffectiveArea = 0.073; |
1117 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.030; |
1118 |
> |
if (type == ElectronTools::kEleNeutralHadronIso007) EffectiveArea = 0.000; |
1119 |
> |
if (type == ElectronTools::kEleHoverE) EffectiveArea = 0.00022; |
1120 |
> |
if (type == ElectronTools::kEleHcalDepth1OverEcal) EffectiveArea = 0.00022; |
1121 |
> |
if (type == ElectronTools::kEleHcalDepth2OverEcal) EffectiveArea = 0.00000; |
1122 |
> |
} else if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) { |
1123 |
> |
if (type == ElectronTools::kEleChargedIso03) EffectiveArea = 0.000; |
1124 |
> |
if (type == ElectronTools::kEleNeutralHadronIso03) EffectiveArea = 0.030; |
1125 |
> |
if (type == ElectronTools::kEleGammaIso03) EffectiveArea = 0.170; |
1126 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.134; |
1127 |
> |
if (type == ElectronTools::kEleChargedIso04) EffectiveArea = 0.000; |
1128 |
> |
if (type == ElectronTools::kEleNeutralHadronIso04) EffectiveArea = 0.060; |
1129 |
> |
if (type == ElectronTools::kEleGammaIso04) EffectiveArea = 0.187; |
1130 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.134; |
1131 |
> |
if (type == ElectronTools::kEleNeutralHadronIso007) EffectiveArea = 0.000; |
1132 |
> |
if (type == ElectronTools::kEleHoverE) EffectiveArea = 0.00030; |
1133 |
> |
if (type == ElectronTools::kEleHcalDepth1OverEcal) EffectiveArea = 0.00026; |
1134 |
> |
if (type == ElectronTools::kEleHcalDepth2OverEcal) EffectiveArea = 0.00002; |
1135 |
> |
} else if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.25 ) { |
1136 |
> |
if (type == ElectronTools::kEleChargedIso03) EffectiveArea = 0.000; |
1137 |
> |
if (type == ElectronTools::kEleNeutralHadronIso03) EffectiveArea = 0.022; |
1138 |
> |
if (type == ElectronTools::kEleGammaIso03) EffectiveArea = 0.623; |
1139 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 0.516; |
1140 |
> |
if (type == ElectronTools::kEleChargedIso04) EffectiveArea = 0.000; |
1141 |
> |
if (type == ElectronTools::kEleNeutralHadronIso04) EffectiveArea = 0.055; |
1142 |
> |
if (type == ElectronTools::kEleGammaIso04) EffectiveArea = 0.659; |
1143 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 0.517; |
1144 |
> |
if (type == ElectronTools::kEleNeutralHadronIso007) EffectiveArea = 0.000; |
1145 |
> |
if (type == ElectronTools::kEleHoverE) EffectiveArea = 0.00054; |
1146 |
> |
if (type == ElectronTools::kEleHcalDepth1OverEcal) EffectiveArea = 0.00045; |
1147 |
> |
if (type == ElectronTools::kEleHcalDepth2OverEcal) EffectiveArea = 0.00003; |
1148 |
> |
} else if (fabs(SCEta) >= 2.25 && fabs(SCEta) < 2.5 ) { |
1149 |
> |
if (type == ElectronTools::kEleChargedIso03) EffectiveArea = 0.000; |
1150 |
> |
if (type == ElectronTools::kEleNeutralHadronIso03) EffectiveArea = 0.018; |
1151 |
> |
if (type == ElectronTools::kEleGammaIso03) EffectiveArea = 1.198; |
1152 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip03) EffectiveArea = 1.049; |
1153 |
> |
if (type == ElectronTools::kEleChargedIso04) EffectiveArea = 0.000; |
1154 |
> |
if (type == ElectronTools::kEleNeutralHadronIso04) EffectiveArea = 0.073; |
1155 |
> |
if (type == ElectronTools::kEleGammaIso04) EffectiveArea = 1.258; |
1156 |
> |
if (type == ElectronTools::kEleGammaIsoVetoEtaStrip04) EffectiveArea = 1.051; |
1157 |
> |
if (type == ElectronTools::kEleNeutralHadronIso007) EffectiveArea = 0.000; |
1158 |
> |
if (type == ElectronTools::kEleHoverE) EffectiveArea = 0.00082; |
1159 |
> |
if (type == ElectronTools::kEleHcalDepth1OverEcal) EffectiveArea = 0.00066; |
1160 |
> |
if (type == ElectronTools::kEleHcalDepth2OverEcal) EffectiveArea = 0.00004; |
1161 |
> |
} |
1162 |
> |
|
1163 |
> |
//NoCorrections |
1164 |
> |
if (EffectiveAreaTarget == kEleEANoCorr) { |
1165 |
> |
return 0.0; |
1166 |
> |
} |
1167 |
> |
else if (EffectiveAreaTarget == kEleEAData2012) { |
1168 |
> |
if (type == kEleGammaIso03) { |
1169 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.122; |
1170 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.147; |
1171 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.055; |
1172 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.106; |
1173 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.138; |
1174 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.221; |
1175 |
> |
if (fabs(SCEta) >= 2.4 ) EffectiveArea = 0.211; |
1176 |
> |
} |
1177 |
> |
if (type == kEleGammaIso04) { |
1178 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.176; |
1179 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.206; |
1180 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.094; |
1181 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.172; |
1182 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.244; |
1183 |
> |
if (fabs(SCEta) >= 2.4 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.333; |
1184 |
> |
if (fabs(SCEta) >= 2.4 ) EffectiveArea = 0.348; |
1185 |
> |
} |
1186 |
> |
if (type == kEleNeutralHadronIso03) { |
1187 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.013; |
1188 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.021; |
1189 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.013; |
1190 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.010; |
1191 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.024; |
1192 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.020; |
1193 |
> |
if (fabs(SCEta) >= 2.4 ) EffectiveArea = 0.019; |
1194 |
> |
} |
1195 |
> |
if (type == kEleNeutralHadronIso04) { |
1196 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.022; |
1197 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.036; |
1198 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.027; |
1199 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.028; |
1200 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.052; |
1201 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.063; |
1202 |
> |
if (fabs(SCEta) >= 2.4 ) EffectiveArea = 0.028; |
1203 |
> |
} |
1204 |
> |
if (type == kEleGammaAndNeutralHadronIso04) { |
1205 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.19; |
1206 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.25; |
1207 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.12; |
1208 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.21; |
1209 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.27; |
1210 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.44; |
1211 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.52; |
1212 |
> |
} |
1213 |
> |
if (type == kEleGammaIsoDR0p0To0p1) { |
1214 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.051; |
1215 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.032; |
1216 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.006; |
1217 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.007; |
1218 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.024; |
1219 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.013; |
1220 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.013; |
1221 |
> |
} |
1222 |
> |
if (type == kEleGammaIsoDR0p1To0p2) { |
1223 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.013; |
1224 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.013; |
1225 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.021; |
1226 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.052; |
1227 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.066; |
1228 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.043; |
1229 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.102; |
1230 |
> |
} |
1231 |
> |
if (type == kEleGammaIsoDR0p2To0p3) { |
1232 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.026; |
1233 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.017; |
1234 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.012; |
1235 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.028; |
1236 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.041; |
1237 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.034; |
1238 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.042; |
1239 |
> |
} |
1240 |
> |
if (type == kEleGammaIsoDR0p3To0p4) { |
1241 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.039; |
1242 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.032; |
1243 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.017; |
1244 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.024; |
1245 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.053; |
1246 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.059; |
1247 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.069; |
1248 |
> |
} |
1249 |
> |
if (type == kEleGammaIsoDR0p4To0p5) { |
1250 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.059; |
1251 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.045; |
1252 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.033; |
1253 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.043; |
1254 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.056; |
1255 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.065; |
1256 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.074; |
1257 |
|
} |
1258 |
+ |
if (type == kEleNeutralHadronIsoDR0p0To0p1) { |
1259 |
+ |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.001; |
1260 |
+ |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.006; |
1261 |
+ |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.001; |
1262 |
+ |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.000; |
1263 |
+ |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.001; |
1264 |
+ |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.003; |
1265 |
+ |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.008; |
1266 |
+ |
} |
1267 |
+ |
if (type == kEleNeutralHadronIsoDR0p1To0p2) { |
1268 |
+ |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.002; |
1269 |
+ |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.001; |
1270 |
+ |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.004; |
1271 |
+ |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.003; |
1272 |
+ |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.005; |
1273 |
+ |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.006; |
1274 |
+ |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.010; |
1275 |
+ |
} |
1276 |
+ |
if (type == kEleNeutralHadronIsoDR0p2To0p3) { |
1277 |
+ |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.007; |
1278 |
+ |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.010; |
1279 |
+ |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.009; |
1280 |
+ |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.009; |
1281 |
+ |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.007; |
1282 |
+ |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.018; |
1283 |
+ |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.028; |
1284 |
+ |
} |
1285 |
+ |
if (type == kEleNeutralHadronIsoDR0p3To0p4) { |
1286 |
+ |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.010; |
1287 |
+ |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.011; |
1288 |
+ |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.012; |
1289 |
+ |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.008; |
1290 |
+ |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.018; |
1291 |
+ |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.026; |
1292 |
+ |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.063; |
1293 |
+ |
} |
1294 |
+ |
if (type == kEleNeutralHadronIsoDR0p4To0p5) { |
1295 |
+ |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.011; |
1296 |
+ |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.012; |
1297 |
+ |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.016; |
1298 |
+ |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.023; |
1299 |
+ |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.038; |
1300 |
+ |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.051; |
1301 |
+ |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.143; |
1302 |
+ |
} |
1303 |
+ |
} |
1304 |
|
|
1305 |
< |
Double_t d0_real = 99999; |
1306 |
< |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
1307 |
< |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
1308 |
< |
if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0); |
1305 |
> |
//2011 Data Effective Areas |
1306 |
> |
else if (EffectiveAreaTarget == kEleEAData2011) { |
1307 |
> |
if (type == kEleGammaAndNeutralHadronIso03) { |
1308 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.100; |
1309 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.120; |
1310 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.085; |
1311 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.110; |
1312 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.120; |
1313 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.120; |
1314 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.130; |
1315 |
> |
} |
1316 |
> |
if (type == kEleGammaAndNeutralHadronIso04) { |
1317 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.180; |
1318 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.200; |
1319 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.150; |
1320 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.190; |
1321 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.210; |
1322 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.220; |
1323 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.290; |
1324 |
> |
} |
1325 |
> |
if (type == kEleGammaIsoDR0p0To0p1) { |
1326 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.017; |
1327 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.033; |
1328 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.005; |
1329 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.007; |
1330 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.004; |
1331 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.000; |
1332 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.000; |
1333 |
> |
} |
1334 |
> |
if (type == kEleGammaIsoDR0p1To0p2) { |
1335 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.010; |
1336 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.010; |
1337 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.019; |
1338 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.042; |
1339 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.041; |
1340 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.035; |
1341 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.041; |
1342 |
> |
} |
1343 |
> |
if (type == kEleGammaIsoDR0p2To0p3) { |
1344 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.020; |
1345 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.017; |
1346 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.014; |
1347 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.029; |
1348 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.039; |
1349 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.042; |
1350 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.048; |
1351 |
> |
} |
1352 |
> |
if (type == kEleGammaIsoDR0p3To0p4) { |
1353 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.036; |
1354 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.029; |
1355 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.020; |
1356 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.029; |
1357 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.042; |
1358 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.047; |
1359 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.054; |
1360 |
> |
} |
1361 |
> |
if (type == kEleGammaIsoDR0p4To0p5) { |
1362 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.051; |
1363 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.038; |
1364 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.028; |
1365 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.036; |
1366 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.047; |
1367 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.057; |
1368 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.059; |
1369 |
|
} |
1370 |
< |
if (d0_real < cutip_gsf[cat+bin*9]) |
1371 |
< |
result += 4; |
1370 |
> |
if (type == kEleNeutralHadronIsoDR0p0To0p1) { |
1371 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.001; |
1372 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.002; |
1373 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.002; |
1374 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.000; |
1375 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.000; |
1376 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.000; |
1377 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.000; |
1378 |
> |
} |
1379 |
> |
if (type == kEleNeutralHadronIsoDR0p1To0p2) { |
1380 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.005; |
1381 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.008; |
1382 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.008; |
1383 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.006; |
1384 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.003; |
1385 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.001; |
1386 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.003; |
1387 |
> |
} |
1388 |
> |
if (type == kEleNeutralHadronIsoDR0p2To0p3) { |
1389 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.010; |
1390 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.014; |
1391 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.017; |
1392 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.016; |
1393 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.016; |
1394 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.016; |
1395 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.019; |
1396 |
> |
} |
1397 |
> |
if (type == kEleNeutralHadronIsoDR0p3To0p4) { |
1398 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.015; |
1399 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.021; |
1400 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.025; |
1401 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.030; |
1402 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.036; |
1403 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.038; |
1404 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.084; |
1405 |
> |
} |
1406 |
> |
if (type == kEleNeutralHadronIsoDR0p4To0p5) { |
1407 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.020; |
1408 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.027; |
1409 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.035; |
1410 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.045; |
1411 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.051; |
1412 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.107; |
1413 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.228; |
1414 |
> |
} |
1415 |
> |
} |
1416 |
|
|
1417 |
< |
Bool_t passConvVeto = PassConversionFilter(ele, conversions, kTRUE); |
1418 |
< |
if (mishits < cutfmishits[cat+bin*9] && |
1419 |
< |
passConvVeto) |
1420 |
< |
result += 8; |
1421 |
< |
} // classbased |
1417 |
> |
//Summer11 MC Effective Areas |
1418 |
> |
else if (EffectiveAreaTarget == kEleEASummer11MC) { |
1419 |
> |
if (type == kEleGammaIsoDR0p0To0p1) { |
1420 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.015; |
1421 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.030; |
1422 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.004; |
1423 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.010; |
1424 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.014; |
1425 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.024; |
1426 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.023; |
1427 |
> |
} |
1428 |
> |
if (type == kEleGammaIsoDR0p1To0p2) { |
1429 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.012; |
1430 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.010; |
1431 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.009; |
1432 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.037; |
1433 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.046; |
1434 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.055; |
1435 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.046; |
1436 |
> |
} |
1437 |
> |
if (type == kEleGammaIsoDR0p2To0p3) { |
1438 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.021; |
1439 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.018; |
1440 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.013; |
1441 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.026; |
1442 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.038; |
1443 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.045; |
1444 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.059; |
1445 |
> |
} |
1446 |
> |
if (type == kEleGammaIsoDR0p3To0p4) { |
1447 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.036; |
1448 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.030; |
1449 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.017; |
1450 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.036; |
1451 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.058; |
1452 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.073; |
1453 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.083; |
1454 |
> |
} |
1455 |
> |
if (type == kEleGammaIsoDR0p4To0p5) { |
1456 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.053; |
1457 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.037; |
1458 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.032; |
1459 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.048; |
1460 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.062; |
1461 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.085; |
1462 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.118; |
1463 |
> |
} |
1464 |
> |
if (type == kEleNeutralHadronIsoDR0p0To0p1) { |
1465 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.000; |
1466 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.000; |
1467 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.000; |
1468 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.000; |
1469 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.000; |
1470 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.000; |
1471 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.000; |
1472 |
> |
} |
1473 |
> |
if (type == kEleNeutralHadronIsoDR0p1To0p2) { |
1474 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.004; |
1475 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.007; |
1476 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.009; |
1477 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.004; |
1478 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.003; |
1479 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.000; |
1480 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.004; |
1481 |
> |
} |
1482 |
> |
if (type == kEleNeutralHadronIsoDR0p2To0p3) { |
1483 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.008; |
1484 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.013; |
1485 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.016; |
1486 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.013; |
1487 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.014; |
1488 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.016; |
1489 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.021; |
1490 |
> |
} |
1491 |
> |
if (type == kEleNeutralHadronIsoDR0p3To0p4) { |
1492 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.012; |
1493 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.017; |
1494 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.020; |
1495 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.024; |
1496 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.040; |
1497 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.036; |
1498 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.086; |
1499 |
> |
} |
1500 |
> |
if (type == kEleNeutralHadronIsoDR0p4To0p5) { |
1501 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.016; |
1502 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.026; |
1503 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.030; |
1504 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.038; |
1505 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.051; |
1506 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.105; |
1507 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.169; |
1508 |
> |
} |
1509 |
> |
} |
1510 |
> |
|
1511 |
> |
//Fall11 MC Effective Areas |
1512 |
> |
else if (EffectiveAreaTarget == kEleEAFall11MC) { |
1513 |
> |
if (type == kEleGammaIsoDR0p0To0p1) { |
1514 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.014; |
1515 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.020; |
1516 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.004; |
1517 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.012; |
1518 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.016; |
1519 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.021; |
1520 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.012; |
1521 |
> |
} |
1522 |
> |
if (type == kEleGammaIsoDR0p1To0p2) { |
1523 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.012; |
1524 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.011; |
1525 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.015; |
1526 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.042; |
1527 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.055; |
1528 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.068; |
1529 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.067; |
1530 |
> |
} |
1531 |
> |
if (type == kEleGammaIsoDR0p2To0p3) { |
1532 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.024; |
1533 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.020; |
1534 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.017; |
1535 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.038; |
1536 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.051; |
1537 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.066; |
1538 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.080; |
1539 |
> |
} |
1540 |
> |
if (type == kEleGammaIsoDR0p3To0p4) { |
1541 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.040; |
1542 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.032; |
1543 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.021; |
1544 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.047; |
1545 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.066; |
1546 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.083; |
1547 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.123; |
1548 |
> |
} |
1549 |
> |
if (type == kEleGammaIsoDR0p4To0p5) { |
1550 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.059; |
1551 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.041; |
1552 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.037; |
1553 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.057; |
1554 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.095; |
1555 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.123; |
1556 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.133; |
1557 |
> |
} |
1558 |
> |
if (type == kEleNeutralHadronIsoDR0p0To0p1) { |
1559 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.002; |
1560 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.003; |
1561 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.000; |
1562 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.000; |
1563 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.000; |
1564 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.000; |
1565 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.000; |
1566 |
> |
} |
1567 |
> |
if (type == kEleNeutralHadronIsoDR0p1To0p2) { |
1568 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.006; |
1569 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.008; |
1570 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.010; |
1571 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.006; |
1572 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.005; |
1573 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.002; |
1574 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.007; |
1575 |
> |
} |
1576 |
> |
if (type == kEleNeutralHadronIsoDR0p2To0p3) { |
1577 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.009; |
1578 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.014; |
1579 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.018; |
1580 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.016; |
1581 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.017; |
1582 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.020; |
1583 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.021; |
1584 |
> |
} |
1585 |
> |
if (type == kEleNeutralHadronIsoDR0p3To0p4) { |
1586 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.013; |
1587 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.019; |
1588 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.027; |
1589 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.035; |
1590 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.037; |
1591 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.043; |
1592 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.110; |
1593 |
> |
} |
1594 |
> |
if (type == kEleNeutralHadronIsoDR0p4To0p5) { |
1595 |
> |
if (fabs(SCEta) >= 0.0 && fabs(SCEta) < 1.0 ) EffectiveArea = 0.017; |
1596 |
> |
if (fabs(SCEta) >= 1.0 && fabs(SCEta) < 1.479 ) EffectiveArea = 0.027; |
1597 |
> |
if (fabs(SCEta) >= 1.479 && fabs(SCEta) < 2.0 ) EffectiveArea = 0.036; |
1598 |
> |
if (fabs(SCEta) >= 2.0 && fabs(SCEta) < 2.2 ) EffectiveArea = 0.045; |
1599 |
> |
if (fabs(SCEta) >= 2.2 && fabs(SCEta) < 2.3 ) EffectiveArea = 0.057; |
1600 |
> |
if (fabs(SCEta) >= 2.3 && fabs(SCEta) < 2.4 ) EffectiveArea = 0.123; |
1601 |
> |
if (fabs(SCEta) >= 2.4) EffectiveArea = 0.220; |
1602 |
> |
} |
1603 |
> |
} |
1604 |
|
|
1605 |
< |
return result; |
1605 |
> |
return EffectiveArea; |
1606 |
|
} |
1607 |
+ |
|
1608 |
+ |
|
1609 |
+ |
Bool_t ElectronTools::PassHggLeptonTagID(const Electron* ele) { |
1610 |
+ |
|
1611 |
+ |
float dist = ( ele->ConvPartnerDist() == -9999.? 9999:TMath::Abs(ele->ConvPartnerDist())); |
1612 |
+ |
float dcot = ( ele->ConvPartnerDCotTheta() == -9999.? 9999:TMath::Abs(ele->ConvPartnerDCotTheta())); |
1613 |
+ |
|
1614 |
+ |
if (dist < 0.02) return false; |
1615 |
+ |
if (dcot < 0.02) return false; |
1616 |
+ |
|
1617 |
+ |
int numInnerHits = ele->Trk()->NExpectedHitsInner(); |
1618 |
+ |
if( numInnerHits > 1 ) return false; |
1619 |
+ |
|
1620 |
+ |
float coviEtaiEta = ele->CoviEtaiEta(); |
1621 |
+ |
if( ele->SCluster()->AbsEta() < 1.5 && coviEtaiEta > 0.01 ) return false; |
1622 |
+ |
else if( ele->SCluster()->AbsEta() > 1.5 && coviEtaiEta > 0.031 ) return false; |
1623 |
+ |
|
1624 |
+ |
Double_t deltaPhiIn = TMath::Abs(ele->DeltaPhiSuperClusterTrackAtVtx()); |
1625 |
+ |
Double_t deltaEtaIn = TMath::Abs(ele->DeltaEtaSuperClusterTrackAtVtx()); |
1626 |
+ |
|
1627 |
+ |
if( ele->SCluster()->AbsEta() < 1.5 && ( deltaPhiIn > 0.039 || deltaEtaIn > 0.005 ) ) return false; |
1628 |
+ |
else if ( ele->SCluster()->AbsEta() > 1.5 && ( deltaPhiIn > 0.028 || deltaEtaIn > 0.007 ) ) return false; |
1629 |
+ |
|
1630 |
+ |
return true; |
1631 |
+ |
} |
1632 |
+ |
|
1633 |
+ |
Bool_t ElectronTools::PassHggLeptonTagID2012(const Electron* ele) { |
1634 |
+ |
|
1635 |
+ |
if (TMath::Abs(1./ele->E()-1./ele->Pt())>0.05) return false; |
1636 |
+ |
|
1637 |
+ |
int numInnerHits = ele->Trk()->NExpectedHitsInner(); |
1638 |
+ |
if( numInnerHits > 1 ) return false; |
1639 |
+ |
|
1640 |
+ |
float coviEtaiEta = ele->CoviEtaiEta(); |
1641 |
+ |
if( ele->SCluster()->AbsEta() < 1.5 && coviEtaiEta > 0.01 ) return false; |
1642 |
+ |
else if( ele->SCluster()->AbsEta() > 1.5 && coviEtaiEta > 0.03 ) return false; // h |
1643 |
+ |
|
1644 |
+ |
Double_t deltaPhiIn = TMath::Abs(ele->DeltaPhiSuperClusterTrackAtVtx()); |
1645 |
+ |
Double_t deltaEtaIn = TMath::Abs(ele->DeltaEtaSuperClusterTrackAtVtx()); |
1646 |
+ |
|
1647 |
+ |
if( ele->SCluster()->AbsEta() < 1.5 && ( deltaPhiIn > 0.15 || deltaEtaIn > 0.007 || ele->HadronicOverEm()>0.12) ) return false; // h |
1648 |
+ |
else if ( ele->SCluster()->AbsEta() > 1.5 && ( deltaPhiIn > 0.10 || deltaEtaIn > 0.009 || ele->HadronicOverEm()>0.10 ) ) return false; // h |
1649 |
+ |
|
1650 |
+ |
return true; |
1651 |
+ |
} |
1652 |
+ |
|