132 Double_t vx, Double_t vy, Double_t vz,
133 Int_t mother1, Int_t mother2,
134 Int_t daughter1, Int_t daughter2,
136 Double_t e, Double_t tof,
137 Double_t
weight, TMCProcess proc, Int_t generatorStatus)
143 LOG(fatal) <<
"Generator status " << generatorStatus <<
" of particle is not encoded properly.";
152 auto particlePDG = TDatabasePDG::Instance()->GetParticle(pdgid);
153 if (wanttracking && !particlePDG) {
154 LOG(warn) <<
"Particle to be tracked is not defined in PDG: pdg = " << pdgid <<
" (disabling tracking)";
155 wanttracking =
false;
159 Int_t doTracking = 0;
160 if (fdoTracking && wanttracking) {
163 Int_t dummyparent = -1;
168 Int_t status = generatorStatus;
172 mother1 += fMCIndexOffset;
175 mother2 += fMCIndexOffset;
177 if (daughter1 != -1) {
178 daughter1 += fMCIndexOffset;
180 if (daughter2 != -1) {
181 daughter2 += fMCIndexOffset;
192 if (abs(pdgid) == 311 && doTracking) {
193 LOG(warn) <<
"K0/antiK0 requested for tracking: converting into K0s/K0L";
194 pdgid = gRandom->Uniform() < 0.5 ? 310 : 130;
199 double mass = particlePDG ? particlePDG->Mass() : 0.;
200 e = std::sqrt(mass * mass + px * px + py * py + pz * pz);
206 LOG(fatal) <<
"Stack must be an o2::data:Stack";
210 e, vx, vy, vz, tof, polx, poly, polz, TMCProcess::kPPrimary, ntr,
211 weight, status, mother2, daughter1, daughter2, proc);
219 Double_t pz, Double_t vx, Double_t vy,
220 Double_t vz, Int_t parent, Bool_t wanttracking,
221 Double_t e, Double_t tof, Double_t
weight, TMCProcess proc)
226 AddTrack(pdgid, px, py, pz, vx, vy, vz, parent, -1, -1, -1, wanttracking,
287 SetBeam(0., 0., 0., 0.);
302 SmearVertexXY(
false);
304 SmearGausVertexXY(
false);
305 SmearGausVertexZ(
false);
311 const auto& xyz =
param.position;
312 const auto& sigma =
param.width;
320 LOG(fatal) <<
"MeanVertexObject is null ... but mode is kCCDB. Please inject the valid CCDB object via setVertexMode";
326 LOG(info) <<
"Sampled interacting vertex " << sampledvertex;
328 SetBeam(sampledvertex.X(), sampledvertex.Y(), 0., 0.);
329 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)