Skip to content

Commit 013cd62

Browse files
authored
Merge branch 'AliceO2Group:master' into PID-Hadrons-in-Jets
2 parents 91381d9 + f702235 commit 013cd62

246 files changed

Lines changed: 29890 additions & 9984 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
///
1616
/// \author Alexander Tiekoetter (atiekoet@cern.ch) University of Muenster
1717

18-
#ifndef PWGDQ_DATAMODEL_REDUCEDTABLESALICE3_H_
19-
#define PWGDQ_DATAMODEL_REDUCEDTABLESALICE3_H_
18+
#ifndef ALICE3_DATAMODEL_REDUCEDTABLESALICE3_H_
19+
#define ALICE3_DATAMODEL_REDUCEDTABLESALICE3_H_
2020

2121
#include "PWGDQ/DataModel/ReducedInfoTables.h"
2222

@@ -50,7 +50,7 @@ DECLARE_SOA_COLUMN(MultMCNParticlesEta20, multMCNParticlesEta20, float);
5050
DECLARE_SOA_COLUMN(MultMCNParticlesEta40, multMCNParticlesEta40, float);
5151
} // namespace reducedeventmcalice3
5252

53-
DECLARE_SOA_TABLE_STAGED(ReducedA3Events, "REA3EVENTS", //! Main event information table
53+
DECLARE_SOA_TABLE_STAGED(ReA3Events, "REA3EVENT", //! Main event information table
5454
o2::soa::Index<>,
5555
collision::PosX, collision::PosY, collision::PosZ, collision::NumContrib,
5656
collision::CollisionTime, collision::CollisionTimeRes, reducedeventalice3::MultDensity);
@@ -62,19 +62,19 @@ DECLARE_SOA_TABLE(ReducedA3EventsVtxCov, "AOD", "REA3VTXCOV", //! Event verte
6262
DECLARE_SOA_TABLE(ReducedA3EventsInfo, "AOD", "REA3EVENTINFO", //! Main event index table
6363
reducedevent::CollisionId);
6464

65-
DECLARE_SOA_TABLE(ReducedA3MCEvents, "AOD", "REA3MCEVTS", //! Event level MC truth information
65+
DECLARE_SOA_TABLE(ReA3MCEvents, "AOD", "REA3MCEVENT", //! Event level MC truth information
6666
o2::soa::Index<>,
6767
mccollision::GeneratorsID, reducedeventalice3::MCPosX, reducedeventalice3::MCPosY, reducedeventalice3::MCPosZ,
6868
mccollision::T, mccollision::Weight, mccollision::ImpactParameter);
6969

70-
using ReducedA3MCEvent = ReducedA3MCEvents::iterator;
71-
using ReducedA3Event = ReducedA3Events::iterator;
70+
using ReducedA3MCEvent = ReA3MCEvents::iterator;
71+
using ReA3Event = ReA3Events::iterator;
7272

7373
namespace reducedtrackalice3
7474
{
7575
// basic track information
76-
DECLARE_SOA_INDEX_COLUMN(ReducedA3Event, reduceda3event); //!
77-
DECLARE_SOA_INDEX_COLUMN(Track, track); //!
76+
DECLARE_SOA_INDEX_COLUMN(ReA3Event, rea3event); //!
77+
DECLARE_SOA_INDEX_COLUMN(Track, track); //!
7878
// ---- flags reserved for storing various information during filtering
7979
DECLARE_SOA_BITMAP_COLUMN(FilteringFlags, filteringFlags, 64); //!
8080
// -----------------------------------------------------
@@ -111,8 +111,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(P, p, //!
111111
} // namespace reducedtrackalice3
112112

113113
// basic track information
114-
DECLARE_SOA_TABLE(ReducedA3Tracks, "AOD", "REA3TRACK", //!
115-
o2::soa::Index<>, reducedtrackalice3::ReducedA3EventId, reducedtrackalice3::FilteringFlags,
114+
DECLARE_SOA_TABLE(ReA3Tracks, "AOD", "REA3TRACK", //!
115+
o2::soa::Index<>, reducedtrackalice3::ReA3EventId, reducedtrackalice3::FilteringFlags,
116116
reducedtrackalice3::Pt, reducedtrackalice3::Eta, reducedtrackalice3::Phi, reducedtrackalice3::Sign, reducedtrackalice3::IsAmbiguous,
117117
reducedtrackalice3::Px<reducedtrackalice3::Pt, reducedtrackalice3::Phi>,
118118
reducedtrackalice3::Py<reducedtrackalice3::Pt, reducedtrackalice3::Phi>,
@@ -126,19 +126,19 @@ DECLARE_SOA_TABLE(ReducedA3TracksBarrelCov, "AOD", "REA3BARRELCOV", //!
126126

127127
namespace reducedA3trackMC
128128
{
129-
DECLARE_SOA_INDEX_COLUMN(ReducedA3MCEvent, reducedA3MCEvent); //!
130-
DECLARE_SOA_COLUMN(McReducedFlags, mcReducedFlags, uint16_t); //! Flags to hold compressed MC selection information
131-
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother0, mother0, int, "ReducedA3MCTracks_Mother0"); //! Track index of the first mother
132-
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother1, mother1, int, "ReducedA3MCTracks_Mother1"); //! Track index of the last mother
133-
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter0, daughter0, int, "ReducedA3MCTracks_Daughter0"); //! Track index of the first daughter
134-
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter1, daughter1, int, "ReducedA3MCTracks_Daughter1"); //! Track index of the last daughter
135-
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Mothers, mothers); //! Mother tracks (possible empty) array. Iterate over mcParticle.mothers_as<aod::McParticles>())
136-
DECLARE_SOA_SELF_SLICE_INDEX_COLUMN(Daughters, daughters); //! Daughter tracks (possibly empty) slice. Check for non-zero with mcParticle.has_daughters(). Iterate over mcParticle.daughters_as<aod::McParticles>())
137-
DECLARE_SOA_COLUMN(Pt, pt, float); //!
138-
DECLARE_SOA_COLUMN(Eta, eta, float); //!
139-
DECLARE_SOA_COLUMN(Phi, phi, float); //!
140-
DECLARE_SOA_COLUMN(E, e, float); //!
141-
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
129+
DECLARE_SOA_INDEX_COLUMN(ReA3MCEvent, reA3MCEvent); //!
130+
DECLARE_SOA_COLUMN(McReducedFlags, mcReducedFlags, uint16_t); //! Flags to hold compressed MC selection information
131+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother0, mother0, int, "ReA3MCTracks_Mother0"); //! Track index of the first mother
132+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother1, mother1, int, "ReA3MCTracks_Mother1"); //! Track index of the last mother
133+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter0, daughter0, int, "ReA3MCTracks_Daughter0"); //! Track index of the first daughter
134+
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter1, daughter1, int, "ReA3MCTracks_Daughter1"); //! Track index of the last daughter
135+
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Mothers, mothers); //! Mother tracks (possible empty) array. Iterate over mcParticle.mothers_as<aod::McParticles>())
136+
DECLARE_SOA_SELF_SLICE_INDEX_COLUMN(Daughters, daughters); //! Daughter tracks (possibly empty) slice. Check for non-zero with mcParticle.has_daughters(). Iterate over mcParticle.daughters_as<aod::McParticles>())
137+
DECLARE_SOA_COLUMN(Pt, pt, float); //!
138+
DECLARE_SOA_COLUMN(Eta, eta, float); //!
139+
DECLARE_SOA_COLUMN(Phi, phi, float); //!
140+
DECLARE_SOA_COLUMN(E, e, float); //!
141+
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
142142
[](float pt, float phi) -> float { return pt * std::cos(phi); });
143143
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //!
144144
[](float pt, float phi) -> float { return pt * std::sin(phi); });
@@ -159,8 +159,8 @@ DECLARE_SOA_DYNAMIC_COLUMN(Y, y, //! Particle rapidity
159159

160160
// NOTE: This table is nearly identical to the one from Framework (except that it points to the event ID, not the BC id)
161161
// This table contains all MC truth tracks (both barrel and muon)
162-
DECLARE_SOA_TABLE(ReducedA3MCTracks, "AOD", "REA3MCTRACK", //! MC track information (on disk)
163-
o2::soa::Index<>, reducedA3trackMC::ReducedA3MCEventId,
162+
DECLARE_SOA_TABLE(ReA3MCTracks, "AOD", "REA3MCTRACK", //! MC track information (on disk)
163+
o2::soa::Index<>, reducedA3trackMC::ReA3MCEventId,
164164
mcparticle::PdgCode, mcparticle::StatusCode, mcparticle::Flags,
165165
reducedA3trackMC::MothersIds, reducedA3trackMC::DaughtersIdSlice,
166166
mcparticle::Weight,
@@ -179,18 +179,18 @@ DECLARE_SOA_TABLE(ReducedA3MCTracks, "AOD", "REA3MCTRACK", //! MC track informa
179179
mcparticle::GetHepMCStatusCode<mcparticle::Flags, mcparticle::StatusCode>,
180180
mcparticle::IsPhysicalPrimary<mcparticle::Flags>);
181181

182-
using ReducedA3MCTrack = ReducedA3MCTracks::iterator;
182+
using ReA3MCTrack = ReA3MCTracks::iterator;
183183

184184
namespace reduceda3barreltracklabel
185185
{
186-
DECLARE_SOA_INDEX_COLUMN(ReducedA3MCTrack, reducedA3MCTrack); //!
186+
DECLARE_SOA_INDEX_COLUMN(ReA3MCTrack, reA3MCTrack); //!
187187
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t);
188188
} // namespace reduceda3barreltracklabel
189189

190190
// NOTE: MC labels. This table has one entry for each reconstructed track (joinable with the track tables)
191191
// The McParticleId points to the position of the MC truth track from the ReducedTracksMC table
192192
DECLARE_SOA_TABLE(ReducedA3TracksBarrelLabels, "AOD", "REA3BARLA", //!
193-
reduceda3barreltracklabel::ReducedA3MCTrackId, reduceda3barreltracklabel::McMask, reducedA3trackMC::McReducedFlags);
193+
reduceda3barreltracklabel::ReA3MCTrackId, reduceda3barreltracklabel::McMask, reducedA3trackMC::McReducedFlags);
194194

195195
using ReducedA3TrackBarrelLabel = ReducedA3TracksBarrelLabels::iterator;
196196

@@ -206,31 +206,31 @@ DECLARE_SOA_TABLE(ReducedA3TracksBarrel, "AOD", "REA3BARREL",
206206
DECLARE_SOA_TABLE(ReducedA3TracksBarrelInfo, "AOD", "REA3BARRELINFO",
207207
reducedtrackalice3::CollisionId, collision::PosX, collision::PosY, collision::PosZ, reducedtrackalice3::TrackId);
208208

209-
using ReducedA3Track = ReducedA3Tracks::iterator;
209+
using ReducedA3Track = ReA3Tracks::iterator;
210210
using ReducedA3TrackBarrel = ReducedA3TracksBarrel::iterator;
211211
using ReducedA3TrackBarrelCov = ReducedA3TracksBarrelCov::iterator;
212212
using ReducedA3TrackBarrelInfo = ReducedA3TracksBarrelInfo::iterator;
213213

214214
namespace reducedeventlabela3
215215
{
216-
DECLARE_SOA_INDEX_COLUMN(ReducedA3MCEvent, reducedA3MCEvent); //! MC collision
217-
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t); //! Bit mask to indicate collision mismatches (bit ON means mismatch). Bit 15: indicates negative label
216+
DECLARE_SOA_INDEX_COLUMN(ReA3MCEvent, reA3MCEvent); //! MC collision
217+
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t); //! Bit mask to indicate collision mismatches (bit ON means mismatch). Bit 15: indicates negative label
218218
} // namespace reducedeventlabela3
219219

