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
constexpr float ptMin
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double etaMax, double etaMin, double pMin, double ptMax, double ptMin)
std::vector< double > hadronEtaMax_
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HadronDecayGenEvtSelector(const edm::ParameterSet &pset)
std::vector< double > hadronEtaMin_
std::vector< double > hadronPtMax_
std::vector< double > hadronPtMin_
bool filter(HepMC::GenEvent *) override