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
21 
24 
25 class myEvtRandomEngine;
26 
27 namespace HepMC {
28  class GenParticle;
29  class GenEvent;
30 } // namespace HepMC
31 
32 class EvtId;
33 class EvtGen;
34 
35 namespace gen {
37  public:
38  // ctor & dtor
40  ~EvtGenInterface() override;
41 
42  void init() override;
43  const std::vector<int>& operatesOnParticles() override { return m_PDGs; }
45  void setRandomEngine(CLHEP::HepRandomEngine* v) override;
46  static double flat();
47 
48  private:
49  bool addToHepMC(HepMC::GenParticle* partHep, const EvtId& idEvt, HepMC::GenEvent* theEvent, bool del_daug);
51  void SetDefault_m_PDGs();
54  void go_through_daughters(EvtParticle* part);
55 
56  EvtGen* m_EvtGen; // EvtGen main object
57 
58  std::vector<EvtId> forced_id; // EvtGen Id's of particles which are to be forced by EvtGen
59  std::vector<int> forced_pdgids; // PDG Id's of particles which are to be forced by EvtGen
60 
61  std::vector<int> ignore_pdgids; // HepId's of particles which are to be ignroed by EvtGen
62 
63  // Adding parameters for polarization of spin-1/2 particles
64  std::vector<int> polarize_ids;
65  std::vector<double> polarize_pol;
66  std::map<int, float> polarizations;
67  int BmixingOption = 1;
69 
70  static CLHEP::HepRandomEngine* fRandomEngine;
72  };
73 } // namespace gen
74 #endif
edm::ParameterSet * fPSet
std::vector< int > polarize_ids
static double flat()
double v[5][pyjets_maxn]
void go_through_daughters(EvtParticle *part)
std::vector< int > forced_pdgids
bool addToHepMC(HepMC::GenParticle *partHep, const EvtId &idEvt, HepMC::GenEvent *theEvent, bool del_daug)
double p[5][pyjets_maxn]
void setRandomEngine(CLHEP::HepRandomEngine *v) override
static CLHEP::HepRandomEngine * fRandomEngine
std::map< int, float > polarizations
std::vector< EvtId > forced_id
HepMC::GenEvent * decay(HepMC::GenEvent *) override
std::vector< double > polarize_pol
void update_particles(HepMC::GenParticle *partHep, HepMC::GenEvent *theEvent, HepMC::GenParticle *p)
EvtGenInterface(const edm::ParameterSet &)
const std::vector< int > & operatesOnParticles() override
part
Definition: HCALResponse.h:20
bool hasnoDaughter(HepMC::GenParticle *p)
myEvtRandomEngine * the_engine
void init() override
std::vector< int > ignore_pdgids
bool findLastinChain(HepMC::GenParticle *&p)