CMS 3D CMS Logo

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 &&
15  fabs(par->momentum().eta()) < etaMax);
16  }
17 };
18 
19 #endif
mps_update.status
status
Definition: mps_update.py:69
BaseHiGenEvtSelector::filter
virtual bool filter(HepMC::GenEvent *)
Definition: BaseHiGenEvtSelector.h:12
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
BaseHiGenEvtSelector::BaseHiGenEvtSelector
BaseHiGenEvtSelector(const edm::ParameterSet &)
Definition: BaseHiGenEvtSelector.h:10
BaseHiGenEvtSelector::selectParticle
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)
Definition: BaseHiGenEvtSelector.h:13
edm::ParameterSet
Definition: ParameterSet.h:47
BaseHiGenEvtSelector
Definition: BaseHiGenEvtSelector.h:8
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
pdg
Definition: pdg_functions.h:28
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParameterSet.h
BaseHiGenEvtSelector::~BaseHiGenEvtSelector
virtual ~BaseHiGenEvtSelector()
Definition: BaseHiGenEvtSelector.h:11