365 |
|
} else { |
366 |
|
for(vector<susy::Electron>::iterator it = eleMap->second.begin(); it < eleMap->second.end(); ++it) { |
367 |
|
// for cuts see https://twiki.cern.ch/twiki/bin/viewauth/CMS/EgammaCutBasedIdentification |
368 |
+ |
if( loggingVerbosity > 0) |
369 |
+ |
std::cout << "TODO: piAtVtx is not calculated correctly" << std::endl; |
370 |
+ |
//float pAtVtx = it->trackMomentums.find("AtVtxWithConstraint")->second.P(); |
371 |
+ |
float pAtVtx = it->ecalEnergy; |
372 |
+ |
if( it->momentum.Pt() < 1 || it->momentum.Pt() > 1e6 || pAtVtx == 0 ) |
373 |
+ |
continue; |
374 |
|
float iso = ( it->chargedHadronIso + max(it->neutralHadronIso+it->photonIso |
375 |
< |
-effectiveAreaElectron(it->momentum.Eta())*event->rho25, (Float_t)0. ) |
375 |
> |
- effectiveAreaElectron(it->momentum.Eta())*event->rho25, (Float_t)0. ) |
376 |
|
) / it->momentum.Pt(); |
377 |
|
if ( it->isEE() ){ |
378 |
|
if ( fabs(it->deltaEtaSuperClusterTrackAtVtx) > 0.007 |
381 |
|
|| it->hcalOverEcalBc > 0.12 |
382 |
|
|| it->vertex.Perp() > 0.02 |
383 |
|
|| it->vertex.Z() > 0.2 |
384 |
< |
|| fabs(1./(it->ecalEnergy) - 1./(it->trackMomentums["AtVtx"].P())) > 0.05 |
379 |
< |
|| it->convFlags() // not official, but perhaps substitude? |
384 |
> |
|| fabs(1./it->ecalEnergy - 1./pAtVtx ) > 0.05 |
385 |
|
|| iso > 0.15 ) |
386 |
|
continue; |
387 |
|
} |
392 |
|
|| it->hcalOverEcalBc > 0.10 |
393 |
|
|| it->vertex.Perp() > 0.02 |
394 |
|
|| it->vertex.Z() > 0.2 |
395 |
< |
|| fabs(1./(it->ecalEnergy) - 1./(it->trackMomentums["AtVtx"].P())) > 0.05 |
391 |
< |
|| it->convFlags() // not official, but perhaps substitude? |
395 |
> |
|| fabs(1./it->ecalEnergy - 1./pAtVtx) > 0.05 |
396 |
|
|| iso > 0.15 ) |
397 |
|
continue; |
398 |
|
} |
400 |
|
continue; |
401 |
|
// TODO: conversion rejection information not implemented yet, see twiki for more details |
402 |
|
|
403 |
< |
thiselectron->pt = it->momentum.Et(); |
403 |
> |
thiselectron->pt = it->momentum.Pt(); |
404 |
|
if( thiselectron->pt < 20 ) |
405 |
|
continue; |
406 |
|
if( loggingVerbosity > 2 ) |