CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/GeneratorInterface/HiGenCommon/interface/BaseHiGenEvtSelector.h

Go to the documentation of this file.
00001 #ifndef __BaseHiGenEvtSelector_h_
00002 #define __BaseHiGenEvtSelector_h_
00003 
00004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00005 #include "HepMC/GenEvent.h"
00006 #include "HepMC/GenParticle.h"
00007 
00008 class BaseHiGenEvtSelector {
00009  public:
00010    BaseHiGenEvtSelector(const edm::ParameterSet&){;}
00011    virtual ~BaseHiGenEvtSelector(){;}
00012    virtual bool filter(HepMC::GenEvent *){return true;}
00013    bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double ptMin, double etaMax){
00014       return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().perp() > ptMin && fabs(par->momentum().eta()) < etaMax);
00015    }
00016 };
00017 
00018 #endif
00019