472 |
|
|
473 |
|
tree::Particle thisGenParticle; |
474 |
|
for( std::vector<susy::Particle>::iterator it = event->genParticles.begin(); it != event->genParticles.end(); ++it ) { |
475 |
< |
if( it->status == 3 ) { // hard interaction |
476 |
< |
switch( std::abs(it->pdgId) ) { |
477 |
< |
thisGenParticle.pt = it->momentum.Pt(); |
478 |
< |
thisGenParticle.eta = it->momentum.Eta(); |
479 |
< |
thisGenParticle.phi = it->momentum.Phi(); |
480 |
< |
case 22: // photon |
481 |
< |
if( thisGenParticle.pt > 75 ) |
482 |
< |
genPhoton.push_back( thisGenParticle ); |
483 |
< |
case 11: // electron |
484 |
< |
if( thisGenParticle.pt > 20 ) // pt cut is lower to estimate fake rate in all pt bins |
485 |
< |
genElectron.push_back( thisGenParticle ); |
486 |
< |
} |
475 |
> |
if( it->momentum.Pt() < 20 ) continue; |
476 |
> |
thisGenParticle.pt = it->momentum.Pt(); |
477 |
> |
thisGenParticle.eta = it->momentum.Eta(); |
478 |
> |
thisGenParticle.phi = it->momentum.Phi(); |
479 |
> |
switch( std::abs(it->pdgId) ) { |
480 |
> |
case 22: // photon |
481 |
> |
genPhoton.push_back( thisGenParticle ); |
482 |
> |
break; |
483 |
> |
case 11: // electron |
484 |
> |
genElectron.push_back( thisGenParticle ); |
485 |
> |
break; |
486 |
|
} |
487 |
|
} |
488 |
|
|