13 #include <TDatabasePDG.h>
14 #include <TParticlePDG.h>
48 fVertexSmear = VertexSmear;
60 TDatabasePDG *pid = TDatabasePDG::Instance();
61 TParticlePDG *p = pid->GetParticle(fPDGType);
63 LOG(info) << this->ClassName() <<
": particle with PDG =" <<
GetPDGType() <<
" Found";
73 switch (fVertexSmear) {
75 fX = gRandom->Gaus(fVx, fVex);
76 fY = gRandom->Gaus(fVy, fVey);
77 fZ = gRandom->Gaus(fVz, fVez);
80 fX = gRandom->Uniform(fVx - fVex, fVx + fVex);
81 fY = gRandom->Uniform(fVy - fVey, fVy + fVey);
82 fZ = gRandom->Uniform(fVz - fVez, fVz + fVez);
85 if (gRandom->Uniform() < 0.5) {
86 fX = fVx + gRandom->Exp(fVex);
88 fX = fVx - gRandom->Exp(fVex);
90 if (gRandom->Uniform() < 0.5) {
91 fY = fVy + gRandom->Exp(fVey);
93 fY = fVy - gRandom->Exp(fVey);
95 if (gRandom->Uniform() < 0.5) {
96 fZ = fVz + gRandom->Exp(fVez);
98 fZ = fVz - gRandom->Exp(fVez);
102 LOG(info) << this->ClassName() <<
": Event, vertex = (" <<
fX <<
"," <<
fY <<
"," <<
fZ <<
") cm, multiplicity "
virtual ~FairBaseMCGenerator()
void SetPDGType(Int_t pdg)
virtual void GenerateEventParameters()
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)