CMS 3D CMS Logo

PartonHadronDecayGenEvtSelector.h
Go to the documentation of this file.
1 #ifndef _HI_PartonHadronDecayGenEvtSelector_h__
2 #define _HI_PartonHadronDecayGenEvtSelector_h__
3 
4 #include <vector>
6 
8 public:
11 
12  bool filter(HepMC::GenEvent*) override;
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  }
18  int status,
19  int pdg /*Absolute*/,
20  double etaMax,
21  double etaMin,
22  double pMin,
23  double ptMax,
24  double ptMin) {
25  return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().eta() < etaMax &&
26  par->momentum().eta() > etaMin && par->momentum().rho() > pMin && par->momentum().perp() < ptMax &&
27  par->momentum().perp() > ptMin);
28  }
29 
30 private:
31  std::vector<int> partonId_;
32  std::vector<int> partonStatus_;
33  std::vector<double> partonEtaMax_;
34  std::vector<double> partonPtMin_;
35 
36  std::vector<int> hadronId_;
37  std::vector<int> hadronStatus_;
38  std::vector<double> hadronEtaMax_;
39  std::vector<double> hadronEtaMin_;
40  std::vector<double> hadronPMin_;
41  std::vector<double> hadronPtMax_;
42  std::vector<double> hadronPtMin_;
43 
44  int decayId_;
46  double decayEtaMax_;
47  double decayEtaMin_;
48  double decayPMin_;
49  double decayPtMax_;
50  double decayPtMin_;
52 };
53 
54 #endif
constexpr float ptMin
PartonHadronDecayGenEvtSelector(const edm::ParameterSet &pset)
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double etaMax, double etaMin, double pMin, double ptMax, double ptMin)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool filter(HepMC::GenEvent *) override
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)