36 |
|
{0.8,0.2,0,0,0,0,0,0}}; //extra cuts fbrem and E_Over_P |
37 |
|
|
38 |
|
Double_t VBTFWorkingPoint95[6][8] = { |
39 |
< |
{0.5, 0.5, 0.5, 0.5, 0.07, 0.07, 0.07, 0.07 }, //hovere |
39 |
> |
{0.15, 0.15, 0.15, 0.15, 0.07, 0.07, 0.07, 0.07 }, //hovere |
40 |
|
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
41 |
|
{0.8, 0.8, 0.8, 0.8, 0.7, 0.7, 0.7, 0.7 }, //deltaphiin |
42 |
|
{0.007, 0.007, 0.007, 0.007, 0.010, 0.010, 0.010, 0.010 }, //deltaetain |
75 |
|
{0.025, 0.025, 0.025, 0.025, 0.012, 0.012, 0.012, 0.012}, //hovere |
76 |
|
{0.01, 0.01, 0.01, 0.01, 0.03, 0.03, 0.03, 0.03 }, //sigmaetaeta |
77 |
|
{0.03, 0.03, 0.03, 0.03, 0.02, 0.02, 0.02, 0.02 }, //deltaphiin |
78 |
< |
{0.003, 0.003, 0.003, 0.003, 0.005, 0.005, 0.005, 0.005}, //deltaetain |
78 |
> |
{0.004, 0.004, 0.004, 0.004, 0.005, 0.005, 0.005, 0.005}, //deltaetain |
79 |
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }, //eoverp |
80 |
|
{0.0, 0.0, 0, 0, 0, 0, 0, 0 } //extra cuts fbrem and E_Over_P |
81 |
|
}; |
112 |
|
Double_t eOverP = ele->ESuperClusterOverP(); |
113 |
|
Double_t fBrem = ele->FBrem(); |
114 |
|
|
115 |
< |
if ((eOverP < fCuts[5][0]) && (fBrem < fCuts[5][1])) |
115 |
> |
if ( (fCuts[5][0]>0.0) && (eOverP < fCuts[5][0]) && (fCuts[5][1]>0.0) && (fBrem < fCuts[5][1])) |
116 |
|
return kFALSE; |
117 |
|
|
118 |
< |
if (eOverP < fCuts[5][2]*(1-fBrem)) |
118 |
> |
if ( (fCuts[5][2]>0.0) && (eOverP < fCuts[5][2]*(1-fBrem))) |
119 |
|
return kFALSE; |
120 |
|
|
121 |
|
Int_t cat = 2; |
123 |
|
cat=1; |
124 |
|
else if (eOverP < 1.2 && eOverP > 0.8) |
125 |
|
cat=0; |
126 |
< |
|
126 |
> |
|
127 |
> |
if(ele->SCluster() == 0) |
128 |
> |
return kFALSE; |
129 |
|
Double_t eSeedOverPin = ele->ESeedClusterOverPIn(); |
130 |
|
Double_t hOverE = ele->HadronicOverEm(); |
131 |
|
Double_t sigmaee = ele->CoviEtaiEta(); |
189 |
|
}; |
190 |
|
|
191 |
|
Double_t VBTFWorkingPoint70[4][2] = { |
192 |
< |
{0.06 , 0.03 }, //TrkIso |
193 |
< |
{0.06 , 0.03 }, //ECALIso |
194 |
< |
{0.05 , 0.015 }, //HCALIso |
195 |
< |
{0.05, 0.04 } //Combined |
192 |
> |
{0.05 , 0.025 }, //TrkIso |
193 |
> |
{0.06 , 0.025 }, //ECALIso |
194 |
> |
{0.03 , 0.020 }, //HCALIso |
195 |
> |
{0.04, 0.030 } //Combined |
196 |
|
}; |
197 |
|
|
198 |
|
switch (isoType) { |
216 |
|
break; |
217 |
|
} |
218 |
|
|
219 |
< |
Double_t trkIso = ele->TrackIsolationDr03(); |
220 |
< |
Double_t ecalIso = ele->EcalRecHitIsoDr03(); |
221 |
< |
Double_t hcalIso = ele->HcalTowerSumEtDr03(); |
222 |
< |
Double_t combinedIso = trkIso + ecalIso + hcalIso; |
223 |
< |
if(ele->IsEB()) combinedIso = trkIso + TMath::Max(ecalIso - 1.0, 0.0) + hcalIso; |
219 |
> |
Double_t trkIso = ele->TrackIsolationDr03() / ele->Pt(); |
220 |
> |
Double_t ecalIso = ele->EcalRecHitIsoDr03() / ele->Pt(); |
221 |
> |
Double_t hcalIso = ele->HcalTowerSumEtDr03() / ele->Pt(); |
222 |
> |
Double_t combinedIso = ele->TrackIsolationDr03() + ele->EcalRecHitIsoDr03() + ele->HcalTowerSumEtDr03(); |
223 |
> |
if(ele->IsEB()) combinedIso = ele->TrackIsolationDr03() + TMath::Max(ele->EcalRecHitIsoDr03() - 1.0, 0.0) + ele->HcalTowerSumEtDr03(); |
224 |
|
combinedIso = combinedIso / ele->Pt(); |
225 |
|
|
226 |
|
Int_t eb = 1; |
287 |
|
} |
288 |
|
} |
289 |
|
} |
290 |
+ |
|
291 |
|
if (isGoodConversion == kTRUE) break; |
292 |
|
|
293 |
|
} // loop over all conversions |
296 |
|
} |
297 |
|
|
298 |
|
//-------------------------------------------------------------------------------------------------- |
299 |
< |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const VertexCol *vertices, Double_t fD0Cut, |
297 |
< |
Bool_t fReverseD0Cut) |
299 |
> |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const VertexCol *vertices, Double_t fD0Cut) |
300 |
|
{ |
301 |
|
Bool_t d0cut = kFALSE; |
302 |
|
// d0 cut |
303 |
|
Double_t d0_real = 99999; |
304 |
|
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
305 |
< |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
306 |
< |
if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0); |
305 |
> |
if(vertices->At(i0)->NTracks() > 0){ |
306 |
> |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
307 |
> |
d0_real = TMath::Abs(pD0); |
308 |
> |
break; |
309 |
> |
} |
310 |
|
} |
311 |
|
if(d0_real < fD0Cut) d0cut = kTRUE; |
312 |
|
|
308 |
– |
if (fReverseD0Cut == kTRUE && |
309 |
– |
d0cut == kFALSE && d0_real < 0.05) |
310 |
– |
d0cut = kTRUE; |
311 |
– |
else if(fReverseD0Cut == kTRUE) |
312 |
– |
d0cut = kFALSE; |
313 |
– |
|
313 |
|
return d0cut; |
314 |
|
} |
315 |
|
|
316 |
|
//-------------------------------------------------------------------------------------------------- |
317 |
< |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const BeamSpotCol *beamspots, Double_t fD0Cut, |
319 |
< |
Bool_t fReverseD0Cut) |
317 |
> |
Bool_t ElectronTools::PassD0Cut(const Electron *ele, const BeamSpotCol *beamspots, Double_t fD0Cut) |
318 |
|
{ |
319 |
|
Bool_t d0cut = kFALSE; |
320 |
|
// d0 cut |
325 |
|
} |
326 |
|
if(d0_real < fD0Cut) d0cut = kTRUE; |
327 |
|
|
330 |
– |
if (fReverseD0Cut == kTRUE && |
331 |
– |
d0cut == kFALSE && d0_real < 0.05) |
332 |
– |
d0cut = kTRUE; |
333 |
– |
else if(fReverseD0Cut == kTRUE) |
334 |
– |
d0cut = kFALSE; |
335 |
– |
|
328 |
|
return d0cut; |
329 |
|
} |
330 |
|
|
342 |
|
Bool_t ElectronTools::PassSpikeRemovalFilter(const Electron *ele) |
343 |
|
{ |
344 |
|
Bool_t passSpikeRemovalFilter = kTRUE; |
345 |
< |
if(ele->SCluster()->Seed()->Energy() > 5.0 && |
345 |
> |
if(ele->SCluster() && |
346 |
> |
ele->SCluster()->Seed()->Energy() > 5.0 && |
347 |
|
ele->SCluster()->Seed()->EMax() / ele->SCluster()->Seed()->E3x3() > 0.95 |
348 |
|
) { |
349 |
|
passSpikeRemovalFilter = kFALSE; |
359 |
|
return passSpikeRemovalFilter; |
360 |
|
} |
361 |
|
|
362 |
+ |
Bool_t ElectronTools::PassTriggerMatching(const Electron *ele, const TriggerObjectCol *trigobjs) |
363 |
+ |
{ |
364 |
+ |
|
365 |
+ |
for (UInt_t i=0; i<trigobjs->GetEntries(); ++i) { |
366 |
+ |
const TriggerObject *trigobj = trigobjs->At(i); |
367 |
+ |
if (trigobj->TriggerType()==TriggerObject::TriggerCluster || trigobj->TriggerType()==TriggerObject::TriggerElectron || trigobj->TriggerType()==TriggerObject::TriggerPhoton) { |
368 |
+ |
if (MathUtils::DeltaR(ele->SCluster(),trigobj)<0.3) { |
369 |
+ |
return kTRUE; |
370 |
+ |
} |
371 |
+ |
} |
372 |
+ |
} |
373 |
+ |
|
374 |
+ |
return kFALSE; |
375 |
+ |
|
376 |
+ |
|
377 |
+ |
} |
378 |
+ |
|
379 |
|
//-------------------------------------------------------------------------------------------------- |
380 |
|
Int_t ElectronTools::Classify(const Electron *ele) { |
381 |
|
|
418 |
|
Int_t ElectronTools::PassTightId(const Electron *ele, const VertexCol *vertices, |
419 |
|
const DecayParticleCol *conversions, const Int_t typeCuts){ |
420 |
|
|
421 |
< |
Double_t scEt = ele->SCluster()->Et(); |
422 |
< |
Double_t eOverP = ele->ESuperClusterOverP(); |
421 |
> |
// original code on |
422 |
> |
// http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/RecoEgamma/ElectronIdentification/src/CutBasedElectronID.cc |
423 |
> |
|
424 |
> |
Double_t scEt = ele->SCluster()->Et(); |
425 |
> |
Double_t scEta = ele->SCluster()->Eta(); |
426 |
|
|
427 |
|
Double_t fBrem = ele->FBrem(); |
428 |
|
Double_t hOverE = ele->HadronicOverEm(); |
434 |
|
Int_t mishits = ele->BestTrk()->NExpectedHitsInner(); |
435 |
|
Double_t tkIso = ele->TrackIsolationDr03(); |
436 |
|
Double_t ecalIso = ele->EcalRecHitIsoDr04(); |
424 |
– |
Double_t ecalIsoPed = (ele->IsEB())?std::max(0.,ecalIso-1.):ecalIso; |
437 |
|
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; |
438 |
|
|
439 |
|
int cat = Classify(ele); |
440 |
|
int eb; |
444 |
|
else |
445 |
|
eb = 1; |
446 |
|
|
447 |
< |
Int_t result = 0.; |
447 |
> |
// Medium cuts |
448 |
> |
Double_t cutdcotdistMedium[9] = { |
449 |
> |
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}; |
450 |
> |
Double_t cutdetainMedium[9] = { |
451 |
> |
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}; |
452 |
> |
Double_t cutdetainlMedium[9] = { |
453 |
> |
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}; |
454 |
> |
Double_t cutdphiinMedium[9] = { |
455 |
> |
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}; |
456 |
> |
Double_t cutdphiinlMedium[9] = { |
457 |
> |
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}; |
458 |
> |
Double_t cuteseedopcorMedium[9] = { |
459 |
> |
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}; |
460 |
> |
Double_t cutfmishitsMedium[9] = { |
461 |
> |
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}; |
462 |
> |
Double_t cuthoeMedium[9] = { |
463 |
> |
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}; |
464 |
> |
Double_t cuthoelMedium[9] = { |
465 |
> |
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}; |
466 |
> |
Double_t cutip_gsfMedium[9] = { |
467 |
> |
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}; |
468 |
> |
Double_t cutip_gsflMedium[9] = { |
469 |
> |
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}; |
470 |
> |
Double_t cutiso_sumMedium[9] = { |
471 |
> |
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}; |
472 |
> |
Double_t cutiso_sumoetMedium[9] = { |
473 |
> |
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}; |
474 |
> |
Double_t cutiso_sumoetlMedium[9] = { |
475 |
> |
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}; |
476 |
> |
Double_t cutseeMedium[9] = { |
477 |
> |
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}; |
478 |
> |
Double_t cutseelMedium[9] = { |
479 |
> |
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}; |
480 |
> |
|
481 |
> |
// Tight cuts |
482 |
> |
Double_t cutdcotdistTight[9] = { |
483 |
> |
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}; |
484 |
> |
Double_t cutdetainTight[9] = { |
485 |
> |
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}; |
486 |
> |
Double_t cutdetainlTight[9] = { |
487 |
> |
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}; |
488 |
> |
Double_t cutdphiinTight[9] = { |
489 |
> |
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}; |
490 |
> |
Double_t cutdphiinlTight[9] = { |
491 |
> |
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}; |
492 |
> |
Double_t cuteseedopcorTight[9] = { |
493 |
> |
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}; |
494 |
> |
Double_t cutfmishitsTight[9] = { |
495 |
> |
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}; |
496 |
> |
Double_t cuthoeTight[9] = { |
497 |
> |
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}; |
498 |
> |
Double_t cuthoelTight[9] = { |
499 |
> |
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}; |
500 |
> |
Double_t cutip_gsfTight[9] = { |
501 |
> |
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}; |
502 |
> |
Double_t cutip_gsflTight[9] = { |
503 |
> |
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}; |
504 |
> |
Double_t cutiso_sumTight[9] = { |
505 |
> |
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}; |
506 |
> |
Double_t cutiso_sumoetTight[9] = { |
507 |
> |
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}; |
508 |
> |
Double_t cutiso_sumoetlTight[9] = { |
509 |
> |
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}; |
510 |
> |
Double_t cutseeTight[9] = { |
511 |
> |
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}; |
512 |
> |
Double_t cutseelTight[9] = { |
513 |
> |
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}; |
514 |
|
|
515 |
< |
Int_t bin = 0; |
516 |
< |
|
517 |
< |
Double_t WantBin = kFALSE; |
518 |
< |
if(WantBin) { |
519 |
< |
if (scEt < 20.) |
520 |
< |
bin = 2; |
521 |
< |
else if (scEt > 30.) |
522 |
< |
bin = 0; |
523 |
< |
else |
524 |
< |
bin = 1; |
515 |
> |
Double_t cutdcotdistSuperTight[9] = { |
516 |
> |
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}; |
517 |
> |
Double_t cutdetainSuperTight[9] = { |
518 |
> |
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}; |
519 |
> |
Double_t cutdetainlSuperTight[9] = { |
520 |
> |
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}; |
521 |
> |
Double_t cutdphiinSuperTight[9] = { |
522 |
> |
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}; |
523 |
> |
Double_t cutdphiinlSuperTight[9] = { |
524 |
> |
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}; |
525 |
> |
Double_t cuteseedopcorSuperTight[9] = { |
526 |
> |
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}; |
527 |
> |
Double_t cutfmishitsSuperTight[9] = { |
528 |
> |
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}; |
529 |
> |
Double_t cuthoeSuperTight[9] = { |
530 |
> |
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}; |
531 |
> |
Double_t cuthoelSuperTight[9] = { |
532 |
> |
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}; |
533 |
> |
Double_t cutip_gsfSuperTight[9] = { |
534 |
> |
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}; |
535 |
> |
Double_t cutip_gsflSuperTight[9] = { |
536 |
> |
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}; |
537 |
> |
Double_t cutiso_sumSuperTight[9] = { |
538 |
> |
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}; |
539 |
> |
Double_t cutiso_sumoetSuperTight[9] = { |
540 |
> |
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}; |
541 |
> |
Double_t cutiso_sumoetlSuperTight[9] = { |
542 |
> |
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}; |
543 |
> |
Double_t cutseeSuperTight[9] = { |
544 |
> |
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}; |
545 |
> |
Double_t cutseelSuperTight[9] = { |
546 |
> |
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}; |
547 |
> |
|
548 |
> |
Double_t cutdcotdist[9]; |
549 |
> |
Double_t cutdetain[9]; |
550 |
> |
Double_t cutdetainl[9]; |
551 |
> |
Double_t cutdphiin[9]; |
552 |
> |
Double_t cutdphiinl[9]; |
553 |
> |
Double_t cuteseedopcor[9]; |
554 |
> |
Double_t cutfmishits[9]; |
555 |
> |
Double_t cuthoe[9]; |
556 |
> |
Double_t cuthoel[9]; |
557 |
> |
Double_t cutip_gsf[9]; |
558 |
> |
Double_t cutip_gsfl[9]; |
559 |
> |
Double_t cutiso_sum[9]; |
560 |
> |
Double_t cutiso_sumoet[9]; |
561 |
> |
Double_t cutiso_sumoetl[9]; |
562 |
> |
Double_t cutsee[9]; |
563 |
> |
Double_t cutseel[9]; |
564 |
> |
if (typeCuts == 0) { |
565 |
> |
memcpy(cutdcotdist ,cutdcotdistMedium ,sizeof(cutdcotdistMedium)); |
566 |
> |
memcpy(cutdetain ,cutdetainMedium ,sizeof(cutdetainMedium)); |
567 |
> |
memcpy(cutdetainl ,cutdetainlMedium ,sizeof(cutdetainlMedium)); |
568 |
> |
memcpy(cutdphiin ,cutdphiinMedium ,sizeof(cutdphiinMedium)); |
569 |
> |
memcpy(cutdphiinl ,cutdphiinlMedium ,sizeof(cutdphiinlMedium)); |
570 |
> |
memcpy(cuteseedopcor ,cuteseedopcorMedium ,sizeof(cuteseedopcorMedium)); |
571 |
> |
memcpy(cutfmishits ,cutfmishitsMedium ,sizeof(cutfmishitsMedium)); |
572 |
> |
memcpy(cuthoe ,cuthoeMedium ,sizeof(cuthoeMedium)); |
573 |
> |
memcpy(cuthoel ,cuthoelMedium ,sizeof(cuthoelMedium)); |
574 |
> |
memcpy(cutip_gsf ,cutip_gsfMedium ,sizeof(cutip_gsfMedium)); |
575 |
> |
memcpy(cutip_gsfl ,cutip_gsflMedium ,sizeof(cutip_gsflMedium)); |
576 |
> |
memcpy(cutiso_sum ,cutiso_sumMedium ,sizeof(cutiso_sumMedium)); |
577 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetMedium ,sizeof(cutiso_sumoetMedium)); |
578 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlMedium,sizeof(cutiso_sumoetlMedium)); |
579 |
> |
memcpy(cutsee ,cutseeMedium ,sizeof(cutseeMedium)); |
580 |
> |
memcpy(cutseel ,cutseelMedium ,sizeof(cutseelMedium)); |
581 |
> |
} |
582 |
> |
else if(typeCuts == 1) { |
583 |
> |
memcpy(cutdcotdist ,cutdcotdistTight ,sizeof(cutdcotdistTight)); |
584 |
> |
memcpy(cutdetain ,cutdetainTight ,sizeof(cutdetainTight)); |
585 |
> |
memcpy(cutdetainl ,cutdetainlTight ,sizeof(cutdetainlTight)); |
586 |
> |
memcpy(cutdphiin ,cutdphiinTight ,sizeof(cutdphiinTight)); |
587 |
> |
memcpy(cutdphiinl ,cutdphiinlTight ,sizeof(cutdphiinlTight)); |
588 |
> |
memcpy(cuteseedopcor ,cuteseedopcorTight ,sizeof(cuteseedopcorTight)); |
589 |
> |
memcpy(cutfmishits ,cutfmishitsTight ,sizeof(cutfmishitsTight)); |
590 |
> |
memcpy(cuthoe ,cuthoeTight ,sizeof(cuthoeTight)); |
591 |
> |
memcpy(cuthoel ,cuthoelTight ,sizeof(cuthoelTight)); |
592 |
> |
memcpy(cutip_gsf ,cutip_gsfTight ,sizeof(cutip_gsfTight)); |
593 |
> |
memcpy(cutip_gsfl ,cutip_gsflTight ,sizeof(cutip_gsflTight)); |
594 |
> |
memcpy(cutiso_sum ,cutiso_sumTight ,sizeof(cutiso_sumTight)); |
595 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetTight ,sizeof(cutiso_sumoetTight)); |
596 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlTight,sizeof(cutiso_sumoetlTight)); |
597 |
> |
memcpy(cutsee ,cutseeTight ,sizeof(cutseeTight)); |
598 |
> |
memcpy(cutseel ,cutseelTight ,sizeof(cutseelTight)); |
599 |
> |
} |
600 |
> |
else { |
601 |
> |
memcpy(cutdcotdist ,cutdcotdistSuperTight ,sizeof(cutdcotdistSuperTight)); |
602 |
> |
memcpy(cutdetain ,cutdetainSuperTight ,sizeof(cutdetainSuperTight)); |
603 |
> |
memcpy(cutdetainl ,cutdetainlSuperTight ,sizeof(cutdetainlSuperTight)); |
604 |
> |
memcpy(cutdphiin ,cutdphiinSuperTight ,sizeof(cutdphiinSuperTight)); |
605 |
> |
memcpy(cutdphiinl ,cutdphiinlSuperTight ,sizeof(cutdphiinlSuperTight)); |
606 |
> |
memcpy(cuteseedopcor ,cuteseedopcorSuperTight ,sizeof(cuteseedopcorSuperTight)); |
607 |
> |
memcpy(cutfmishits ,cutfmishitsSuperTight ,sizeof(cutfmishitsSuperTight)); |
608 |
> |
memcpy(cuthoe ,cuthoeSuperTight ,sizeof(cuthoeSuperTight)); |
609 |
> |
memcpy(cuthoel ,cuthoelSuperTight ,sizeof(cuthoelSuperTight)); |
610 |
> |
memcpy(cutip_gsf ,cutip_gsfSuperTight ,sizeof(cutip_gsfSuperTight)); |
611 |
> |
memcpy(cutip_gsfl ,cutip_gsflSuperTight ,sizeof(cutip_gsflSuperTight)); |
612 |
> |
memcpy(cutiso_sum ,cutiso_sumSuperTight ,sizeof(cutiso_sumSuperTight)); |
613 |
> |
memcpy(cutiso_sumoet ,cutiso_sumoetSuperTight ,sizeof(cutiso_sumoetSuperTight)); |
614 |
> |
memcpy(cutiso_sumoetl,cutiso_sumoetlSuperTight,sizeof(cutiso_sumoetlSuperTight)); |
615 |
> |
memcpy(cutsee ,cutseeSuperTight ,sizeof(cutseeSuperTight)); |
616 |
> |
memcpy(cutseel ,cutseelSuperTight ,sizeof(cutseelSuperTight)); |
617 |
|
} |
618 |
|
|
619 |
< |
if (fBrem > 0) |
620 |
< |
eSeedOverPin = eSeedOverPin + fBrem; |
621 |
< |
|
622 |
< |
if(typeCuts == 3 || typeCuts == 4){ |
623 |
< |
// Loose robust cuts |
624 |
< |
Double_t robustlooseEleIDCuts[52] = { |
625 |
< |
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, |
626 |
< |
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 |
627 |
< |
}; |
628 |
< |
// Tight robust cuts |
629 |
< |
Double_t robusttightEleIDCuts[52] = { |
630 |
< |
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, |
631 |
< |
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 |
632 |
< |
}; |
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.; |
485 |
< |
|
486 |
< |
if (hOverE > cut[26*eb+0]) |
487 |
< |
return result; |
488 |
< |
|
489 |
< |
if (sigmaee > cut[26*eb+1]) |
490 |
< |
return result; |
491 |
< |
|
492 |
< |
if (fabs(deltaPhiIn) > cut[26*eb+2]) |
493 |
< |
return result; |
619 |
> |
int result = 0; |
620 |
> |
|
621 |
> |
const int ncuts = 10; |
622 |
> |
std::vector<bool> cut_results(ncuts, false); |
623 |
> |
|
624 |
> |
float iso_sum = tkIso + ecalIso + hcalIso; |
625 |
> |
if(fabs(scEta)>1.5) |
626 |
> |
iso_sum += (fabs(scEta)-1.5)*1.09; |
627 |
> |
|
628 |
> |
float iso_sumoet = iso_sum*(40./scEt); |
629 |
> |
|
630 |
> |
float eseedopincor = eSeedOverPin + fBrem; |
631 |
> |
if(fBrem < 0) |
632 |
> |
eseedopincor = eSeedOverPin; |
633 |
|
|
634 |
< |
if (fabs(deltaEtaIn) > cut[26*eb+3]) |
635 |
< |
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; |
634 |
> |
float dist = (TMath::Abs(ele->ConvPartnerDist()) == -9999.? 9999:TMath::Abs(ele->ConvPartnerDist())); |
635 |
> |
float dcot = (TMath::Abs(ele->ConvPartnerDCotTheta()) == -9999.? 9999:TMath::Abs(ele->ConvPartnerDCotTheta())); |
636 |
|
|
637 |
< |
if ( eOverP < cut[26*eb+19] || eOverP > cut[26*eb+20]) // lower and upper cut in E/P |
505 |
< |
return result; |
506 |
< |
|
507 |
< |
result = result + 1; |
637 |
> |
float dcotdistcomb = ((0.04 - std::max(dist, dcot)) > 0?(0.04 - std::max(dist, dcot)):0); |
638 |
|
|
639 |
< |
Double_t d0_real = 99999; |
640 |
< |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
639 |
> |
Double_t ip = 99999; |
640 |
> |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
641 |
> |
if(vertices->At(i0)->NTracks() > 0){ |
642 |
|
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
643 |
< |
if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0); |
643 |
> |
ip = TMath::Abs(pD0); |
644 |
> |
break; |
645 |
|
} |
646 |
< |
if (d0_real > cut[26*eb+21]) |
515 |
< |
return result; |
516 |
< |
|
517 |
< |
if (mishits > cut[26*eb+22]) // expected missing hits |
518 |
< |
return result; |
646 |
> |
} |
647 |
|
|
648 |
< |
Bool_t passConvVeto = PassConversionFilter(ele, conversions, kTRUE); |
649 |
< |
if (passConvVeto == kFALSE) |
650 |
< |
return result; |
651 |
< |
|
652 |
< |
result += 4; |
653 |
< |
} |
654 |
< |
else if(typeCuts == 0 || typeCuts == 1 || typeCuts == 2){ |
655 |
< |
// Loose cuts |
656 |
< |
Double_t cutdcotdistLoose[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
657 |
< |
}; |
658 |
< |
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 |
659 |
< |
}; |
660 |
< |
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 |
661 |
< |
}; |
662 |
< |
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 |
663 |
< |
}; |
664 |
< |
Double_t cutetLoose[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0. |
665 |
< |
}; |
666 |
< |
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 |
667 |
< |
}; |
668 |
< |
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 |
669 |
< |
}; |
670 |
< |
Double_t cutip_gsfLoose[9] = {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 |
671 |
< |
}; |
672 |
< |
Double_t cutiso_sumLoose[9] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 |
673 |
< |
}; |
674 |
< |
Double_t cutiso_sumoetLoose[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
675 |
< |
}; |
676 |
< |
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 |
677 |
< |
}; |
678 |
< |
|
679 |
< |
// Medium cuts |
552 |
< |
Double_t cutdcotdistMedium[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
553 |
< |
}; |
554 |
< |
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 |
555 |
< |
}; |
556 |
< |
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 |
557 |
< |
}; |
558 |
< |
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 |
559 |
< |
}; |
560 |
< |
Double_t cutetMedium[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0. |
561 |
< |
}; |
562 |
< |
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 |
563 |
< |
}; |
564 |
< |
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 |
565 |
< |
}; |
566 |
< |
Double_t cutip_gsfMedium[9] = {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 |
567 |
< |
}; |
568 |
< |
Double_t cutiso_sumMedium[9] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 |
569 |
< |
}; |
570 |
< |
Double_t cutiso_sumoetMedium[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
571 |
< |
}; |
572 |
< |
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 |
573 |
< |
}; |
574 |
< |
|
575 |
< |
// Tight cuts |
576 |
< |
Double_t cutdcotdistTight[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
577 |
< |
}; |
578 |
< |
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 |
579 |
< |
}; |
580 |
< |
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 |
581 |
< |
}; |
582 |
< |
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 |
583 |
< |
}; |
584 |
< |
Double_t cutetTight[9] = {0., 0., 0., 0., 0., 0., 0., 0., 0. |
585 |
< |
}; |
586 |
< |
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 |
587 |
< |
}; |
588 |
< |
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 |
589 |
< |
}; |
590 |
< |
Double_t cutip_gsfTight[9] = {0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02 |
591 |
< |
}; |
592 |
< |
Double_t cutiso_sumTight[9] = {0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1 |
593 |
< |
}; |
594 |
< |
Double_t cutiso_sumoetTight[9] = {9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999., 9999. |
595 |
< |
}; |
596 |
< |
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 |
597 |
< |
}; |
598 |
< |
|
599 |
< |
Double_t cutdcotdist[9]; |
600 |
< |
Double_t cutdetain[9]; |
601 |
< |
Double_t cutdphiin[9]; |
602 |
< |
Double_t cuteseedopcor[9]; |
603 |
< |
Double_t cutet[9]; |
604 |
< |
Double_t cutfmishits[9]; |
605 |
< |
Double_t cuthoe[9]; |
606 |
< |
Double_t cutip_gsf[9]; |
607 |
< |
Double_t cutiso_sum[9]; |
608 |
< |
Double_t cutiso_sumoet[9]; |
609 |
< |
Double_t cutsee[9]; |
610 |
< |
if (typeCuts == 0) { |
611 |
< |
memcpy(cutdcotdist ,cutdcotdistLoose ,sizeof(cutdcotdistLoose)); |
612 |
< |
memcpy(cutdetain ,cutdetainLoose ,sizeof(cutdetainLoose)); |
613 |
< |
memcpy(cutdphiin ,cutdphiinLoose ,sizeof(cutdphiinLoose)); |
614 |
< |
memcpy(cuteseedopcor,cuteseedopcorLoose,sizeof(cuteseedopcorLoose)); |
615 |
< |
memcpy(cutet ,cutetLoose ,sizeof(cutetLoose)); |
616 |
< |
memcpy(cutfmishits ,cutfmishitsLoose ,sizeof(cutfmishitsLoose)); |
617 |
< |
memcpy(cuthoe ,cuthoeLoose ,sizeof(cuthoeLoose)); |
618 |
< |
memcpy(cutip_gsf ,cutip_gsfLoose ,sizeof(cutip_gsfLoose)); |
619 |
< |
memcpy(cutiso_sum ,cutiso_sumLoose ,sizeof(cutiso_sumLoose)); |
620 |
< |
memcpy(cutiso_sumoet,cutiso_sumoetLoose,sizeof(cutiso_sumoetLoose)); |
621 |
< |
memcpy(cutsee ,cutseeLoose ,sizeof(cutseeLoose)); |
622 |
< |
} |
623 |
< |
else if(typeCuts == 1) { |
624 |
< |
memcpy(cutdcotdist ,cutdcotdistMedium ,sizeof(cutdcotdistMedium)); |
625 |
< |
memcpy(cutdetain ,cutdetainMedium ,sizeof(cutdetainMedium)); |
626 |
< |
memcpy(cutdphiin ,cutdphiinMedium ,sizeof(cutdphiinMedium)); |
627 |
< |
memcpy(cuteseedopcor,cuteseedopcorMedium,sizeof(cuteseedopcorMedium)); |
628 |
< |
memcpy(cutet ,cutetMedium ,sizeof(cutetMedium)); |
629 |
< |
memcpy(cutfmishits ,cutfmishitsMedium ,sizeof(cutfmishitsMedium)); |
630 |
< |
memcpy(cuthoe ,cuthoeMedium ,sizeof(cuthoeMedium)); |
631 |
< |
memcpy(cutip_gsf ,cutip_gsfMedium ,sizeof(cutip_gsfMedium)); |
632 |
< |
memcpy(cutiso_sum ,cutiso_sumMedium ,sizeof(cutiso_sumMedium)); |
633 |
< |
memcpy(cutiso_sumoet,cutiso_sumoetMedium,sizeof(cutiso_sumoetMedium)); |
634 |
< |
memcpy(cutsee ,cutseeMedium ,sizeof(cutseeMedium)); |
635 |
< |
} |
636 |
< |
else { |
637 |
< |
memcpy(cutdcotdist ,cutdcotdistTight ,sizeof(cutdcotdistTight)); |
638 |
< |
memcpy(cutdetain ,cutdetainTight ,sizeof(cutdetainTight)); |
639 |
< |
memcpy(cutdphiin ,cutdphiinTight ,sizeof(cutdphiinTight)); |
640 |
< |
memcpy(cuteseedopcor,cuteseedopcorTight,sizeof(cuteseedopcorTight)); |
641 |
< |
memcpy(cutet ,cutetTight ,sizeof(cutetTight)); |
642 |
< |
memcpy(cutfmishits ,cutfmishitsTight ,sizeof(cutfmishitsTight)); |
643 |
< |
memcpy(cuthoe ,cuthoeTight ,sizeof(cuthoeTight)); |
644 |
< |
memcpy(cutip_gsf ,cutip_gsfTight ,sizeof(cutip_gsfTight)); |
645 |
< |
memcpy(cutiso_sum ,cutiso_sumTight ,sizeof(cutiso_sumTight)); |
646 |
< |
memcpy(cutiso_sumoet,cutiso_sumoetTight,sizeof(cutiso_sumoetTight)); |
647 |
< |
memcpy(cutsee ,cutseeTight ,sizeof(cutseeTight)); |
648 |
> |
for (int cut=0; cut<ncuts; cut++) { |
649 |
> |
switch (cut) { |
650 |
> |
case 0: |
651 |
> |
cut_results[cut] = compute_cut(fabs(deltaEtaIn), scEt, cutdetainl[cat], cutdetain[cat]); |
652 |
> |
break; |
653 |
> |
case 1: |
654 |
> |
cut_results[cut] = compute_cut(fabs(deltaPhiIn), scEt, cutdphiinl[cat], cutdphiin[cat]); |
655 |
> |
break; |
656 |
> |
case 2: |
657 |
> |
cut_results[cut] = (eseedopincor > cuteseedopcor[cat]); |
658 |
> |
break; |
659 |
> |
case 3: |
660 |
> |
cut_results[cut] = compute_cut(hOverE, scEt, cuthoel[cat], cuthoe[cat]); |
661 |
> |
break; |
662 |
> |
case 4: |
663 |
> |
cut_results[cut] = compute_cut(sigmaee, scEt, cutseel[cat], cutsee[cat]); |
664 |
> |
break; |
665 |
> |
case 5: |
666 |
> |
cut_results[cut] = compute_cut(iso_sumoet, scEt, cutiso_sumoetl[cat], cutiso_sumoet[cat]); |
667 |
> |
break; |
668 |
> |
case 6: |
669 |
> |
cut_results[cut] = (iso_sum < cutiso_sum[cat]); |
670 |
> |
break; |
671 |
> |
case 7: |
672 |
> |
cut_results[cut] = compute_cut(fabs(ip), scEt, cutip_gsfl[cat], cutip_gsf[cat]); |
673 |
> |
break; |
674 |
> |
case 8: |
675 |
> |
cut_results[cut] = (mishits < cutfmishits[cat]); |
676 |
> |
break; |
677 |
> |
case 9: |
678 |
> |
cut_results[cut] = (dcotdistcomb < cutdcotdist[cat]); |
679 |
> |
break; |
680 |
|
} |
681 |
+ |
} |
682 |
+ |
|
683 |
+ |
// ID part |
684 |
+ |
if (cut_results[0] & cut_results[1] & cut_results[2] & cut_results[3] & cut_results[4]) |
685 |
+ |
result = result + 1; |
686 |
+ |
|
687 |
+ |
// ISO part |
688 |
+ |
if (cut_results[5] & cut_results[6]) |
689 |
+ |
result = result + 2; |
690 |
+ |
|
691 |
+ |
// IP part |
692 |
+ |
if (cut_results[7]) |
693 |
+ |
result = result + 8; |
694 |
+ |
|
695 |
+ |
// Conversion part |
696 |
+ |
if (cut_results[8] and cut_results[9]) |
697 |
+ |
result = result + 4; |
698 |
+ |
|
699 |
+ |
return result; |
700 |
+ |
} |
701 |
|
|
702 |
< |
// CAREFUL, I HAVE COMMENTED OUT WHAT SANI IS DOING |
703 |
< |
//Double_t iso_sum = tkIso + ecalIso + hcalIso; |
652 |
< |
Double_t iso_sum = (ele->TrackIsolationDr03() + TMath::Max(ele->EcalRecHitIsoDr03() - 1.0, 0.0) + |
653 |
< |
ele->HcalTowerSumEtDr03()) / ele->Pt(); |
654 |
< |
Double_t iso_sum_corrected = iso_sum*pow(40./scEt, 2); |
655 |
< |
if ((iso_sum < cutiso_sum[cat+bin*9]) && |
656 |
< |
(iso_sum_corrected < cutiso_sumoet[cat+bin*9])) |
657 |
< |
result += 2; |
658 |
< |
|
659 |
< |
if (fBrem > -2) { |
660 |
< |
if ((hOverE < cuthoe[cat+bin*9]) and |
661 |
< |
(sigmaee < cutsee[cat+bin*9]) and |
662 |
< |
(fabs(deltaPhiIn) < cutdphiin[cat+bin*9]) and |
663 |
< |
(fabs(deltaEtaIn) < cutdetain[cat+bin*9]) and |
664 |
< |
(eSeedOverPin > cuteseedopcor[cat+bin*9]) and |
665 |
< |
(scEt > cutet[cat+bin*9])) |
666 |
< |
result += 1.; |
667 |
< |
} |
702 |
> |
//-------------------------------------------------------------------------------------------------- |
703 |
> |
bool ElectronTools::compute_cut(double x, double et, double cut_min, double cut_max, bool gtn) { |
704 |
|
|
705 |
< |
Double_t d0_real = 99999; |
706 |
< |
for(UInt_t i0 = 0; i0 < vertices->GetEntries(); i0++) { |
671 |
< |
Double_t pD0 = ele->GsfTrk()->D0Corrected(*vertices->At(i0)); |
672 |
< |
if(TMath::Abs(pD0) < TMath::Abs(d0_real)) d0_real = TMath::Abs(pD0); |
673 |
< |
} |
674 |
< |
if (d0_real < cutip_gsf[cat+bin*9]) |
675 |
< |
result += 4; |
705 |
> |
float et_min = 10; |
706 |
> |
float et_max = 40; |
707 |
|
|
708 |
< |
Bool_t passConvVeto = PassConversionFilter(ele, conversions, kTRUE); |
709 |
< |
if (mishits < cutfmishits[cat+bin*9] && |
679 |
< |
passConvVeto) |
680 |
< |
result += 8; |
681 |
< |
} // classbased |
708 |
> |
bool accept = false; |
709 |
> |
float cut = cut_max; // the cut at et=40 GeV |
710 |
|
|
711 |
< |
return result; |
711 |
> |
if(et < et_max) { |
712 |
> |
cut = cut_min + (1/et_min - 1/et)*(cut_max - cut_min)/(1/et_min - 1/et_max); |
713 |
> |
} |
714 |
> |
|
715 |
> |
if(et < et_min) { |
716 |
> |
cut = cut_min; |
717 |
> |
} |
718 |
> |
|
719 |
> |
if(gtn) { // useful for e/p cut which is gt |
720 |
> |
accept = (x >= cut); |
721 |
> |
} |
722 |
> |
else { |
723 |
> |
accept = (x <= cut); |
724 |
> |
} |
725 |
> |
|
726 |
> |
return accept; |
727 |
|
} |