SND@LHC Software
Loading...
Searching...
No Matches
Pythia8Generator.h
Go to the documentation of this file.
1#ifndef PNDP8GENERATOR_H
2#define PNDP8GENERATOR_H 1
3
4#include "TROOT.h"
5#include "FairGenerator.h"
6#include "Pythia8/Pythia.h"
7#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
8#include "TTree.h"
9#include "GenieGenerator.h"
10
11class FairPrimaryGenerator;
12
13class Pythia8Generator : public FairGenerator
14{
15 public:
16
19
21 virtual ~Pythia8Generator();
22
24 Bool_t ReadEvent(FairPrimaryGenerator*);
25 void SetParameters(char*);
26 void Print();
27
28 virtual Bool_t Init();
29
30 void SetMom(Double_t mom) { fMom = mom; };
31 void SetId(Double_t id) { fId = id; };
32 void UseRandom1() { fUseRandom1 = kTRUE; fUseRandom3 = kFALSE; };
33 void UseRandom3() { fUseRandom1 = kFALSE; fUseRandom3 = kTRUE; };
34 void UseExternalFile(const char* x, Int_t i){ fextFile = x; firstEvent=i; };
35 void SetfFDs(Double_t z) { fFDs = z; };
36 void SetTarget(TString s, Double_t x,Double_t y ) { targetName = s; xOff=x; yOff=y; };
37 Int_t nrOfRetries(){ return fnRetries; };
38
39 private:
40
41 Pythia8::RndmEngine* fRandomEngine;
42
43 protected:
44
45 Double_t fMom; // proton momentum
46 Int_t fId; // target type
47 Bool_t fUseRandom1; // flag to use TRandom1
48 Bool_t fUseRandom3; // flag to use TRandom3 (default)
49 const char* fextFile; // read charm and beauty hadrons from external file, decay with Pythia
50 Float_t hpx[1], hpy[1], hpz[1], hE[1],hM[1],mpx[1], mpy[1], mpz[1], mE[1],hid[1], mid[1],ck[1];
51 Float_t ancestors[16],subprocCodes[16];
53 TFile* fInputFile;
54 FairLogger* fLogger;
55 TTree* fTree;
56 Pythia8::Pythia* fPythia;
57 Double_t fFDs; // correction for Pythia6 to match measured Ds production
58 Int_t fnRetries; //
61 TString targetName;
62 Double_t xOff;
63 Double_t yOff;
64 Double_t start[3];
65 Double_t end[3];
66 Double_t bparam;
67 Double_t mparam[10];
68 Double_t startZ;
69 Double_t endZ;
71};
72
73#endif /* !PNDP8GENERATOR_H */
virtual Bool_t Init()
void SetMom(Double_t mom)
Double_t mparam[10]
Bool_t ReadEvent(FairPrimaryGenerator *)
void SetTarget(TString s, Double_t x, Double_t y)
void SetParameters(char *)
void SetId(Double_t id)
Pythia8::RndmEngine * fRandomEngine
Float_t subprocCodes[16]
const char * fextFile
FairLogger * fLogger
pointer to a file
ClassDef(Pythia8Generator, 3)
Float_t ancestors[16]
Pythia8::Pythia * fPythia
void SetfFDs(Double_t z)
GenieGenerator * fMaterialInvestigator
void UseExternalFile(const char *x, Int_t i)
TTree * fTree
don't make it persistent, magic ROOT command