9 #if !defined(__CLING__) || defined(__ROOTCLING__)
23 #include <TStopwatch.h>
39 TString dir = getenv(
"VMCWORKDIR");
40 TString tutdir = dir +
"/simulation/Tutorial1";
42 TString tut_geomdir = dir +
"/common/geometry";
43 gSystem->Setenv(
"GEOMPATH", tut_geomdir.Data());
45 TString tut_configdir = dir +
"/common/gconfig";
46 gSystem->Setenv(
"CONFIG_DIR", tut_configdir.Data());
48 TString partName[] = {
"pions",
"eplus",
"proton"};
49 Int_t partPdgC[] = {211, 11, 2212};
52 Double_t momentum = 2.;
62 TString geoFile =
"geofile_" + config.
GetEngine() +
"_full.root";
103 boxGen.
SetPRange(momentum, momentum + 0.01);
114 TRandom3 random(randomSeed);
124 parOut.
open(parFile.Data());
137 cout << endl << endl;
143 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
145 cout <<
"</DartMeasurement>" << endl;
148 Double_t rtime = timer.RealTime();
149 Double_t ctime = timer.CpuTime();
151 Float_t cpuUsage = ctime / rtime;
152 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
154 cout <<
"</DartMeasurement>" << endl;
156 cout << endl << endl;
157 cout <<
"Output file is " << outFile << endl;
158 cout <<
"Parameter file is " << parFile << endl;
159 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
160 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
void CreateGeometryFile(const char *geofile)
list of container factories
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void AddGenerator(FairGenerator *generator)
void SetGenerator(FairPrimaryGenerator *Gen)
void run_tutorial1_main(const FairSimConfig &config)
void SetSink(FairSink *tempSink)
TString GetEngine() const
void run_tutorial1_binary()
TString GetOutputFile() const
void SetIsMT(Bool_t isMT)
bool IsMultiThreaded() const
FairParRootFileIo * parOut
int GetRandomSeed() const
FairRuntimeDb * GetRuntimeDb(void)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
void SetMaterials(const char *MatFileName)
Bool_t setOutput(FairParIo *)
Bool_t open(const Text_t *fname, Option_t *option="READ", const Text_t *ftitle="", Int_t compress=1)
virtual void Run(Int_t NEvents=0, Int_t NotUsed=0)
void AddModule(FairModule *Mod)
TString GetParameterFile() const
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)