Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:04:37

0001 #ifndef _HI_PartonHadronDecayGenEvtSelector_h__
0002 #define _HI_PartonHadronDecayGenEvtSelector_h__
0003 
0004 #include <vector>
0005 #include "GeneratorInterface/HiGenCommon/interface/BaseHiGenEvtSelector.h"
0006 
0007 class PartonHadronDecayGenEvtSelector : public BaseHiGenEvtSelector {
0008 public:
0009   PartonHadronDecayGenEvtSelector(const edm::ParameterSet& pset);
0010   ~PartonHadronDecayGenEvtSelector() override { ; }
0011 
0012   bool filter(HepMC::GenEvent*) override;
0013   bool selectParticle(HepMC::GenParticle* par, int status, int pdg /*Absolute*/, double ptMin, double etaMax) {
0014     return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().perp() > ptMin &&
0015             fabs(par->momentum().eta()) < etaMax);
0016   }
0017   bool selectParticle(HepMC::GenParticle* par,
0018                       int status,
0019                       int pdg /*Absolute*/,
0020                       double etaMax,
0021                       double etaMin,
0022                       double pMin,
0023                       double ptMax,
0024                       double ptMin) {
0025     return (par->status() == status && abs(par->pdg_id()) == pdg && par->momentum().eta() < etaMax &&
0026             par->momentum().eta() > etaMin && par->momentum().rho() > pMin && par->momentum().perp() < ptMax &&
0027             par->momentum().perp() > ptMin);
0028   }
0029 
0030 private:
0031   std::vector<int> partonId_;
0032   std::vector<int> partonStatus_;
0033   std::vector<double> partonEtaMax_;
0034   std::vector<double> partonPtMin_;
0035 
0036   std::vector<int> hadronId_;
0037   std::vector<int> hadronStatus_;
0038   std::vector<double> hadronEtaMax_;
0039   std::vector<double> hadronEtaMin_;
0040   std::vector<double> hadronPMin_;
0041   std::vector<double> hadronPtMax_;
0042   std::vector<double> hadronPtMin_;
0043 
0044   int decayId_;
0045   int decayStatus_;
0046   double decayEtaMax_;
0047   double decayEtaMin_;
0048   double decayPMin_;
0049   double decayPtMax_;
0050   double decayPtMin_;
0051   int decayNtrig_;
0052 };
0053 
0054 #endif