8 void run_rutherford(Int_t nEvents = 10, TString mcEngine =
"TGeant4", Bool_t isMT =
true)
11 TString dir = gSystem->Getenv(
"VMCWORKDIR");
12 TString tutdir = dir +
"/simulation/rutherford/macros";
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 outDir =
"data";
21 TString outFile = outDir +
"/test_";
22 outFile = outFile + mcEngine +
".mc.root";
24 TString geoFile = outDir +
"/geofile_rutherford_";
25 geoFile = geoFile + mcEngine +
"_full.root";
27 TString parFile = outDir +
"/params_";
28 parFile = parFile + mcEngine +
".root";
31 gRandom->SetSeed(98989);
55 run->SetName(mcEngine);
94 boxGen1->
SetXYZ(0., 0., -3.);
99 TH2D ypt_hist(
"ypt",
"ypt;y;p_{T}", 100, -2, 2, 100, 0, 2);
100 ypt_hist.Fill(0.2, 0.2);
101 ypt_hist.Fill(0.2, 0.4);
134 parOut->
open(parFile.Data());
147 cout << endl << endl;
153 cout <<
"<DartMeasurement name=\"MaxMemory\" type=\"numeric/double\">";
155 cout <<
"</DartMeasurement>" << endl;
158 Double_t rtime = timer.RealTime();
159 Double_t ctime = timer.CpuTime();
161 Float_t cpuUsage = ctime / rtime;
162 cout <<
"<DartMeasurement name=\"CpuLoad\" type=\"numeric/double\">";
164 cout <<
"</DartMeasurement>" << endl;
166 cout << endl << endl;
167 cout <<
"Output file is " << outFile << endl;
168 cout <<
"Parameter file is " << parFile << endl;
169 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
"s" << endl << endl;
170 cout <<
"Macro finished successfully." << endl;
virtual void SetGeometryFileName(TString fname, TString geoVer="0")
void CreateGeometryFile(const char *geofile)
list of container factories
void SetYPt(const TH2D &yPt)
void SetMultiplicity(Int_t mult)
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void AddGenerator(FairGenerator *generator)
void SetWriteRunInfoFile(Bool_t write)
void SetGenerator(FairPrimaryGenerator *Gen)
void SetSink(FairSink *tempSink)
void SetLogFileName(const std::string &name)
void SetIsMT(Bool_t isMT)
void SetXYZ(Double32_t x=0, Double32_t y=0, Double32_t z=0)
FairParRootFileIo * parOut
void SetPDGType(Int_t pdg)
void SetLogToScreen(bool enabled)
void SetLogToFile(bool enabled)
void SetStoreSecondaries(Bool_t storeSec=kTRUE)
static FairTrajFilter * Instance()
static FairLogger * GetLogger()
void SetStorePrimaries(Bool_t storePrim=kTRUE)
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 SetVertex(Double_t vx, Double_t vy, Double_t vz, Double_t evx=0, Double_t evy=0, Double_t evz=0, eVertexSmear sm=kBox)
virtual void Run(Int_t NEvents=0, Int_t NotUsed=0)
void AddModule(FairModule *Mod)
void run_rutherford(Int_t nEvents=10, TString mcEngine="TGeant4", Bool_t isMT=true)
void SetLogVerbosityLevel(const char *verbosity)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetStoreTraj(Bool_t storeTraj=kTRUE)