Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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
Original file line number Diff line number Diff line change
Expand Up @@ -151,24 +151,6 @@ using FwdTracksCovTable = o2::soa::Table<o2::aod::fwdtrack::SigmaX,
o2::aod::fwdtrack::Rho1PtPhi,
o2::aod::fwdtrack::Rho1PtTgl>;

using MCParticlesTable = o2::soa::Table<o2::aod::mcparticle::McCollisionId,
o2::aod::mcparticle::PdgCode,
o2::aod::mcparticle::StatusCode,
o2::aod::mcparticle::Flags,
o2::aod::mcparticle::Mother0Id,
o2::aod::mcparticle::Mother1Id,
o2::aod::mcparticle::Daughter0Id,
o2::aod::mcparticle::Daughter1Id,
o2::aod::mcparticle::Weight,
o2::aod::mcparticle::Px,
o2::aod::mcparticle::Py,
o2::aod::mcparticle::Pz,
o2::aod::mcparticle::E,
o2::aod::mcparticle::Vx,
o2::aod::mcparticle::Vy,
o2::aod::mcparticle::Vz,
o2::aod::mcparticle::Vt>;

typedef boost::tuple<int, int, int> Triplet_t;

struct TripletHash : std::unary_function<Triplet_t, std::size_t> {
Expand Down
32 changes: 15 additions & 17 deletions 32 Detectors/AOD/src/AODProducerWorkflowSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void AODProducerWorkflowDPL::fillTrackTablesPerCollision(int collisionID,
for (int ti = start; ti < end; ti++) {
auto& trackIndex = GIndices[ti];
if (GIndex::includesSource(src, mInputSources)) {
if (src == GIndex::Source::MFT) { // MFT tracks are treated separately since they are stored in a different table
if (src == GIndex::Source::MFT) { // MFT tracks are treated separately since they are stored in a different table
if (trackIndex.isAmbiguous() && mGIDToTableMFTID.find(trackIndex) != mGIDToTableMFTID.end()) { // was it already stored ?
continue;
}
Expand Down Expand Up @@ -701,29 +701,29 @@ void AODProducerWorkflowDPL::fillMCParticlesTable(o2::steer::MCKinematicsReader&
flags |= o2::aod::mcparticle::enums::PhysicalPrimary; // mark as physical primary
}
float weight = 0.f;
std::vector<int> mothers;
int mcMother0 = mcParticles[particle].getMotherTrackId();
auto item = mToStore.find(Triplet_t(source, event, mcMother0));
int mother0 = -1;
if (item != mToStore.end()) {
mother0 = item->second;
mothers.push_back(item->second);
}
int mcMother1 = mcParticles[particle].getSecondMotherTrackId();
int mother1 = -1;
item = mToStore.find(Triplet_t(source, event, mcMother1));
if (item != mToStore.end()) {
mother1 = item->second;
mothers.push_back(item->second);
}
int daughters[2] = {-1, -1}; // slice
int mcDaughter0 = mcParticles[particle].getFirstDaughterTrackId();
int daughter0 = -1;
item = mToStore.find(Triplet_t(source, event, mcDaughter0));
if (item != mToStore.end()) {
daughter0 = item->second;
daughters[0] = item->second;
}
int mcDaughterL = mcParticles[particle].getLastDaughterTrackId();
int daughterL = -1;
item = mToStore.find(Triplet_t(source, event, mcDaughterL));
if (item != mToStore.end()) {
daughterL = item->second;
daughters[1] = item->second;
} else {
daughters[1] = daughters[0];
}
auto pX = (float)mcParticles[particle].Px();
auto pY = (float)mcParticles[particle].Py();
Expand All @@ -734,10 +734,8 @@ void AODProducerWorkflowDPL::fillMCParticlesTable(o2::steer::MCKinematicsReader&
mcParticles[particle].GetPdgCode(),
statusCode,
flags,
mother0,
mother1,
daughter0,
daughterL,
mothers,
daughters,
truncateFloatFraction(weight, mMcParticleW),
truncateFloatFraction(pX, mMcParticleMom),
truncateFloatFraction(pY, mMcParticleMom),
Expand Down Expand Up @@ -789,7 +787,7 @@ void AODProducerWorkflowDPL::fillMCTrackLabelsTable(const MCTrackLabelCursorType
if (!needToStore(src == GIndex::Source::MFT ? mGIDToTableMFTID : mGIDToTableFwdID)) {
continue;
}
if (mcTruth.isValid()) { // if not set, -1 will be stored
if (mcTruth.isValid()) { // if not set, -1 will be stored
labelHolder.labelID = mToStore.at(Triplet_t(mcTruth.getSourceID(), mcTruth.getEventID(), mcTruth.getTrackID()));
}
if (mcTruth.isFake()) {
Expand Down Expand Up @@ -1178,7 +1176,7 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
auto& mcCollisionsBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MCCOLLISION"});
auto& mcMFTTrackLabelBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MCMFTTRACKLABEL"});
auto& mcFwdTrackLabelBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MCFWDTRACKLABEL"});
auto& mcParticlesBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MCPARTICLE"});
auto& mcParticlesBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MCPARTICLE_001"});
auto& mcTrackLabelBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MCTRACKLABEL"});
auto& mftTracksBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "MFTTRACK"});
auto& tracksBuilder = pc.outputs().make<TableBuilder>(Output{"AOD", "TRACK"});
Expand All @@ -1204,7 +1202,7 @@ void AODProducerWorkflowDPL::run(ProcessingContext& pc)
auto mcCollisionsCursor = mcCollisionsBuilder.cursor<o2::aod::McCollisions>();
auto mcMFTTrackLabelCursor = mcMFTTrackLabelBuilder.cursor<o2::aod::McMFTTrackLabels>();
auto mcFwdTrackLabelCursor = mcFwdTrackLabelBuilder.cursor<o2::aod::McFwdTrackLabels>();
auto mcParticlesCursor = mcParticlesBuilder.cursor<o2::aodproducer::MCParticlesTable>();
auto mcParticlesCursor = mcParticlesBuilder.cursor<o2::aod::StoredMcParticles_001>();
auto mcTrackLabelCursor = mcTrackLabelBuilder.cursor<o2::aod::McTrackLabels>();
auto mftTracksCursor = mftTracksBuilder.cursor<o2::aodproducer::MFTTracksTable>();
auto tracksCovCursor = tracksCovBuilder.cursor<o2::aodproducer::TracksCovTable>();
Expand Down Expand Up @@ -1939,7 +1937,7 @@ DataProcessorSpec getAODProducerWorkflowSpec(GID::mask_t src, bool enableSV, boo
outputs.emplace_back(OutputLabel{"O2mccollisionlabel"}, "AOD", "MCCOLLISIONLABEL", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2mcmfttracklabel"}, "AOD", "MCMFTTRACKLABEL", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2mcfwdtracklabel"}, "AOD", "MCFWDTRACKLABEL", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2mcparticle"}, "AOD", "MCPARTICLE", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2mcparticle_001"}, "AOD", "MCPARTICLE_001", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2mctracklabel"}, "AOD", "MCTRACKLABEL", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2mfttrack"}, "AOD", "MFTTRACK", 0, Lifetime::Timeframe);
outputs.emplace_back(OutputLabel{"O2track"}, "AOD", "TRACK", 0, Lifetime::Timeframe);
Expand Down
2 changes: 1 addition & 1 deletion 2 Framework/Core/include/Framework/AnalysisDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ DECLARE_SOA_EXTENDED_TABLE(McParticles_001, StoredMcParticles_001, "MCPARTICLE_0
mcparticle::P,
mcparticle::Y);

using McParticles = McParticles_000;
using McParticles = McParticles_001;
using McParticle = McParticles::iterator;
} // namespace aod
namespace soa
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.