PandaRoot
PndPythia8Direct.h
Go to the documentation of this file.
1 #ifndef PNDP8DIRECT_H
2 #define PNDP8DIRECT_H 1
3 
4 #include "TROOT.h"
5 #include "PndTargetGenerator.h"
6 
7 #ifdef __CINT__
8 #define _DLFCN_H_
9 #define _DLFCN_H
10 #endif
11 
12 #include "Pythia.h"
13 #include "TRandom1.h"
14 #include "TRandom.h"
15 
16 class FairPrimaryGenerator;
17 //using namespace Pythia8;
18 
19 // Wrap gRandom to Pythia8
20 class PyTrGRng : public Pythia8::RndmEngine {
21  public:
22  PyTrGRng(){};
23  virtual ~PyTrGRng(){};
24 
25  Double_t flat() { return gRandom->Rndm(); };
26 };
27 
29  public:
32 
34  PndPythia8Direct(Double_t mom, const char *par = "");
35 
37  virtual ~PndPythia8Direct();
38 
40  Bool_t ReadEvent(FairPrimaryGenerator *);
41  void AddParameter(const char *);
42  void SetParameters(const char *);
43  void Print();
44 
45  void SetMom(Double_t mom) { fMom = mom; };
46 
47  virtual Bool_t Init();
48 
49 
50  private:
51  Pythia8::Pythia fPythia;
52  Pythia8::RndmEngine *fRandomEngine;
53  const char *fParams[100];
54 
55  protected:
56  Double_t fMom; // pbar momentum
57  Int_t fPar_it; // number of parameter lines
58 
59  ClassDef(PndPythia8Direct, 1);
60 };
61 
62 #endif /* !PNDP8GENERATOR_H */
virtual ~PyTrGRng()
Double_t flat()
void SetMom(Double_t mom)
Double_t fMom
parameter line storage