CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
11 #ifndef gen_EvtGenInterface_h
12 #define gen_EvtGenInterface_h
13 
15 #include <memory>
16 #include <string>
17 #include <vector>
18 
19 // user include files
22 
25 
26 class myEvtRandomEngine;
27 
28 namespace HepMC {
29  class GenParticle;
30  class GenEvent;
31 }
32 
33 class EvtId;
34 class EvtGen;
35 
36 namespace gen {
38  public:
39  // ctor & dtor
42 
43  virtual void init();
44  virtual const std::vector<int>& operatesOnParticles() { return m_PDGs; }
45  virtual HepMC::GenEvent* decay( HepMC::GenEvent* );
46  virtual void setRandomEngine(CLHEP::HepRandomEngine* v);
47  static double flat();
48 
49  private:
50  void addToHepMC(HepMC::GenParticle* partHep,const EvtId &idEvt, HepMC::GenEvent* theEvent);
51  void update_particles(HepMC::GenParticle* partHep,HepMC::GenEvent* theEvent,HepMC::GenParticle* p);
52  void SetDefault_m_PDGs();
53 
54  EvtGen *m_EvtGen; // EvtGen main object
55 
56  std::vector<EvtId> forced_id; // EvtGen Id's of particles which are to be forced by EvtGen
57  std::vector<int> forced_pdgids; // PDG Id's of particles which are to be forced by EvtGen
58 
59  std::vector<int> ignore_pdgids; // HepId's of particles which are to be ignroed by EvtGen
60 
61  // Adding parameters for polarization of spin-1/2 particles
62  std::vector<int> polarize_ids;
63  std::vector<double> polarize_pol;
64  std::map<int, float> polarizations;
65 
67 
68  static CLHEP::HepRandomEngine* fRandomEngine;
70  };
71 }
72 #endif
edm::ParameterSet * fPSet
virtual HepMC::GenEvent * decay(HepMC::GenEvent *)
std::vector< int > polarize_ids
static double flat()
double v[5][pyjets_maxn]
virtual void setRandomEngine(CLHEP::HepRandomEngine *v)
std::vector< int > forced_pdgids
virtual const std::vector< int > & operatesOnParticles()
double p[5][pyjets_maxn]
static CLHEP::HepRandomEngine * fRandomEngine
std::map< int, float > polarizations
std::vector< EvtId > forced_id
std::vector< double > polarize_pol
void update_particles(HepMC::GenParticle *partHep, HepMC::GenEvent *theEvent, HepMC::GenParticle *p)
EvtGenInterface(const edm::ParameterSet &)
myEvtRandomEngine * the_engine
std::vector< int > ignore_pdgids
void addToHepMC(HepMC::GenParticle *partHep, const EvtId &idEvt, HepMC::GenEvent *theEvent)