Skip to content

Commit b4970cd

Browse files
committed
Addressed comments and fix crash with Xis
1 parent ef4275c commit b4970cd

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,17 @@ struct OnTheFlyTracker {
267267
kLambda0,
268268
kLambda0Bar};
269269

270+
static constexpr std::array<int, 5> longLivedHandledPDGs = {kElectron,
271+
kMuonMinus,
272+
kPiPlus,
273+
kKPlus,
274+
kProton};
275+
276+
static constexpr std::array<int, 4> nucleiPDGs = {o2::constants::physics::kDeuteron,
277+
o2::constants::physics::kTriton,
278+
o2::constants::physics::kHelium3,
279+
o2::constants::physics::kAlpha};
280+
270281
// necessary for particle charges
271282
Service<o2::framework::O2DatabasePDG> pdgDB;
272283

@@ -691,17 +702,6 @@ struct OnTheFlyTracker {
691702
auto ir = irSampler.generateCollisionTime();
692703
const float eventCollisionTimeNS = ir.timeInBCNS;
693704

694-
constexpr std::array<int, 5> longLivedHandledPDGs = {kElectron,
695-
kMuonMinus,
696-
kPiPlus,
697-
kKPlus,
698-
kProton};
699-
700-
constexpr std::array<int, 4> nucleiPDGs = {o2::constants::physics::kDeuteron,
701-
o2::constants::physics::kTriton,
702-
o2::constants::physics::kHelium3,
703-
o2::constants::physics::kAlpha};
704-
705705
// First we compute the number of charged particles in the event
706706
dNdEta = 0.f;
707707
LOG(debug) << "Processing " << mcParticles.size() << " MC particles to compute dNch/deta";
@@ -1601,7 +1601,6 @@ struct OnTheFlyTracker {
16011601
{
16021602
// const int lastTrackIndex = tableStoredTracksCov.lastIndex() + 1; // bookkeep the last added track
16031603
const std::string histPath = "Configuration_" + std::to_string(icfg) + "/";
1604-
16051604
tracksAlice3.clear();
16061605
ghostTracksAlice3.clear();
16071606
bcData.clear();
@@ -1615,17 +1614,6 @@ struct OnTheFlyTracker {
16151614
auto ir = irSampler.generateCollisionTime();
16161615
const float eventCollisionTimeNS = ir.timeInBCNS;
16171616

1618-
constexpr std::array<int, 5> longLivedHandledPDGs = {kElectron,
1619-
kMuonMinus,
1620-
kPiPlus,
1621-
kKPlus,
1622-
kProton};
1623-
1624-
constexpr std::array<int, 4> nucleiPDGs = {o2::constants::physics::kDeuteron,
1625-
o2::constants::physics::kTriton,
1626-
o2::constants::physics::kHelium3,
1627-
o2::constants::physics::kAlpha};
1628-
16291617
// First we compute the number of charged particles in the event
16301618
dNdEta = 0.f;
16311619
for (const auto& mcParticle : mcParticles) {
@@ -1640,7 +1628,7 @@ struct OnTheFlyTracker {
16401628
const auto pdg = std::abs(mcParticle.pdgCode());
16411629
const bool longLivedToBeHandled = std::find(longLivedHandledPDGs.begin(), longLivedHandledPDGs.end(), pdg) != longLivedHandledPDGs.end();
16421630
const bool nucleiToBeHandled = std::find(nucleiPDGs.begin(), nucleiPDGs.end(), pdg) != nucleiPDGs.end();
1643-
const bool pdgsToBeHandled = longLivedToBeHandled || (enableNucleiSmearing && nucleiToBeHandled) || (cascadeDecaySettings.decayXi && mcParticle.pdgCode() == kXiMinus);
1631+
const bool pdgsToBeHandled = longLivedToBeHandled || (enableNucleiSmearing && nucleiToBeHandled);
16441632
if (!pdgsToBeHandled) {
16451633
continue;
16461634
}
@@ -1669,7 +1657,7 @@ struct OnTheFlyTracker {
16691657
continue;
16701658
}
16711659

1672-
if (std::fabs(mcParticle.eta() > maxEta)) {
1660+
if (std::fabs(mcParticle.eta()) > maxEta) {
16731661
continue;
16741662
}
16751663

@@ -1729,7 +1717,6 @@ struct OnTheFlyTracker {
17291717
}
17301718

17311719
histos.fill(HIST("hNaNBookkeeping"), 0.0f, 1.0f);
1732-
17331720
if (enablePrimarySmearing) {
17341721
getHist(TH1, histPath + "hPtReconstructed")->Fill(trackParCov.getPt());
17351722
if (std::abs(mcParticle.pdgCode()) == kElectron)
@@ -1861,7 +1848,7 @@ struct OnTheFlyTracker {
18611848
tableTrackSelection(static_cast<uint8_t>(0), false, false, false, false, false, false);
18621849
tableTrackSelectionExtension(false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false);
18631850
}
1864-
tableTracksAlice3(true);
1851+
tableTracksAlice3(false);
18651852
}
18661853
}
18671854

0 commit comments

Comments
 (0)