CMS 3D CMS Logo

HadronDecayGenEvtSelector.h
Go to the documentation of this file.
1 #ifndef _HI_HadronDecayGenEvtSelector_h__
2 #define _HI_HadronDecayGenEvtSelector_h__
3 
4 #include <vector>
6 
8 public:
10  ~HadronDecayGenEvtSelector() override { ; }
11 
12  bool filter(HepMC::GenEvent*) override;
14  int status,
15  int pdg /*Absolute*/,
16  double etaMax,
17  double etaMin,
18  double pMin,
19  double ptMax,
20  double ptMin) {
21  return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().eta() < etaMax &&
22  par->momentum().eta() > etaMin && par->momentum().rho() > pMin && par->momentum().perp() < ptMax &&
23  par->momentum().perp() > ptMin);
24  }
25 
26 private:
27  std::vector<int> hadronId_;
28  std::vector<int> hadronStatus_;
29  std::vector<double> hadronEtaMax_;
30  std::vector<double> hadronEtaMin_;
31  std::vector<double> hadronPMin_;
32  std::vector<double> hadronPtMax_;
33  std::vector<double> hadronPtMin_;
34 
35  int decayId_;
37  double decayEtaMax_;
38  double decayEtaMin_;
39  double decayPMin_;
40  double decayPtMax_;
41  double decayPtMin_;
43 };
44 
45 #endif
BaseHiGenEvtSelector.h
HadronDecayGenEvtSelector::hadronPtMin_
std::vector< double > hadronPtMin_
Definition: HadronDecayGenEvtSelector.h:33
ALCARECOTkAlBeamHalo_cff.etaMin
etaMin
GeV.
Definition: ALCARECOTkAlBeamHalo_cff.py:32
HadronDecayGenEvtSelector::decayNtrig_
int decayNtrig_
Definition: HadronDecayGenEvtSelector.h:42
mps_update.status
status
Definition: mps_update.py:69
HadronDecayGenEvtSelector::decayPtMin_
double decayPtMin_
Definition: HadronDecayGenEvtSelector.h:41
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:153
HadronDecayGenEvtSelector::hadronEtaMax_
std::vector< double > hadronEtaMax_
Definition: HadronDecayGenEvtSelector.h:29
HadronDecayGenEvtSelector::hadronPMin_
std::vector< double > hadronPMin_
Definition: HadronDecayGenEvtSelector.h:31
HadronDecayGenEvtSelector::decayStatus_
int decayStatus_
Definition: HadronDecayGenEvtSelector.h:36
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
HadronDecayGenEvtSelector::decayEtaMax_
double decayEtaMax_
Definition: HadronDecayGenEvtSelector.h:37
HadronDecayGenEvtSelector::selectParticle
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double etaMax, double etaMin, double pMin, double ptMax, double ptMin)
Definition: HadronDecayGenEvtSelector.h:13
AlignmentTrackSelector_cfi.ptMax
ptMax
Definition: AlignmentTrackSelector_cfi.py:12
HadronDecayGenEvtSelector::decayId_
int decayId_
Definition: HadronDecayGenEvtSelector.h:35
HadronDecayGenEvtSelector::hadronEtaMin_
std::vector< double > hadronEtaMin_
Definition: HadronDecayGenEvtSelector.h:30
edm::ParameterSet
Definition: ParameterSet.h:36
HadronDecayGenEvtSelector::decayPMin_
double decayPMin_
Definition: HadronDecayGenEvtSelector.h:39
ALCARECOTkAlMinBias_cff.pMin
pMin
GeV.
Definition: ALCARECOTkAlMinBias_cff.py:35
BaseHiGenEvtSelector
Definition: BaseHiGenEvtSelector.h:8
HadronDecayGenEvtSelector::filter
bool filter(HepMC::GenEvent *) override
Definition: HadronDecayGenEvtSelector.cc:39
HadronDecayGenEvtSelector::hadronStatus_
std::vector< int > hadronStatus_
Definition: HadronDecayGenEvtSelector.h:28
HadronDecayGenEvtSelector
Definition: HadronDecayGenEvtSelector.h:7
HadronDecayGenEvtSelector::hadronPtMax_
std::vector< double > hadronPtMax_
Definition: HadronDecayGenEvtSelector.h:32
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
HadronDecayGenEvtSelector::decayPtMax_
double decayPtMax_
Definition: HadronDecayGenEvtSelector.h:40
HadronDecayGenEvtSelector::decayEtaMin_
double decayEtaMin_
Definition: HadronDecayGenEvtSelector.h:38
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
HadronDecayGenEvtSelector::hadronId_
std::vector< int > hadronId_
Definition: HadronDecayGenEvtSelector.h:27
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
HadronDecayGenEvtSelector::HadronDecayGenEvtSelector
HadronDecayGenEvtSelector(const edm::ParameterSet &pset)
Definition: HadronDecayGenEvtSelector.cc:6
HadronDecayGenEvtSelector::~HadronDecayGenEvtSelector
~HadronDecayGenEvtSelector() override
Definition: HadronDecayGenEvtSelector.h:10