From 7351a4fdecdf9c70712d637b18aa493229a8c6bd Mon Sep 17 00:00:00 2001 From: nzardosh Date: Fri, 7 Feb 2025 15:13:28 +0000 Subject: [PATCH] Adding D+ jets to framework --- PWGJE/Core/JetCandidateUtilities.h | 12 +- PWGJE/Core/JetHFUtilities.h | 151 +++++++++++++++++- PWGJE/DataModel/Jet.h | 9 ++ PWGJE/DataModel/JetReducedDataHF.h | 40 +++++ PWGJE/DataModel/JetSubstructure.h | 3 +- PWGJE/DataModel/JetSubtraction.h | 67 +++++++- PWGJE/JetFinders/CMakeLists.txt | 15 ++ .../JetFinders/jetFinderDplusDataCharged.cxx | 29 ++++ PWGJE/JetFinders/jetFinderDplusMCDCharged.cxx | 29 ++++ PWGJE/JetFinders/jetFinderDplusMCPCharged.cxx | 29 ++++ PWGJE/JetFinders/jetFinderHF.cxx | 8 +- PWGJE/TableProducer/Matching/CMakeLists.txt | 15 ++ .../Matching/jetMatchingMCDplusCharged.cxx | 31 ++++ .../Matching/jetMatchingMCSubDplusCharged.cxx | 29 ++++ .../Matching/jetMatchingSubDplusCharged.cxx | 30 ++++ PWGJE/TableProducer/derivedDataProducer.cxx | 36 +++++ PWGJE/TableProducer/derivedDataSelector.cxx | 16 +- PWGJE/TableProducer/derivedDataWriter.cxx | 84 ++++++++++ .../eventwiseConstituentSubtractor.cxx | 14 ++ PWGJE/TableProducer/jetEventWeightMCD.cxx | 5 + PWGJE/TableProducer/jetEventWeightMCP.cxx | 5 + PWGJE/TableProducer/rhoEstimator.cxx | 28 ++++ PWGJE/Tasks/CMakeLists.txt | 14 +- PWGJE/Tasks/jetFinderDplusQA.cxx | 27 ++++ PWGJE/Tasks/jetFinderHFQA.cxx | 3 +- PWGJE/Tasks/jetSubstructureDplus.cxx | 27 ++++ PWGJE/Tasks/jetSubstructureDplusOutput.cxx | 26 +++ PWGJE/Tasks/jetSubstructureHFOutput.cxx | 6 +- 28 files changed, 764 insertions(+), 24 deletions(-) create mode 100644 PWGJE/JetFinders/jetFinderDplusDataCharged.cxx create mode 100644 PWGJE/JetFinders/jetFinderDplusMCDCharged.cxx create mode 100644 PWGJE/JetFinders/jetFinderDplusMCPCharged.cxx create mode 100644 PWGJE/TableProducer/Matching/jetMatchingMCDplusCharged.cxx create mode 100644 PWGJE/TableProducer/Matching/jetMatchingMCSubDplusCharged.cxx create mode 100644 PWGJE/TableProducer/Matching/jetMatchingSubDplusCharged.cxx create mode 100644 PWGJE/Tasks/jetFinderDplusQA.cxx create mode 100644 PWGJE/Tasks/jetSubstructureDplus.cxx create mode 100644 PWGJE/Tasks/jetSubstructureDplusOutput.cxx diff --git a/PWGJE/Core/JetCandidateUtilities.h b/PWGJE/Core/JetCandidateUtilities.h index 8b31b11634e..8c83d4da4cd 100644 --- a/PWGJE/Core/JetCandidateUtilities.h +++ b/PWGJE/Core/JetCandidateUtilities.h @@ -225,11 +225,11 @@ auto matchedParticle(const T& candidate, const U& tracks, const V& particles) * @param candidate candidate that is being checked * @param table the table to be sliced */ -template -auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perLcCandidate, N const& perBplusCandidate, O const& perDielectronCandidate) +template +auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perDplusCandidate, N const& perLcCandidate, O const& perBplusCandidate, P const& perDielectronCandidate) { if constexpr (jethfutilities::isHFCandidate()) { - return jethfutilities::slicedPerHFCandidate(table, candidate, perD0Candidate, perLcCandidate, perBplusCandidate); + return jethfutilities::slicedPerHFCandidate(table, candidate, perD0Candidate, perDplusCandidate, perLcCandidate, perBplusCandidate); } else if constexpr (jetdqutilities::isDielectronCandidate()) { return jetdqutilities::slicedPerDielectronCandidate(table, candidate, perDielectronCandidate); } else { @@ -243,11 +243,11 @@ auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candid * @param candidate candidate that is being checked * @param table the table to be sliced */ -template -auto slicedPerCandidateCollision(T const& table, U const& candidates, V const& collision, M const& D0CollisionPerCollision, N const& LcCollisionPerCollision, O const& BplusCollisionPerCollision, P const& DielectronCollisionPerCollision) +template +auto slicedPerCandidateCollision(T const& table, U const& candidates, V const& collision, M const& D0CollisionPerCollision, N const& DplusCollisionPerCollision, O const& LcCollisionPerCollision, P const& BplusCollisionPerCollision, Q const& DielectronCollisionPerCollision) { if constexpr (jethfutilities::isHFTable() || jethfutilities::isHFMcTable()) { - return jethfutilities::slicedPerHFCollision(table, candidates, collision, D0CollisionPerCollision, LcCollisionPerCollision, BplusCollisionPerCollision); + return jethfutilities::slicedPerHFCollision(table, candidates, collision, D0CollisionPerCollision, DplusCollisionPerCollision, LcCollisionPerCollision, BplusCollisionPerCollision); } else if constexpr (jetdqutilities::isDielectronTable() || jetdqutilities::isDielectronMcTable()) { return jetdqutilities::slicedPerDielectronCollision(table, candidates, collision, DielectronCollisionPerCollision); } else { diff --git a/PWGJE/Core/JetHFUtilities.h b/PWGJE/Core/JetHFUtilities.h index b281da526c0..509c1d22b5c 100644 --- a/PWGJE/Core/JetHFUtilities.h +++ b/PWGJE/Core/JetHFUtilities.h @@ -83,6 +83,42 @@ constexpr bool isD0McTable() return isD0McCandidate() || isD0McCandidate(); } +/** + * returns true if the candidate is from a D+ table + */ +template +constexpr bool isDplusCandidate() +{ + return std::is_same_v, o2::aod::CandidatesDplusData::iterator> || std::is_same_v, o2::aod::CandidatesDplusData::filtered_iterator> || std::is_same_v, o2::aod::CandidatesDplusMCD::iterator> || std::is_same_v, o2::aod::CandidatesDplusMCD::filtered_iterator>; +} + +/** + * returns true if the particle is from a D+ MC table + */ +template +constexpr bool isDplusMcCandidate() +{ + return std::is_same_v, o2::aod::CandidatesDplusMCP::iterator> || std::is_same_v, o2::aod::CandidatesDplusMCP::filtered_iterator>; +} + +/** + * returns true if the table is a D+ table + */ +template +constexpr bool isDplusTable() +{ + return isDplusCandidate() || isDplusCandidate(); +} + +/** + * returns true if the table is a D+ MC table + */ +template +constexpr bool isDplusMcTable() +{ + return isDplusMcCandidate() || isDplusMcCandidate(); +} + /** * returns true if the candidate is from a Lc table */ @@ -164,6 +200,8 @@ constexpr bool isHFCandidate() { if constexpr (isD0Candidate()) { return true; + } else if constexpr (isDplusCandidate()) { + return true; } else if constexpr (isLcCandidate()) { return true; } else if constexpr (isBplusCandidate()) { @@ -182,6 +220,8 @@ constexpr bool isHFMcCandidate() { if constexpr (isD0McCandidate()) { return true; + } else if constexpr (isDplusMcCandidate()) { + return true; } else if constexpr (isLcMcCandidate()) { return true; } else if constexpr (isBplusMcCandidate()) { @@ -199,6 +239,8 @@ constexpr bool isHFTable() { if constexpr (isD0Candidate() || isD0Candidate()) { return true; + } else if constexpr (isDplusCandidate() || isDplusCandidate()) { + return true; } else if constexpr (isLcCandidate() || isLcCandidate()) { return true; } else if constexpr (isBplusCandidate() || isBplusCandidate()) { @@ -216,6 +258,8 @@ constexpr bool isHFMcTable() { if constexpr (isD0McCandidate() || isD0McCandidate()) { return true; + } else if constexpr (isDplusMcCandidate() || isDplusMcCandidate()) { + return true; } else if constexpr (isLcMcCandidate() || isLcMcCandidate()) { return true; } else if constexpr (isBplusMcCandidate() || isBplusMcCandidate()) { @@ -238,6 +282,12 @@ constexpr bool isMatchedHFCandidate(T const& candidate) } else { return false; } + } else if constexpr (isDplusCandidate()) { + if (std::abs(candidate.flagMcMatchRec()) == 1 << o2::aod::hf_cand_3prong::DecayType::DplusToPiKPi) { + return true; + } else { + return false; + } } else if constexpr (isLcCandidate()) { if (std::abs(candidate.flagMcMatchRec()) == 1 << o2::aod::hf_cand_3prong::DecayType::LcToPKPi) { return true; @@ -256,6 +306,12 @@ constexpr bool isMatchedHFCandidate(T const& candidate) } else { return false; } + } else if constexpr (isDplusMcCandidate()) { + if (std::abs(candidate.flagMcMatchGen()) == 1 << o2::aod::hf_cand_3prong::DecayType::DplusToPiKPi) { + return true; + } else { + return false; + } } else if constexpr (isLcMcCandidate()) { if (std::abs(candidate.flagMcMatchGen()) == 1 << o2::aod::hf_cand_3prong::DecayType::LcToPKPi) { return true; @@ -289,6 +345,12 @@ bool isHFDaughterTrack(T& track, U& candidate, V const& /*tracks*/) } else { return false; } + } else if constexpr (isDplusCandidate()) { + if (candidate.prong0Id() == track.globalIndex() || candidate.prong1Id() == track.globalIndex() || candidate.prong2Id() == track.globalIndex()) { + return true; + } else { + return false; + } } else if constexpr (isLcCandidate()) { if (candidate.prong0Id() == track.globalIndex() || candidate.prong1Id() == track.globalIndex() || candidate.prong2Id() == track.globalIndex()) { return true; @@ -340,11 +402,13 @@ auto matchedHFParticle(const T& candidate, const U& /*tracks*/, const V& /*parti * @param candidate HF candidate that is being checked * @param table the table to be sliced */ -template -auto slicedPerHFCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perLcCandidate, N const& perBplusCandidate) +template +auto slicedPerHFCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perDplusCandidate, N const& perLcCandidate, O const& perBplusCandidate) { if constexpr (isD0Candidate()) { return table.sliceBy(perD0Candidate, candidate.globalIndex()); + } else if constexpr (isDplusCandidate()) { + return table.sliceBy(perDplusCandidate, candidate.globalIndex()); } else if constexpr (isLcCandidate()) { return table.sliceBy(perLcCandidate, candidate.globalIndex()); } else if constexpr (isBplusCandidate()) { @@ -360,11 +424,13 @@ auto slicedPerHFCandidate(T const& table, U const& candidate, V const& perD0Cand * @param candidate HF candidate that is being checked * @param table the table to be sliced */ -template -auto slicedPerHFCollision(T const& table, U const& /*candidates*/, V const& collision, M const& D0CollisionPerCollision, N const& LcCollisionPerCollision, O const& BplusCollisionPerCollision) +template +auto slicedPerHFCollision(T const& table, U const& /*candidates*/, V const& collision, M const& D0CollisionPerCollision, N const& DplusCollisionPerCollision, O const& LcCollisionPerCollision, P const& BplusCollisionPerCollision) { if constexpr (isD0Table() || isD0McTable()) { return table.sliceBy(D0CollisionPerCollision, collision.globalIndex()); + } else if constexpr (isDplusTable() || isDplusMcTable()) { + return table.sliceBy(DplusCollisionPerCollision, collision.globalIndex()); } else if constexpr (isLcTable() || isLcMcTable()) { return table.sliceBy(LcCollisionPerCollision, collision.globalIndex()); } else if constexpr (isBplusTable() || isBplusMcTable()) { @@ -406,6 +472,8 @@ int getHFCandidatePDG(T const& /*candidate*/) { if constexpr (isD0Candidate() || isD0McCandidate()) { return static_cast(o2::constants::physics::Pdg::kD0); + } else if constexpr (isDplusCandidate() || isDplusMcCandidate()) { + return static_cast(o2::constants::physics::Pdg::kDPlus); } else if constexpr (isLcCandidate() || isLcMcCandidate()) { return static_cast(o2::constants::physics::Pdg::kLambdaCPlus); } else if constexpr (isBplusCandidate() || isBplusMcCandidate()) { @@ -423,6 +491,8 @@ int getHFTablePDG() { if constexpr (isD0Table() || isD0McTable()) { return static_cast(o2::constants::physics::Pdg::kD0); + } else if constexpr (isDplusTable() || isDplusMcTable()) { + return static_cast(o2::constants::physics::Pdg::kDPlus); } else if constexpr (isLcTable() || isLcMcTable()) { return static_cast(o2::constants::physics::Pdg::kLambdaCPlus); } else if constexpr (isBplusTable() || isBplusMcTable()) { @@ -442,6 +512,8 @@ float getHFCandidatePDGMass(T const& /*candidate*/) { if constexpr (isD0Candidate() || isD0McCandidate()) { return static_cast(o2::constants::physics::MassD0); + } else if constexpr (isDplusCandidate() || isDplusMcCandidate()) { + return static_cast(o2::constants::physics::MassDPlus); } else if constexpr (isLcCandidate() || isLcMcCandidate()) { return static_cast(o2::constants::physics::MassLambdaCPlus); } else if constexpr (isBplusCandidate() || isBplusMcCandidate()) { @@ -460,6 +532,8 @@ float getHFTablePDGMass() { if constexpr (isD0Table() || isD0McTable()) { return static_cast(o2::constants::physics::MassD0); + } else if constexpr (isDplusTable() || isDplusMcTable()) { + return static_cast(o2::constants::physics::MassDPlus); } else if constexpr (isLcTable() || isLcMcTable()) { return static_cast(o2::constants::physics::MassLambdaCPlus); } else if constexpr (isBplusTable() || isBplusMcTable()) { @@ -555,6 +629,72 @@ void fillD0CandidateTable(T const& candidate, U& D0ParTable, V& D0ParETable, M& } } +template +void fillDplusCandidateTable(T const& candidate, U& DplusParTable, V& DplusParETable, M& DplusMlTable, N& DplusMCDTable) +{ + + DplusParTable( + candidate.chi2PCA(), + candidate.nProngsContributorsPV(), + candidate.cpa(), + candidate.cpaXY(), + candidate.decayLength(), + candidate.decayLengthXY(), + candidate.decayLengthNormalised(), + candidate.decayLengthXYNormalised(), + candidate.ptProng0(), + candidate.ptProng1(), + candidate.ptProng2(), + candidate.impactParameter0(), + candidate.impactParameter1(), + candidate.impactParameter2(), + candidate.impactParameterNormalised0(), + candidate.impactParameterNormalised1(), + candidate.impactParameterNormalised2(), + candidate.nSigTpcPi0(), + candidate.nSigTofPi0(), + candidate.nSigTpcTofPi0(), + candidate.nSigTpcKa1(), + candidate.nSigTofKa1(), + candidate.nSigTpcTofKa1(), + candidate.nSigTpcPi2(), + candidate.nSigTofPi2(), + candidate.nSigTpcTofPi2()); + + DplusParETable( + candidate.xSecondaryVertex(), + candidate.ySecondaryVertex(), + candidate.zSecondaryVertex(), + candidate.errorDecayLength(), + candidate.errorDecayLengthXY(), + candidate.rSecondaryVertex(), + candidate.pProng0(), + candidate.pProng1(), + candidate.pProng2(), + candidate.pxProng0(), + candidate.pyProng0(), + candidate.pzProng0(), + candidate.pxProng1(), + candidate.pyProng1(), + candidate.pzProng1(), + candidate.pxProng2(), + candidate.pyProng2(), + candidate.pzProng2(), + candidate.errorImpactParameter0(), + candidate.errorImpactParameter1(), + candidate.errorImpactParameter2(), + candidate.ct()); + + std::vector mlScoresVector; + auto mlScoresSpan = candidate.mlScores(); + std::copy(mlScoresSpan.begin(), mlScoresSpan.end(), std::back_inserter(mlScoresVector)); + DplusMlTable(mlScoresVector); + + if constexpr (isMc) { + DplusMCDTable(candidate.flagMcMatchRec(), candidate.originMcRec(), candidate.isCandidateSwapped()); + } +} + template void fillLcCandidateTable(T const& candidate, U& LcParTable, V& LcParETable, M& LcMlTable, N& LcMCDTable) { @@ -712,6 +852,9 @@ void fillHFCandidateTable(T const& candidate, int32_t collisionIndex, U& HFBaseT if constexpr (isD0Candidate()) { fillD0CandidateTable(candidate, HFParTable, HFParETable, HFMlTable, HFMCDTable); } + if constexpr (isDplusCandidate()) { + fillDplusCandidateTable(candidate, HFParTable, HFParETable, HFMlTable, HFMCDTable); + } if constexpr (isLcCandidate()) { fillLcCandidateTable(candidate, HFParTable, HFParETable, HFMlTable, HFMCDTable); } diff --git a/PWGJE/DataModel/Jet.h b/PWGJE/DataModel/Jet.h index fbc96669dd9..a623f25775b 100644 --- a/PWGJE/DataModel/Jet.h +++ b/PWGJE/DataModel/Jet.h @@ -179,6 +179,7 @@ DECLARE_JET_TABLES_LEVELS(Charged, JTrackSub, HfD0Bases, HfD0PBases, "C"); DECLARE_JET_TABLES_LEVELS(Full, JTrackSub, HfD0Bases, HfD0PBases, "F"); DECLARE_JET_TABLES_LEVELS(Neutral, JTrackSub, HfD0Bases, HfD0PBases, "N"); DECLARE_JET_TABLES_LEVELS(D0Charged, JTrackD0Sub, HfD0Bases, HfD0PBases, "D0"); +DECLARE_JET_TABLES_LEVELS(DplusCharged, JTrackDplusSub, HfDplusBases, HfDplusPBases, "DP"); DECLARE_JET_TABLES_LEVELS(LcCharged, JTrackLcSub, HfLcBases, HfLcPBases, "Lc"); DECLARE_JET_TABLES_LEVELS(BplusCharged, JTrackBplusSub, HfBplusBases, HfBplusPBases, "BP"); DECLARE_JET_TABLES_LEVELS(V0Charged, JTrackSub, V0Cores, JV0Mcs, "V0"); @@ -219,6 +220,14 @@ using JetParticlesSubD0 = JMcParticleD0Subs; using McCollisionsD0 = o2::soa::Join; using CandidatesD0MCP = o2::soa::Join; +using CollisionsDplus = o2::soa::Join; +using CandidatesDplusData = o2::soa::Join; +using CandidatesDplusMCD = o2::soa::Join; +using JetTracksSubDplus = JTrackDplusSubs; +using JetParticlesSubDplus = JMcParticleDplusSubs; +using McCollisionsDplus = o2::soa::Join; +using CandidatesDplusMCP = o2::soa::Join; + using CollisionsLc = o2::soa::Join; using CandidatesLcData = o2::soa::Join; using CandidatesLcMCD = o2::soa::Join; diff --git a/PWGJE/DataModel/JetReducedDataHF.h b/PWGJE/DataModel/JetReducedDataHF.h index 855746326a2..fe8b9270f7e 100644 --- a/PWGJE/DataModel/JetReducedDataHF.h +++ b/PWGJE/DataModel/JetReducedDataHF.h @@ -63,6 +63,46 @@ DECLARE_SOA_TABLE(JDumD0MlDaus, "AOD", "JDumD0MLDAU", jdummyd0::DummyD0, o2::soa::Marker<2>); +namespace jdplusindices +{ +DECLARE_SOA_INDEX_COLUMN(JCollision, collision); +DECLARE_SOA_INDEX_COLUMN_FULL(Prong0, prong0, int, JTracks, "_0"); +DECLARE_SOA_INDEX_COLUMN_FULL(Prong1, prong1, int, JTracks, "_1"); +DECLARE_SOA_INDEX_COLUMN_FULL(Prong2, prong2, int, JTracks, "_2"); +DECLARE_SOA_INDEX_COLUMN(JMcCollision, mcCollision); +DECLARE_SOA_INDEX_COLUMN(JMcParticle, mcParticle); +} // namespace jdplusindices + +DECLARE_SOA_TABLE_STAGED(JDplusCollisionIds, "JDPCOLLID", + jdplusindices::JCollisionId); + +DECLARE_SOA_TABLE_STAGED(JDplusMcCollisionIds, "JDPMCCOLLID", + jdplusindices::JMcCollisionId); + +DECLARE_SOA_TABLE_STAGED(JDplusIds, "JDPID", + jdplusindices::JCollisionId, + jdplusindices::Prong0Id, + jdplusindices::Prong1Id, + jdplusindices::Prong2Id); + +DECLARE_SOA_TABLE_STAGED(JDplusPIds, "JDPPID", + jdplusindices::JMcCollisionId, + jdplusindices::JMcParticleId); + +namespace jdummydplus +{ + +DECLARE_SOA_COLUMN(DummyDplus, dummyDplus, bool); + +} // namespace jdummydplus +DECLARE_SOA_TABLE(JDumDplusParDaus, "AOD", "JDUMDPPARDAU", + jdummydplus::DummyDplus, + o2::soa::Marker<1>); + +DECLARE_SOA_TABLE(JDumDplusMlDaus, "AOD", "JDUMDPMLDAU", + jdummydplus::DummyDplus, + o2::soa::Marker<2>); + namespace jlcindices { DECLARE_SOA_INDEX_COLUMN(JCollision, collision); diff --git a/PWGJE/DataModel/JetSubstructure.h b/PWGJE/DataModel/JetSubstructure.h index 058ac8ebcaa..660ef03cb47 100644 --- a/PWGJE/DataModel/JetSubstructure.h +++ b/PWGJE/DataModel/JetSubstructure.h @@ -122,7 +122,8 @@ DECLARE_SOA_COLUMN(JetNConstituents, jetNConstituents, int); //! JETSUBSTRUCTURE_TABLES_DEF(C, "C", CJetCOs, "CJETCO", CEWSJetCOs, "CEWSJETCO", CMCDJetCOs, "CMCDJETCO", CMCPJetCOs, "CMCPJETCO"); JETSUBSTRUCTURE_TABLES_DEF(D0C, "D0C", HfD0Bases, "HFD0BASE", HfD0Bases, "HFD0BASE", HfD0Bases, "HFD0BASE", HfD0PBases, "HFD0PBASE"); -JETSUBSTRUCTURE_TABLES_DEF(LcC, "LCC", HfLcBases, "HFLcBASE", HfLcBases, "HFLcBASE", HfLcBases, "HFLcBASE", HfLcPBases, "HFLcPBASE"); +JETSUBSTRUCTURE_TABLES_DEF(DplusC, "DPC", HfDplusBases, "HFDPBASE", HfDplusBases, "HFDPBASE", HfDplusBases, "HFDPBASE", HfDplusPBases, "HFDPPBASE"); +JETSUBSTRUCTURE_TABLES_DEF(LcC, "LCC", HfLcBases, "HFLCBASE", HfLcBases, "HFLCBASE", HfLcBases, "HFLCBASE", HfLcPBases, "HFLCPBASE"); JETSUBSTRUCTURE_TABLES_DEF(BplusC, "BPC", HfBplusBases, "HFBPBASE", HfBplusBases, "HFBPBASE", HfBplusBases, "HFBPBASE", HfBplusPBases, "HFBPPBASE"); JETSUBSTRUCTURE_TABLES_DEF(DielectronC, "DIELC", Dielectrons, "RTDIELECTRON", Dielectrons, "RTDIELECTRON", Dielectrons, "RTDIELECTRON", JDielectronMcs, "JDIELMC"); diff --git a/PWGJE/DataModel/JetSubtraction.h b/PWGJE/DataModel/JetSubtraction.h index 3f78c05ec58..55879d009c1 100644 --- a/PWGJE/DataModel/JetSubtraction.h +++ b/PWGJE/DataModel/JetSubtraction.h @@ -52,6 +52,16 @@ namespace bkgd0mc DECLARE_SOA_INDEX_COLUMN_FULL(Candidate, candidate, int, HfD0PBases, "_0"); } // namespace bkgd0mc +namespace bkgdplus +{ +DECLARE_SOA_INDEX_COLUMN_FULL(Candidate, candidate, int, HfDplusBases, "_0"); +} // namespace bkgdplus + +namespace bkgdplusmc +{ +DECLARE_SOA_INDEX_COLUMN_FULL(Candidate, candidate, int, HfDplusPBases, "_0"); +} // namespace bkgdplusmc + namespace bkglc { DECLARE_SOA_INDEX_COLUMN_FULL(Candidate, candidate, int, HfLcBases, "_0"); @@ -105,19 +115,31 @@ DECLARE_SOA_TABLE(BkgD0McRhos, "AOD", "BkgD0McRho", bkgrho::RhoM, o2::soa::Marker<3>); -DECLARE_SOA_TABLE(BkgLcRhos, "AOD", "BkgLcRho", +DECLARE_SOA_TABLE(BkgDplusRhos, "AOD", "BkgDPRho", o2::soa::Index<>, bkgrho::Rho, bkgrho::RhoM, o2::soa::Marker<4>); -DECLARE_SOA_TABLE(BkgLcMcRhos, "AOD", "BkgLcMcRho", +DECLARE_SOA_TABLE(BkgDplusMcRhos, "AOD", "BkgDPMcRho", o2::soa::Index<>, bkgrho::Rho, bkgrho::RhoM, o2::soa::Marker<5>); -DECLARE_SOA_TABLE(BkgBplusRhos, "AOD", "BkgRho", +DECLARE_SOA_TABLE(BkgLcRhos, "AOD", "BkgLCRho", + o2::soa::Index<>, + bkgrho::Rho, + bkgrho::RhoM, + o2::soa::Marker<4>); + +DECLARE_SOA_TABLE(BkgLcMcRhos, "AOD", "BkgLCMcRho", + o2::soa::Index<>, + bkgrho::Rho, + bkgrho::RhoM, + o2::soa::Marker<5>); + +DECLARE_SOA_TABLE(BkgBplusRhos, "AOD", "BkgBPRho", o2::soa::Index<>, bkgrho::Rho, bkgrho::RhoM, @@ -211,7 +233,42 @@ DECLARE_SOA_TABLE(JMcParticleD0Subs, "AOD", "JMcPartD0Subs", using JMcParticleD0Sub = JMcParticleD0Subs::iterator; -DECLARE_SOA_TABLE(JTrackLcSubs, "AOD", "JTrackLcSubs", +DECLARE_SOA_TABLE(JTrackDplusSubs, "AOD", "JTrackDPSubs", + o2::soa::Index<>, + bkglc::CandidateId, + jtrack::Pt, + jtrack::Eta, + jtrack::Phi, + jtrack::TrackSel, + jtrack::Px, + jtrack::Py, + jtrack::Pz, + jtrack::P, + jtrack::Energy); + +using JTrackDplusSub = JTrackDplusSubs::iterator; + +DECLARE_SOA_TABLE(JMcParticleDplusSubs, "AOD", "JMcPartDPSubs", + o2::soa::Index<>, + bkglcmc::CandidateId, + jmcparticle::Pt, + jmcparticle::Eta, + jmcparticle::Phi, + jmcparticle::Y, + jmcparticle::E, + jmcparticle::PdgCode, + jmcparticle::GenStatusCode, + jmcparticle::HepMCStatusCode, + jmcparticle::IsPhysicalPrimary, + jmcparticle::Px, + jmcparticle::Py, + jmcparticle::Pz, + jmcparticle::P, + jmcparticle::Energy); + +using JMcParticleDplusSub = JMcParticleDplusSubs::iterator; + +DECLARE_SOA_TABLE(JTrackLcSubs, "AOD", "JTrackLCSubs", o2::soa::Index<>, bkglc::CandidateId, jtrack::Pt, @@ -226,7 +283,7 @@ DECLARE_SOA_TABLE(JTrackLcSubs, "AOD", "JTrackLcSubs", using JTrackLcSub = JTrackLcSubs::iterator; -DECLARE_SOA_TABLE(JMcParticleLcSubs, "AOD", "JMcPartLcSubs", +DECLARE_SOA_TABLE(JMcParticleLcSubs, "AOD", "JMcPartLCSubs", o2::soa::Index<>, bkglcmc::CandidateId, jmcparticle::Pt, diff --git a/PWGJE/JetFinders/CMakeLists.txt b/PWGJE/JetFinders/CMakeLists.txt index ba4dbb132fc..a050f9d3fef 100644 --- a/PWGJE/JetFinders/CMakeLists.txt +++ b/PWGJE/JetFinders/CMakeLists.txt @@ -74,6 +74,21 @@ o2physics_add_dpl_workflow(jet-finder-d0-mcp-charged PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(jet-finder-dplus-data-charged + SOURCES jetFinderDplusDataCharged.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(jet-finder-dplus-mcd-charged + SOURCES jetFinderDplusMCDCharged.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(jet-finder-dplus-mcp-charged + SOURCES jetFinderDplusMCPCharged.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-finder-lc-data-charged SOURCES jetFinderLcDataCharged.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport diff --git a/PWGJE/JetFinders/jetFinderDplusDataCharged.cxx b/PWGJE/JetFinders/jetFinderDplusDataCharged.cxx new file mode 100644 index 00000000000..a0cdbdf2a24 --- /dev/null +++ b/PWGJE/JetFinders/jetFinderDplusDataCharged.cxx @@ -0,0 +1,29 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet finder D+ data charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/JetFinders/jetFinderHF.cxx" + +using JetFinderDplusDataCharged = JetFinderHFTask; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + + tasks.emplace_back(adaptAnalysisTask(cfgc, + SetDefaultProcesses{{{"processChargedJetsData", true}}}, + TaskName{"jet-finder-dplus-data-charged"})); + + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/JetFinders/jetFinderDplusMCDCharged.cxx b/PWGJE/JetFinders/jetFinderDplusMCDCharged.cxx new file mode 100644 index 00000000000..0a401d330ef --- /dev/null +++ b/PWGJE/JetFinders/jetFinderDplusMCDCharged.cxx @@ -0,0 +1,29 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet finder D+ mcd charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/JetFinders/jetFinderHF.cxx" + +using JetFinderDplusMCDetectorLevelCharged = JetFinderHFTask; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + + tasks.emplace_back(adaptAnalysisTask(cfgc, + SetDefaultProcesses{{{"processChargedJetsMCD", true}}}, + TaskName{"jet-finder-dplus-mcd-charged"})); + + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/JetFinders/jetFinderDplusMCPCharged.cxx b/PWGJE/JetFinders/jetFinderDplusMCPCharged.cxx new file mode 100644 index 00000000000..4c5cb4a604d --- /dev/null +++ b/PWGJE/JetFinders/jetFinderDplusMCPCharged.cxx @@ -0,0 +1,29 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet finder D+ mcp charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/JetFinders/jetFinderHF.cxx" + +using JetFinderDplusMCParticleLevelCharged = JetFinderHFTask; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + + tasks.emplace_back(adaptAnalysisTask(cfgc, + SetDefaultProcesses{{{"processChargedJetsMCP", true}}}, + TaskName{"jet-finder-dplus-mcp-charged"})); + + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/JetFinders/jetFinderHF.cxx b/PWGJE/JetFinders/jetFinderHF.cxx index b153a3adc52..55590bc2f11 100644 --- a/PWGJE/JetFinders/jetFinderHF.cxx +++ b/PWGJE/JetFinders/jetFinderHF.cxx @@ -162,6 +162,8 @@ struct JetFinderHFTask { PresliceOptional> perD0Candidate = aod::bkgd0::candidateId; PresliceOptional> perD0McCandidate = aod::bkgd0mc::candidateId; + PresliceOptional> perDplusCandidate = aod::bkgdplus::candidateId; + PresliceOptional> perDplusMcCandidate = aod::bkgdplusmc::candidateId; PresliceOptional> perLcCandidate = aod::bkglc::candidateId; PresliceOptional> perLcMcCandidate = aod::bkglcmc::candidateId; PresliceOptional> perBplusCandidate = aod::bkgbplus::candidateId; @@ -233,7 +235,7 @@ struct JetFinderHFTask { void processChargedEvtWiseSubJetsData(soa::Filtered::iterator const& collision, soa::Filtered const& tracks, CandidateTableData const& candidates) { for (typename CandidateTableData::iterator const& candidate : candidates) { - analyseCharged(collision, jetcandidateutilities::slicedPerCandidate(tracks, candidate, perD0Candidate, perLcCandidate, perBplusCandidate, perDielectronCandidate), candidate, jetsEvtWiseSubTable, constituentsEvtWiseSubTable, tracks, jetEWSPtMin, jetEWSPtMax); + analyseCharged(collision, jetcandidateutilities::slicedPerCandidate(tracks, candidate, perD0Candidate, perDplusCandidate, perLcCandidate, perBplusCandidate, perDielectronCandidate), candidate, jetsEvtWiseSubTable, constituentsEvtWiseSubTable, tracks, jetEWSPtMin, jetEWSPtMax); } } PROCESS_SWITCH(JetFinderHFTask, processChargedEvtWiseSubJetsData, "charged hf jet finding on data with event-wise constituent subtraction", false); @@ -249,7 +251,7 @@ struct JetFinderHFTask { void processChargedEvtWiseSubJetsMCD(soa::Filtered::iterator const& collision, soa::Filtered const& tracks, CandidateTableMCD const& candidates) { for (typename CandidateTableMCD::iterator const& candidate : candidates) { - analyseCharged(collision, jetcandidateutilities::slicedPerCandidate(tracks, candidate, perD0Candidate, perLcCandidate, perBplusCandidate, perDielectronCandidate), candidate, jetsEvtWiseSubTable, constituentsEvtWiseSubTable, tracks, jetEWSPtMin, jetEWSPtMax); + analyseCharged(collision, jetcandidateutilities::slicedPerCandidate(tracks, candidate, perD0Candidate, perDplusCandidate, perLcCandidate, perBplusCandidate, perDielectronCandidate), candidate, jetsEvtWiseSubTable, constituentsEvtWiseSubTable, tracks, jetEWSPtMin, jetEWSPtMax); } } PROCESS_SWITCH(JetFinderHFTask, processChargedEvtWiseSubJetsMCD, "charged hf jet finding on MC detector level with event-wise constituent subtraction", false); @@ -269,7 +271,7 @@ struct JetFinderHFTask { CandidateTableMCP const& candidates) { for (typename CandidateTableMCP::iterator const& candidate : candidates) { - analyseMCP(collision, jetcandidateutilities::slicedPerCandidate(particles, candidate, perD0McCandidate, perLcMcCandidate, perBplusMcCandidate, perDielectronMcCandidate), candidate, 1, jetPtMin, jetPtMax); + analyseMCP(collision, jetcandidateutilities::slicedPerCandidate(particles, candidate, perD0McCandidate, perDplusMcCandidate, perLcMcCandidate, perBplusMcCandidate, perDielectronMcCandidate), candidate, 1, jetPtMin, jetPtMax); } } PROCESS_SWITCH(JetFinderHFTask, processChargedEvtWiseSubJetsMCP, "hf jet finding on MC particle level", false); diff --git a/PWGJE/TableProducer/Matching/CMakeLists.txt b/PWGJE/TableProducer/Matching/CMakeLists.txt index a3848f352e7..9c904afcdd1 100644 --- a/PWGJE/TableProducer/Matching/CMakeLists.txt +++ b/PWGJE/TableProducer/Matching/CMakeLists.txt @@ -33,6 +33,11 @@ o2physics_add_dpl_workflow(jet-matching-mc-d0-ch PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(jet-matching-mc-dplus-ch + SOURCES jetMatchingMCDplusCharged.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-matching-mc-lc-ch SOURCES jetMatchingMCLcCharged.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport @@ -63,6 +68,11 @@ o2physics_add_dpl_workflow(jet-matching-mc-sub-d0-ch PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(jet-matching-mc-sub-dplus-ch + SOURCES jetMatchingMCSubDplusCharged.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-matching-mc-sub-lc-ch SOURCES jetMatchingMCSubLcCharged.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport @@ -88,6 +98,11 @@ o2physics_add_dpl_workflow(jet-matching-sub-d0-ch PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(jet-matching-sub-dplus-ch + SOURCES jetMatchingSubDplusCharged.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-matching-sub-lc-ch SOURCES jetMatchingSubLcCharged.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore O2::FrameworkPhysicsSupport diff --git a/PWGJE/TableProducer/Matching/jetMatchingMCDplusCharged.cxx b/PWGJE/TableProducer/Matching/jetMatchingMCDplusCharged.cxx new file mode 100644 index 00000000000..31c3391533b --- /dev/null +++ b/PWGJE/TableProducer/Matching/jetMatchingMCDplusCharged.cxx @@ -0,0 +1,31 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet matching mc D+ charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/TableProducer/Matching/jetMatchingMC.cxx" + +using DplusChargedJetMatchingMC = JetMatchingMc, + soa::Join, + aod::DplusChargedMCDetectorLevelJetsMatchedToDplusChargedMCParticleLevelJets, + aod::DplusChargedMCParticleLevelJetsMatchedToDplusChargedMCDetectorLevelJets, + aod::CandidatesDplusMCD, + aod::CandidatesDplusMCP, + aod::JDummys>; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + tasks.emplace_back(adaptAnalysisTask(cfgc, TaskName{"jet-matching-mc-dplus-ch"})); + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/TableProducer/Matching/jetMatchingMCSubDplusCharged.cxx b/PWGJE/TableProducer/Matching/jetMatchingMCSubDplusCharged.cxx new file mode 100644 index 00000000000..d8b0e0aaf50 --- /dev/null +++ b/PWGJE/TableProducer/Matching/jetMatchingMCSubDplusCharged.cxx @@ -0,0 +1,29 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet matching mc subtracted D+ charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/TableProducer/Matching/jetMatchingMCSub.cxx" + +using DplusChargedJetMatchingMCSub = JetMatchingMcSub, + soa::Join, + aod::DplusChargedMCDetectorLevelJetsMatchedToDplusChargedMCDetectorLevelEventWiseSubtractedJets, + aod::DplusChargedMCDetectorLevelEventWiseSubtractedJetsMatchedToDplusChargedMCDetectorLevelJets, + aod::CandidatesDplusMCD>; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + tasks.emplace_back(adaptAnalysisTask(cfgc, TaskName{"jet-matching-mc-sub-dplus-ch"})); + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/TableProducer/Matching/jetMatchingSubDplusCharged.cxx b/PWGJE/TableProducer/Matching/jetMatchingSubDplusCharged.cxx new file mode 100644 index 00000000000..181bd2a93a2 --- /dev/null +++ b/PWGJE/TableProducer/Matching/jetMatchingSubDplusCharged.cxx @@ -0,0 +1,30 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet matching subtracted D+ charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/TableProducer/Matching/jetMatchingSub.cxx" + +using DplusChargedJetMatchingSub = JetMatchingSub, + soa::Join, + aod::DplusChargedJetsMatchedToDplusChargedEventWiseSubtractedJets, + aod::DplusChargedEventWiseSubtractedJetsMatchedToDplusChargedJets, + aod::JTrackDplusSubs, + aod::CandidatesDplusData>; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + tasks.emplace_back(adaptAnalysisTask(cfgc, TaskName{"jet-matching-sub-dplus-ch"})); + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/TableProducer/derivedDataProducer.cxx b/PWGJE/TableProducer/derivedDataProducer.cxx index ccd31ad1e92..3cccd60e506 100644 --- a/PWGJE/TableProducer/derivedDataProducer.cxx +++ b/PWGJE/TableProducer/derivedDataProducer.cxx @@ -87,6 +87,10 @@ struct JetDerivedDataProducerTask { Produces jD0McCollisionIdsTable; Produces jD0IdsTable; Produces jD0ParticleIdsTable; + Produces jDplusCollisionIdsTable; + Produces jDplusMcCollisionIdsTable; + Produces jDplusIdsTable; + Produces jDplusParticleIdsTable; Produces jLcCollisionIdsTable; Produces jLcMcCollisionIdsTable; Produces jLcIdsTable; @@ -442,6 +446,38 @@ struct JetDerivedDataProducerTask { } PROCESS_SWITCH(JetDerivedDataProducerTask, processD0MC, "produces derived index for D0 particles", false); + void processDplusCollisions(aod::HfDplusCollIds::iterator const& DplusCollision) + { + products.jDplusCollisionIdsTable(DplusCollision.collisionId()); + } + PROCESS_SWITCH(JetDerivedDataProducerTask, processDplusCollisions, "produces derived index for Dplus collisions", false); + + void processDplusMcCollisions(aod::HfDplusMcCollIds::iterator const& DplusMcCollision) + { + products.jDplusMcCollisionIdsTable(DplusMcCollision.mcCollisionId()); + } + PROCESS_SWITCH(JetDerivedDataProducerTask, processDplusMcCollisions, "produces derived index for Dplus MC collisions", false); + + void processDplus(aod::HfDplusIds::iterator const& Dplus, aod::Tracks const&) + { + auto JProng0ID = trackCollisionMapping.find({Dplus.prong0Id(), Dplus.prong0_as().collisionId()}); + auto JProng1ID = trackCollisionMapping.find({Dplus.prong1Id(), Dplus.prong1_as().collisionId()}); + auto JProng2ID = trackCollisionMapping.find({Dplus.prong2Id(), Dplus.prong2_as().collisionId()}); + if (withCollisionAssociator) { + JProng0ID = trackCollisionMapping.find({Dplus.prong0Id(), Dplus.collisionId()}); + JProng1ID = trackCollisionMapping.find({Dplus.prong1Id(), Dplus.collisionId()}); + JProng2ID = trackCollisionMapping.find({Dplus.prong2Id(), Dplus.collisionId()}); + } + products.jDplusIdsTable(Dplus.collisionId(), JProng0ID->second, JProng1ID->second, JProng2ID->second); + } + PROCESS_SWITCH(JetDerivedDataProducerTask, processDplus, "produces derived index for Dplus candidates", false); + + void processDplusMC(aod::HfDplusPIds::iterator const& Dplus) + { + products.jDplusParticleIdsTable(Dplus.mcCollisionId(), Dplus.mcParticleId()); + } + PROCESS_SWITCH(JetDerivedDataProducerTask, processDplusMC, "produces derived index for Dplus particles", false); + void processLcCollisions(aod::HfLcCollIds::iterator const& LcCollision) { products.jLcCollisionIdsTable(LcCollision.collisionId()); diff --git a/PWGJE/TableProducer/derivedDataSelector.cxx b/PWGJE/TableProducer/derivedDataSelector.cxx index 88398f796f5..f4336b228a2 100644 --- a/PWGJE/TableProducer/derivedDataSelector.cxx +++ b/PWGJE/TableProducer/derivedDataSelector.cxx @@ -52,6 +52,9 @@ struct JetDerivedDataSelector { Configurable thresholdChargedD0JetPtMin{"thresholdChargedD0JetPtMin", 0.0, "Minimum charged D0 jet pt to accept event"}; Configurable thresholdChargedEventWiseSubtractedD0JetPtMin{"thresholdChargedEventWiseSubtractedD0JetPtMin", 0.0, "Minimum charged event-wise subtracted D0 jet pt to accept event"}; Configurable thresholdChargedD0MCPJetPtMin{"thresholdChargedD0MCPJetPtMin", 0.0, "Minimum charged D0 mcp jet pt to accept event"}; + Configurable thresholdChargedDplusJetPtMin{"thresholdChargedDplusJetPtMin", 0.0, "Minimum charged Dplus jet pt to accept event"}; + Configurable thresholdChargedEventWiseSubtractedDplusJetPtMin{"thresholdChargedEventWiseSubtractedDplusJetPtMin", 0.0, "Minimum charged event-wise subtracted Dplus jet pt to accept event"}; + Configurable thresholdChargedDplusMCPJetPtMin{"thresholdChargedDplusMCPJetPtMin", 0.0, "Minimum charged Dplus mcp jet pt to accept event"}; Configurable thresholdChargedLcJetPtMin{"thresholdChargedLcJetPtMin", 0.0, "Minimum charged Lc jet pt to accept event"}; Configurable thresholdChargedEventWiseSubtractedLcJetPtMin{"thresholdChargedEventWiseSubtractedLcJetPtMin", 0.0, "Minimum charged event-wise subtracted Lc jet pt to accept event"}; Configurable thresholdChargedLcMCPJetPtMin{"thresholdChargedLcMCPJetPtMin", 0.0, "Minimum charged Lc mcp jet pt to accept event"}; @@ -198,6 +201,12 @@ struct JetDerivedDataSelector { selectionObjectPtMin = config.thresholdChargedEventWiseSubtractedD0JetPtMin; } else if constexpr (std::is_same_v, aod::D0ChargedMCParticleLevelJets>) { selectionObjectPtMin = config.thresholdChargedD0MCPJetPtMin; + } else if constexpr (std::is_same_v, aod::DplusChargedJets> || std::is_same_v, aod::DplusChargedMCDetectorLevelJets>) { + selectionObjectPtMin = config.thresholdChargedDplusJetPtMin; + } else if constexpr (std::is_same_v, aod::DplusChargedEventWiseSubtractedJets> || std::is_same_v, aod::DplusChargedMCDetectorLevelEventWiseSubtractedJets>) { + selectionObjectPtMin = config.thresholdChargedEventWiseSubtractedDplusJetPtMin; + } else if constexpr (std::is_same_v, aod::DplusChargedMCParticleLevelJets>) { + selectionObjectPtMin = config.thresholdChargedDplusMCPJetPtMin; } else if constexpr (std::is_same_v, aod::LcChargedJets> || std::is_same_v, aod::LcChargedMCDetectorLevelJets>) { selectionObjectPtMin = config.thresholdChargedLcJetPtMin; } else if constexpr (std::is_same_v, aod::LcChargedEventWiseSubtractedJets> || std::is_same_v, aod::LcChargedMCDetectorLevelEventWiseSubtractedJets>) { @@ -243,7 +252,7 @@ struct JetDerivedDataSelector { } } if (isTriggerObject) { - if constexpr (std::is_same_v, aod::ChargedMCParticleLevelJets> || std::is_same_v, aod::NeutralMCParticleLevelJets> || std::is_same_v, aod::FullMCParticleLevelJets> || std::is_same_v, aod::D0ChargedMCParticleLevelJets> || std::is_same_v, aod::LcChargedMCParticleLevelJets> || std::is_same_v, aod::BplusChargedMCParticleLevelJets> || std::is_same_v, aod::DielectronChargedMCParticleLevelJets>) { + if constexpr (std::is_same_v, aod::ChargedMCParticleLevelJets> || std::is_same_v, aod::NeutralMCParticleLevelJets> || std::is_same_v, aod::FullMCParticleLevelJets> || std::is_same_v, aod::D0ChargedMCParticleLevelJets> || std::is_same_v, aod::DplusChargedMCParticleLevelJets> || std::is_same_v, aod::LcChargedMCParticleLevelJets> || std::is_same_v, aod::BplusChargedMCParticleLevelJets> || std::is_same_v, aod::DielectronChargedMCParticleLevelJets>) { if (selectionObject.mcCollisionId() >= 0) { McCollisionFlag[selectionObject.mcCollisionId()] = true; } @@ -277,6 +286,11 @@ struct JetDerivedDataSelector { PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingD0ChargedMCDJets, "process D0 charged mcd jets", false); PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingD0ChargedMCDetectorLevelEventWiseSubtractedJets, "process D0 event-wise subtracted charged mcd jets", false); PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingD0ChargedMCPJets, "process D0 charged mcp jets", false); + PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingDplusChargedJets, "process Dplus charged jets", false); + PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingDplusChargedEventWiseSubtractedJets, "process Dplus event-wise subtracted charged jets", false); + PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingDplusChargedMCDJets, "process Dplus charged mcd jets", false); + PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingDplusChargedMCDetectorLevelEventWiseSubtractedJets, "process Dplus event-wise subtracted charged mcd jets", false); + PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingDplusChargedMCPJets, "process Dplus charged mcp jets", false); PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingLcChargedJets, "process Lc charged jets", false); PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingLcChargedEventWiseSubtractedJets, "process Lc event-wise subtracted charged jets", false); PROCESS_SWITCH_FULL(JetDerivedDataSelector, processSelectionObjects, processSelectingLcChargedMCDJets, "process Lc charged mcd jets", false); diff --git a/PWGJE/TableProducer/derivedDataWriter.cxx b/PWGJE/TableProducer/derivedDataWriter.cxx index 234cc219b8b..0bac7812852 100644 --- a/PWGJE/TableProducer/derivedDataWriter.cxx +++ b/PWGJE/TableProducer/derivedDataWriter.cxx @@ -88,6 +88,23 @@ struct JetDerivedDataWriter { Produces storedD0ParticlesTable; Produces storedD0ParticleIdsTable; + Produces storedDplusCollisionsTable; + Produces storedDplusCollisionIdsTable; + Produces storedDplussTable; + Produces storedDplusParsTable; + Produces storedDplusParExtrasTable; + Produces storedDplusParDaughtersDummyTable; + Produces storedDplusSelsTable; + Produces storedDplusMlsTable; + Produces storedDplusMlDughtersDummyTable; + Produces storedDplusMcsTable; + Produces storedDplusIdsTable; + Produces storedDplusMcCollisionsTable; + Produces storedDplusMcCollisionIdsTable; + Produces storedDplusMcCollisionsMatchingTable; + Produces storedDplusParticlesTable; + Produces storedDplusParticleIdsTable; + Produces storedLcCollisionsTable; Produces storedLcCollisionIdsTable; Produces storedLcsTable; @@ -138,10 +155,12 @@ struct JetDerivedDataWriter { Preslice> ParticlesPerMcCollision = aod::jmcparticle::mcCollisionId; Preslice> TracksPerCollision = aod::jtrack::collisionId; Preslice D0McCollisionsPerMcCollision = aod::jd0indices::mcCollisionId; + Preslice DplusMcCollisionsPerMcCollision = aod::jdplusindices::mcCollisionId; Preslice LcMcCollisionsPerMcCollision = aod::jlcindices::mcCollisionId; Preslice BplusMcCollisionsPerMcCollision = aod::jbplusindices::mcCollisionId; Preslice DielectronMcCollisionsPerMcCollision = aod::jdielectronindices::mcCollisionId; Preslice D0ParticlesPerMcCollision = aod::jd0indices::mcCollisionId; + Preslice DplusParticlesPerMcCollision = aod::jdplusindices::mcCollisionId; Preslice LcParticlesPerMcCollision = aod::jlcindices::mcCollisionId; Preslice BplusParticlesPerMcCollision = aod::jbplusindices::mcCollisionId; PresliceUnsorted EMCTrackPerTrack = aod::jemctrack::trackId; @@ -183,6 +202,21 @@ struct JetDerivedDataWriter { } } + template + void storeDplus(soa::Join::iterator const& collision, aod::JTracks const&, aod::CollisionsDplus const& DplusCollisions, T const& Dpluss) + { + if (collision.isCollisionSelected()) { + for (const auto& DplusCollision : DplusCollisions) { // should only ever be one + jethfutilities::fillHFCollisionTable(DplusCollision, products.storedDplusCollisionsTable); + products.storedDplusCollisionIdsTable(collisionMapping[collision.globalIndex()]); + } + for (const auto& Dplus : Dpluss) { + jethfutilities::fillHFCandidateTable(Dplus, products.storedDplusCollisionsTable.lastIndex(), products.storedDplussTable, products.storedDplusParsTable, products.storedDplusParExtrasTable, products.storedDplusParDaughtersDummyTable, products.storedDplusSelsTable, products.storedDplusMlsTable, products.storedDplusMlDughtersDummyTable, products.storedDplusMcsTable); + products.storedDplusIdsTable(collisionMapping[collision.globalIndex()], trackMapping[Dplus.prong0Id()], trackMapping[Dplus.prong1Id()], trackMapping[Dplus.prong2Id()]); + } + } + } + template void storeLc(soa::Join::iterator const& collision, aod::JTracks const&, aod::CollisionsLc const& LcCollisions, T const& Lcs) { @@ -225,6 +259,7 @@ struct JetDerivedDataWriter { std::vector mcCollisionMapping; std::vector particleMapping; std::vector d0McCollisionMapping; + std::vector dplusMcCollisionMapping; std::vector lcMcCollisionMapping; std::vector bplusMcCollisionMapping; std::vector dielectronMcCollisionMapping; @@ -329,6 +364,18 @@ struct JetDerivedDataWriter { } PROCESS_SWITCH(JetDerivedDataWriter, processD0MCD, "write out mcd output tables for D0", false); + void processDplusData(soa::Join::iterator const& collision, aod::JTracks const& tracks, aod::CollisionsDplus const& DplusCollisions, aod::CandidatesDplusData const& Dpluss) + { + storeDplus(collision, tracks, DplusCollisions, Dpluss); + } + PROCESS_SWITCH(JetDerivedDataWriter, processDplusData, "write out data output tables for Dplus", false); + + void processDplusMCD(soa::Join::iterator const& collision, aod::JTracks const& tracks, aod::CollisionsDplus const& DplusCollisions, aod::CandidatesDplusMCD const& Dpluss) + { + storeDplus(collision, tracks, DplusCollisions, Dpluss); + } + PROCESS_SWITCH(JetDerivedDataWriter, processDplusMCD, "write out mcd output tables for Dplus", false); + void processLcData(soa::Join::iterator const& collision, aod::JTracks const& tracks, aod::CollisionsLc const& LcCollisions, aod::CandidatesLcData const& Lcs) { storeLc(collision, tracks, LcCollisions, Lcs); @@ -447,6 +494,29 @@ struct JetDerivedDataWriter { } PROCESS_SWITCH(JetDerivedDataWriter, processD0MCP, "write out D0 mcp output tables", false); + void processDplusMCP(soa::Join const& mcCollisions, aod::McCollisionsDplus const& DplusMcCollisions, aod::CandidatesDplusMCP const& DplusParticles) + { + dplusMcCollisionMapping.clear(); + dplusMcCollisionMapping.resize(DplusMcCollisions.size(), -1); + for (auto const& mcCollision : mcCollisions) { + if (mcCollision.isMcCollisionSelected()) { + const auto dplusMcCollisionsPerMcCollision = DplusMcCollisions.sliceBy(DplusMcCollisionsPerMcCollision, mcCollision.globalIndex()); + for (const auto& dplusMcCollisionPerMcCollision : dplusMcCollisionsPerMcCollision) { // should only ever be one + jethfutilities::fillHFMcCollisionTable(dplusMcCollisionPerMcCollision, products.storedDplusMcCollisionsTable); + products.storedDplusMcCollisionIdsTable(mcCollisionMapping[mcCollision.globalIndex()]); + dplusMcCollisionMapping[dplusMcCollisionPerMcCollision.globalIndex()] = products.storedDplusMcCollisionsTable.lastIndex(); + } + const auto dplusParticlesPerMcCollision = DplusParticles.sliceBy(DplusParticlesPerMcCollision, mcCollision.globalIndex()); + for (const auto& DplusParticle : dplusParticlesPerMcCollision) { + jethfutilities::fillHFCandidateMcTable(DplusParticle, products.storedDplusMcCollisionsTable.lastIndex(), products.storedDplusParticlesTable); + products.storedDplusParticleIdsTable(mcCollisionMapping[mcCollision.globalIndex()], particleMapping[DplusParticle.mcParticleId()]); + } + } + } + } + + PROCESS_SWITCH(JetDerivedDataWriter, processDplusMCP, "write out Dplus mcp output tables", false); + void processLcMCP(soa::Join const& mcCollisions, aod::McCollisionsLc const& LcMcCollisions, aod::CandidatesLcMCP const& LcParticles) { lcMcCollisionMapping.clear(); @@ -582,6 +652,20 @@ struct JetDerivedDataWriter { } PROCESS_SWITCH(JetDerivedDataWriter, processD0McCollisionMatch, "write out D0 McCollision collision label output tables", false); + void processDplusMcCollisionMatch(soa::Join::iterator const& mcCollision, soa::Join const& DplusMcCollisions, aod::CollisionsDplus const&) + { + if (mcCollision.isMcCollisionSelected()) { + for (const auto& DplusMcCollision : DplusMcCollisions) { // should just be one + std::vector dplusCollisionIDs; + for (auto const& dplusCollisionPerMcCollision : DplusMcCollision.hfCollBases_as()) { + dplusCollisionIDs.push_back(dplusMcCollisionMapping[dplusCollisionPerMcCollision.globalIndex()]); + } + products.storedDplusMcCollisionsMatchingTable(dplusCollisionIDs); + } + } + } + PROCESS_SWITCH(JetDerivedDataWriter, processDplusMcCollisionMatch, "write out Dplus McCollision collision label output tables", false); + void processLcMcCollisionMatch(soa::Join::iterator const& mcCollision, soa::Join const& LcMcCollisions, aod::CollisionsLc const&) { if (mcCollision.isMcCollisionSelected()) { diff --git a/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx b/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx index 38d73e4c171..cf545ba8295 100644 --- a/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx +++ b/PWGJE/TableProducer/eventwiseConstituentSubtractor.cxx @@ -34,6 +34,8 @@ struct eventWiseConstituentSubtractorTask { Produces particleSubtractedTable; Produces trackSubtractedD0Table; Produces particleSubtractedD0Table; + Produces trackSubtractedDplusTable; + Produces particleSubtractedDplusTable; Produces trackSubtractedLcTable; Produces particleSubtractedLcTable; Produces trackSubtractedBplusTable; @@ -158,6 +160,18 @@ struct eventWiseConstituentSubtractorTask { } PROCESS_SWITCH(eventWiseConstituentSubtractorTask, processD0McCollisions, "Fill table of subtracted tracks for collisions with D0 MCP candidates", false); + void processDplusCollisions(aod::JetCollision const&, soa::Filtered const& tracks, soa::Join const& candidates) + { + analyseHF(tracks, candidates, trackSubtractedDplusTable); + } + PROCESS_SWITCH(eventWiseConstituentSubtractorTask, processDplusCollisions, "Fill table of subtracted tracks for collisions with Dplus candidates", false); + + void processDplusMcCollisions(aod::JetMcCollision const&, soa::Filtered const& tracks, soa::Join const& candidates) + { + analyseHFMc(tracks, candidates, particleSubtractedDplusTable); + } + PROCESS_SWITCH(eventWiseConstituentSubtractorTask, processDplusMcCollisions, "Fill table of subtracted tracks for collisions with Dplus MCP candidates", false); + void processLcCollisions(aod::JetCollision const&, soa::Filtered const& tracks, soa::Join const& candidates) { analyseHF(tracks, candidates, trackSubtractedLcTable); diff --git a/PWGJE/TableProducer/jetEventWeightMCD.cxx b/PWGJE/TableProducer/jetEventWeightMCD.cxx index 40ce7053b8a..0709a362d7f 100644 --- a/PWGJE/TableProducer/jetEventWeightMCD.cxx +++ b/PWGJE/TableProducer/jetEventWeightMCD.cxx @@ -56,6 +56,7 @@ using ChargedMCJetsEventWeight = JetEventWeightMCDTask; using FullMCJetsEventWeight = JetEventWeightMCDTask; using D0ChargedMCJetsEventWeight = JetEventWeightMCDTask; +using DplusChargedMCJetsEventWeight = JetEventWeightMCDTask; using LcChargedMCJetsEventWeight = JetEventWeightMCDTask; using BplusChargedMCJetsEventWeight = JetEventWeightMCDTask; using V0ChargedMCJetsEventWeight = JetEventWeightMCDTask; @@ -81,6 +82,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-d0-eventweight-mcd-charged"})); + tasks.emplace_back( + adaptAnalysisTask(cfgc, + SetDefaultProcesses{}, TaskName{"jet-dplus-eventweight-mcd-charged"})); + tasks.emplace_back( adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-lc-eventweight-mcd-charged"})); diff --git a/PWGJE/TableProducer/jetEventWeightMCP.cxx b/PWGJE/TableProducer/jetEventWeightMCP.cxx index 6a3a9742546..5727cf57a43 100644 --- a/PWGJE/TableProducer/jetEventWeightMCP.cxx +++ b/PWGJE/TableProducer/jetEventWeightMCP.cxx @@ -47,6 +47,7 @@ using ChargedMCJetsEventWeight = JetEventWeightMCPTask; using FullMCJetsEventWeight = JetEventWeightMCPTask; using D0ChargedMCJetsEventWeight = JetEventWeightMCPTask; +using DplusChargedMCJetsEventWeight = JetEventWeightMCPTask; using LcChargedMCJetsEventWeight = JetEventWeightMCPTask; using BplusChargedMCJetsEventWeight = JetEventWeightMCPTask; using V0ChargedMCJetsEventWeight = JetEventWeightMCPTask; @@ -72,6 +73,10 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-d0-eventweight-mcp-charged"})); + tasks.emplace_back( + adaptAnalysisTask(cfgc, + SetDefaultProcesses{}, TaskName{"jet-dplus-eventweight-mcp-charged"})); + tasks.emplace_back( adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-lc-eventweight-mcp-charged"})); diff --git a/PWGJE/TableProducer/rhoEstimator.cxx b/PWGJE/TableProducer/rhoEstimator.cxx index 0d2f2a76523..cea195df69f 100644 --- a/PWGJE/TableProducer/rhoEstimator.cxx +++ b/PWGJE/TableProducer/rhoEstimator.cxx @@ -34,6 +34,8 @@ struct RhoEstimatorTask { Produces rhoChargedMcTable; Produces rhoD0Table; Produces rhoD0McTable; + Produces rhoDplusTable; + Produces rhoDplusMcTable; Produces rhoLcTable; Produces rhoLcMcTable; Produces rhoBplusTable; @@ -140,6 +142,32 @@ struct RhoEstimatorTask { } PROCESS_SWITCH(RhoEstimatorTask, processD0McCollisions, "Fill rho tables for collisions with D0 MCP candidates", false); + void processDplusCollisions(aod::JetCollision const&, soa::Filtered const& tracks, aod::CandidatesDplusData const& candidates) + { + inputParticles.clear(); + for (auto& candidate : candidates) { + inputParticles.clear(); + jetfindingutilities::analyseTracks(inputParticles, tracks, trackSelection, trackingEfficiency, std::optional{candidate}); + + auto [rho, rhoM] = bkgSub.estimateRhoAreaMedian(inputParticles, doSparse); + rhoDplusTable(rho, rhoM); + } + } + PROCESS_SWITCH(RhoEstimatorTask, processDplusCollisions, "Fill rho tables for collisions with Dplus candidates", false); + + void processDplusMcCollisions(aod::JetMcCollision const&, soa::Filtered const& particles, aod::CandidatesDplusMCP const& candidates) + { + inputParticles.clear(); + for (auto& candidate : candidates) { + inputParticles.clear(); + jetfindingutilities::analyseParticles(inputParticles, particleSelection, 1, particles, pdgDatabase, std::optional{candidate}); + + auto [rho, rhoM] = bkgSub.estimateRhoAreaMedian(inputParticles, doSparse); + rhoDplusMcTable(rho, rhoM); + } + } + PROCESS_SWITCH(RhoEstimatorTask, processDplusMcCollisions, "Fill rho tables for collisions with Dplus MCP candidates", false); + void processLcCollisions(aod::JetCollision const&, soa::Filtered const& tracks, aod::CandidatesLcData const& candidates) { inputParticles.clear(); diff --git a/PWGJE/Tasks/CMakeLists.txt b/PWGJE/Tasks/CMakeLists.txt index 727ed4f4d76..a3e6be92270 100644 --- a/PWGJE/Tasks/CMakeLists.txt +++ b/PWGJE/Tasks/CMakeLists.txt @@ -68,11 +68,15 @@ if(FastJet_FOUND) SOURCES jetSubstructureD0.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-substructure-dplus + SOURCES jetSubstructureDplus.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore + COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(jet-substructure-lc SOURCES jetSubstructureLc.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(jet-substructure-bplus + o2physics_add_dpl_workflow(jet-substructure-bplus SOURCES jetSubstructureBplus.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore COMPONENT_NAME Analysis) @@ -84,6 +88,10 @@ o2physics_add_dpl_workflow(jet-substructure-bplus SOURCES jetSubstructureD0Output.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-substructure-dplus-output + SOURCES jetSubstructureDplusOutput.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore + COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(jet-substructure-lc-output SOURCES jetSubstructureLcOutput.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore @@ -120,6 +128,10 @@ o2physics_add_dpl_workflow(jet-substructure-bplus SOURCES jetFinderD0QA.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(jet-finder-dplus-qa + SOURCES jetFinderDplusQA.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore + COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(jet-finder-lc-qa SOURCES jetFinderLcQA.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore diff --git a/PWGJE/Tasks/jetFinderDplusQA.cxx b/PWGJE/Tasks/jetFinderDplusQA.cxx new file mode 100644 index 00000000000..bf5468eae57 --- /dev/null +++ b/PWGJE/Tasks/jetFinderDplusQA.cxx @@ -0,0 +1,27 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet finder D+ charged QA task +// +/// \author Nima Zardoshti + +#include "PWGJE/Tasks/jetFinderHFQA.cxx" + +using JetFinderDplusQATask = JetFinderHFQATask; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + tasks.emplace_back(adaptAnalysisTask(cfgc, + SetDefaultProcesses{}, + TaskName{"jet-finder-charged-dplus-qa"})); + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/Tasks/jetFinderHFQA.cxx b/PWGJE/Tasks/jetFinderHFQA.cxx index 6ed3ab41306..a63cbef6563 100644 --- a/PWGJE/Tasks/jetFinderHFQA.cxx +++ b/PWGJE/Tasks/jetFinderHFQA.cxx @@ -489,6 +489,7 @@ struct JetFinderHFQATask { // Filter candidateCutsBplus = (aod::hf_sel_candidate_bplus::isSelBplusToD0Pi >= selectionFlagBplus); PresliceOptional> perD0CandidateTracks = aod::bkgd0::candidateId; + PresliceOptional> perDplusCandidateTracks = aod::bkgdplus::candidateId; PresliceOptional> perLcCandidateTracks = aod::bkglc::candidateId; PresliceOptional> perBplusCandidateTracks = aod::bkgbplus::candidateId; PresliceOptional> perDielectronCandidateTracks = aod::bkgdielectron::candidateId; @@ -1517,7 +1518,7 @@ struct JetFinderHFQATask { } for (auto const& candidate : candidates) { - for (auto const& track : jetcandidateutilities::slicedPerCandidate(tracks, candidate, perD0CandidateTracks, perLcCandidateTracks, perBplusCandidateTracks, perDielectronCandidateTracks)) { + for (auto const& track : jetcandidateutilities::slicedPerCandidate(tracks, candidate, perD0CandidateTracks, perDplusCandidateTracks, perLcCandidateTracks, perBplusCandidateTracks, perDielectronCandidateTracks)) { registry.fill(HIST("h3_centrality_track_pt_track_phi_eventwiseconstituentsubtracted"), collision.centrality(), track.pt(), track.phi()); registry.fill(HIST("h3_centrality_track_pt_track_eta_eventwiseconstituentsubtracted"), collision.centrality(), track.pt(), track.eta()); registry.fill(HIST("h3_track_pt_track_eta_track_phi_eventwiseconstituentsubtracted"), track.pt(), track.eta(), track.phi()); diff --git a/PWGJE/Tasks/jetSubstructureDplus.cxx b/PWGJE/Tasks/jetSubstructureDplus.cxx new file mode 100644 index 00000000000..ecf1b714b50 --- /dev/null +++ b/PWGJE/Tasks/jetSubstructureDplus.cxx @@ -0,0 +1,27 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet substructure D+ charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/Tasks/jetSubstructureHF.cxx" + +using JetSubstructureDplus = JetSubstructureHFTask, soa::Join, soa::Join, soa::Join, aod::CandidatesDplusData, aod::CandidatesDplusMCP, aod::DplusCJetSSs, aod::DplusCMCDJetSSs, aod::DplusCMCPJetSSs, aod::DplusCEWSJetSSs, aod::JTrackDplusSubs>; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + tasks.emplace_back(adaptAnalysisTask(cfgc, + SetDefaultProcesses{}, + TaskName{"jet-substructure-dplus"})); + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/Tasks/jetSubstructureDplusOutput.cxx b/PWGJE/Tasks/jetSubstructureDplusOutput.cxx new file mode 100644 index 00000000000..065c412376f --- /dev/null +++ b/PWGJE/Tasks/jetSubstructureDplusOutput.cxx @@ -0,0 +1,26 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// jet substructure output D+ charged task +// +/// \author Nima Zardoshti + +#include "PWGJE/Tasks/jetSubstructureHFOutput.cxx" + +using JetSubstructureOutputDplus = JetSubstructureHFOutputTask, aod::CandidatesDplusData, aod::CandidatesDplusMCD, aod::CandidatesDplusMCP, aod::JTrackDplusSubs, soa::Join, soa::Join, aod::DplusCJetCOs, aod::DplusCJetOs, aod::DplusCJetSSOs, aod::DplusCJetMOs, soa::Join, aod::DplusCMCDJetCOs, aod::DplusCMCDJetOs, aod::DplusCMCDJetSSOs, aod::DplusCMCDJetMOs, soa::Join, aod::DplusCMCPJetCOs, aod::DplusCMCPJetOs, aod::DplusCMCPJetSSOs, aod::DplusCMCPJetMOs, soa::Join, aod::DplusCEWSJetCOs, aod::DplusCEWSJetOs, aod::DplusCEWSJetSSOs, aod::DplusCEWSJetMOs, aod::StoredHfDplusCollBase, aod::StoredHfDplusBases, aod::StoredHfDplusPars, aod::StoredHfDplusParEs, aod::JDumDplusParDaus, aod::StoredHfDplusSels, aod::StoredHfDplusMls, aod::JDumDplusMlDaus, aod::StoredHfDplusMcs, aod::StoredHfDplusMcCollBases, aod::StoredHfDplusMcRCollIds, aod::StoredHfDplusPBases>; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + std::vector tasks; + tasks.emplace_back(adaptAnalysisTask(cfgc, SetDefaultProcesses{}, TaskName{"jet-substructure-dplus-output"})); + + return WorkflowSpec{tasks}; +} diff --git a/PWGJE/Tasks/jetSubstructureHFOutput.cxx b/PWGJE/Tasks/jetSubstructureHFOutput.cxx index fd2c3e327c8..2e47f204787 100644 --- a/PWGJE/Tasks/jetSubstructureHFOutput.cxx +++ b/PWGJE/Tasks/jetSubstructureHFOutput.cxx @@ -106,10 +106,12 @@ struct JetSubstructureHFOutputTask { PresliceUnsorted> CollisionsPerMcCollision = aod::jmccollisionlb::mcCollisionId; PresliceOptional D0CollisionsPerCollision = aod::jd0indices::collisionId; + PresliceOptional DplusCollisionsPerCollision = aod::jdplusindices::collisionId; PresliceOptional LcCollisionsPerCollision = aod::jlcindices::collisionId; PresliceOptional BplusCollisionsPerCollision = aod::jbplusindices::collisionId; PresliceOptional DielectronCollisionsPerCollision = aod::jdielectronindices::collisionId; PresliceOptional> D0McCollisionsPerMcCollision = aod::jd0indices::mcCollisionId; + PresliceOptional> DplusMcCollisionsPerMcCollision = aod::jdplusindices::mcCollisionId; PresliceOptional> LcMcCollisionsPerMcCollision = aod::jlcindices::mcCollisionId; PresliceOptional> BplusMcCollisionsPerMcCollision = aod::jbplusindices::mcCollisionId; PresliceOptional DielectronMcCollisionsPerMcCollision = aod::jdielectronindices::mcCollisionId; @@ -333,7 +335,7 @@ struct JetSubstructureHFOutputTask { if constexpr (!isMCPOnly) { for (const auto& collision : collisions) { if (collisionFlag[collision.globalIndex()]) { - const auto hfCollisionsPerCollision = jetcandidateutilities::slicedPerCandidateCollision(hfCollisions, candidates, collision, D0CollisionsPerCollision, LcCollisionsPerCollision, BplusCollisionsPerCollision, DielectronCollisionsPerCollision); // add Bplus later + const auto hfCollisionsPerCollision = jetcandidateutilities::slicedPerCandidateCollision(hfCollisions, candidates, collision, D0CollisionsPerCollision, DplusCollisionsPerCollision, LcCollisionsPerCollision, BplusCollisionsPerCollision, DielectronCollisionsPerCollision); // add Bplus later for (const auto& hfCollisionPerCollision : hfCollisionsPerCollision) { // should only ever be one auto hfCollisionTableIndex = candidateCollisionMapping.find(hfCollisionPerCollision.globalIndex()); if (hfCollisionTableIndex != candidateCollisionMapping.end()) { @@ -348,7 +350,7 @@ struct JetSubstructureHFOutputTask { if constexpr (isMC) { for (const auto& mcCollision : mcCollisions) { if (mcCollisionFlag[mcCollision.globalIndex()]) { - const auto hfMcCollisionsPerMcCollision = jetcandidateutilities::slicedPerCandidateCollision(hfMcCollisions, candidatesMCP, mcCollision, D0McCollisionsPerMcCollision, LcMcCollisionsPerMcCollision, BplusMcCollisionsPerMcCollision, DielectronMcCollisionsPerMcCollision); // add Bplus later + const auto hfMcCollisionsPerMcCollision = jetcandidateutilities::slicedPerCandidateCollision(hfMcCollisions, candidatesMCP, mcCollision, D0McCollisionsPerMcCollision, DplusMcCollisionsPerMcCollision, LcMcCollisionsPerMcCollision, BplusMcCollisionsPerMcCollision, DielectronMcCollisionsPerMcCollision); // add Bplus later for (const auto& hfMcCollisionPerMcCollision : hfMcCollisionsPerMcCollision) { // should only ever be one auto hfMcCollisionTableIndex = candidateMcCollisionMapping.find(hfMcCollisionPerMcCollision.globalIndex()); if (hfMcCollisionTableIndex != candidateMcCollisionMapping.end()) {