2 TTimeStamp* timeStamp =
new TTimeStamp();
3 Int_t newSeed = 1000*(Int_t)(timeStamp->AsDouble())+timeStamp-(Int_t)(timeStamp->AsDouble());
4 gRandom->SetSeed(newSeed);
6 if ( nStations != 3 && nStations != 4 ) {
7 cout <<
"WRONG number of stations, only 3 or 4 allowed." << endl;
19 TString outputFile = Form(
"points_22Part_n%d_f%d_sep.root",
nEvents,fileId);
21 FairRunSim *
fRun =
new FairRunSim();
26 fRun->SetName(
"TGeant3");
28 fRun->SetOutputFile(outputFile.Data());
33 fRun->SetMaterials(
"media_pnd.geo");
39 Cave->SetGeometryFileName(
"pndcave.geo");
40 fRun->AddModule(Cave);
43 Dipole->SetGeometryFileName(
"dipole.geo");
44 fRun->AddModule(Dipole);
47 fRun->AddModule(Pipe);
52 Mvd->SetGeometryFileName(
"Mvd-2.1_FullVersion.root");
55 FairDetector *
Stt=
new PndStt(
"STT", kTRUE);
57 Stt->SetGeometryFileName(
"straws_skewed_blocks_35cm_pipe.geo");
59 Stt->SetGeometryFileName(
"straws_skewed_blocks_pipe_120cm.geo");
63 Gem->SetGeometryFileName(Form(
"gem_%dStations.root",nStations));
90 FairPrimaryGenerator*
primGen =
new FairPrimaryGenerator();
91 fRun->SetGenerator(primGen);
93 FairBoxGenerator *
fBox =
new FairBoxGenerator(
pid, 2);
94 fBox->SetPRange(.3,10.);
95 fBox->SetThetaRange(2.,100.);
96 fBox->SetPhiRange( 0.,360);
98 primGen->AddGenerator(fBox);
99 FairBoxGenerator *
fBox2 =
new FairBoxGenerator(-
pid, 2);
100 fBox2->SetPRange(.3,10.);
101 fBox2->SetThetaRange(2.,100.);
102 fBox2->SetPhiRange( 0.,360);
104 primGen->AddGenerator(fBox2);
106 fRun->SetBeamMom(15);
109 fRun->SetField(fField);
112 fRun->SetStoreTraj(kFALSE);
113 fRun->SetRadLenRegister(kFALSE);
119 FairRuntimeDb *
rtdb=fRun->GetRuntimeDb();
121 FairParRootFileIo*
output=
new FairParRootFileIo(kParameterMerged);
122 output->open(parOutput.Data(),
"RECREATE");
123 rtdb->setOutput(output);
137 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
139 cout <<
" Test passed" << endl;
140 cout <<
" All ok " << endl;
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
int sim_BARREL_1000sep(Int_t fileId=0, Int_t nEvents=1000, Int_t pid=13, Int_t nStations=3)
FairParRootFileIo * output
FairPrimaryGenerator * primGen