CMS 3D CMS Logo

Pythia6Service.h
Go to the documentation of this file.
1 #ifndef gen_Pythia6Service_h
2 #define gen_Pythia6Service_h
3 
4 #include <vector>
5 
8 
10 
11 // #include "HepMC/PythiaWrapper6_2.h"
12 
13 namespace CLHEP {
14  class HepRandomEngine;
15 }
16 
17 namespace gen {
18 
19  // the callbacks from Pythia which are passed on to the Pythia6Service
20  extern "C" {
21  double pyr_(int* idummy);
22  }
23 
25  public:
26  // ctor & dtor
29  ~Pythia6Service() override;
30 
31  void setGeneralParams();
32  void setCSAParams();
33  void setSLHAParams();
34  void setPYUPDAParams(bool afterPyinit);
35  void setSLHAFromHeader(const std::vector<std::string>& lines);
36 
37  void openSLHA(const char*);
38  void closeSLHA();
39  void openPYUPDA(const char*, bool write_file);
40  void closePYUPDA();
41 
42  // initialise Pythia on first call from "dummy" instance
43  void enter() override;
44 
45  CLHEP::HepRandomEngine* randomEngine() const { return fRandomEngine; }
46  void setRandomEngine(CLHEP::HepRandomEngine* v) { fRandomEngine = v; }
47 
48  private:
49  friend double gen::pyr_(int*);
50 
52 
53  CLHEP::HepRandomEngine* fRandomEngine;
54 
55  std::vector<std::string> fParamGeneral;
56  std::vector<std::string> fParamCSA;
57  std::vector<std::string> fParamSLHA;
58  std::vector<std::string> fParamPYUPDA;
59  int fUnitSLHA;
61 
63  };
64 
65 } // namespace gen
66 
67 #endif
CLHEP::HepRandomEngine * randomEngine() const
std::vector< std::string > fParamPYUPDA
std::vector< std::string > fParamGeneral
static Pythia6Service * fPythia6Owner
CLHEP::HepRandomEngine * fRandomEngine
std::vector< std::string > fParamCSA
void setRandomEngine(CLHEP::HepRandomEngine *v)
std::vector< std::string > fParamSLHA
double pyr_(int *idummy)