CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 #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
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)