23#include <fairlogger/Logger.h>
29#include "TLorentzVector.h"
32#include "TVirtualMC.h"
33#include "TMCProcess.h"
39#include <unordered_map>
50TParticle makeParticle(
int pdg,
int status,
int mother1,
int mother2,
int daughter1,
int daughter2,
51 double px,
double py,
double pz,
double e,
double vx,
double vy,
double vz,
double t)
53 thread_local std::unordered_map<int, TParticle> prototypes;
54 auto it = prototypes.find(pdg);
55 if (it == prototypes.end()) {
56 TParticle
p(pdg, status, mother1, mother2, daughter1, daughter2, px, py, pz,
e, vx, vy, vz,
t);
58 prototypes.emplace(pdg, p);
62 TParticle
p(it->second);
63 p.SetStatusCode(status);
64 p.SetFirstMother(mother1);
65 p.SetLastMother(mother2);
66 p.SetFirstDaughter(daughter1);
67 p.SetLastDaughter(daughter2);
68 p.SetMomentum(px, py, pz,
e);
69 p.SetProductionVertex(vx, vy, vz,
t);
75template <
typename T,
typename I>
78 auto currentsize =
v.size();
79 if (
index >= currentsize) {
80 const auto newsize = std::max(
index + 1, (I)(1 + currentsize * 1.2));
81 v.resize(newsize, T(-1));
93 mTrackIDtoParticlesEntry(1000000, -1),
95 mIndexOfCurrentTrack(-1),
96 mIndexOfCurrentPrimary(-1),
97 mNumberOfPrimaryParticles(0),
98 mNumberOfEntriesInParticles(0),
99 mNumberOfEntriesInTracks(0),
100 mNumberOfPrimariesforTracking(0),
101 mNumberOfPrimariesPopped(0),
102 mStoreMothers(kTRUE),
103 mStoreSecondaries(kTRUE),
109 auto vmc = TVirtualMC::GetMC();
111 mIsG4Like = !(vmc->SecondariesAreOrdered());
116 if (
param.transportPrimary.compare(
"none") == 0) {
117 transportPrimary = [](
const TParticle& p,
const std::vector<TParticle>& particles) {
120 }
else if (
param.transportPrimary.compare(
"all") == 0) {
121 transportPrimary = [](
const TParticle& p,
const std::vector<TParticle>& particles) {
124 }
else if (
param.transportPrimary.compare(
"barrel") == 0) {
125 transportPrimary = [](
const TParticle& p,
const std::vector<TParticle>& particles) {
126 return (std::fabs(p.Eta()) < 2.0);
128 }
else if (
param.transportPrimary.compare(
"external") == 0) {
129 transportPrimary = o2::conf::GetFromMacro<o2::data::Stack::TransportFcn>(
param.transportPrimaryFileName,
130 param.transportPrimaryFuncName,
131 "o2::data::Stack::TransportFcn",
"stack_transport_primary");
132 if (!transportPrimary) {
133 LOG(fatal) <<
"Failed to retrieve external \'transportPrimary\' function: problem with configuration ";
135 LOG(info) <<
"Successfully retrieve external \'transportPrimary\' frunction: " <<
param.transportPrimaryFileName;
137 LOG(fatal) <<
"unsupported \'trasportPrimary\' mode: " <<
param.transportPrimary;
140 if (
param.transportPrimaryInvert) {
141 mTransportPrimary = [transportPrimary](
const TParticle& p,
const std::vector<TParticle>& particles) {
return !transportPrimary(p, particles); };
143 mTransportPrimary = transportPrimary;
151 mTrackIDtoParticlesEntry(rhs.mTrackIDtoParticlesEntry.
size(), -1),
154 mIndexOfCurrentTrack(-1),
155 mIndexOfCurrentPrimary(-1),
156 mNumberOfPrimaryParticles(0),
157 mNumberOfEntriesInParticles(0),
158 mNumberOfEntriesInTracks(0),
159 mNumberOfPrimariesforTracking(0),
160 mNumberOfPrimariesPopped(0),
161 mStoreMothers(rhs.mStoreMothers),
162 mStoreSecondaries(rhs.mStoreSecondaries),
163 mPruneKinematics(rhs.mPruneKinematics),
164 mMinHits(rhs.mMinHits),
165 mEnergyCut(rhs.mEnergyCut),
166 mCleanupThreshold(rhs.mCleanupThreshold),
167 mIsG4Like(rhs.mIsG4Like),
168 mIsExternalMode(rhs.mIsExternalMode),
169 mDoTrackSeeding(rhs.mDoTrackSeeding),
170 mTransportPrimary(rhs.mTransportPrimary),
173 LOG(
debug) <<
"copy constructor called";
174 mTracks =
new std::vector<MCTrack>();
186 LOG(fatal) <<
"operator= called";
194 mTracks =
new std::vector<MCTrack>(rhs.mTracks->size());
195 mIndexOfCurrentTrack = -1;
196 mIndexOfCurrentPrimary = -1;
197 mNumberOfPrimaryParticles = 0;
198 mNumberOfEntriesInParticles = 0;
199 mNumberOfEntriesInTracks = 0;
200 mNumberOfPrimariesforTracking = 0;
201 mNumberOfPrimariesPopped = 0;
202 mStoreMothers = rhs.mStoreMothers;
203 mStoreSecondaries = rhs.mStoreSecondaries;
204 mMinHits = rhs.mMinHits;
205 mEnergyCut = rhs.mEnergyCut;
206 mIsG4Like = rhs.mIsG4Like;
211void Stack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t
e,
212 Double_t vx, Double_t vy, Double_t vz, Double_t
time, Double_t polx, Double_t poly, Double_t polz,
213 TMCProcess
proc, Int_t& ntr, Double_t
weight, Int_t is)
215 PushTrack(toBeDone, parentId, pdgCode, px, py, pz,
e, vx, vy, vz,
time, polx, poly, polz,
proc, ntr,
weight, is, -1);
218void Stack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t
e,
219 Double_t vx, Double_t vy, Double_t vz, Double_t
time, Double_t polx, Double_t poly, Double_t polz,
220 TMCProcess
proc, Int_t& ntr, Double_t
weight, Int_t is, Int_t secondparentId)
222 PushTrack(toBeDone, parentId, pdgCode, px, py, pz,
e, vx, vy, vz,
time, polx, poly, polz,
proc, ntr,
weight, is, secondparentId, -1, -1,
proc);
225void Stack::PushTrack(Int_t toBeDone, Int_t parentId, Int_t pdgCode, Double_t px, Double_t py, Double_t pz, Double_t
e,
226 Double_t vx, Double_t vy, Double_t vz, Double_t
time, Double_t polx, Double_t poly, Double_t polz,
227 TMCProcess
proc, Int_t& ntr, Double_t
weight, Int_t is, Int_t secondparentId, Int_t daughter1Id, Int_t daughter2Id,
244 Int_t trackId = mNumberOfEntriesInParticles;
249 Int_t iStatus = (
proc == kPPrimary) ? is : trackId;
250 TParticle p = makeParticle(pdgCode, iStatus, parentId, secondparentId, daughter1Id, daughter2Id, px, py, pz,
e, vx, vy, vz,
time);
251 p.SetPolarisation(polx, poly, polz);
256 mNumberOfEntriesInParticles++;
258 insertInVector(mTrackIDtoParticlesEntry, trackId, (
int)(mParticles.size()));
260 handleTransportPrimary(p);
275 p.SetUniqueID(proc2);
277 mIndexMap[trackId] = trackId;
280 mNumberOfPrimariesforTracking++;
282 mNumberOfPrimaryParticles++;
283 mPrimaryParticles.push_back(p);
284 mTracks->emplace_back(p);
286 mParticles.emplace_back(p);
287 mCurrentParticle0 = p;
292void Stack::handleTransportPrimary(TParticle& p)
301 if (!mTransportPrimary(p, mPrimaryParticles)) {
307void Stack::PushTrack(
int toBeDone, TParticle& p)
316 mIndexMap[mNumberOfPrimaryParticles] = mNumberOfPrimaryParticles;
317 mNumberOfPrimaryParticles++;
318 mPrimaryParticles.push_back(p);
321 mNumberOfPrimariesforTracking++;
324 mTracks->emplace_back(p);
331void Stack::SetCurrentTrack(Int_t iTrack)
333 mIndexOfCurrentTrack = iTrack;
334 if (iTrack < mPrimaryParticles.size()) {
335 auto& p = mPrimaryParticles[iTrack];
336 mCurrentParticle = p;
337 mIndexOfCurrentPrimary = iTrack;
339 mCurrentParticle = mCurrentParticle0;
347 auto asLong = [](
double x) {
348 return (ULong_t) * (
reinterpret_cast<ULong_t*
>(&
x));
354 hash = asLong(track.GetStartVertexCoordinatesX());
355 hash ^= asLong(track.GetStartVertexCoordinatesY());
356 hash ^= asLong(track.GetStartVertexCoordinatesZ());
357 hash ^= asLong(track.GetStartVertexCoordinatesT());
358 hash ^= asLong(track.GetStartVertexMomentumX());
359 hash ^= asLong(track.GetStartVertexMomentumY());
360 hash ^= asLong(track.GetStartVertexMomentumZ());
361 hash += (ULong_t)track.GetPdgCode();
365TParticle* Stack::PopNextTrack(Int_t& iTrack)
369 Int_t nprod = (int)(mParticles.size());
372 if (mStack.empty()) {
376 Bool_t found = kFALSE;
378 TParticle* nextParticle =
nullptr;
379 while (!found && !mStack.empty()) {
381 mCurrentParticle = mStack.top();
388 mNumberOfPrimariesPopped++;
389 mIndexOfCurrentPrimary = mStack.size();
390 mIndexOfCurrentTrack = mIndexOfCurrentPrimary;
392 mIndexOfCurrentTrack = mCurrentParticle.GetStatusCode();
394 iTrack = mIndexOfCurrentTrack;
395 if (mDoTrackSeeding) {
404 nextParticle = &mCurrentParticle;
408 nextParticle =
nullptr;
414TParticle* Stack::PopPrimaryForTracking(Int_t iPrim)
422 if (iPrim < 0 || iPrim >= mNumberOfPrimaryParticles) {
423 LOG(fatal) <<
"Stack::PopPrimaryForTracking: Stack: Primary index out of range! " << iPrim <<
" ";
428 auto particle = &mPrimaryParticles[iPrim];
436void Stack::updateEventStats()
439 mMCEventStats->
setNHits(mHitCounter);
445void Stack::FillTrackArray()
449 LOG(info) <<
"Stack: " << mTracks->size() <<
" out of " << mNumberOfEntriesInParticles <<
" stored \n";
452void Stack::FinishPrimary()
457 LOG(
debug) <<
"Finish primary hook " << mPrimariesDone;
460 auto selected = selectTracks();
467 int indexoffset = mTracks->size();
469 std::vector<int> indicesKept((
int)(mParticles.size()));
470 std::vector<MCTrack> tmpTracks;
483 for (
auto& particle : mParticles) {
484 if (particle.getStore() || !mPruneKinematics) {
486 auto imother = particle.getMotherTrackId();
490 imother = indicesKept[imother];
491 particle.SetMotherTrackId(imother);
495 tmpTracks.emplace_back(particle);
496 indicesKept[indexOld] = indexNew;
499 indicesKept[indexOld] = -1;
505 Int_t ntr = (int)(tmpTracks.size());
506 std::vector<int> reOrderedIndices(ntr);
507 std::vector<int> invreOrderedIndices(ntr);
508 for (Int_t
i = 0;
i < ntr;
i++) {
509 invreOrderedIndices[
i] =
i;
510 reOrderedIndices[
i] =
i;
515 for (Int_t
i = 0;
i < ntr;
i++) {
516 Int_t
index = reOrderedIndices[
i];
517 invreOrderedIndices[
index] =
i;
520 for (Int_t
i = 0;
i < ntr;
i++) {
521 Int_t
index = reOrderedIndices[
i];
522 auto& particle = tmpTracks[
index];
523 Int_t imo = particle.getMotherTrackId();
526 imo = invreOrderedIndices[imo];
529 particle.SetMotherTrackId(imo);
530 mTracks->emplace_back(particle);
531 auto& mother = mTracks->at(imo);
532 if (mother.getFirstDaughterTrackId() == -1) {
533 mother.SetFirstDaughterTrackId((
int)(mTracks->size()) - 1);
535 mother.SetLastDaughterTrackId((
int)(mTracks->size()) - 1);
541 Int_t imax = mNumberOfEntriesInParticles;
542 Int_t imin = imax - mParticles.size();
543 for (Int_t idTrack = imin; idTrack < imax; idTrack++) {
544 Int_t index1 = mTrackIDtoParticlesEntry[idTrack];
545 Int_t index2 = indicesKept[index1];
549 Int_t index3 = (mIsG4Like) ? invreOrderedIndices[index2] : index2;
550 mIndexMap[idTrack] = index3 + indexoffset;
554 reOrderedIndices.clear();
555 invreOrderedIndices.clear();
558 mTransportedIDs.clear();
559 mTrackIDtoParticlesEntry.clear();
560 mIndexOfPrimaries.clear();
563void Stack::UpdateTrackIndex(TRefArray* detList)
567 if (mIndexMap.size() == 0) {
568 LOG(info) <<
"No TrackIndex update necessary\n";
575 if (mActiveDetectors.size() == 0) {
576 if (detList ==
nullptr) {
577 LOG(fatal) <<
"No detList passed to Stack";
579 auto iter = detList->MakeIterator();
580 while (
auto det = iter->Next()) {
583 mActiveDetectors.emplace_back(o2det);
585 LOG(info) <<
"Found nonconforming detector " << det->GetName();
590 LOG(
debug) <<
"Stack::UpdateTrackIndex: Stack: Updating track indices...";
595 for (
auto&
ref : *mTrackRefs) {
596 const auto id =
ref.getTrackID();
597 auto iter = mIndexMap.find(
id);
598 if (iter == mIndexMap.end()) {
599 LOG(info) <<
"Invalid trackref ... needs to be rmoved \n";
602 ref.setTrackID(iter->second);
609 if (a.getTrackID() == b.getTrackID()) {
610 return a.getLength() < b.getLength();
612 return a.getTrackID() <
b.getTrackID();
615 for (
auto det : mActiveDetectors) {
617 det->updateHitTrackIndices(mIndexMap);
620 LOG(
debug) <<
"Stack::UpdateTrackIndex: ...stack and " << nColl <<
" collections updated.";
626 mIndexOfCurrentTrack = -1;
627 mNumberOfPrimaryParticles = mNumberOfEntriesInParticles = mNumberOfEntriesInTracks = 0;
628 while (!mStack.empty()) {
633 if (!mIsExternalMode && (mPrimariesDone != mNumberOfPrimariesforTracking)) {
634 LOG(fatal) <<
"Inconsistency in primary particles treated " << mPrimariesDone <<
" vs expected "
635 << mNumberOfPrimariesforTracking <<
"\n(This points to a flaw in the stack logic)";
638 mNumberOfPrimariesforTracking = 0;
639 mNumberOfPrimariesPopped = 0;
640 mPrimaryParticles.clear();
642 mTrackIDtoParticlesEntry.clear();
647void Stack::Register()
653void Stack::Print(Int_t iVerbose)
const
655 cout <<
"-I- Stack: Number of primaries = " << mNumberOfPrimaryParticles << endl;
656 cout <<
" Total number of particles = " << mNumberOfEntriesInParticles << endl;
657 cout <<
" Number of tracks in output = " << mNumberOfEntriesInTracks << endl;
659 for (
auto& track : *mTracks) {
674void Stack::addHit(
int iDet)
679 if (mIndexOfCurrentTrack < mNumberOfPrimaryParticles) {
680 auto& part = mTracks->at(mIndexOfCurrentTrack);
684 Int_t iTrack = mTrackIDtoParticlesEntry[mIndexOfCurrentTrack];
685 auto& part = mParticles[iTrack];
691void Stack::modifiesHit(
int iDet)
694 if (mIndexOfCurrentTrack < mNumberOfPrimaryParticles) {
695 mTracks->at(mIndexOfCurrentTrack).setContributesToAHit();
697 Int_t iTrack = mTrackIDtoParticlesEntry[mIndexOfCurrentTrack];
698 mParticles[iTrack].setContributesToAHit();
701void Stack::addHit(
int iDet, Int_t iTrack)
704 auto& part = mParticles[iTrack];
711Int_t Stack::GetCurrentParentTrackNumber()
const
715 return currentPart->GetFirstMother();
721bool Stack::selectTracks()
723 bool tracksdiscarded =
false;
726 LOG(
debug) <<
"Stack: Entering track selection on " << mParticles.size() <<
" tracks";
727 for (
auto& thisPart : mParticles) {
728 Bool_t store = kTRUE;
730 Bool_t isPrimary = (thisPart.getProcess() == 0);
731 Int_t iMother = thisPart.getMotherTrackId();
732 auto& mother = mParticles[iMother];
733 Bool_t motherIsPrimary = (iMother < mNumberOfPrimaryParticles);
743 if (!motherIsPrimary) {
745 thisPart.SetMotherTrackId(mTrackIDtoParticlesEntry[iMother]);
748 thisPart.SetMotherTrackId(iMother - (
int)(mTracks->size()));
751 if (!mStoreSecondaries) {
753 tracksdiscarded =
true;
757 int nHits = thisPart.hasHits();
759 if (nHits < mMinHits) {
761 tracksdiscarded =
true;
764 if (mEnergyCut > 0.) {
765 Double_t energy = thisPart.GetEnergy();
766 Double_t mass = thisPart.GetMass();
767 Double_t eKin = energy - mass;
768 if (eKin < mEnergyCut) {
770 tracksdiscarded =
true;
773 if (keepPhysics(thisPart)) {
775 tracksdiscarded =
false;
780 store = store || thisPart.getStore();
781 thisPart.setStore(store);
787 for (
auto& particle : mParticles) {
788 if (particle.getStore()) {
789 Int_t iMother = particle.getMotherTrackId();
790 while (iMother >= 0) {
791 auto& mother = mParticles[iMother];
792 mother.setStore(
true);
793 iMother = mother.getMotherTrackId();
799 return !tracksdiscarded;
802bool Stack::isPrimary(
const MCTrack& part)
812bool Stack::isFromPrimaryDecayChain(
const MCTrack& part)
823 auto mother = mParticles[imother];
824 if (isPrimary(mother)) {
828 return isFromPrimaryDecayChain(mother);
831bool Stack::isFromPrimaryPairProduction(
const MCTrack& part)
843 auto mother = mParticles[imother];
844 if (isPrimary(mother)) {
848 return isFromPrimaryDecayChain(mother);
851bool Stack::keepPhysics(
const MCTrack& part)
858 if (isPrimary(part)) {
861 if (isFromPrimaryDecayChain(part)) {
864 if (isFromPrimaryPairProduction(part)) {
871TClonesArray* Stack::GetListOfParticles()
873 LOG(fatal) <<
"Stack::GetListOfParticles interface not implemented\n";
877bool Stack::isTrackDaughterOf(
int trackid,
int parentid)
const
880 if (trackid < parentid) {
884 if (trackid == parentid) {
889 while (mother != -1) {
890 if (mother == parentid) {
898void Stack::fillParentIDs(std::vector<int>& parentids)
const
901 int mother = mIndexOfCurrentTrack;
904 parentids.push_back(mother);
907 }
while (mother != -1);
910void Stack::ReorderKine(std::vector<MCTrack>& particles, std::vector<int>& reOrderedIndices)
919 Int_t ntr = (int)(particles.size());
920 std::vector<bool>
done(ntr,
false);
922 int indexoffset = mTracks->size();
925 for (Int_t
i = 0;
i < ntr;
i++) {
926 reOrderedIndices[
i] =
i;
929 for (Int_t
i = -1;
i < ntr;
i++) {
933 reOrderedIndices[
index] =
i;
940 imoOld = mIndexOfCurrentPrimary - indexoffset;
942 for (Int_t
j =
i + 1;
j < ntr;
j++) {
945 reOrderedIndices[
index] =
j;
Definition of the Detector class.
Definition of the Stack class.
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char e
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions false
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone proc
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h configStandalone Reconstruction rec_trd Max chi2 for TRD tracklets to be matched to a track Chi2 cut for strict matching mode Number of sigmas for ITS TPC track time error estimate Addition to search road around track prolongation along Y in cm Optimal tracklet rphi resolution in maximum chi2 per attached tracklet for TRD tracks take into account the full likelihood of the slope including exponential tails Tracks with less attached tracklets are discarded after the tracking Post trigger Pile up integration time in BCs fits all iterations but the last one in projections Use material lookup table for TPC refit Apply workarounds to avoid cyclic merge should not be needed tpc dyn configStandalone Processing proc_rtc Replace constant variables static by constexpr expressions Compile RTC in deterministic with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define Use RTC to optimize GPU code h configStandalone Processing proc_rtctech Use a file lock to serialize access to the cache folder Print launch bounds used for RTC code as debugging option
Definition of the MCTrack class.
void insertInVector(std::vector< T > &v, I index, T e)
ULong_t getHash(TParticle const &p)
FairGenericStack & operator=(const FairGenericStack &)
void RegisterAny(const char *name, T *&obj, Bool_t toFile)
static FairRootManager * Instance()
int getProcess() const
get the production process (id) of this track
Int_t getMotherTrackId() const
static std::vector< int > const & getDetId2HitBitIndex()
static VMCSeederService const & instance()
static const StackParam & Instance()
void ReorderKine(std::vector< MCTrack > &particles, std::vector< int > &reOrderedIndices)
int getMotherTrackId(int) const
Allow to query the direct mother track ID of an arbitrary trackID managed by stack.
virtual void Print(Int_t iVerbose=0) const
TParticle * GetCurrentTrack() const override
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
std::function< bool(const TParticle &p, const std::vector< TParticle > &particles)> TransportFcn
GLuint GLuint GLfloat weight
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"