11 TString dir = getenv(
"VMCWORKDIR");
12 TString tutdir = dir +
"/simulation/Tutorial1";
14 TString tut_geomdir = dir +
"/common/geometry";
15 gSystem->Setenv(
"GEOMPATH", tut_geomdir.Data());
17 TString tut_configdir = dir +
"/common/gconfig";
18 gSystem->Setenv(
"CONFIG_DIR", tut_configdir.Data());
20 TString pythia8Config(tut_configdir +
"/DecayConfigPythia8.C");
22 TString partName[] = {
"pions",
"eplus",
"proton"};
23 Int_t partPdgC[] = {211, 11, 2212};
26 Double_t momentum = 2.;
30 TString outDir =
"./";
33 TString outFile = Form(
"%s/tutorial1_pythia8_%s_%s.mc_p%1.3f_t%1.0f_n%d.root",
36 partName[chosenPart].Data(),
42 TString parFile = Form(
"%s/tutorial1_pythia8_%s_%s.params_p%1.3f_t%1.0f_n%d.root",
45 partName[chosenPart].Data(),
50 TString geoFile = outDir +
"geofile_pythia8_" + mcEngine +
"_full.root";
66 run->SetName(mcEngine);
93 boxGen->
SetPRange(momentum, momentum + 0.01);
110 parOut->
open(parFile.Data());
123 cout << endl << endl;
129 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
131 cout <<
"</DartMeasurement>" << endl;
134 Double_t rtime = timer.RealTime();
135 Double_t ctime = timer.CpuTime();
137 Float_t cpuUsage = ctime / rtime;
138 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
140 cout <<
"</DartMeasurement>" << endl;
142 cout << endl << endl;
143 cout <<
"Output file is " << outFile << endl;
144 cout <<
"Parameter file is " << parFile << endl;
145 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
146 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 SetSink(FairSink *tempSink)
void run_tutorial1_pythia8(Int_t nEvents=10, TString mcEngine="TGeant3")
FairParRootFileIo * parOut
void SetPythiaDecayer(Bool_t decayer)
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)