Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:06:54

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