CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
BaseHiGenEvtSelector.h
Go to the documentation of this file.
1 #ifndef __BaseHiGenEvtSelector_h_
2 #define __BaseHiGenEvtSelector_h_
3 
5 #include "HepMC/GenEvent.h"
6 #include "HepMC/GenParticle.h"
7 
9  public:
11  virtual ~BaseHiGenEvtSelector(){;}
12  virtual bool filter(HepMC::GenEvent *){return true;}
13  bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double ptMin, double etaMax){
14  return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().perp() > ptMin && fabs(par->momentum().eta()) < etaMax);
15  }
16 };
17 
18 #endif
19 
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual bool filter(HepMC::GenEvent *)
BaseHiGenEvtSelector(const edm::ParameterSet &)
tuple status
Definition: mps_update.py:57