CMS 3D CMS Logo

EvtGenInterface.h
Go to the documentation of this file.
1 // Class Based on EvtGenInterface(LHC).
2 //
3 // Created March 2014
4 //
5 // This class is a modification of the original EvtGenInterface which was developed for EvtGenLHC 9.1.
6 // The modifications for EvtGen 1.3.0 are implemented by Ian M. Nugent
7 // I would like to thank the EvtGen developers, in particular John Black, and Mikhail Kirsanov for their assistance.
8 //
9 
10 #ifndef gen_EvtGenInterface_h
11 #define gen_EvtGenInterface_h
12 
14 #include <memory>
15 #include <string>
16 #include <vector>
17 
18 #include "EvtGenBase/EvtParticle.hh"
19 // user include files
22 
25 
26 class myEvtRandomEngine;
27 
28 namespace HepMC {
29  class GenParticle;
30  class GenEvent;
31 } // namespace HepMC
32 
33 class EvtId;
34 class EvtGen;
35 
36 namespace gen {
38  public:
39  // ctor & dtor
41  ~EvtGenInterface() override;
42 
43  void init() override;
44  const std::vector<int>& operatesOnParticles() override { return m_PDGs; }
46  void setRandomEngine(CLHEP::HepRandomEngine* v) override;
47  static double flat();
48 
49  private:
50  bool addToHepMC(HepMC::GenParticle* partHep, const EvtId& idEvt, HepMC::GenEvent* theEvent, bool del_daug);
52  void SetDefault_m_PDGs();
55  void go_through_daughters(EvtParticle* part);
56 
57  EvtGen* m_EvtGen; // EvtGen main object
58 
59  std::vector<EvtId> forced_id; // EvtGen Id's of particles which are to be forced by EvtGen
60  std::vector<int> forced_pdgids; // PDG Id's of particles which are to be forced by EvtGen
61 
62  std::vector<int> ignore_pdgids; // HepId's of particles which are to be ignroed by EvtGen
63 
64  // Adding parameters for polarization of spin-1/2 particles
65  std::vector<int> polarize_ids;
66  std::vector<double> polarize_pol;
67  std::map<int, float> polarizations;
68  int BmixingOption = 1;
70 
71  static CLHEP::HepRandomEngine* fRandomEngine;
73  };
74 } // namespace gen
75 #endif
myEvtRandomEngine
Definition: myEvtRandomEngine.h:27
gen::EvtGenInterface::fRandomEngine
static CLHEP::HepRandomEngine * fRandomEngine
Definition: EvtGenInterface.h:71
EvtGenInterfaceBase.h
gen::EvtGenInterface::polarize_pol
std::vector< double > polarize_pol
Definition: EvtGenInterface.h:66
EDProducer.h
gen::EvtGenInterface::setRandomEngine
void setRandomEngine(CLHEP::HepRandomEngine *v) override
Definition: EvtGenInterface.cc:618
gen::EvtGenInterface::flat
static double flat()
Definition: EvtGenInterface.cc:623
RandomNumberGenerator.h
gen::EvtGenInterface::BmixingOption
int BmixingOption
Definition: EvtGenInterface.h:68
gen::EvtGenInterface::decay
HepMC::GenEvent * decay(HepMC::GenEvent *) override
Definition: EvtGenInterface.cc:456
gen::EvtGenInterface
Definition: EvtGenInterface.h:37
gen::EvtGenInterface::init
void init() override
Definition: EvtGenInterface.cc:292
GenParticle
Definition: GenParticle.py:1
gen::EvtGenInterface::the_engine
myEvtRandomEngine * the_engine
Definition: EvtGenInterface.h:72
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
gen::EvtGenInterfaceBase::m_PDGs
std::vector< int > m_PDGs
Definition: EvtGenInterfaceBase.h:27
gen::EvtGenInterfaceBase
Definition: EvtGenInterfaceBase.h:14
part
part
Definition: HCALResponse.h:20
gen::EvtGenInterface::hasnoDaughter
bool hasnoDaughter(HepMC::GenParticle *p)
Definition: EvtGenInterface.cc:650
gen::p
double p[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen
Definition: PythiaDecays.h:13
gen::EvtGenInterface::ignore_pdgids
std::vector< int > ignore_pdgids
Definition: EvtGenInterface.h:62
gen::EvtGenInterface::EvtGenInterface
EvtGenInterface(const edm::ParameterSet &)
Definition: EvtGenInterface.cc:58
edm::ParameterSet
Definition: ParameterSet.h:36
gen::EvtGenInterface::fPSet
edm::ParameterSet * fPSet
Definition: EvtGenInterface.h:69
gen::EvtGenInterface::addToHepMC
bool addToHepMC(HepMC::GenParticle *partHep, const EvtId &idEvt, HepMC::GenEvent *theEvent, bool del_daug)
Definition: EvtGenInterface.cc:541
gen::EvtGenInterface::m_EvtGen
EvtGen * m_EvtGen
Definition: EvtGenInterface.h:57
gen::v
double v[5][pyjets_maxn]
Definition: Cascade2Hadronizer.cc:74
gen::EvtGenInterface::findLastinChain
bool findLastinChain(HepMC::GenParticle *&p)
Definition: EvtGenInterface.cc:633
gen::EvtGenInterface::go_through_daughters
void go_through_daughters(EvtParticle *part)
Definition: EvtGenInterface.cc:659
gen::EvtGenInterface::forced_pdgids
std::vector< int > forced_pdgids
Definition: EvtGenInterface.h:60
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
gen::EvtGenInterface::~EvtGenInterface
~EvtGenInterface() override
Definition: EvtGenInterface.cc:290
Frameworkfwd.h
gen::EvtGenInterface::polarizations
std::map< int, float > polarizations
Definition: EvtGenInterface.h:67
HepMC
Definition: GenParticle.h:15
gen::EvtGenInterface::SetDefault_m_PDGs
void SetDefault_m_PDGs()
Definition: EvtGenInterface.cc:63
gen::EvtGenInterface::forced_id
std::vector< EvtId > forced_id
Definition: EvtGenInterface.h:59
gen::EvtGenInterface::update_particles
void update_particles(HepMC::GenParticle *partHep, HepMC::GenEvent *theEvent, HepMC::GenParticle *p)
Definition: EvtGenInterface.cc:596
gen::EvtGenInterface::operatesOnParticles
const std::vector< int > & operatesOnParticles() override
Definition: EvtGenInterface.h:44
gen::EvtGenInterface::polarize_ids
std::vector< int > polarize_ids
Definition: EvtGenInterface.h:65
ParameterSet.h