15 if (prefix==
"" || inputGen==
"" || pbeam==0.)
18 cout <<
"prod_sim.C( <pref>, <nevt>, <gen>, <pbeam> )\n\n";
19 cout <<
" <pref> : output file names prefix\n";
20 cout <<
" <nevt> : number of events\n";
21 cout <<
" <gen> : generator input: EvtGen decfile; DPM/FTF/BOX uses DPM/FTF generator (inelastic mode) or BOX generator instead\n";
22 cout <<
" DPM settings: DPM = inelastic only, DPM1 = inel. + elastic, DPM2 = elastic only\n";
23 cout <<
" FTF settings: FTF = inel. + elastic, FTF1 = inelastic only\n";
24 cout <<
" BOX settings: type[pdgcode,mult] and optional ranges 'p/tht/phi[min,max]' separated with colon; example: 'BOX:type[211,1]:p[1,5]:tht[45]:phi[90,210]'\n";
25 cout <<
" <pbeam> : pbar momentum (for BOX generator it still controls the magnetic field) \n\n";
27 cout <<
"Example 1 : root -l -b -q 'prod_sim.C(\"EvtD0D0b\", 100, \"D0toKpi.dec:pbarpSystem0\", 12.)'\n";
28 cout <<
"Example 2 : root -l -b -q 'prod_sim.C(\"DpmInel\", 100, \"DPM\", 12.)'\n";
29 cout <<
"Example 3 : root -l -b -q 'prod_sim.C(\"SingleK\", 100, \"BOX:type[321,1]:p[0.1,10]:tht[22,140]:phi[0,360]\", 12.)'\n\n";
45 double X = (pbeam*pbeam-2*mp*
mp)/(2*mp);
46 pbeam =
sqrt(X*X-mp*mp);
50 if (inputGen.Contains(
":pbp")) inputGen.ReplaceAll(
":pbp",
":pbarpSystem");
54 TString Workdir = gSystem->Getenv(
"VMCWORKDIR");
55 TString parAsciiFile =
"all.par";
59 if (inputGen==
"DPM1" || inputGen==
"FTF1") genflag=1;
60 if (inputGen==
"DPM2") genflag=2;
68 fRun->SetName(SimEngine);
71 fRun->SetBeamMom(pbeam);
void Finish()
Final diagnostics.
friend F32vec4 sqrt(const F32vec4 &a)
Bool_t Setup(TString outprefix="")
Initial setup.
PndFilteredPrimaryGenerator * GetPndFilteredPrimaryGenerator()
void SetParamAsciiFile(TString par)
Setter of the parameter ascii file.
FairPrimaryGenerator * primGen
void SetInput(TString par)
Input of the simulation This string can be: a) the name of the dec file for EvtGen, ending w/ .dec b) "dpm" if you want to use dpm c) "ftf" if you want to use ftf d) "box:[...]" if you want to use box.
void AddSimTasks()
Add simulation tasks.
Primary generator with added event filtering capabilities.
void SetNumberOfEvents(Int_t par)
Setter of the number of events.
void CreateGeometry()
It switches between different standard geometry volumes.
Class for the master simulation chain.
void SetOptions(TString par)
Setter of the simulation options This string can be: "" -> default settings full setup "day1" -> Set...
void SetFtfFlag(Int_t Mode)
Set the FTF noelastic flag.
int prod_sim(TString prefix="", Int_t nEvents=100, TString inputGen="", Float_t pbeam=0.)
void SetGenerator()
Set the event generator.
void SetDpmFlag(Int_t Mode)
Set the DPM flag.