8 int runMM(Int_t nEvents = 1000, TString mcEngine =
"TGeant4", Bool_t isMT =
false)
10 UInt_t randomSeed = 123456;
11 gRandom->SetSeed(randomSeed);
13 TString dir = getenv(
"VMCWORKDIR");
15 TString tut_geomdir = dir +
"/common/geometry";
16 gSystem->Setenv(
"GEOMPATH", tut_geomdir.Data());
18 TString tut_configdir = dir +
"/common/gconfig";
19 gSystem->Setenv(
"CONFIG_DIR", tut_configdir.Data());
21 TString outDir =
"./";
24 TString outFile = Form(
"%s/prop.mc.root", outDir.Data());
27 TString parFile = Form(
"%s/prop.par.root", outDir.Data());
29 TString geoFile =
"geofile_" + mcEngine +
"_full.root";
45 run->SetName(mcEngine);
109 parOut->
open(parFile.Data());
122 cout << endl << endl;
128 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
130 cout <<
"</DartMeasurement>" << endl;
133 Double_t rtime = timer.RealTime();
134 Double_t ctime = timer.CpuTime();
136 Float_t cpuUsage = ctime / rtime;
137 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
139 cout <<
"</DartMeasurement>" << endl;
141 cout << endl << endl;
142 cout <<
"Output file is " << outFile << endl;
143 cout <<
"Parameter file is " << parFile << endl;
144 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
145 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
void CreateGeometryFile(const char *geofile)
list of container factories
int runMM(Int_t nEvents=1000, TString mcEngine="TGeant4", Bool_t isMT=false)
void SetField(FairField *field)
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void AddGenerator(FairGenerator *generator)
void SetField(Double_t bX, Double_t bY, Double_t bZ)
void SetPointsArrayName(const std::string &tempName)
void SetGenerator(FairPrimaryGenerator *Gen)
void SetSink(FairSink *tempSink)
void SetIsMT(Bool_t isMT)
void SetFieldRegion(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
FairParRootFileIo * parOut
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)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)