7 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
8 gSystem->Load(
"libHypGe");
9 gSystem->Load(
"libHyp");
10 FairRunSim *
fRun =
new FairRunSim();
19 if (WhichDetector == 3)
21 GeoFile =
"hypGe_GeoMarcellCrystalsOnly.root";
22 outFile +=
"TripleV2CrystalsOnly_";
24 else if (WhichDetector == 31)
26 GeoFile =
"hypGeGeoTripleCluster_V3CrystalsOnly.root";
27 outFile +=
"TripleBall30CrystalsOnly_";
29 else if (WhichDetector == 32)
31 GeoFile =
"hypGeGeoTripleCluster_StraightCrystalsOnly.root";
32 outFile +=
"TripleStraightCrystalsOnly_";
34 else if (WhichDetector == 33)
36 GeoFile =
"hypGeGeoTripleCluster_Ball40_Offset10CrystalsOnly.root";
37 outFile +=
"TripleBall40Offset10CrystalsOnly_";
39 else if (WhichDetector == 34)
41 GeoFile =
"hypGeGeoTripleCluster_Ball40_Offset20CrystalsOnly.root";
42 outFile +=
"TripleBall40Offset20CrystalsOnly_";
44 else if (WhichDetector == 35)
46 GeoFile =
"hypGeGeoTripleCluster_Ball40_Offset10_STTFittingCrystalsOnly.root";
47 outFile +=
"TripleBall40Offset10STTCrystalsOnly_";
49 else if (WhichDetector == 36)
51 GeoFile =
"hypGeGeoTripleCluster_Ball40_Offset20_STTFittingCrystalsOnly.root";
52 outFile +=
"TripleBall40Offset20STTCrystalsOnly_";
54 else if (WhichDetector == 2)
56 GeoFile =
"hypGe_GeoMarcell_2erCrystalsOnly.root";
57 outFile +=
"DoubleV2CrystalsOnly_";
59 else if (WhichDetector == 21)
61 GeoFile =
"hypGeGeoDoubleCluster_V3CrystalsOnly.root";
62 outFile +=
"DoubleV3CrystalsOnly_";
74 outFile += Energy*1000;
85 outFile +=
"withSecTar";
91 SimparamsFile +=
"__Simparams.root";
98 fRun->SetName(
"TGeant4");
100 fRun->SetOutputFile(outFile);
104 fRun->SetMaterials(
"media_pnd_hypGe.geo");
110 Cave->SetGeometryFileName(
"pndcave_vacuum.geo");
111 fRun->AddModule(Cave);
116 HypGe->SetGeometryFileName(GeoFile);
117 fRun->AddModule(HypGe);
122 Hyp->SetAbsorverVol(
"Absorber");
124 Hyp->SetGeometryFileName(
"SekTarget_open_varAbs4_3Q_HYPbe_1mm.root");
125 fRun->AddModule(Hyp);
142 FairPrimaryGenerator*
primGen =
new FairPrimaryGenerator();
143 fRun->SetGenerator(primGen);
160 boxGen->
SetXYZ(0., 0., -55.);
161 primGen->AddGenerator(boxGen);
171 boxGen2->
SetXYZ(0., 0., -55.);
172 primGen->AddGenerator(boxGen2);
199 fRun->SetStoreTraj(kTRUE);
217 FairRuntimeDb *
rtdb=fRun->GetRuntimeDb();
221 FairParRootFileIo*
output=
new FairParRootFileIo(kParameterMerged);
222 output->open(SimparamsFile);
223 rtdb->setOutput(output);
237 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
void SetThetaRange(Double32_t thetamin=0, Double32_t thetamax=90)
PndBoxGenerator * boxGen2
void SetXYZ(Double32_t x=0, Double32_t y=0, Double32_t z=0)
int sim_hypGe_CrystalsOnly(Int_t nEvents, Int_t WhichDetector, Double_t Energy, Bool_t addSecTar)
FairParRootFileIo * output
FairPrimaryGenerator * primGen
void SetSensorVol(TString VolSi)
FairBoxGenerator * boxGen
void SetPRange(Double32_t pmin=0, Double32_t pmax=10)
void SetPhiRange(Double32_t phimin=0, Double32_t phimax=360)
void SetPathGeo(TString pgeo)