From 1fd95c9b8205503f3ddbe56f52faadacbcc6480e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Mon, 13 Mar 2023 09:57:03 +0000 Subject: [PATCH 01/15] treeCreatorD0toKPi.cxx changed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 116 +++++++++++++++++++-- 1 file changed, 110 insertions(+), 6 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 5c73a26fef8..c4a1e8d1b29 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -67,6 +67,9 @@ DECLARE_SOA_COLUMN(MCflag, mcflag, int8_t); // Events DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); DECLARE_SOA_COLUMN(RunNumber, runNumber, int); +// New +DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); // is prompt or non-prompt, reco level +DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); // is prompt or non-prompt, Gen level } // namespace full DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull", @@ -123,7 +126,8 @@ DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull", full::Phi, full::Y, full::E, - full::MCflag); + full::MCflag, + full::OriginMcRec); DECLARE_SOA_TABLE(HfCand2ProngFullEvents, "AOD", "HFCAND2PFullE", collision::BCId, @@ -140,7 +144,8 @@ DECLARE_SOA_TABLE(HfCand2ProngFullParticles, "AOD", "HFCAND2PFullP", full::Eta, full::Phi, full::Y, - full::MCflag); + full::MCflag, + full::OriginMcGen); } // namespace o2::aod @@ -154,7 +159,102 @@ struct HfTreeCreatorD0ToKPi { { } - void process(aod::Collisions const& collisions, + void processData(aod::Collisions const& collisions, + soa::Join const& candidates, + aod::BigTracksPID const& tracks) + { + + // Filling event properties + rowCandidateFullEvents.reserve(collisions.size()); + for (auto& collision : collisions) { + rowCandidateFullEvents( + collision.bcId(), + collision.numContrib(), + collision.posX(), + collision.posY(), + collision.posZ(), + 0, + 1); + } + + // Filling candidate properties + rowCandidateFull.reserve(candidates.size()); + for (auto& candidate : candidates) { + auto fillTable = [&](int CandFlag, + int FunctionSelection, + double FunctionInvMass, + double FunctionCosThetaStar, + double FunctionCt, + double FunctionY, + double FunctionE) { + if (FunctionSelection >= 1) { + rowCandidateFull( + candidate.prong0_as().collision().bcId(), + candidate.prong0_as().collision().numContrib(), + candidate.posX(), + candidate.posY(), + candidate.posZ(), + candidate.xSecondaryVertex(), + candidate.ySecondaryVertex(), + candidate.zSecondaryVertex(), + candidate.errorDecayLength(), + candidate.errorDecayLengthXY(), + candidate.chi2PCA(), + candidate.rSecondaryVertex(), + candidate.decayLength(), + candidate.decayLengthXY(), + candidate.decayLengthNormalised(), + candidate.decayLengthXYNormalised(), + candidate.impactParameterNormalised0(), + candidate.ptProng0(), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + candidate.impactParameterNormalised1(), + candidate.ptProng1(), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + candidate.pxProng0(), + candidate.pyProng0(), + candidate.pzProng0(), + candidate.pxProng1(), + candidate.pyProng1(), + candidate.pzProng1(), + candidate.impactParameter0(), + candidate.impactParameter1(), + candidate.errorImpactParameter0(), + candidate.errorImpactParameter1(), + candidate.prong0_as().tpcNSigmaPi(), + candidate.prong0_as().tpcNSigmaKa(), + candidate.prong0_as().tofNSigmaPi(), + candidate.prong0_as().tofNSigmaKa(), + candidate.prong1_as().tpcNSigmaPi(), + candidate.prong1_as().tpcNSigmaKa(), + candidate.prong1_as().tofNSigmaPi(), + candidate.prong1_as().tofNSigmaKa(), + 1 << CandFlag, + FunctionInvMass, + candidate.impactParameterProduct(), + FunctionCosThetaStar, + candidate.pt(), + candidate.p(), + candidate.cpa(), + candidate.cpaXY(), + FunctionCt, + candidate.eta(), + candidate.phi(), + FunctionY, + FunctionE, + 0, + 0); + } + }; + + fillTable(0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate)); + fillTable(1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate)); + } + } + + PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processData, "Process data", true); + + void processMC(aod::Collisions const& collisions, aod::McCollisions const& mccollisions, soa::Join const& candidates, soa::Join const& particles, @@ -239,7 +339,8 @@ struct HfTreeCreatorD0ToKPi { candidate.phi(), FunctionY, FunctionE, - candidate.flagMcMatchRec()); + candidate.flagMcMatchRec(), + candidate.originMcRec()); } }; @@ -257,10 +358,13 @@ struct HfTreeCreatorD0ToKPi { particle.eta(), particle.phi(), RecoDecay::y(array{particle.px(), particle.py(), particle.pz()}, RecoDecay::getMassPDG(particle.pdgCode())), - particle.flagMcMatchGen()); + particle.flagMcMatchGen(), + particle.originMcGen()); } } } + + PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processMC, "Process MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) @@ -268,4 +372,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) WorkflowSpec workflow; workflow.push_back(adaptAnalysisTask(cfgc)); return workflow; -} +} \ No newline at end of file From 2d7d3a7067af1ee1faf6ba0b49c3d194935ad4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:41:40 +0000 Subject: [PATCH 02/15] whitespace removed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index c4a1e8d1b29..d46b001479b 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -67,7 +67,7 @@ DECLARE_SOA_COLUMN(MCflag, mcflag, int8_t); // Events DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); DECLARE_SOA_COLUMN(RunNumber, runNumber, int); -// New +// New DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); // is prompt or non-prompt, reco level DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); // is prompt or non-prompt, Gen level } // namespace full From fcbc1e0f5a11ad952bd1d037ae85f23c98e952b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Thu, 16 Mar 2023 17:16:28 +0000 Subject: [PATCH 03/15] functions added, redundant code eliminated --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 170 ++++++--------------- 1 file changed, 50 insertions(+), 120 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index d46b001479b..492241533f2 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -63,11 +63,10 @@ DECLARE_SOA_COLUMN(CPAXY, cpaXY, float); DECLARE_SOA_COLUMN(Ct, ct, float); DECLARE_SOA_COLUMN(ImpactParameterProduct, impactParameterProduct, float); DECLARE_SOA_COLUMN(CosThetaStar, cosThetaStar, float); -DECLARE_SOA_COLUMN(MCflag, mcflag, int8_t); +DECLARE_SOA_COLUMN(Mcflag, mcflag, int8_t); // Events DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); DECLARE_SOA_COLUMN(RunNumber, runNumber, int); -// New DECLARE_SOA_COLUMN(OriginMcRec, originMcRec, int8_t); // is prompt or non-prompt, reco level DECLARE_SOA_COLUMN(OriginMcGen, originMcGen, int8_t); // is prompt or non-prompt, Gen level } // namespace full @@ -126,7 +125,7 @@ DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull", full::Phi, full::Y, full::E, - full::MCflag, + full::Mcflag, full::OriginMcRec); DECLARE_SOA_TABLE(HfCand2ProngFullEvents, "AOD", "HFCAND2PFullE", @@ -144,7 +143,7 @@ DECLARE_SOA_TABLE(HfCand2ProngFullParticles, "AOD", "HFCAND2PFullP", full::Eta, full::Phi, full::Y, - full::MCflag, + full::Mcflag, full::OriginMcGen); } // namespace o2::aod @@ -159,38 +158,26 @@ struct HfTreeCreatorD0ToKPi { { } - void processData(aod::Collisions const& collisions, - soa::Join const& candidates, - aod::BigTracksPID const& tracks) + template + void fillEvent(const T& collision, int8_t isEventReject, int8_t runNumber) { - - // Filling event properties - rowCandidateFullEvents.reserve(collisions.size()); - for (auto& collision : collisions) { - rowCandidateFullEvents( + rowCandidateFullEvents( collision.bcId(), collision.numContrib(), collision.posX(), collision.posY(), collision.posZ(), - 0, - 1); - } + isEventReject, + runNumber); + } - // Filling candidate properties - rowCandidateFull.reserve(candidates.size()); - for (auto& candidate : candidates) { - auto fillTable = [&](int CandFlag, - int FunctionSelection, - double FunctionInvMass, - double FunctionCosThetaStar, - double FunctionCt, - double FunctionY, - double FunctionE) { +template +auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFlag, int FunctionSelection, double FunctionInvMass, double FunctionCosThetaStar, + double FunctionCt, double FunctionY, double FunctionE, int8_t flagMc, int8_t origin) { if (FunctionSelection >= 1) { rowCandidateFull( - candidate.prong0_as().collision().bcId(), - candidate.prong0_as().collision().numContrib(), + prong0.collision().bcId(), + prong0.collision().numContrib(), candidate.posX(), candidate.posY(), candidate.posZ(), @@ -221,14 +208,14 @@ struct HfTreeCreatorD0ToKPi { candidate.impactParameter1(), candidate.errorImpactParameter0(), candidate.errorImpactParameter1(), - candidate.prong0_as().tpcNSigmaPi(), - candidate.prong0_as().tpcNSigmaKa(), - candidate.prong0_as().tofNSigmaPi(), - candidate.prong0_as().tofNSigmaKa(), - candidate.prong1_as().tpcNSigmaPi(), - candidate.prong1_as().tpcNSigmaKa(), - candidate.prong1_as().tofNSigmaPi(), - candidate.prong1_as().tofNSigmaKa(), + prong0.tpcNSigmaPi(), + prong0.tpcNSigmaKa(), + prong0.tofNSigmaPi(), + prong0.tofNSigmaKa(), + prong1.tpcNSigmaPi(), + prong1.tpcNSigmaKa(), + prong1.tofNSigmaPi(), + prong1.tofNSigmaKa(), 1 << CandFlag, FunctionInvMass, candidate.impactParameterProduct(), @@ -242,110 +229,53 @@ struct HfTreeCreatorD0ToKPi { candidate.phi(), FunctionY, FunctionE, - 0, - 0); + flagMc, + origin); } - }; + } + + + void processData(aod::Collisions const& collisions, + soa::Join const& candidates, + aod::BigTracksPID const& tracks) + { + // Filling event properties + rowCandidateFullEvents.reserve(collisions.size()); + for (auto& collision : collisions) { + fillEvent(collision, 0, 1); + } - fillTable(0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate)); - fillTable(1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate)); + // Filling candidate properties + rowCandidateFull.reserve(candidates.size()); + for (auto& candidate : candidates) { + auto prong0 = candidate.prong0_as(); + auto prong1 = candidate.prong1_as(); + fillTable(candidate, prong0, prong1, 0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), 0, 0); + fillTable(candidate, prong0, prong1, 1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), 0, 0); } } PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processData, "Process data", true); - void processMC(aod::Collisions const& collisions, + void processMc(aod::Collisions const& collisions, aod::McCollisions const& mccollisions, soa::Join const& candidates, soa::Join const& particles, aod::BigTracksPID const& tracks) { - // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); for (auto& collision : collisions) { - rowCandidateFullEvents( - collision.bcId(), - collision.numContrib(), - collision.posX(), - collision.posY(), - collision.posZ(), - 0, - 1); + fillEvent(collision, 0, 1); } // Filling candidate properties rowCandidateFull.reserve(candidates.size()); for (auto& candidate : candidates) { - auto fillTable = [&](int CandFlag, - int FunctionSelection, - double FunctionInvMass, - double FunctionCosThetaStar, - double FunctionCt, - double FunctionY, - double FunctionE) { - if (FunctionSelection >= 1) { - rowCandidateFull( - candidate.prong0_as().collision().bcId(), - candidate.prong0_as().collision().numContrib(), - candidate.posX(), - candidate.posY(), - candidate.posZ(), - candidate.xSecondaryVertex(), - candidate.ySecondaryVertex(), - candidate.zSecondaryVertex(), - candidate.errorDecayLength(), - candidate.errorDecayLengthXY(), - candidate.chi2PCA(), - candidate.rSecondaryVertex(), - candidate.decayLength(), - candidate.decayLengthXY(), - candidate.decayLengthNormalised(), - candidate.decayLengthXYNormalised(), - candidate.impactParameterNormalised0(), - candidate.ptProng0(), - RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), - candidate.impactParameterNormalised1(), - candidate.ptProng1(), - RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), - candidate.pxProng0(), - candidate.pyProng0(), - candidate.pzProng0(), - candidate.pxProng1(), - candidate.pyProng1(), - candidate.pzProng1(), - candidate.impactParameter0(), - candidate.impactParameter1(), - candidate.errorImpactParameter0(), - candidate.errorImpactParameter1(), - candidate.prong0_as().tpcNSigmaPi(), - candidate.prong0_as().tpcNSigmaKa(), - candidate.prong0_as().tofNSigmaPi(), - candidate.prong0_as().tofNSigmaKa(), - candidate.prong1_as().tpcNSigmaPi(), - candidate.prong1_as().tpcNSigmaKa(), - candidate.prong1_as().tofNSigmaPi(), - candidate.prong1_as().tofNSigmaKa(), - 1 << CandFlag, - FunctionInvMass, - candidate.impactParameterProduct(), - FunctionCosThetaStar, - candidate.pt(), - candidate.p(), - candidate.cpa(), - candidate.cpaXY(), - FunctionCt, - candidate.eta(), - candidate.phi(), - FunctionY, - FunctionE, - candidate.flagMcMatchRec(), - candidate.originMcRec()); - } - }; - - fillTable(0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate)); - fillTable(1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate)); + auto prong0 = candidate.prong0_as(); + auto prong1 = candidate.prong0_as(); + fillTable(candidate, prong0, prong1, 0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), candidate.flagMcMatchRec(), candidate.originMcRec()); + fillTable(candidate, prong0, prong1, 1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), candidate.flagMcMatchRec(), candidate.originMcRec()); } // Filling particle properties @@ -364,7 +294,7 @@ struct HfTreeCreatorD0ToKPi { } } - PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processMC, "Process MC", false); + PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processMc, "Process Mc", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From 52c822db74ada3fb01963c331e560c3c794f13ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 09:32:39 +0000 Subject: [PATCH 04/15] Capitalised nly the first letter of acronyms (where possible) --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 492241533f2..4470a08486d 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -46,20 +46,20 @@ DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Phi, phi, float); DECLARE_SOA_COLUMN(Y, y, float); DECLARE_SOA_COLUMN(E, e, float); -DECLARE_SOA_COLUMN(NSigTPCPi0, nsigTPCPi0, float); -DECLARE_SOA_COLUMN(NSigTPCKa0, nsigTPCKa0, float); -DECLARE_SOA_COLUMN(NSigTOFPi0, nsigTOFPi0, float); -DECLARE_SOA_COLUMN(NSigTOFKa0, nsigTOFKa0, float); -DECLARE_SOA_COLUMN(NSigTPCPi1, nsigTPCPi1, float); -DECLARE_SOA_COLUMN(NSigTPCKa1, nsigTPCKa1, float); -DECLARE_SOA_COLUMN(NSigTOFPi1, nsigTOFPi1, float); -DECLARE_SOA_COLUMN(NSigTOFKa1, nsigTOFKa1, float); +DECLARE_SOA_COLUMN(NSigTpcPi0, nsigTpcPi0, float); +DECLARE_SOA_COLUMN(NSigTpcKa0, nsigTpcKa0, float); +DECLARE_SOA_COLUMN(NSigTofPi0, nsigTofPi0, float); +DECLARE_SOA_COLUMN(NSigTofKa0, nsigTofKa0, float); +DECLARE_SOA_COLUMN(NSigTpcPi1, nsigTpcPi1, float); +DECLARE_SOA_COLUMN(NSigTpcKa1, nsigTpcKa1, float); +DECLARE_SOA_COLUMN(NSigTofPi1, nsigTofPi1, float); +DECLARE_SOA_COLUMN(NSigTofKa1, nsigTofKa1, float); DECLARE_SOA_COLUMN(DecayLength, decayLength, float); DECLARE_SOA_COLUMN(DecayLengthXY, decayLengthXY, float); DECLARE_SOA_COLUMN(DecayLengthNormalised, decayLengthNormalised, float); DECLARE_SOA_COLUMN(DecayLengthXYNormalised, decayLengthXYNormalised, float); -DECLARE_SOA_COLUMN(CPA, cpa, float); -DECLARE_SOA_COLUMN(CPAXY, cpaXY, float); +DECLARE_SOA_COLUMN(Cpa, cpa, float); +DECLARE_SOA_COLUMN(CpaXY, cpaXY, float); DECLARE_SOA_COLUMN(Ct, ct, float); DECLARE_SOA_COLUMN(ImpactParameterProduct, impactParameterProduct, float); DECLARE_SOA_COLUMN(CosThetaStar, cosThetaStar, float); @@ -104,22 +104,22 @@ DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull", hf_cand::ImpactParameter1, hf_cand::ErrorImpactParameter0, hf_cand::ErrorImpactParameter1, - full::NSigTPCPi0, - full::NSigTPCKa0, - full::NSigTOFPi0, - full::NSigTOFKa0, - full::NSigTPCPi1, - full::NSigTPCKa1, - full::NSigTOFPi1, - full::NSigTOFKa1, + full::NSigTpcPi0, + full::NSigTpcKa0, + full::NSigTofPi0, + full::NSigTofKa0, + full::NSigTpcPi1, + full::NSigTpcKa1, + full::NSigTofPi1, + full::NSigTofKa1, full::CandidateSelFlag, full::M, full::ImpactParameterProduct, full::CosThetaStar, full::Pt, full::P, - full::CPA, - full::CPAXY, + full::Cpa, + full::CpaXY, full::Ct, full::Eta, full::Phi, From 656cd7d3810fe7045c14250da0c7b4bd9346b794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 10:09:09 +0000 Subject: [PATCH 05/15] origin and flagMc capitalisation changed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 4470a08486d..54efcf40dfe 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -173,7 +173,7 @@ struct HfTreeCreatorD0ToKPi { template auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFlag, int FunctionSelection, double FunctionInvMass, double FunctionCosThetaStar, - double FunctionCt, double FunctionY, double FunctionE, int8_t flagMc, int8_t origin) { + double FunctionCt, double FunctionY, double FunctionE, int8_t FlagMc, int8_t Origin) { if (FunctionSelection >= 1) { rowCandidateFull( prong0.collision().bcId(), @@ -229,8 +229,8 @@ auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFla candidate.phi(), FunctionY, FunctionE, - flagMc, - origin); + FlagMc, + Origin); } } From 419b1747feac9707e037425cd6df896052458465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 10:14:34 +0000 Subject: [PATCH 06/15] indents changed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 149 +++++++++++---------- 1 file changed, 75 insertions(+), 74 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 54efcf40dfe..9d751d3267f 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -162,82 +162,83 @@ struct HfTreeCreatorD0ToKPi { void fillEvent(const T& collision, int8_t isEventReject, int8_t runNumber) { rowCandidateFullEvents( - collision.bcId(), - collision.numContrib(), - collision.posX(), - collision.posY(), - collision.posZ(), - isEventReject, - runNumber); + collision.bcId(), + collision.numContrib(), + collision.posX(), + collision.posY(), + collision.posZ(), + isEventReject, + runNumber); } -template -auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFlag, int FunctionSelection, double FunctionInvMass, double FunctionCosThetaStar, - double FunctionCt, double FunctionY, double FunctionE, int8_t FlagMc, int8_t Origin) { - if (FunctionSelection >= 1) { - rowCandidateFull( - prong0.collision().bcId(), - prong0.collision().numContrib(), - candidate.posX(), - candidate.posY(), - candidate.posZ(), - candidate.xSecondaryVertex(), - candidate.ySecondaryVertex(), - candidate.zSecondaryVertex(), - candidate.errorDecayLength(), - candidate.errorDecayLengthXY(), - candidate.chi2PCA(), - candidate.rSecondaryVertex(), - candidate.decayLength(), - candidate.decayLengthXY(), - candidate.decayLengthNormalised(), - candidate.decayLengthXYNormalised(), - candidate.impactParameterNormalised0(), - candidate.ptProng0(), - RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), - candidate.impactParameterNormalised1(), - candidate.ptProng1(), - RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), - candidate.pxProng0(), - candidate.pyProng0(), - candidate.pzProng0(), - candidate.pxProng1(), - candidate.pyProng1(), - candidate.pzProng1(), - candidate.impactParameter0(), - candidate.impactParameter1(), - candidate.errorImpactParameter0(), - candidate.errorImpactParameter1(), - prong0.tpcNSigmaPi(), - prong0.tpcNSigmaKa(), - prong0.tofNSigmaPi(), - prong0.tofNSigmaKa(), - prong1.tpcNSigmaPi(), - prong1.tpcNSigmaKa(), - prong1.tofNSigmaPi(), - prong1.tofNSigmaKa(), - 1 << CandFlag, - FunctionInvMass, - candidate.impactParameterProduct(), - FunctionCosThetaStar, - candidate.pt(), - candidate.p(), - candidate.cpa(), - candidate.cpaXY(), - FunctionCt, - candidate.eta(), - candidate.phi(), - FunctionY, - FunctionE, - FlagMc, - Origin); - } + template + auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFlag, int FunctionSelection, double FunctionInvMass, double FunctionCosThetaStar, + double FunctionCt, double FunctionY, double FunctionE, int8_t FlagMc, int8_t Origin) + { + if (FunctionSelection >= 1) { + rowCandidateFull( + prong0.collision().bcId(), + prong0.collision().numContrib(), + candidate.posX(), + candidate.posY(), + candidate.posZ(), + candidate.xSecondaryVertex(), + candidate.ySecondaryVertex(), + candidate.zSecondaryVertex(), + candidate.errorDecayLength(), + candidate.errorDecayLengthXY(), + candidate.chi2PCA(), + candidate.rSecondaryVertex(), + candidate.decayLength(), + candidate.decayLengthXY(), + candidate.decayLengthNormalised(), + candidate.decayLengthXYNormalised(), + candidate.impactParameterNormalised0(), + candidate.ptProng0(), + RecoDecay::p(candidate.pxProng0(), candidate.pyProng0(), candidate.pzProng0()), + candidate.impactParameterNormalised1(), + candidate.ptProng1(), + RecoDecay::p(candidate.pxProng1(), candidate.pyProng1(), candidate.pzProng1()), + candidate.pxProng0(), + candidate.pyProng0(), + candidate.pzProng0(), + candidate.pxProng1(), + candidate.pyProng1(), + candidate.pzProng1(), + candidate.impactParameter0(), + candidate.impactParameter1(), + candidate.errorImpactParameter0(), + candidate.errorImpactParameter1(), + prong0.tpcNSigmaPi(), + prong0.tpcNSigmaKa(), + prong0.tofNSigmaPi(), + prong0.tofNSigmaKa(), + prong1.tpcNSigmaPi(), + prong1.tpcNSigmaKa(), + prong1.tofNSigmaPi(), + prong1.tofNSigmaKa(), + 1 << CandFlag, + FunctionInvMass, + candidate.impactParameterProduct(), + FunctionCosThetaStar, + candidate.pt(), + candidate.p(), + candidate.cpa(), + candidate.cpaXY(), + FunctionCt, + candidate.eta(), + candidate.phi(), + FunctionY, + FunctionE, + FlagMc, + Origin); + } } void processData(aod::Collisions const& collisions, - soa::Join const& candidates, - aod::BigTracksPID const& tracks) + soa::Join const& candidates, + aod::BigTracksPID const& tracks) { // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); @@ -258,10 +259,10 @@ auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFla PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processData, "Process data", true); void processMc(aod::Collisions const& collisions, - aod::McCollisions const& mccollisions, - soa::Join const& candidates, - soa::Join const& particles, - aod::BigTracksPID const& tracks) + aod::McCollisions const& mccollisions, + soa::Join const& candidates, + soa::Join const& particles, + aod::BigTracksPID const& tracks) { // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); From ca1f647869d90ae1f98289fd99efa7171aed029a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 10:24:08 +0000 Subject: [PATCH 07/15] ending_newline added --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 9d751d3267f..12311fbc0ee 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -303,4 +303,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) WorkflowSpec workflow; workflow.push_back(adaptAnalysisTask(cfgc)); return workflow; -} \ No newline at end of file +} From c5f96973b0cd7c3771d85e7e39abe3aad1f5864f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 14:59:14 +0000 Subject: [PATCH 08/15] Capitalisation changed, author name added --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 47 +++++++++++----------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 12311fbc0ee..051b1be2509 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -15,6 +15,7 @@ /// In this file are defined and filled the output tables /// /// \author Nicolo' Jacazio , CERN +/// \author Andrea Tavira García , IJCLab #include "Framework/runDataProcessing.h" #include "Framework/AnalysisTask.h" @@ -46,14 +47,14 @@ DECLARE_SOA_COLUMN(Eta, eta, float); DECLARE_SOA_COLUMN(Phi, phi, float); DECLARE_SOA_COLUMN(Y, y, float); DECLARE_SOA_COLUMN(E, e, float); -DECLARE_SOA_COLUMN(NSigTpcPi0, nsigTpcPi0, float); -DECLARE_SOA_COLUMN(NSigTpcKa0, nsigTpcKa0, float); -DECLARE_SOA_COLUMN(NSigTofPi0, nsigTofPi0, float); -DECLARE_SOA_COLUMN(NSigTofKa0, nsigTofKa0, float); -DECLARE_SOA_COLUMN(NSigTpcPi1, nsigTpcPi1, float); -DECLARE_SOA_COLUMN(NSigTpcKa1, nsigTpcKa1, float); -DECLARE_SOA_COLUMN(NSigTofPi1, nsigTofPi1, float); -DECLARE_SOA_COLUMN(NSigTofKa1, nsigTofKa1, float); +DECLARE_SOA_COLUMN(NSigTpcPi0, nSigTpcPi0, float); +DECLARE_SOA_COLUMN(NSigTpcKa0, nSigTpcKa0, float); +DECLARE_SOA_COLUMN(NSigTofPi0, nSigTofPi0, float); +DECLARE_SOA_COLUMN(NSigTofKa0, nSigTofKa0, float); +DECLARE_SOA_COLUMN(NSigTpcPi1, nSigTpcPi1, float); +DECLARE_SOA_COLUMN(NSigTpcKa1, nSigTpcKa1, float); +DECLARE_SOA_COLUMN(NSigTofPi1, nSigTofPi1, float); +DECLARE_SOA_COLUMN(NSigTofKa1, nSigTofKa1, float); DECLARE_SOA_COLUMN(DecayLength, decayLength, float); DECLARE_SOA_COLUMN(DecayLengthXY, decayLengthXY, float); DECLARE_SOA_COLUMN(DecayLengthNormalised, decayLengthNormalised, float); @@ -63,7 +64,7 @@ DECLARE_SOA_COLUMN(CpaXY, cpaXY, float); DECLARE_SOA_COLUMN(Ct, ct, float); DECLARE_SOA_COLUMN(ImpactParameterProduct, impactParameterProduct, float); DECLARE_SOA_COLUMN(CosThetaStar, cosThetaStar, float); -DECLARE_SOA_COLUMN(Mcflag, mcflag, int8_t); +DECLARE_SOA_COLUMN(FlagMc, flagMc, int8_t); // Events DECLARE_SOA_COLUMN(IsEventReject, isEventReject, int); DECLARE_SOA_COLUMN(RunNumber, runNumber, int); @@ -125,7 +126,7 @@ DECLARE_SOA_TABLE(HfCand2ProngFull, "AOD", "HFCAND2PFull", full::Phi, full::Y, full::E, - full::Mcflag, + full::FlagMc, full::OriginMcRec); DECLARE_SOA_TABLE(HfCand2ProngFullEvents, "AOD", "HFCAND2PFullE", @@ -143,7 +144,7 @@ DECLARE_SOA_TABLE(HfCand2ProngFullParticles, "AOD", "HFCAND2PFullP", full::Eta, full::Phi, full::Y, - full::Mcflag, + full::FlagMc, full::OriginMcGen); } // namespace o2::aod @@ -172,10 +173,10 @@ struct HfTreeCreatorD0ToKPi { } template - auto fillTable(const T& candidate, const U& prong0, const V& prong1, int CandFlag, int FunctionSelection, double FunctionInvMass, double FunctionCosThetaStar, - double FunctionCt, double FunctionY, double FunctionE, int8_t FlagMc, int8_t Origin) + auto fillTable(const T& candidate, const U& prong0, const V& prong1, int candFlag, int functionSelection, double functionInvMass, double functionCosThetaStar, + double functionCt, double functionY, double functionE, int8_t flagMc, int8_t origin) { - if (FunctionSelection >= 1) { + if (functionSelection >= 1) { rowCandidateFull( prong0.collision().bcId(), prong0.collision().numContrib(), @@ -217,21 +218,21 @@ struct HfTreeCreatorD0ToKPi { prong1.tpcNSigmaKa(), prong1.tofNSigmaPi(), prong1.tofNSigmaKa(), - 1 << CandFlag, - FunctionInvMass, + 1 << candFlag, + functionInvMass, candidate.impactParameterProduct(), - FunctionCosThetaStar, + functionCosThetaStar, candidate.pt(), candidate.p(), candidate.cpa(), candidate.cpaXY(), - FunctionCt, + functionCt, candidate.eta(), candidate.phi(), - FunctionY, - FunctionE, - FlagMc, - Origin); + functionY, + functionE, + flagMc, + origin); } } @@ -295,7 +296,7 @@ struct HfTreeCreatorD0ToKPi { } } - PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processMc, "Process Mc", false); + PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processMc, "Process MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) From e4d8e8c625c35887bed041bcb894815e4dd1a1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:06:11 +0000 Subject: [PATCH 09/15] functions y, e, and ct calculated only once --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 051b1be2509..4bc6ba9c14f 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -252,8 +252,11 @@ struct HfTreeCreatorD0ToKPi { for (auto& candidate : candidates) { auto prong0 = candidate.prong0_as(); auto prong1 = candidate.prong1_as(); - fillTable(candidate, prong0, prong1, 0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), 0, 0); - fillTable(candidate, prong0, prong1, 1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), 0, 0); + double yD = yD0(candidate); + double eD = eD0(candidate); + double ctD = ctD0(candidate); + fillTable(candidate, prong0, prong1, 0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD, yD, eD, 0, 0); + fillTable(candidate, prong0, prong1, 1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD, yD, eD, 0, 0); } } @@ -276,8 +279,11 @@ struct HfTreeCreatorD0ToKPi { for (auto& candidate : candidates) { auto prong0 = candidate.prong0_as(); auto prong1 = candidate.prong0_as(); - fillTable(candidate, prong0, prong1, 0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), candidate.flagMcMatchRec(), candidate.originMcRec()); - fillTable(candidate, prong0, prong1, 1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD0(candidate), yD0(candidate), eD0(candidate), candidate.flagMcMatchRec(), candidate.originMcRec()); + double yD = yD0(candidate); + double eD = eD0(candidate); + double ctD = ctD0(candidate); + fillTable(candidate, prong0, prong1, 0, candidate.isSelD0(), invMassD0ToPiK(candidate), cosThetaStarD0(candidate), ctD, yD, eD, candidate.flagMcMatchRec(), candidate.originMcRec()); + fillTable(candidate, prong0, prong1, 1, candidate.isSelD0bar(), invMassD0barToKPi(candidate), cosThetaStarD0bar(candidate), ctD, yD, eD, candidate.flagMcMatchRec(), candidate.originMcRec()); } // Filling particle properties From 371da0620870a463d1d02017e21e2c68f6723367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 15:54:43 +0000 Subject: [PATCH 10/15] word function removed, extra template removed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 4bc6ba9c14f..b9d10c6be2c 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -172,9 +172,9 @@ struct HfTreeCreatorD0ToKPi { runNumber); } - template - auto fillTable(const T& candidate, const U& prong0, const V& prong1, int candFlag, int functionSelection, double functionInvMass, double functionCosThetaStar, - double functionCt, double functionY, double functionE, int8_t flagMc, int8_t origin) + template + auto fillTable(const T& candidate, const U& prong0, const U& prong1, int candFlag, int selection, double invMass, double cosThetaStar, + double ct, double y, double e, int8_t flagMc, int8_t origin) { if (functionSelection >= 1) { rowCandidateFull( From 3ba7c633d091d3c0400bb06a264ff82d2094cae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Fri, 17 Mar 2023 16:03:29 +0000 Subject: [PATCH 11/15] variable tracks removed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index b9d10c6be2c..f6c156953ce 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -239,7 +239,7 @@ struct HfTreeCreatorD0ToKPi { void processData(aod::Collisions const& collisions, soa::Join const& candidates, - aod::BigTracksPID const& tracks) + aod::BigTracksPID const&) { // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); @@ -266,7 +266,7 @@ struct HfTreeCreatorD0ToKPi { aod::McCollisions const& mccollisions, soa::Join const& candidates, soa::Join const& particles, - aod::BigTracksPID const& tracks) + aod::BigTracksPID const&) { // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); From ff108b97874b8ad7287df7b61020239a4e8731fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:20:38 +0000 Subject: [PATCH 12/15] const added on loops, variable mccollisions removed --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index f6c156953ce..26f02441b07 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -243,13 +243,13 @@ struct HfTreeCreatorD0ToKPi { { // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); - for (auto& collision : collisions) { + for (auto const& collision : collisions) { fillEvent(collision, 0, 1); } // Filling candidate properties rowCandidateFull.reserve(candidates.size()); - for (auto& candidate : candidates) { + for (auto const& candidate : candidates) { auto prong0 = candidate.prong0_as(); auto prong1 = candidate.prong1_as(); double yD = yD0(candidate); @@ -263,20 +263,20 @@ struct HfTreeCreatorD0ToKPi { PROCESS_SWITCH(HfTreeCreatorD0ToKPi, processData, "Process data", true); void processMc(aod::Collisions const& collisions, - aod::McCollisions const& mccollisions, + aod::McCollisions const&, soa::Join const& candidates, soa::Join const& particles, aod::BigTracksPID const&) { // Filling event properties rowCandidateFullEvents.reserve(collisions.size()); - for (auto& collision : collisions) { + for (auto const& collision : collisions) { fillEvent(collision, 0, 1); } // Filling candidate properties rowCandidateFull.reserve(candidates.size()); - for (auto& candidate : candidates) { + for (auto const& candidate : candidates) { auto prong0 = candidate.prong0_as(); auto prong1 = candidate.prong0_as(); double yD = yD0(candidate); @@ -288,7 +288,7 @@ struct HfTreeCreatorD0ToKPi { // Filling particle properties rowCandidateFullParticles.reserve(particles.size()); - for (auto& particle : particles) { + for (auto const& particle : particles) { if (std::abs(particle.flagMcMatchGen()) == 1 << DecayType::D0ToPiK) { rowCandidateFullParticles( particle.mcCollision().bcId(), From ff45b049393a93cc8ccca668cb973921c65c58b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:26:49 +0000 Subject: [PATCH 13/15] word function removed (it wasn't properly removed the previous time) --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 26f02441b07..a06ab436544 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -176,7 +176,7 @@ struct HfTreeCreatorD0ToKPi { auto fillTable(const T& candidate, const U& prong0, const U& prong1, int candFlag, int selection, double invMass, double cosThetaStar, double ct, double y, double e, int8_t flagMc, int8_t origin) { - if (functionSelection >= 1) { + if (selection >= 1) { rowCandidateFull( prong0.collision().bcId(), prong0.collision().numContrib(), @@ -219,18 +219,18 @@ struct HfTreeCreatorD0ToKPi { prong1.tofNSigmaPi(), prong1.tofNSigmaKa(), 1 << candFlag, - functionInvMass, + invMass, candidate.impactParameterProduct(), - functionCosThetaStar, + cosThetaStar, candidate.pt(), candidate.p(), candidate.cpa(), candidate.cpaXY(), - functionCt, + ct, candidate.eta(), candidate.phi(), - functionY, - functionE, + y, + e, flagMc, origin); } From 9096ee8422f7e1412b8857cf6090683b79abcfee Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Mon, 20 Mar 2023 13:29:43 +0000 Subject: [PATCH 14/15] Please consider the following formatting changes --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index a06ab436544..98b01fbb3ed 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -174,7 +174,7 @@ struct HfTreeCreatorD0ToKPi { template auto fillTable(const T& candidate, const U& prong0, const U& prong1, int candFlag, int selection, double invMass, double cosThetaStar, - double ct, double y, double e, int8_t flagMc, int8_t origin) + double ct, double y, double e, int8_t flagMc, int8_t origin) { if (selection >= 1) { rowCandidateFull( @@ -236,7 +236,6 @@ struct HfTreeCreatorD0ToKPi { } } - void processData(aod::Collisions const& collisions, soa::Join const& candidates, aod::BigTracksPID const&) From dd5fea02bb2d624710e157b6ec51ddbb7b909f05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrea=20Tavira=20Garc=C3=ADa?= <118979672+atavirag@users.noreply.github.com> Date: Mon, 20 Mar 2023 16:05:35 +0100 Subject: [PATCH 15/15] Update PWGHF/TableProducer/treeCreatorD0ToKPi.cxx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Vít Kučera --- PWGHF/TableProducer/treeCreatorD0ToKPi.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx index 98b01fbb3ed..5aaaabe1193 100644 --- a/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx +++ b/PWGHF/TableProducer/treeCreatorD0ToKPi.cxx @@ -160,7 +160,7 @@ struct HfTreeCreatorD0ToKPi { } template - void fillEvent(const T& collision, int8_t isEventReject, int8_t runNumber) + void fillEvent(const T& collision, int isEventReject, int runNumber) { rowCandidateFullEvents( collision.bcId(),