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  bool addToHepMC(HepMC::GenParticle* partHep,const EvtId &idEvt, HepMC::GenEvent* theEvent,bool allowMixing=true,bool mixforce=false,bool noforced=false);
51  void update_particles(HepMC::GenParticle* partHep,HepMC::GenEvent* theEvent,HepMC::GenParticle* p,bool allowMixing=true,bool mixforce=false,bool noforced=false);
52  void SetDefault_m_PDGs();
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 }
74 #endif
edm::ParameterSet * fPSet
void update_particles(HepMC::GenParticle *partHep, HepMC::GenEvent *theEvent, HepMC::GenParticle *p, bool allowMixing=true, bool mixforce=false, bool noforced=false)
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
EvtGenInterface(const edm::ParameterSet &)
bool hasnoDaughter(HepMC::GenParticle *p)
myEvtRandomEngine * the_engine
std::vector< int > ignore_pdgids
bool findLastinChain(HepMC::GenParticle *&p)
bool addToHepMC(HepMC::GenParticle *partHep, const EvtId &idEvt, HepMC::GenEvent *theEvent, bool allowMixing=true, bool mixforce=false, bool noforced=false)