133 Double_t vx, Double_t vy, Double_t vz,
134 Int_t mother1, Int_t mother2,
135 Int_t daughter1, Int_t daughter2,
137 Double_t e, Double_t tof,
138 Double_t
weight, TMCProcess proc, Int_t generatorStatus)
144 LOG(fatal) <<
"Generator status " << generatorStatus <<
" of particle is not encoded properly.";
153 auto particlePDG = TDatabasePDG::Instance()->GetParticle(pdgid);
154 if (wanttracking && !particlePDG) {
155 LOG(warn) <<
"Particle to be tracked is not defined in PDG: pdg = " << pdgid <<
" (disabling tracking)";
156 wanttracking =
false;
160 Int_t doTracking = 0;
161 if (fdoTracking && wanttracking) {
164 Int_t dummyparent = -1;
169 Int_t status = generatorStatus;
173 mother1 += fMCIndexOffset;
176 mother2 += fMCIndexOffset;
178 if (daughter1 != -1) {
179 daughter1 += fMCIndexOffset;
181 if (daughter2 != -1) {
182 daughter2 += fMCIndexOffset;
193 if (abs(pdgid) == 311 && doTracking) {
194 LOG(warn) <<
"K0/antiK0 requested for tracking: converting into K0s/K0L";
195 pdgid = gRandom->Uniform() < 0.5 ? 310 : 130;
200 double mass = particlePDG ? particlePDG->Mass() : 0.;
201 e = std::sqrt(mass * mass + px * px + py * py + pz * pz);
207 LOG(fatal) <<
"Stack must be an o2::data:Stack";
211 e, vx, vy, vz, tof, polx, poly, polz, TMCProcess::kPPrimary, ntr,
212 weight, status, mother2, daughter1, daughter2, proc);
220 Double_t pz, Double_t vx, Double_t vy,
221 Double_t vz, Int_t parent, Bool_t wanttracking,
222 Double_t e, Double_t tof, Double_t
weight, TMCProcess proc)
227 AddTrack(pdgid, px, py, pz, vx, vy, vz, parent, -1, -1, -1, wanttracking,
288 SetBeam(0., 0., 0., 0.);
303 SmearVertexXY(
false);
305 SmearGausVertexXY(
false);
306 SmearGausVertexZ(
false);
312 const auto& xyz =
param.position;
313 const auto& sigma =
param.width;
321 LOG(fatal) <<
"MeanVertexObject is null ... but mode is kCCDB. Please inject the valid CCDB object via setVertexMode";
327 LOG(info) <<
"Sampled interacting vertex " << sampledvertex;
329 SetBeam(sampledvertex.X(), sampledvertex.Y(), 0., 0.);
330 SetTarget(sampledvertex.Z(), 0.);
void PushTrack(Int_t toBeDone, Int_t parentID, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vx, Double_t vy, Double_t vz, Double_t time, Double_t polx, Double_t poly, Double_t polz, TMCProcess proc, Int_t &ntr, Double_t weight, Int_t is) override
void AddTrack(Int_t pdgid, Double_t px, Double_t py, Double_t pz, Double_t vx, Double_t vy, Double_t vz, Int_t mother1=-1, Int_t mother2=-1, Int_t daughter1=-1, Int_t daughter2=-1, Bool_t wanttracking=true, Double_t e=-9e9, Double_t tof=0., Double_t weight=0., TMCProcess proc=kPPrimary, Int_t generatorStatus=0)