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
49 changes: 49 additions & 0 deletions PWGHF/HFC/TableProducer/producerCharmHadronsV0FemtoDream.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ struct HfProducerCharmHadronsV0FemtoDream {
constexpr int GenFromTransport = -1; // -1 if a particle produced during transport
// get list of mothers, but it could be empty (for example in case of injected light nuclei)
auto motherparticlesMc = particleMc.template mothers_as<aod::McParticles>();
float ptPos{-1.f}, ptNeg{-1.f};
float etaPos{-1.f}, etaNeg{-1.f};
float phiPos{-1.f}, phiNeg{-1.f};
int pdgCodePos{0}, pdgCodeNeg{0};
// check pdg code
// if this fails, the particle is a fake
if (std::abs(pdgCode) == std::abs(v0PDGCode.value)) {
Expand Down Expand Up @@ -534,21 +538,66 @@ struct HfProducerCharmHadronsV0FemtoDream {
} else {
particleOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kElse;
}
for (auto const& dauMc : particleMc.template daughters_as<aod::McParticles>()) {
if (dauMc.pdgCode() > 0) {
ptPos = dauMc.pt();
etaPos = dauMc.eta();
phiPos = dauMc.phi();
pdgCodePos = dauMc.pdgCode();
} else {
ptNeg = dauMc.pt();
etaNeg = dauMc.eta();
phiNeg = dauMc.phi();
pdgCodeNeg = dauMc.pdgCode();
}
}
// if pdg code is wrong, particle is fake
} else {
particleOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kFake;
}

// positive daughter
outputPartsMc(particleOrigin, pdgCodePos, ptPos, etaPos, phiPos);
outputPartsMcLabels(outputPartsMc.lastIndex());
if (isDebug) {
outputPartsExtMcLabels(outputPartsMc.lastIndex());
outputDebugPartsMc(pdgCode);
}
// negative daughter
outputPartsMc(particleOrigin, pdgCodeNeg, ptNeg, etaNeg, phiNeg);
outputPartsMcLabels(outputPartsMc.lastIndex());
if (isDebug) {
outputPartsExtMcLabels(outputPartsMc.lastIndex());
outputDebugPartsMc(pdgCode);
}
// V0
outputPartsMc(particleOrigin, pdgCode, particleMc.pt(), particleMc.eta(), particleMc.phi());
outputPartsMcLabels(outputPartsMc.lastIndex());
if (isDebug) {
outputPartsExtMcLabels(outputPartsMc.lastIndex());
outputDebugPartsMc(pdgCodeMother);
}
} else {
// positive daughter
outputPartsMc(aod::femtodreamMCparticle::ParticleOriginMCTruth::kFake, 0, -1.f, -1.f, -1.f);
outputPartsMcLabels(-1);
if (isDebug) {
outputPartsExtMcLabels(-1);
outputDebugPartsMc(0);
}
// negative daughter
outputPartsMc(aod::femtodreamMCparticle::ParticleOriginMCTruth::kFake, 0, -1.f, -1.f, -1.f);
outputPartsMcLabels(-1);
if (isDebug) {
outputPartsExtMcLabels(-1);
outputDebugPartsMc(0);
}
// V0
outputPartsMc(aod::femtodreamMCparticle::ParticleOriginMCTruth::kFake, 0, -1.f, -1.f, -1.f);
outputPartsMcLabels(-1);
if (isDebug) {
outputPartsExtMcLabels(-1);
outputDebugPartsMc(0);
}
}
}
Expand Down
50 changes: 25 additions & 25 deletions PWGHF/HFC/Tasks/taskCharmHadronsV0FemtoDream.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file taskCharmHadronsTrackFemtoDream.cxx
/// \file taskCharmHadronsV0FemtoDream.cxx
/// \brief Tasks that reads the V0 and CharmHadrons tables used for the pairing and builds pairs
/// \author Biao Zhang, Heidelberg University, biao.zhang@cern.ch