220220
DECLARE_SOA_TABLE(ReducedA3MCEventLabels, "AOD", "REA3MCCOLLBL", //! Table joined to the ReducedEvents table containing the MC index
221-
reducedeventlabela3::ReducedA3MCEventId, reducedeventlabela3::McMask);
221+
reducedeventlabela3::ReA3MCEventId, reducedeventlabela3::McMask);
222222

223223
using ReducedA3MCEventLabel = ReducedA3MCEventLabels::iterator;
224224

225225
namespace reducedA3track_association
226226
{
227-
DECLARE_SOA_INDEX_COLUMN(ReducedA3Event, reducedA3event); //! ReducedEvent index
228-
DECLARE_SOA_INDEX_COLUMN(ReducedA3Track, reducedA3track); //! ReducedTrack index
227+
DECLARE_SOA_INDEX_COLUMN(ReA3Event, reA3event); //! ReducedEvent index
228+
DECLARE_SOA_INDEX_COLUMN(ReA3Track, reA3track); //! ReducedTrack index
229229
} // namespace reducedA3track_association
230230

231231
DECLARE_SOA_TABLE(ReducedA3TracksAssoc, "AOD", "REA3ASSOC", //! Table for reducedtrack-to-reducedcollision association
232-
reducedA3track_association::ReducedA3EventId,
233-
reducedA3track_association::ReducedA3TrackId);
232+
reducedA3track_association::ReA3EventId,
233+
reducedA3track_association::ReA3TrackId);
234234

