8 gRandom->SetSeed(
seed);
14 }
else if (emcModule==
"shashlyk")
19 std::cout<<
"Incorrect emcModule parameter: "<<emcModule<<std::endl;
24 if (energyRange==
"low")
27 }
else if (energyRange==
"high")
30 }
else if (energyRange==
"all")
35 std::cout<<
"Incorrect parameter energyRange: "<<energyRange<<std::endl;
40 if (useFullPandaGeometry==0)
47 TString OutputSimFile =
"emc_complete";
48 OutputSimFile = OutputSimFile+
"_"+part+
"_"+TransportModel+
49 "_"+pandaGeometry+
"_"+emcModule+
"_"+s1+
".root";
50 TString OutputDatabaseFile =
"simparams";
51 OutputDatabaseFile = OutputDatabaseFile+
"_"+part+
"_"+TransportModel+
52 "_"+pandaGeometry+
"_"+emcModule+
"_"+s1+
".root";
58 FairLogger::GetLogger()->SetLogToFile(kFALSE);
59 FairRunSim *
fRun =
new FairRunSim();
66 fRun->SetName(TransportModel);
69 fRun->SetOutputFile(OutputSimFile);
75 emcDigiFile +=
"/macro/params/";
79 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
80 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
81 parIo1->open(emcDigiFile.Data(),
"in");
82 rtdb->setFirstInput(parIo1);
86 FairParRootFileIo*
output=
new FairParRootFileIo(kParameterMerged);
87 output->open(OutputDatabaseFile);
88 rtdb->setOutput(output);
94 fRun->SetMaterials(
"media_pnd.geo");
99 Cave->SetGeometryFileName(
"pndcave.geo");
100 fRun->AddModule(Cave);
105 fRun->AddModule(Emc);
107 if (useFullPandaGeometry)
110 Magnet->SetGeometryFileName(
"FullSuperconductingSolenoid_v831.root");
111 fRun->AddModule(Magnet);
114 Dipole->SetGeometryFileName(
"dipole.geo");
115 fRun->AddModule(Dipole);
118 Pipe->SetGeometryFileName(
"beampipe_201309.root");
119 fRun->AddModule(Pipe);
121 FairDetector *
Stt=
new PndStt(
"STT", kTRUE);
122 Stt->SetGeometryFileName(
"straws_skewed_blocks_35cm_pipe.geo");
123 fRun->AddModule(Stt);
126 Mvd->SetGeometryFileName(
"Mvd-2.1_FullVersion.root");
127 fRun->AddModule(Mvd);
137 fRun->AddModule(Muo);
140 Gem->SetGeometryFileName(
"gem_3Stations.root");
141 fRun->AddModule(Gem);
143 FairDetector *SciT =
new PndSciT(
"SCIT",kTRUE);
144 SciT->SetGeometryFileName(
"barrel-SciTil_07022013.root");
145 fRun->AddModule(SciT);
148 Drc->SetGeometryFileName(
"dirc_l0_p0_updated.root");
150 fRun->AddModule(Drc);
153 Dsk->SetGeometryFileName(
"dsk.root");
156 fRun->AddModule(Dsk);
158 FairDetector *
Fts=
new PndFts(
"FTS", kTRUE);
159 Fts->SetGeometryFileName(
"fts.geo");
160 fRun->AddModule(Fts);
166 FairPrimaryGenerator*
primGen =
new FairPrimaryGenerator();
167 fRun->SetGenerator(primGen);
169 TDatabasePDG *pdg =
new TDatabasePDG();
170 Int_t part_pid = pdg->GetParticle(part)->PdgCode();
173 FairBoxGenerator*
boxGen =
new FairBoxGenerator(part_pid, 1);
176 boxGen->SetPRange(momentum_min,momentum_max);
178 boxGen->SetPhiRange(phi_min, phi_max);
179 boxGen->SetThetaRange(theta_min, theta_max);
180 boxGen->SetXYZ(0., 0., 0.);
181 primGen->AddGenerator(boxGen);
184 fRun->SetBeamMom(15);
187 fRun->SetField(fField);
194 fRun->AddTask(emcHitProd);
200 fRun->AddTask(emcHitsToWaveform);
201 fRun->AddTask(emcWaveformToDigi);
205 fRun->AddTask(emcMakeCluster);
208 fRun->AddTask(emcHdrFiller);
212 fRun->AddTask(emcMakeBump);
219 Par->setInputVersion(fRun->GetRunId(),1);
231 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
void SetForward(TString name)
void SetStorageOfData(Bool_t val)
Method to specify whether clusters are stored or not.
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
PndEmcHitsToWaveform * emcHitsToWaveform
void SetParameters(FairField *field)
creates PndEmcHits from PndEmcPoints
void SetMdtMFIron(bool opt=false)
void SetStorageOfData(Bool_t val)
PndEmcMakeBump * emcMakeBump
FairParRootFileIo * output
FairPrimaryGenerator * primGen
PndEmcHdrFiller * emcHdrFiller
void SetMdtMagnet(bool opt=false)
void SetStorageOfData(Bool_t val)
void SetStoreTrackPoints(Bool_t storeTrackPoints)
void SetStoreCerenkovs(Bool_t storeCerenkovs)
PndEmcMakeCluster * emcMakeCluster
virtual void SetGeometryVersion(const Int_t GeoNumber)
void SetBarrel(TString name)
void SetStorageOfData(Bool_t val)
Method to specify whether bumps are stored or not.
Takes clusters and slits them up into bumps.
PndEmcWaveformToDigi * emcWaveformToDigi
FairParAsciiFileIo * parIo1
FairBoxGenerator * boxGen
Task to cluster PndEmcDigis.
void SetEndcap(TString name)
void SetMuonFilter(TString name)
void SetRunCherenkov(Bool_t ch)
int emc_correction_data_production(Int_t nEvents=10, TString part="gamma", TString TransportModel="TGeant3", Bool_t useFullPandaGeometry=true, TString emcModule="TS", TString energyRange="all", UInt_t seed=0)
Task to create Emc header.