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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 52 additions & 46 deletions PWGHF/DataModel/DerivedTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
{ \
namespace der_##_hf_namespace_ \
{ \
DECLARE_SOA_ARRAY_INDEX_COLUMN_CUSTOM(Hf##_hf_type_##CollBase, hfCollBases, "HF" _hf_description_ "COLLBASES"); \

Check failure on line 95 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
} \
} \
DECLARE_SOA_TABLE_STAGED(Hf##_hf_type_##McCollBases, "HF" _hf_description_ "MCCOLLBASE", \
Expand Down Expand Up @@ -169,7 +169,7 @@
{ \
namespace der_##_hf_namespace_ \
{ \
DECLARE_SOA_INDEX_COLUMN_CUSTOM(Hf##_hf_type_##CollBase, hfCollBase, "HF" _hf_description_ "COLLBASES"); \

Check failure on line 172 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
} \
} \
\
Expand Down Expand Up @@ -230,7 +230,7 @@
{ \
namespace der_##_hf_namespace_ \
{ \
DECLARE_SOA_INDEX_COLUMN_CUSTOM(Hf##_hf_type_##McCollBase, hfMcCollBase, "HF" _hf_description_ "MCCOLLBASES"); \

Check failure on line 233 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
} \
} \
DECLARE_SOA_TABLE_STAGED(Hf##_hf_type_##PBases, "HF" _hf_description_ "PBASE", \
Expand Down Expand Up @@ -325,14 +325,7 @@
DECLARE_SOA_COLUMN(PtProng2, ptProng2, float); //! transverse momentum of prong 2
DECLARE_SOA_COLUMN(RSecondaryVertex, rSecondaryVertex, float); //! distance of the secondary vertex from the z axis
// D*± → D0(bar) π±
DECLARE_SOA_COLUMN(MassD0, massD0, float); //! invariant mass of D0
DECLARE_SOA_COLUMN(CpaD0, cpaD0, float); //! cosine of pointing angle of D0
DECLARE_SOA_COLUMN(CpaXYD0, cpaXYD0, float); //! cosine of pointing angle in the transverse plane of D0
DECLARE_SOA_COLUMN(DecayLengthD0, decayLengthD0, float); //! decay length of D0
DECLARE_SOA_COLUMN(DecayLengthXYD0, decayLengthXYD0, float); //! decay length in the transverse plane of D0
DECLARE_SOA_COLUMN(DecayLengthNormalisedD0, decayLengthNormalisedD0, float); //! decay length of D0 divided by its uncertainty
DECLARE_SOA_COLUMN(DecayLengthXYNormalisedD0, decayLengthXYNormalisedD0, float); //! decay length in the transverse plane of D0 divided by its uncertainty
DECLARE_SOA_COLUMN(NormalisedImpParamSoftPi, normalisedImpParamSoftPi, float); //! impact parameter of soft pion divided by its uncertainty
DECLARE_SOA_COLUMN(SignProng1, signProng1, int8_t);
// TOF
DECLARE_SOA_COLUMN(NSigTofKa0, nSigTofKa0, float);
DECLARE_SOA_COLUMN(NSigTofKa1, nSigTofKa1, float);
Expand All @@ -347,7 +340,6 @@
DECLARE_SOA_COLUMN(NSigTofPr0, nSigTofPr0, float);
DECLARE_SOA_COLUMN(NSigTofPr1, nSigTofPr1, float);
DECLARE_SOA_COLUMN(NSigTofPr2, nSigTofPr2, float);
DECLARE_SOA_COLUMN(NSigTofPiSoftPi, nSigTofPiSoftPi, float);
// TPC
DECLARE_SOA_COLUMN(NSigTpcKa0, nSigTpcKa0, float);
DECLARE_SOA_COLUMN(NSigTpcKa1, nSigTpcKa1, float);
Expand All @@ -362,7 +354,6 @@
DECLARE_SOA_COLUMN(NSigTpcPr0, nSigTpcPr0, float);
DECLARE_SOA_COLUMN(NSigTpcPr1, nSigTpcPr1, float);
DECLARE_SOA_COLUMN(NSigTpcPr2, nSigTpcPr2, float);
DECLARE_SOA_COLUMN(NSigTpcPiSoftPi, nSigTpcPiSoftPi, float);
// TPC+TOF
DECLARE_SOA_COLUMN(NSigTpcTofKa0, nSigTpcTofKa0, float);
DECLARE_SOA_COLUMN(NSigTpcTofKa1, nSigTpcTofKa1, float);
Expand All @@ -377,7 +368,6 @@
DECLARE_SOA_COLUMN(NSigTpcTofPr0, nSigTpcTofPr0, float);
DECLARE_SOA_COLUMN(NSigTpcTofPr1, nSigTpcTofPr1, float);
DECLARE_SOA_COLUMN(NSigTpcTofPr2, nSigTpcTofPr2, float);
DECLARE_SOA_COLUMN(NSigTpcTofPiSoftPi, nSigTpcTofPiSoftPi, float);
} // namespace hf_cand_par

// Candidate properties of the charm daughter candidate used for selection of the beauty candidate
Expand All @@ -403,13 +393,20 @@
DECLARE_SOA_COLUMN(ImpactParameterNormalised2Charm, impactParameterNormalised2Charm, float); //! impact parameter of prong 2 divided by its uncertainty
DECLARE_SOA_COLUMN(ImpactParameterProductCharm, impactParameterProductCharm, float); //! product of impact parameters of prong 0 and prong 1
DECLARE_SOA_COLUMN(MaxNormalisedDeltaIPCharm, maxNormalisedDeltaIPCharm, float); //! see RecoDecay::maxNormalisedDeltaIP
DECLARE_SOA_COLUMN(PxProng0Charm, pxProng0Charm, float); //! x-component of momentum of prong 0
DECLARE_SOA_COLUMN(PyProng0Charm, pyProng0Charm, float); //! y-component of momentum of prong 0
DECLARE_SOA_COLUMN(PzProng0Charm, pzProng0Charm, float); //! z-component of momentum of prong 0
DECLARE_SOA_COLUMN(PxProng1Charm, pxProng1Charm, float); //! x-component of momentum of prong 1
DECLARE_SOA_COLUMN(PyProng1Charm, pyProng1Charm, float); //! y-component of momentum of prong 1
DECLARE_SOA_COLUMN(PzProng1Charm, pzProng1Charm, float); //! z-component of momentum of prong 1
DECLARE_SOA_COLUMN(PProng0Charm, pProng0Charm, float); //! momentum magnitude of prong 0
DECLARE_SOA_COLUMN(PProng1Charm, pProng1Charm, float); //! momentum magnitude of prong 1
DECLARE_SOA_COLUMN(PProng2Charm, pProng2Charm, float); //! momentum magnitude of prong 2
DECLARE_SOA_COLUMN(PtProng0Charm, ptProng0Charm, float); //! transverse momentum of prong 0
DECLARE_SOA_COLUMN(PtProng1Charm, ptProng1Charm, float); //! transverse momentum of prong 1
DECLARE_SOA_COLUMN(PtProng2Charm, ptProng2Charm, float); //! transverse momentum of prong 2
DECLARE_SOA_COLUMN(RSecondaryVertexCharm, rSecondaryVertexCharm, float); //! distance of the secondary vertex from the z axis
DECLARE_SOA_COLUMN(InvMassCharm, invMassCharm, float); //! mass of the charm daughter
// TOF
DECLARE_SOA_COLUMN(NSigTofKa0Charm, nSigTofKa0Charm, float);
DECLARE_SOA_COLUMN(NSigTofKa1Charm, nSigTofKa1Charm, float);
Expand Down Expand Up @@ -846,52 +843,61 @@
// D*+
// ----------------

DECLARE_SOA_TABLE_STAGED(HfDstarPars, "HFDSTARPAR", //! Table with candidate properties used for selection
hf_cand_dstar::Chi2PCAD0,
hf_cand_par::CpaD0,
hf_cand_par::CpaXYD0,
hf_cand_par::DecayLengthD0,
hf_cand_par::DecayLengthXYD0,
hf_cand_par::DecayLengthNormalisedD0,
hf_cand_par::DecayLengthXYNormalisedD0,
hf_cand::PxProng0,
DECLARE_SOA_TABLE_STAGED(HfDstarPars, "HFDSTPAR", //! Table with candidate properties used for selection
hf_cand::PxProng0, // Prong0 is the D0
hf_cand::PyProng0,
hf_cand::PzProng0,
hf_cand::PxProng1,
hf_cand::PxProng1, // Prong1 is the soft pion
hf_cand::PyProng1,
hf_cand::PzProng1,
hf_cand_dstar::PxD0,
hf_cand_dstar::PyD0,
hf_cand_dstar::PzD0,
hf_cand_dstar::PxSoftPi,
hf_cand_dstar::PySoftPi,
hf_cand_dstar::PzSoftPi,
hf_cand_dstar::PtSoftPi<hf_cand_dstar::PxSoftPi, hf_cand_dstar::PySoftPi>,
hf_cand_dstar::SignSoftPi,
hf_cand_dstar::PtD0<hf_cand_dstar::PxD0, hf_cand_dstar::PyD0>,
hf_cand_par::MassD0,
hf_cand::ImpactParameter0,
hf_cand::PtProng1<hf_cand::PxProng1, hf_cand::PyProng1>,
hf_cand_par::SignProng1,
hf_cand::PtProng0<hf_cand::PxProng0, hf_cand::PyProng0>,
hf_cand::ImpactParameter1,
hf_cand_dstar::ImpParamSoftPi,
hf_cand_par::ImpactParameterNormalised0,
hf_cand_par::ImpactParameterNormalised1,
hf_cand_par::NormalisedImpParamSoftPi,
hf_cand_par::NSigTpcPi0,
hf_cand_par::NSigTofPi0,
hf_cand_par::NSigTpcTofPi0,
hf_cand_par::NSigTpcKa1,
hf_cand_par::NSigTofKa1,
hf_cand_par::NSigTpcTofKa1,
hf_cand_par::NSigTpcPiSoftPi,
hf_cand_par::NSigTofPiSoftPi,
hf_cand_par::NSigTpcTofPiSoftPi,
hf_cand_par::NSigTpcPi1,
hf_cand_par::NSigTofPi1,
hf_cand_par::NSigTpcTofPi1,
o2::soa::Marker<MarkerDstar>);

DECLARE_SOA_TABLE_STAGED(HfDstarParD0s, "HFDSTPARD0", //! Table with candidate properties used for selection
hf_cand_par_charm::Chi2PCACharm,
hf_cand_par_charm::CpaCharm,
hf_cand_par_charm::CpaXYCharm,
hf_cand_par_charm::DecayLengthCharm,
hf_cand_par_charm::DecayLengthXYCharm,
hf_cand_par_charm::DecayLengthNormalisedCharm,
hf_cand_par_charm::DecayLengthXYNormalisedCharm,
hf_cand_par_charm::PxProng0Charm, // prong0 is the first D0 daughter
hf_cand_par_charm::PyProng0Charm,
hf_cand_par_charm::PzProng0Charm,
hf_cand_par_charm::PxProng1Charm, // prong 1 is the second D0 daughter
hf_cand_par_charm::PyProng1Charm,
hf_cand_par_charm::PzProng1Charm,
hf_cand_par_charm::InvMassCharm,
hf_cand_par_charm::ImpactParameter0Charm,
hf_cand_par_charm::ImpactParameter1Charm,
hf_cand_par_charm::ImpactParameterNormalised0Charm,
hf_cand_par_charm::ImpactParameterNormalised1Charm,
hf_cand_par_charm::NSigTpcPi0Charm,
hf_cand_par_charm::NSigTofPi0Charm,
hf_cand_par_charm::NSigTpcTofPi0Charm,
hf_cand_par_charm::NSigTpcKa0Charm,
hf_cand_par_charm::NSigTofKa0Charm,
hf_cand_par_charm::NSigTpcTofKa0Charm,
hf_cand_par_charm::NSigTpcPi1Charm,
hf_cand_par_charm::NSigTofPi1Charm,
hf_cand_par_charm::NSigTpcTofPi1Charm,
hf_cand_par_charm::NSigTpcKa1Charm,
hf_cand_par_charm::NSigTofKa1Charm,
hf_cand_par_charm::NSigTpcTofKa1Charm,
o2::soa::Marker<MarkerDstar>);

DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTARML", //! Table with candidate selection ML scores
DECLARE_SOA_TABLE_STAGED(HfDstarMls, "HFDSTML", //! Table with candidate selection ML scores
hf_cand_mc::MlScores,
o2::soa::Marker<MarkerDstar>);

DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTARMC", //! Table with MC candidate info
DECLARE_SOA_TABLE_STAGED(HfDstarMcs, "HFDSTMC", //! Table with MC candidate info
hf_cand_mc::FlagMcMatchRec,
hf_cand_mc::OriginMcRec,
o2::soa::Marker<MarkerDstar>);
Expand Down
38 changes: 25 additions & 13 deletions PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
rowsCommon;
// Candidates
Produces<o2::aod::HfDstarPars> rowCandidatePar;
Produces<o2::aod::HfDstarParD0s> rowCandidateParD0;
Produces<o2::aod::HfDstarSels> rowCandidateSel;
Produces<o2::aod::HfDstarMls> rowCandidateMl;
Produces<o2::aod::HfDstarIds> rowCandidateId;
Expand All @@ -73,6 +74,7 @@
// Switches for filling tables
HfConfigurableDerivedData confDerData;
Configurable<bool> fillCandidatePar{"fillCandidatePar", true, "Fill candidate parameters"};
Configurable<bool> fillCandidateParD0{"fillCandidateParD0", true, "Fill charm daughter parameters"};
Configurable<bool> fillCandidateSel{"fillCandidateSel", true, "Fill candidate selection flags"};
Configurable<bool> fillCandidateMl{"fillCandidateMl", true, "Fill candidate selection ML scores"};
Configurable<bool> fillCandidateId{"fillCandidateId", true, "Fill original indices from the candidate table"};
Expand All @@ -82,7 +84,7 @@
Configurable<float> ptMaxForDownSample{"ptMaxForDownSample", 10., "Maximum pt for the application of the downsampling factor"};

SliceCache cache;
static constexpr double mass{o2::constants::physics::MassDStar};

Check failure on line 87 in PWGHF/TableProducer/derivedDataCreatorDstarToD0Pi.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/constexpr-constant]

Use UpperCamelCase for names of constexpr constants. Names of special constants may be prefixed with "k".

using CollisionsWCentMult = soa::Join<aod::Collisions, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::PVMultZeqs>;
using CollisionsWMcCentMult = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::CentFV0As, aod::CentFT0Ms, aod::CentFT0As, aod::CentFT0Cs, aod::PVMultZeqs>;
Expand Down Expand Up @@ -130,6 +132,21 @@
rowsCommon.fillTablesCandidate(candidate, invMass, y);
if (fillCandidatePar) {
rowCandidatePar(
candidate.pxD0(),
candidate.pyD0(),
candidate.pzD0(),
candidate.pxSoftPi(),
candidate.pySoftPi(),
candidate.pzSoftPi(),
candidate.signSoftPi(),
candidate.impParamSoftPi(),
candidate.normalisedImpParamSoftPi(),
prongSoftPi.tpcNSigmaPi(),
prongSoftPi.tofNSigmaPi(),
prongSoftPi.tpcTofNSigmaPi());
}
if (fillCandidateParD0) {
rowCandidateParD0(
candidate.chi2PCAD0(),
candidate.cpaD0(),
candidate.cpaXYD0(),
Expand All @@ -143,29 +160,23 @@
candidate.pxProng1(),
candidate.pyProng1(),
candidate.pzProng1(),
candidate.pxD0(),
candidate.pyD0(),
candidate.pzD0(),
candidate.pxSoftPi(),
candidate.pySoftPi(),
candidate.pzSoftPi(),
candidate.signSoftPi(),
candidate.invMassD0(),
candidate.impactParameter0(),
candidate.impactParameter1(),
candidate.impParamSoftPi(),
candidate.impactParameterNormalised0(),
candidate.impactParameterNormalised1(),
candidate.normalisedImpParamSoftPi(),
prong0.tpcNSigmaPi(),
prong0.tofNSigmaPi(),
prong0.tpcTofNSigmaPi(),
prong0.tpcNSigmaKa(),
prong0.tofNSigmaKa(),
prong0.tpcTofNSigmaKa(),
prong1.tpcNSigmaPi(),
prong1.tofNSigmaPi(),
prong1.tpcTofNSigmaPi(),
prong1.tpcNSigmaKa(),
prong1.tofNSigmaKa(),
prong1.tpcTofNSigmaKa(),
prongSoftPi.tpcNSigmaPi(),
prongSoftPi.tofNSigmaPi(),
prongSoftPi.tpcTofNSigmaPi());
prong1.tpcTofNSigmaKa());
}
if (fillCandidateSel) {
rowCandidateSel(
Expand Down Expand Up @@ -224,6 +235,7 @@
// Fill candidate properties
rowsCommon.reserveTablesCandidates(sizeTableCand);
reserveTable(rowCandidatePar, fillCandidatePar, sizeTableCand);
reserveTable(rowCandidateParD0, fillCandidateParD0, sizeTableCand);
reserveTable(rowCandidateSel, fillCandidateSel, sizeTableCand);
reserveTable(rowCandidateMl, fillCandidateMl, sizeTableCand);
reserveTable(rowCandidateId, fillCandidateId, sizeTableCand);
Expand Down
12 changes: 6 additions & 6 deletions PWGJE/Core/JetCandidateUtilities.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGJE/Core/JetCandidateUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/file-cpp]

Use lowerCamelCase or UpperCamelCase for names of C++ files. See the O2 naming conventions for details.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -146,7 +146,7 @@
if (!particle.has_daughters()) {
return false;
}
for (auto daughter : particle.template daughters_as<typename std::decay_t<T>::parent_t>()) {

Check failure on line 149 in PWGJE/Core/JetCandidateUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (daughter.globalIndex() == globalIndex) {
return true;
}
Expand Down Expand Up @@ -205,11 +205,11 @@
* @param candidate candidate that is being checked
* @param table the table to be sliced
*/
template <typename T, typename U, typename V, typename M, typename N, typename O, typename P>
auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perDplusCandidate, N const& perLcCandidate, O const& perBplusCandidate, P const& perDielectronCandidate)
template <typename T, typename U, typename V, typename M, typename N, typename O, typename P, typename Q, typename R>
auto slicedPerCandidate(T const& table, U const& candidate, V const& perD0Candidate, M const& perDplusCandidate, N const& perDstarCandidate, O const& perLcCandidate, P const& perB0Candidate, Q const& perBplusCandidate, R const& perDielectronCandidate)
{
if constexpr (jethfutilities::isHFCandidate<U>()) {
return jethfutilities::slicedPerHFCandidate(table, candidate, perD0Candidate, perDplusCandidate, perLcCandidate, perBplusCandidate);
return jethfutilities::slicedPerHFCandidate(table, candidate, perD0Candidate, perDplusCandidate, perDstarCandidate, perLcCandidate, perB0Candidate, perBplusCandidate);
} else if constexpr (jetdqutilities::isDielectronCandidate<U>()) {
return jetdqutilities::slicedPerDielectronCandidate(table, candidate, perDielectronCandidate);
} else {
Expand All @@ -223,11 +223,11 @@
* @param jet jet that the slice is based on
* @param table the table to be sliced
*/
template <typename CandidateTable, typename T, typename U, typename V, typename M, typename N, typename O, typename P>
auto slicedPerJet(T const& table, U const& jet, V const& perD0Jet, M const& perDplusJet, N const& perLcJet, O const& perBplusJet, P const& perDielectronJet)
template <typename CandidateTable, typename T, typename U, typename V, typename M, typename N, typename O, typename P, typename Q, typename R>
auto slicedPerJet(T const& table, U const& jet, V const& perD0Jet, M const& perDplusJet, N const& perDstarJet, O const& perLcJet, P const& perB0Jet, Q const& perBplusJet, R const& perDielectronJet)
{
if constexpr (jethfutilities::isHFTable<CandidateTable>() || jethfutilities::isHFMcTable<CandidateTable>()) {
return jethfutilities::slicedPerHFJet<CandidateTable>(table, jet, perD0Jet, perDplusJet, perLcJet, perBplusJet);
return jethfutilities::slicedPerHFJet<CandidateTable>(table, jet, perD0Jet, perDplusJet, perDstarJet, perLcJet, perB0Jet, perBplusJet);
} else if constexpr (jetdqutilities::isDielectronTable<CandidateTable>() || jetdqutilities::isDielectronMcTable<CandidateTable>()) {
return jetdqutilities::slicedPerDielectronJet<CandidateTable>(table, jet, perDielectronJet);
} else {
Expand Down
Loading
Loading