235235
DECLARE_SOA_TABLE(ReducedA3PIDTOF, "AOD", "REA3PIDTOF",
236236
upgrade_tof::TOFEventTime,
@@ -332,4 +332,4 @@ DECLARE_SOA_TABLE(ReducedA3PIDOT, "AOD", "REA3PIDOT",
332332

333333
} // namespace o2::aod
334334

335-
#endif // PWGDQ_DATAMODEL_REDUCEDTABLESALICE3_H_
335+
#endif // ALICE3_DATAMODEL_REDUCEDTABLESALICE3_H_

ALICE3/TableProducer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ o2physics_add_dpl_workflow(alice3-tracking-translator
6262
COMPONENT_NAME Analysis)
6363

6464
o2physics_add_dpl_workflow(alice3-dq-table-maker
65-
SOURCES alice3-dq-table-maker.cxx
65+
SOURCES alice3DqTableMaker.cxx
6666
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCCDB O2Physics::PWGDQCore
6767
COMPONENT_NAME Analysis)
6868

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ struct OnTheFlyTracker {
211211

212212
struct : ConfigurableGroup {
213213
std::string prefix = "fastPrimaryTrackerSettings";
214+
Configurable<bool> fastTrackShortLivedParticles{"fastTrackShortLivedParticles", false, "Use fasttracker for short lived tracks"};
214215
Configurable<bool> fastTrackPrimaries{"fastTrackPrimaries", false, "Use fasttracker for primary tracks. Enable with care"};
215216
Configurable<int> minSiliconHits{"minSiliconHits", 4, "minimum number of silicon hits to accept track"};
216217
Configurable<bool> applyZacceptance{"applyZacceptance", false, "apply z limits to detector layers or not"};
@@ -348,15 +349,20 @@ struct OnTheFlyTracker {
348349
v0candidate thisV0;
349350
// Constants
350351
static constexpr int kv0Prongs = 2;
351-
static constexpr std::array<int, 3> v0PDGs = {kK0Short,
352-
kLambda0,
353-
kLambda0Bar};
352+
static constexpr std::array<int, 3> v0PDGs = {PDG_t::kK0Short,
353+
PDG_t::kLambda0,
354+
PDG_t::kLambda0Bar};
354355

355-
static constexpr std::array<int, 5> longLivedHandledPDGs = {kElectron,
356-
kMuonMinus,
357-
kPiPlus,
358-
kKPlus,
359-
kProton};
356+
static constexpr std::array<int, 5> longLivedHandledPDGs = {PDG_t::kElectron,
357+
PDG_t::kMuonMinus,
358+
PDG_t::kPiPlus,
359+
PDG_t::kKPlus,
360+
PDG_t::kProton};
361+
362+
static constexpr std::array<int, 5> shortLivedHandledPDGs = {PDG_t::kSigmaPlus,
363+
PDG_t::kSigmaMinus,
364+
PDG_t::kXiMinus,
365+
PDG_t::kOmegaMinus};
360366

361367
static constexpr std::array<int, 4> nucleiPDGs = {o2::constants::physics::kDeuteron,
362368
o2::constants::physics::kTriton,
@@ -760,6 +766,10 @@ struct OnTheFlyTracker {
760766
return o2::track::PID::Proton;
761767
} else if (std::abs(pdgCode) == PDG_t::kLambda0) {
762768
return o2::track::PID::Lambda;
769+
} else if (std::abs(pdgCode) == PDG_t::kSigmaPlus) {
770+
return o2::track::PID::XiMinus; // Close enough
771+
} else if (std::abs(pdgCode) == PDG_t::kSigmaMinus) {
772+
return o2::track::PID::XiMinus; // Close enough
763773
} else if (std::abs(pdgCode) == PDG_t::kXiMinus) {
764774
return o2::track::PID::XiMinus;
765775
} else if (std::abs(pdgCode) == PDG_t::kOmegaMinus) {
@@ -1875,12 +1885,14 @@ struct OnTheFlyTracker {
18751885

18761886
const bool isCascadeToDecay = (mcParticle.pdgCode() == kXiMinus) && cascadeDecaySettings.decayXi;
18771887
const bool isV0ToDecay = std::find(v0PDGs.begin(), v0PDGs.end(), mcParticle.pdgCode()) != v0PDGs.end() && v0DecaySettings.decayV0;
1878-
18791888
const bool longLivedToBeHandled = std::find(longLivedHandledPDGs.begin(), longLivedHandledPDGs.end(), std::abs(mcParticle.pdgCode())) != longLivedHandledPDGs.end();
1889+
const bool shortLivedToBeHandled = std::find(shortLivedHandledPDGs.begin(), shortLivedHandledPDGs.end(), std::abs(mcParticle.pdgCode())) != shortLivedHandledPDGs.end();
18801890
const bool nucleiToBeHandled = std::find(nucleiPDGs.begin(), nucleiPDGs.end(), std::abs(mcParticle.pdgCode())) != nucleiPDGs.end();
18811891
const bool pdgsToBeHandled = longLivedToBeHandled ||
18821892
(enableNucleiSmearing && nucleiToBeHandled) ||
1883-
(isCascadeToDecay) || (isV0ToDecay);
1893+
(isCascadeToDecay) || (isV0ToDecay) ||
1894+
(shortLivedToBeHandled && fastPrimaryTrackerSettings.fastTrackShortLivedParticles);
1895+
18841896
if (!pdgsToBeHandled) {
18851897
continue;
18861898
}
@@ -1902,7 +1914,7 @@ struct OnTheFlyTracker {
19021914
bool reconstructed = true;
19031915
int nTrkHits = 0;
19041916
if (enablePrimarySmearing) {
1905-
if (fastPrimaryTrackerSettings.fastTrackPrimaries) {
1917+
if (fastPrimaryTrackerSettings.fastTrackPrimaries || fastPrimaryTrackerSettings.fastTrackShortLivedParticles) {
19061918
o2::track::TrackParCov perfectTrackParCov;
19071919
o2::upgrade::convertMCParticleToO2Track(mcParticle, perfectTrackParCov, pdgDB);
19081920
perfectTrackParCov.setPID(pdgCodeToPID(mcParticle.pdgCode()));
@@ -2052,8 +2064,10 @@ struct OnTheFlyTracker {
20522064
// Now that the multiplicity is known, we can process the particles to smear them
20532065
for (const auto& mcParticle : mcParticles) {
20542066
const bool longLivedToBeHandled = std::find(longLivedHandledPDGs.begin(), longLivedHandledPDGs.end(), std::abs(mcParticle.pdgCode())) != longLivedHandledPDGs.end();
2067+
const bool shortLivedToBeHandled = std::find(shortLivedHandledPDGs.begin(), shortLivedHandledPDGs.end(), std::abs(mcParticle.pdgCode())) != shortLivedHandledPDGs.end();
20552068
const bool nucleiToBeHandled = std::find(nucleiPDGs.begin(), nucleiPDGs.end(), std::abs(mcParticle.pdgCode())) != nucleiPDGs.end();
2056-
const bool pdgsToBeHandled = longLivedToBeHandled || (enableNucleiSmearing && nucleiToBeHandled);
2069+
const bool pdgsToBeHandled = longLivedToBeHandled || (enableNucleiSmearing && nucleiToBeHandled) ||
2070+
(shortLivedToBeHandled && fastPrimaryTrackerSettings.fastTrackShortLivedParticles);
20572071

20582072
o2::upgrade::OTFParticle otfParticle(mcParticle);
20592073
otfParticle.setBits(mcParticle.decayerBits_raw());
@@ -2099,10 +2113,21 @@ struct OnTheFlyTracker {
20992113
bool reconstructed = false;
21002114
int nTrkHits = 0;
21012115
const bool isSecondary = !otfParticle.isPrimary() && otfParticle.checkBit(o2::upgrade::DecayerBits::ProducedByDecayer) && otfParticle.isAlive();
2102-
if (enablePrimarySmearing && otfParticle.isPrimary()) {
2116+
if (enablePrimarySmearing && longLivedToBeHandled && otfParticle.isPrimary()) {
21032117
o2::upgrade::convertMCParticleToO2Track(mcParticle, trackParCov, pdgDB);
21042118
computeBremsstrahlungLoss(icfg, mcParticle, trackParCov);
21052119
reconstructed = mSmearer[icfg]->smearTrack(trackParCov, mcParticle.pdgCode(), dNdEta);
2120+
} else if (shortLivedToBeHandled && fastPrimaryTrackerSettings.fastTrackShortLivedParticles) {
2121+
o2::track::TrackParCov perfectTrackParCov;
2122+
o2::upgrade::convertMCParticleToO2Track(mcParticle, perfectTrackParCov, pdgDB);
2123+
perfectTrackParCov.setPID(pdgCodeToPID(mcParticle.pdgCode()));
2124+
computeBremsstrahlungLoss(icfg, mcParticle, perfectTrackParCov);
2125+
nTrkHits = fastTracker[icfg]->FastTrack(perfectTrackParCov, trackParCov, dNdEta);
2126+
if (nTrkHits < fastPrimaryTrackerSettings.minSiliconHits) {
2127+
reconstructed = false;
2128+
} else {
2129+
reconstructed = true;
2130+
}
21062131
} else if (enableSecondarySmearing && isSecondary) {
21072132
o2::track::TrackParCov perfectTrackParCov;
21082133
o2::upgrade::convertMCParticleToO2Track(mcParticle, perfectTrackParCov, pdgDB);

0 commit comments

Comments
 (0)