11 TString dir = getenv(
"VMCWORKDIR");
13 TString tut_configdir = dir +
"/simulation/Tutorial4/gconfig";
14 gSystem->Setenv(
"CONFIG_DIR", tut_configdir.Data());
16 TString tut_geomdir = dir +
"/common/geometry";
17 gSystem->Setenv(
"GEOMPATH", tut_geomdir.Data());
19 Double_t momentum = 2.;
23 TString outDir =
"./data/";
26 TString outFile =
"makeGeo_";
27 outFile = outDir + outFile + mcEngine +
".root";
29 TString geoFile =
"makeGeoFile_";
30 geoFile = outDir + geoFile + mcEngine +
"_full.root";
32 TString parFile =
"makeGeoParams_";
33 parFile = outDir + parFile + mcEngine +
".root";
35 TList* parFileList =
new TList();
62 run->SetName(mcEngine);
89 boxGen->
SetPRange(momentum, momentum + 0.01);
91 boxGen->
SetBoxXYZ(-20., -20., 20., 20., 0.);
106 parOut->
open(parFile.Data());
107 parIn->
open(parFileList,
"in");
128 cout << endl << endl;
134 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
136 cout <<
"</DartMeasurement>" << endl;
139 Double_t rtime = timer.RealTime();
140 Double_t ctime = timer.CpuTime();
142 Float_t cpuUsage = ctime / rtime;
143 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
145 cout <<
"</DartMeasurement>" << endl;
147 cout << endl << endl;
148 cout <<
"Output file is " << outFile << endl;
149 cout <<
"Parameter file is " << parFile << endl;
150 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
151 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
void CreateGeometryFile(const char *geofile)
list of container factories
Bool_t open(const Text_t *fname, const Text_t *status="in")
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void AddGenerator(FairGenerator *generator)
void SetGenerator(FairPrimaryGenerator *Gen)
void SetSink(FairSink *tempSink)
void SetIsMT(Bool_t isMT)
FairParRootFileIo * parOut
void SetBoxXYZ(Double32_t x1=0, Double32_t y1=0, Double32_t x2=0, Double32_t y2=0, Double32_t z=0)
FairRuntimeDb * GetRuntimeDb(void)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
void run_tutorial4_createGeometryFile(Int_t nEvents=1, TString mcEngine="TGeant3", Bool_t isMT=false)
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)
Bool_t setFirstInput(FairParIo *)