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 {
9  public:
12 
13  bool filter(HepMC::GenEvent *);
14  bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double etaMax, double etaMin, double pMin, double ptMax, double ptMin){
15  return (par->status() == status &&
16  abs(par->pdg_id()) == pdg &&
17  par->momentum().eta() < etaMax && par->momentum().eta() > etaMin &&
18  par->momentum().rho() > pMin &&
19  par->momentum().perp() < ptMax && par->momentum().perp() > ptMin);
20  }
21 
22  private:
23 
24  std::vector<int> hadronId_;
25  std::vector<int> hadronStatus_;
26  std::vector<double> hadronEtaMax_;
27  std::vector<double> hadronEtaMin_;
28  std::vector<double> hadronPMin_;
29  std::vector<double> hadronPtMax_;
30  std::vector<double> hadronPtMin_;
31 
32  int decayId_;
34  double decayEtaMax_;
35  double decayEtaMin_;
36  double decayPMin_;
37  double decayPtMax_;
38  double decayPtMin_;
40 
41 };
42 
43 #endif
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_