EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairRunSim.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairRunSim.h
1 #ifndef FAIRRUNSIM_H
2 #define FAIRRUNSIM_H
3 
4 #include "FairRun.h"
5 
6 #include "FairMCApplication.h"
7 #include "FairIon.h"
8 #include "FairParticle.h"
9 #include "TObjArray.h"
10 #include "TString.h"
11 #include <iostream>
12 
13 class FairModule;
14 class FairField;
16 class FairMCEventHeader;
17 class FairMesh;
18 
25 class FairRunSim : public FairRun
26 {
27  public:
29  FairRunSim();
31  virtual ~FairRunSim();
33  static FairRunSim* Instance();
37  virtual void AddModule (FairModule* Mod);
41  void AddNewIon(FairIon* ion) {fIons->Add(ion);}
49  TObjArray* GetUserDefIons();
53  TObjArray* GetUserDefParticles();
54 
58  virtual void Init();
62  virtual void Run(Int_t NEvents =0, Int_t NotUsed=0);
66  void SetField(FairField* field);
71 
76  void SetMCEventHeader(FairMCEventHeader* McHeader) {fMCEvHead=McHeader;}
77 
79  virtual void SetMaterials(const char* MatFileName);
80 
82  void SetStoreTraj(Bool_t storeTraj=kTRUE) {fStoreTraj = storeTraj;}
83 
85  void SetTrackingDebugMode( Bool_t set ) { if (fApp) { fApp->SetTrackingDebugMode( set ); } }
86 
88  void SetGeoModel( char* name );
89 
91  TString* GetGeoModel () { return fLoaderName; }
92 
94  FairField* GetField() { return fField;}
95 
98 
100  TObjArray* GetListOfModules() { return ListOfModules;}
101 
104 
106  void SetPythiaDecayer(Bool_t decayer) {fPythiaDecayer = decayer;}
107 
109  void SetPythiaDecayer(const TString& Config );
110 
112  void SetUserDecay(const TString& Config);
113 
115  void SetUserDecay(Bool_t decay) {fUserDecay = decay;}
116 
118  Bool_t IsExtDecayer() {return fPythiaDecayer; }
119 
121  Bool_t IsUserDecay() {return fUserDecay; }
122 
125 
127 
129 
130  void AddMesh (FairMesh* Mesh);
131 
132  void SetUserConfig(const TString& Config) {fUserConfig = Config;}
133 
134  void SetUserCuts(const TString& Cuts) {fUserCuts= Cuts;}
135 
137  void SetBeamMom(Double_t BeamMom) { fBeamMom= BeamMom; fUseBeamMom=kTRUE;}
138 
140  Double_t GetBeamMom() {return fBeamMom;}
141 
143  Bool_t UseBeamMom() {return fUseBeamMom;}
144  void SetFieldContainer();
145  private:
146  FairRunSim(const FairRunSim& M);
147  FairRunSim& operator= (const FairRunSim&) {return *this;}
148  void SetMCConfig();
149  void CheckFlukaExec();
150  protected:
151 
152  Int_t count;
154  Double_t fBeamMom;
155  Bool_t fUseBeamMom;
159  FairField* fField;
160  const char* fMapName;
161  TObjArray* fIons;
162  TObjArray* fParticles;
163  TObjArray* ListOfModules;
164  TString MatFname;
165  Bool_t fStoreTraj;
166  TString* fLoaderName;
167  Bool_t fPythiaDecayer;
169  Bool_t fUserDecay;
171  Bool_t fRadLength;
172  Bool_t fRadMap;
173  Bool_t fRadGrid;
174  TObjArray* fMeshList;
175  TString fUserConfig;
176  TString fUserCuts;
177 
178 
179  ClassDef(FairRunSim ,2)
180 
181 };
182 
183 #endif //FAIRRUNSIM_H
184 
185 
186 
187 
188