Expand Down Expand Up @@ -177,8 +177,8 @@ struct HfTaskCharmHadronsV0FemtoDream {
using FilteredMcCollisions = soa::Filtered<soa::Join<aod::FDCollisions, FDColMasks, aod::FDMCCollLabels>>;
using FilteredMcColision = FilteredMcCollisions::iterator;

using FilteredFDMcParts = soa::Filtered<soa::Join<aod::FDParticles, aod::FDParticlesIndex, aod::FDExtParticles, aod::FDMCLabels, aod::FDExtMCLabels, aod::FDTrkTimeStamp>>;
using FilteredFDMcPart = FilteredFDMcParts::iterator;
using FDMcV0Particles = soa::Join<aod::FDParticles, aod::FDParticlesIndex, aod::FDExtParticles, aod::FDMCLabels, aod::FDExtMCLabels, aod::FDTrkTimeStamp>;
using FDMcV0Particle = FDMcV0Particles::iterator;

using FDV0Particles = soa::Join<aod::FDParticles, aod::FDExtParticles, aod::FDParticlesIndex, aod::FDTrkTimeStamp>;
using FDV0Particle = FDV0Particles::iterator;
Expand All @@ -189,7 +189,7 @@ struct HfTaskCharmHadronsV0FemtoDream {
Filter hfMcSelFilter = (nabs(aod::fdhf::flagMc) == charmSel.charmHadMcSel);

Preslice<FDV0Particles> perCol = aod::femtodreamparticle::fdCollisionId;
Preslice<FilteredFDMcParts> perColMc = aod::femtodreamparticle::fdCollisionId;
Preslice<FDMcV0Particles> perColMc = aod::femtodreamparticle::fdCollisionId;
Preslice<FilteredCharmCand3Prongs> perHf3ProngByCol = aod::femtodreamparticle::fdCollisionId;
Preslice<FilteredCharmCand2Prongs> perHf2ProngByCol = aod::femtodreamparticle::fdCollisionId;
Preslice<FilteredCharmCandDstars> perHfDstarByCol = aod::femtodreamparticle::fdCollisionId;
Expand All @@ -206,16 +206,16 @@ struct HfTaskCharmHadronsV0FemtoDream {
(aod::femtodreamparticle::mAntiLambda > v0Sel.invMassAntiV0Min) &&
(aod::femtodreamparticle::mAntiLambda < v0Sel.invMassAntiV0Max);

Partition<FilteredFDMcParts> partitionMcLambda = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) &&
((aod::femtodreamparticle::cut & v0Sel.cutBit) == v0Sel.cutBit) &&
(aod::femtodreamparticle::pt > v0Sel.ptV0Min) &&
(aod::femtodreamparticle::pt < v0Sel.ptV0Max) &&
(aod::femtodreamparticle::eta > v0Sel.etaV0Min) &&
(aod::femtodreamparticle::eta < v0Sel.etaV0Max) &&
(aod::femtodreamparticle::mLambda > v0Sel.invMassV0Min) &&
(aod::femtodreamparticle::mLambda < v0Sel.invMassV0Max) &&
(aod::femtodreamparticle::mAntiLambda > v0Sel.invMassAntiV0Min) &&
(aod::femtodreamparticle::mAntiLambda < v0Sel.invMassAntiV0Max);
Partition<FDMcV0Particles> partitionMcLambda = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0)) &&
((aod::femtodreamparticle::cut & v0Sel.cutBit) == v0Sel.cutBit) &&
(aod::femtodreamparticle::pt > v0Sel.ptV0Min) &&
(aod::femtodreamparticle::pt < v0Sel.ptV0Max) &&
(aod::femtodreamparticle::eta > v0Sel.etaV0Min) &&
(aod::femtodreamparticle::eta < v0Sel.etaV0Max) &&
(aod::femtodreamparticle::mLambda > v0Sel.invMassV0Min) &&
(aod::femtodreamparticle::mLambda < v0Sel.invMassV0Max) &&
(aod::femtodreamparticle::mAntiLambda > v0Sel.invMassAntiV0Min) &&
(aod::femtodreamparticle::mAntiLambda < v0Sel.invMassAntiV0Max);

/// Partitions for particle K0Short
Partition<FDV0Particles> partitionK0Short = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0K0Short)) &&
Expand All @@ -229,16 +229,16 @@ struct HfTaskCharmHadronsV0FemtoDream {
(aod::femtodreamparticle::mAntiLambda > v0Sel.invMassAntiV0Min) &&
(aod::femtodreamparticle::mAntiLambda < v0Sel.invMassAntiV0Max);

Partition<FilteredFDMcParts> partitionMcK0Short = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0K0Short)) &&
((aod::femtodreamparticle::cut & v0Sel.cutBit) == v0Sel.cutBit) &&
(aod::femtodreamparticle::pt > v0Sel.ptV0Min) &&
(aod::femtodreamparticle::pt < v0Sel.ptV0Max) &&
(aod::femtodreamparticle::eta > v0Sel.etaV0Min) &&
(aod::femtodreamparticle::eta < v0Sel.etaV0Max) &&
(aod::femtodreamparticle::mLambda > v0Sel.invMassV0Min) &&
(aod::femtodreamparticle::mLambda < v0Sel.invMassV0Max) &&
(aod::femtodreamparticle::mAntiLambda > v0Sel.invMassAntiV0Min) &&
(aod::femtodreamparticle::mAntiLambda < v0Sel.invMassAntiV0Max);
Partition<FDMcV0Particles> partitionMcK0Short = (aod::femtodreamparticle::partType == uint8_t(aod::femtodreamparticle::ParticleType::kV0K0Short)) &&
((aod::femtodreamparticle::cut & v0Sel.cutBit) == v0Sel.cutBit) &&
(aod::femtodreamparticle::pt > v0Sel.ptV0Min) &&
(aod::femtodreamparticle::pt < v0Sel.ptV0Max) &&
(aod::femtodreamparticle::eta > v0Sel.etaV0Min) &&
(aod::femtodreamparticle::eta < v0Sel.etaV0Max) &&
(aod::femtodreamparticle::mLambda > v0Sel.invMassV0Min) &&
(aod::femtodreamparticle::mLambda < v0Sel.invMassV0Max) &&
(aod::femtodreamparticle::mAntiLambda > v0Sel.invMassAntiV0Min) &&
(aod::femtodreamparticle::mAntiLambda < v0Sel.invMassAntiV0Max);

/// Partition for particle 2
Partition<FilteredCharmCand3Prongs> partitionCharmHadron3Prong = aod::fdhf::bdtBkg < charmSel.charmHadBkgBDTmax && aod::fdhf::bdtFD < charmSel.charmHadFdBDTmax && aod::fdhf::bdtFD > charmSel.charmHadFdBDTmin&& aod::fdhf::bdtPrompt<charmSel.charmHadPromptBDTmax && aod::fdhf::bdtPrompt> charmSel.charmHadPromptBDTmin;
Expand Down Expand Up @@ -930,7 +930,7 @@ struct HfTaskCharmHadronsV0FemtoDream {
PROCESS_SWITCH(HfTaskCharmHadronsV0FemtoDream, processDataDstarV0, "Enable processing DstarToD0Pi and V0 correlation", false);

void processMcDplusV0(FilteredMcCollisions const& cols,
FilteredFDMcParts const& parts,
FDMcV0Particles const& parts,
o2::aod::FDMCParticles const&,
o2::aod::FDExtMCParticles const&,
FilteredCharmMcCand3Prongs const&)
Expand Down
Loading