ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/kiesel/TreeWriter/treeWriter.cc
(Generate patch)

Comparing UserCode/kiesel/TreeWriter/treeWriter.cc (file contents):
Revision 1.22 by kiesel, Wed Apr 24 13:24:30 2013 UTC vs.
Revision 1.24 by kiesel, Wed Apr 24 15:13:05 2013 UTC

# Line 472 | Line 472 | void TreeWriter::Loop() {
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines