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.bg.root",
25 partName[chosenPart].Data(),
31 TString parFile = Form(
"%s/tutorial2_%s.params_p%1.3f_t%1.0f_n%d.bg.root",
33 partName[chosenPart].Data(),
52 run->SetName(
"TGeant3");
76 boxGen->
SetPRange(momentum, momentum + 0.01);
91 parOut->
open(parFile.Data());
103 cout << endl << endl;
109 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
111 cout <<
"</DartMeasurement>" << endl;
114 Double_t rtime = timer.RealTime();
115 Double_t ctime = timer.CpuTime();
117 Float_t cpuUsage = ctime / rtime;
118 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
120 cout <<
"</DartMeasurement>" << endl;
122 cout << endl << endl;
123 cout <<
"Output file is " << outFile << endl;
124 cout <<
"Parameter file is " << parFile << endl;
125 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
126 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_background(Int_t nEvents=130)