Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions ALICE3/DataModel/OTFMCParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,22 @@ DECLARE_SOA_COLUMN(Y, y, float);
DECLARE_SOA_COLUMN(IsAlive, isAlive, bool);
DECLARE_SOA_COLUMN(IsPrimary, isPrimary, bool);

DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother0, mother0, int, "McPartsWithDau_Mother0"); //! Track index of the first mother
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Mother1, mother1, int, "McPartsWithDau_Mother1"); //! Track index of the last mother
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter0, daughter0, int, "McPartsWithDau_Daughter0"); //! Track index of the first daugther
DECLARE_SOA_SELF_INDEX_COLUMN_FULL(Daughter1, daughter1, int, "McPartsWithDau_Daughter1"); //! Track index of the last daugther
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(Mothers, mothers); //! Mother tracks (possible empty) array. Iterate over mcParticle.mothers_as<aod::McParticles>())
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>())
} // namespace otfmcparticle

DECLARE_SOA_TABLE_FULL(McPartsWithDau, "McPartsWithDau", "AOD", "MCPARTSWITHDAU",
DECLARE_SOA_TABLE_FULL(McPartWithDaus, "McPartWithDaus", "AOD", "MCPARTSWITHDAU",
o2::soa::Index<>,
mcparticle::McCollisionId,
mcparticle::PdgCode,
mcparticle::StatusCode,
mcparticle::Flags,
mcparticle::MothersIds,
mcparticle::DaughtersIdSlice,
otfmcparticle::MothersIds,
otfmcparticle::DaughtersIdSlice,
mcparticle::Weight,
mcparticle::Px,
mcparticle::Py,
Expand All @@ -68,7 +74,18 @@ DECLARE_SOA_TABLE_FULL(McPartsWithDau, "McPartsWithDau", "AOD", "MCPARTSWITHDAU"
mcparticle::GetProcess<mcparticle::Flags, mcparticle::StatusCode>,
mcparticle::IsPhysicalPrimary<mcparticle::Flags>);

using McPartWithDau = McPartsWithDau::iterator;
using McPartWithDau = McPartWithDaus::iterator;

namespace otfmctracklable
{
DECLARE_SOA_INDEX_COLUMN(McPartWithDau, mcPartWithDau); //! MC particle
DECLARE_SOA_COLUMN(McMask, mcMask, uint16_t); //! Bit mask to indicate detector mismatches (bit ON means mismatch). Bit 0-6: mismatch at ITS layer. Bit 12: ITSAB tracklet mismatch. Bit 13: ITS-TPC mismatch. Bit 14: isNoise == True (global track), Bit 15: isFake == True (global track)
} // namespace otfmctracklable

DECLARE_SOA_TABLE(McTrackWithDauLabels, "AOD", "MCTRACKWithDAULABEL", //! Table joined to the track table containing the MC index
otfmctracklable::McPartWithDauId, otfmctracklable::McMask);

using McTrackWithDauLabel = McTrackWithDauLabels::iterator;

} // namespace o2::aod

Expand Down
2 changes: 1 addition & 1 deletion ALICE3/TableProducer/OTF/onTheFlyDecayer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static const std::vector<int> pdgCodes{kK0Short,
kOmegaPlusBar};

struct OnTheFlyDecayer {
Produces<aod::McPartsWithDau> tableMcParticlesWithDau;
Produces<aod::McPartWithDaus> tableMcParticlesWithDau;

o2::upgrade::Decayer decayer;
Service<o2::framework::O2DatabasePDG> pdgDB;
Expand Down
9 changes: 5 additions & 4 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ struct OnTheFlyTracker {
Produces<aod::StoredTracksCov> tableStoredTracksCov;
Produces<aod::TracksCovExtension> tableTracksCovExtension;
Produces<aod::McTrackLabels> tableMcTrackLabels;
Produces<aod::McTrackWithDauLabels> tableMcTrackWithDauLabels;
Produces<aod::TracksDCA> tableTracksDCA;
Produces<aod::TracksDCACov> tableTracksDCACov;
Produces<aod::CollisionsAlice3> tableCollisionsAlice3;
Expand Down Expand Up @@ -1871,7 +1872,7 @@ struct OnTheFlyTracker {
}
}

void processConfigurationDev(aod::McCollision const& mcCollision, aod::McPartsWithDau const& mcParticles, const int icfg)
void processConfigurationDev(aod::McCollision const& mcCollision, aod::McPartWithDaus const& mcParticles, const int icfg)
{
// const int lastTrackIndex = tableStoredTracksCov.lastIndex() + 1; // bookkeep the last added track
const std::string histPath = "Configuration_" + std::to_string(icfg) + "/";
Expand Down Expand Up @@ -2065,7 +2066,7 @@ struct OnTheFlyTracker {
trackParCov.getSigmaSnpZ(), trackParCov.getSigmaSnp2(), trackParCov.getSigmaTglY(), trackParCov.getSigmaTglZ(), trackParCov.getSigmaTglSnp(),
trackParCov.getSigmaTgl2(), trackParCov.getSigma1PtY(), trackParCov.getSigma1PtZ(), trackParCov.getSigma1PtSnp(), trackParCov.getSigma1PtTgl(),
trackParCov.getSigma1Pt2());
tableMcTrackLabels(trackParCov.mcLabel, 0);
tableMcTrackWithDauLabels(trackParCov.mcLabel, 0);
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits);

// populate extra tables if required to do so
Expand Down Expand Up @@ -2111,7 +2112,7 @@ struct OnTheFlyTracker {
trackParCov.getSigmaSnpZ(), trackParCov.getSigmaSnp2(), trackParCov.getSigmaTglY(), trackParCov.getSigmaTglZ(), trackParCov.getSigmaTglSnp(),
trackParCov.getSigmaTgl2(), trackParCov.getSigma1PtY(), trackParCov.getSigma1PtZ(), trackParCov.getSigma1PtSnp(), trackParCov.getSigma1PtTgl(),
trackParCov.getSigma1Pt2());
tableMcTrackLabels(trackParCov.mcLabel, 0);
tableMcTrackWithDauLabels(trackParCov.mcLabel, 0);
tableTracksExtraA3(trackParCov.nSiliconHits, trackParCov.nTPCHits);

// populate extra tables if required to do so
Expand All @@ -2129,7 +2130,7 @@ struct OnTheFlyTracker {
}
}

void processDecayer(aod::McCollision const& mcCollision, aod::McPartsWithDau const& mcParticles)
void processDecayer(aod::McCollision const& mcCollision, aod::McPartWithDaus const& mcParticles)
{
for (size_t icfg = 0; icfg < mSmearer.size(); ++icfg) {
processConfigurationDev(mcCollision, mcParticles, static_cast<int>(icfg));
Expand Down
Loading
Loading