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