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
PartonHadronDecayGenEvtSelector::hadronStatus_
std::vector< int > hadronStatus_
Definition: PartonHadronDecayGenEvtSelector.h:37
BaseHiGenEvtSelector.h
PartonHadronDecayGenEvtSelector::hadronEtaMin_
std::vector< double > hadronEtaMin_
Definition: PartonHadronDecayGenEvtSelector.h:39
PartonHadronDecayGenEvtSelector::hadronId_
std::vector< int > hadronId_
Definition: PartonHadronDecayGenEvtSelector.h:36
ALCARECOTkAlBeamHalo_cff.etaMin
etaMin
GeV.
Definition: ALCARECOTkAlBeamHalo_cff.py:32
PartonHadronDecayGenEvtSelector::partonPtMin_
std::vector< double > partonPtMin_
Definition: PartonHadronDecayGenEvtSelector.h:34
PartonHadronDecayGenEvtSelector::hadronPtMax_
std::vector< double > hadronPtMax_
Definition: PartonHadronDecayGenEvtSelector.h:41
PartonHadronDecayGenEvtSelector::decayEtaMax_
double decayEtaMax_
Definition: PartonHadronDecayGenEvtSelector.h:46
mps_update.status
status
Definition: mps_update.py:68
PartonHadronDecayGenEvtSelector::selectParticle
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double ptMin, double etaMax)
Definition: PartonHadronDecayGenEvtSelector.h:13
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
PartonHadronDecayGenEvtSelector::decayPtMax_
double decayPtMax_
Definition: PartonHadronDecayGenEvtSelector.h:49
PartonHadronDecayGenEvtSelector::hadronPMin_
std::vector< double > hadronPMin_
Definition: PartonHadronDecayGenEvtSelector.h:40
PartonHadronDecayGenEvtSelector::~PartonHadronDecayGenEvtSelector
~PartonHadronDecayGenEvtSelector() override
Definition: PartonHadronDecayGenEvtSelector.h:10
PartonHadronDecayGenEvtSelector::decayId_
int decayId_
Definition: PartonHadronDecayGenEvtSelector.h:44
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
PartonHadronDecayGenEvtSelector::decayPMin_
double decayPMin_
Definition: PartonHadronDecayGenEvtSelector.h:48
PartonHadronDecayGenEvtSelector::decayEtaMin_
double decayEtaMin_
Definition: PartonHadronDecayGenEvtSelector.h:47
AlignmentTrackSelector_cfi.ptMax
ptMax
Definition: AlignmentTrackSelector_cfi.py:12
PartonHadronDecayGenEvtSelector::decayNtrig_
int decayNtrig_
Definition: PartonHadronDecayGenEvtSelector.h:51
edm::ParameterSet
Definition: ParameterSet.h:47
ALCARECOTkAlMinBias_cff.pMin
pMin
GeV.
Definition: ALCARECOTkAlMinBias_cff.py:35
PartonHadronDecayGenEvtSelector::selectParticle
bool selectParticle(HepMC::GenParticle *par, int status, int pdg, double etaMax, double etaMin, double pMin, double ptMax, double ptMin)
Definition: PartonHadronDecayGenEvtSelector.h:17
BaseHiGenEvtSelector
Definition: BaseHiGenEvtSelector.h:8
PartonHadronDecayGenEvtSelector
Definition: PartonHadronDecayGenEvtSelector.h:7
PartonHadronDecayGenEvtSelector::partonId_
std::vector< int > partonId_
Definition: PartonHadronDecayGenEvtSelector.h:31
PartonHadronDecayGenEvtSelector::decayPtMin_
double decayPtMin_
Definition: PartonHadronDecayGenEvtSelector.h:50
PartonHadronDecayGenEvtSelector::partonStatus_
std::vector< int > partonStatus_
Definition: PartonHadronDecayGenEvtSelector.h:32
PartonHadronDecayGenEvtSelector::decayStatus_
int decayStatus_
Definition: PartonHadronDecayGenEvtSelector.h:45
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
PartonHadronDecayGenEvtSelector::hadronEtaMax_
std::vector< double > hadronEtaMax_
Definition: PartonHadronDecayGenEvtSelector.h:38
PartonHadronDecayGenEvtSelector::partonEtaMax_
std::vector< double > partonEtaMax_
Definition: PartonHadronDecayGenEvtSelector.h:33
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
pdg
Definition: pdg_functions.h:28
PartonHadronDecayGenEvtSelector::hadronPtMin_
std::vector< double > hadronPtMin_
Definition: PartonHadronDecayGenEvtSelector.h:42
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PartonHadronDecayGenEvtSelector::filter
bool filter(HepMC::GenEvent *) override
Definition: PartonHadronDecayGenEvtSelector.cc:55
PartonHadronDecayGenEvtSelector::PartonHadronDecayGenEvtSelector
PartonHadronDecayGenEvtSelector(const edm::ParameterSet &pset)
Definition: PartonHadronDecayGenEvtSelector.cc:6
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27