3 TString dir = getenv(
"VMCWORKDIR");
4 TString tutdir = dir +
"/simulation/Tutorial2";
6 TString tut_geomdir = dir +
"/common/geometry";
7 gSystem->Setenv(
"GEOMPATH", tut_geomdir.Data());
9 TString tut_configdir = dir +
"/common/gconfig";
10 gSystem->Setenv(
"CONFIG_DIR", tut_configdir.Data());
12 TString partName[] = {
"pions",
"eplus",
"proton"};
13 Int_t partPdgC[] = {211, 11, 2212};
16 Double_t momentum = 2.;
20 TString outDir =
"./";
23 TString outFile = Form(
"%s/tutorial2_%s.mc_p%1.3f_t%1.0f_n%d.sg%d.root",
25 partName[chosenPart].Data(),
32 TString parFile = Form(
"%s/tutorial2_%s.params_p%1.3f_t%1.0f_n%d.sg%d.root",
34 partName[chosenPart].Data(),
54 run->SetName(
"TGeant3");
78 boxGen->
SetPRange(momentum, momentum + 0.01);
93 parOut->
open(parFile.Data());
105 cout << endl << endl;
111 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
113 cout <<
"</DartMeasurement>" << endl;
116 Double_t rtime = timer.RealTime();
117 Double_t ctime = timer.CpuTime();
119 Float_t cpuUsage = ctime / rtime;
120 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
122 cout <<
"</DartMeasurement>" << endl;
124 cout << endl << endl;
125 cout <<
"Output file is " << outFile << endl;
126 cout <<
"Parameter file is " << parFile << endl;
127 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
128 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
list of container factories
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void AddGenerator(FairGenerator *generator)
void SetGenerator(FairPrimaryGenerator *Gen)
void SetSink(FairSink *tempSink)
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)
void run_signal(Int_t fileNr, Int_t nEvents=10)