Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:43

0001 #ifndef __BaseHiGenEvtSelector_h_
0002 #define __BaseHiGenEvtSelector_h_
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "HepMC/GenEvent.h"
0006 #include "HepMC/GenParticle.h"
0007 
0008 class BaseHiGenEvtSelector {
0009 public:
0010   BaseHiGenEvtSelector(const edm::ParameterSet&) { ; }
0011   virtual ~BaseHiGenEvtSelector() { ; }
0012   virtual bool filter(HepMC::GenEvent*) { return true; }
0013   bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double ptMin, double etaMax) {
0014     return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().perp() > ptMin &&
0015             fabs(par->momentum().eta()) < etaMax);
0016   }
0017 };
0018 
0019 #endif