68 Double_t px, Double_t py, Double_t pz, Double_t e,
69 Double_t vx, Double_t vy, Double_t vz, Double_t time,
70 Double_t polx, Double_t poly, Double_t polz,
71 TMCProcess proc, Int_t& ntr, Double_t weight,
73 PushTrack(toBeDone, parentId, pdgCode, px, py, pz, e, vx, vy, vz, time, polx,
74 poly, polz, proc, ntr, weight, is, -1);
79 Double_t px, Double_t py, Double_t pz, Double_t e,
80 Double_t vx, Double_t vy, Double_t vz, Double_t time,
81 Double_t polx, Double_t poly, Double_t polz,
82 TMCProcess proc, Int_t& ntr, Double_t weight,
83 Int_t is, Int_t secondparentID) {
90 if (parentId < fParticles->GetEntriesFast()) {
91 TParticle* parentPart =
92 dynamic_cast<TParticle*
>(
fParticles->At(parentId));
94 Double_t parentWeight = parentPart->GetWeight();
95 weight = weight * parentWeight;
110 Int_t daughter1Id = -1;
111 Int_t daughter2Id = -1;
114 TParticle* particle =
new (partArray[
fNParticles++])
115 TParticle(pdgCode, trackId, parentId, nPoints, daughter1Id, daughter2Id,
116 px, py, pz, e, vx, vy, vz, time);
122 particle->SetPolarisation(polx, poly, polz);
123 particle->SetWeight(weight);
124 particle->SetUniqueID(proc);
128 particle->SetFirstMother(secondparentID);
129 particle->SetLastMother(secondparentID);
131 particle->SetFirstMother(parentId);
132 particle->SetLastMother(parentId);
257 LOG(
debug) <<
"ShipStack: Updating track indizes...";
261 for (Int_t i = 0; i <
fNTracks; i++) {
264 if (iMotherOld >=
static_cast<Int_t
>(
fIndexMap.size())) {
265 LOGF(fatal,
"ShipStack: Particle index %i not found in dex map! ",
271 if (fDetList ==
nullptr) {
274 fDetIter = detList->MakeIterator();
280 FairDetector* det =
nullptr;
281 while ((det =
dynamic_cast<FairDetector*
>(fDetIter->Next()))) {
285 stlDet->UpdatePointTrackIndices(
fIndexMap);
290 TClonesArray* hitArray;
291 while ((hitArray = det->GetCollection(iColl++))) {
293 Int_t nPoints = hitArray->GetEntriesFast();
296 for (Int_t iPoint = 0; iPoint < nPoints; iPoint++) {
297 FairMCPoint* point =
dynamic_cast<FairMCPoint*
>(hitArray->At(iPoint));
298 Int_t iTrack = point->GetTrackID();
300 if (iTrack < -1 || iTrack >=
static_cast<Int_t
>(
fIndexMap.size())) {
301 LOGF(fatal,
"ShipStack: Particle index %i not found in index map! ",
304 point->SetTrackID(iTrack < 0 ? -1 :
fIndexMap[iTrack]);
310 LOGF(
debug,
"...stack and %i collections updated.", nColl);
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