FairRoot/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 "FairGenerator.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 "TRandom3.h"
15 
16 class FairPrimaryGenerator;
17 using namespace Pythia8;
18 
19 class PyTr1Rng : public RndmEngine
20 {
21  public:
23  rng = new TRandom1(gRandom->GetSeed());
24  };
25  virtual ~PyTr1Rng() {};
26 
28  return rng->Rndm();
29  };
30 
31  private:
32  TRandom1 *rng;
33 };
34 
35 class PyTr3Rng : public RndmEngine
36 {
37  public:
39  rng = new TRandom3(gRandom->GetSeed());
40  };
41  virtual ~PyTr3Rng() {};
42 
44  return rng->Rndm();
45  };
46 
47  private:
48  TRandom3 *rng;
49 };
50 
51 
52 
53 
54 class PndPythia8Direct : public FairGenerator
55 {
56  public:
57 
60 
62  virtual ~PndPythia8Direct();
63 
65  Bool_t ReadEvent(FairPrimaryGenerator*);
66  void SetParameters(char*);
67  void Print();
68 
69  virtual Bool_t Init();
70 
72  fMom = mom;
73  };
74  void UseRandom1() {
75  fUseRandom1 = kTRUE;
76  fUseRandom3 = kFALSE;
77  };
78  void UseRandom3() {
79  fUseRandom1 = kFALSE;
80  fUseRandom3 = kTRUE;
81  };
82 
83  private:
84 
85  Pythia fPythia;
86  RndmEngine* fRandomEngine;
87  char* fParams[100];
88 
89  protected:
90 
91  Double_t fMom; // pbar momentum
92  Int_t fPar_it; // number of parameter lines
93  Bool_t fUseRandom1; // flag to use TRandom1
94  Bool_t fUseRandom3; // flag to use TRandom3 (default)
95 
96  ClassDef(PndPythia8Direct,1);
97 };
98 
99 #endif /* !PNDP8GENERATOR_H */
100 
MechFsc Print()
Double_t flat()
RndmEngine * fRandomEngine
Double_t mom
Definition: plot_dirc.C:14
Double_t flat()
virtual ~PyTr1Rng()
Double_t
fRun Init()
Definition: NHitsPerEvent.C:20
f1 SetParameters(par1)
virtual ~PyTr3Rng()
void SetMom(Double_t mom)