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 partName[] = {
"pions",
"eplus",
"proton"};
21 Int_t partPdgC[] = {211, 11, 2212};
24 Double_t momentum = 2.;
28 TString outDir =
"./";
31 TString outFile = Form(
"%s/tutorial1_mesh%s_%s.mc_p%1.3f_t%1.0f_n%d.root",
34 partName[chosenPart].Data(),
40 TString parFile = Form(
"%s/tutorial1_mesh%s_%s.params_p%1.3f_t%1.0f_n%d.root",
43 partName[chosenPart].Data(),
62 run->SetName(mcEngine);
87 boxGen->
SetPRange(momentum, momentum + 0.01);
103 aMesh1->
SetX(-60, 60, 200);
104 aMesh1->
SetY(-60, 60, 200);
105 aMesh1->
SetZ(29., 31., 1);
108 aMesh2->
SetX(-20, 20, 20);
109 aMesh2->
SetY(-20, 20, 20);
110 aMesh2->
SetZ(-5.0, 5.0, 1);
127 parOut->
open(parFile.Data());
139 cout << endl << endl;
145 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
147 cout <<
"</DartMeasurement>" << endl;
150 Double_t rtime = timer.RealTime();
151 Double_t ctime = timer.CpuTime();
153 Float_t cpuUsage = ctime / rtime;
154 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
156 cout <<
"</DartMeasurement>" << endl;
158 cout << endl << endl;
159 cout <<
"Output file is " << outFile << endl;
160 cout <<
"Parameter file is " << parFile << endl;
161 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
162 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
void AddMesh(FairMesh *Mesh)
list of container factories
static FairRadGridManager * Instance()
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_mesh(Int_t nEvents=10, TString mcEngine="TGeant3")
void SetY(Double_t ymin, Double_t ymax, Int_t nbin)
void SetX(Double_t xmin, Double_t xmax, Int_t nbin)
FairParRootFileIo * parOut
void SetZ(Double_t zmin, Double_t zmax, Int_t nbin)
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)
void SetOutputFileName(TString tempString)
virtual void Run(Int_t NEvents=0, Int_t NotUsed=0)
void AddModule(FairModule *Mod)
void SetRadGridRegister(Bool_t value)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetStoreTraj(Bool_t storeTraj=kTRUE)