9 void run_sim(Int_t nEvents = 10, TString mcEngine =
"TGeant3", Int_t fileId = 0, Bool_t isMT = kFALSE)
11 TString dir = getenv(
"VMCWORKDIR");
12 TString tutdir = dir +
"/MQ/pixelDetector";
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 TString outDir =
"./";
29 outFile = Form(
"%s/pixel_%s.mc.root", outDir.Data(), mcEngine.Data());
31 outFile = Form(
"%s/pixel_%s.mc.f%d.root", outDir.Data(), mcEngine.Data(), fileId);
35 TString parFile = Form(
"%s/pixel_%s.params.root", outDir.Data(), mcEngine.Data());
51 run->SetName(mcEngine);
67 Pixel* det =
new Pixel(
"PixelDetector", kTRUE);
96 parOut->
open(parFile.Data());
109 cout << endl << endl;
115 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
117 cout <<
"</DartMeasurement>" << endl;
120 Double_t rtime = timer.RealTime();
121 Double_t ctime = timer.CpuTime();
123 Float_t cpuUsage = ctime / rtime;
124 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
126 cout <<
"</DartMeasurement>" << endl;
128 cout << endl << endl;
129 cout <<
"Output file is " << outFile << endl;
130 cout <<
"Parameter file is " << parFile << endl;
131 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
132 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 SetIsMT(Bool_t isMT)
FairParRootFileIo * parOut
void run_sim(Int_t nEvents=100, TString mcEngine="TGeant3")
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 SetStoreTraj(Bool_t storeTraj=kTRUE)