Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGHF,PWGJE] Adding B+ to the jet framework and renaming 3P->Lc in Derived HF tables #8792

Merged
merged 2 commits into from
Dec 3, 2024
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
22 changes: 11 additions & 11 deletions PWGHF/DataModel/DerivedTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

// Defines the collision table
#define DECLARE_COLL_TABLE(_hf_type_, _hf_description_) \
DECLARE_SOA_TABLE_STAGED(Hf##_hf_type_##CollBases, "HF" _hf_description_ "COLLBASE", \

Check warning on line 67 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-table]

Use UpperCamelCase for names of O2 tables.
o2::soa::Index<>, \
collision::PosX, \
collision::PosY, \
Expand All @@ -80,7 +80,7 @@
using Hf##_hf_type_##CollBase = Hf##_hf_type_##CollBases::iterator; \
using StoredHf##_hf_type_##CollBase = StoredHf##_hf_type_##CollBases::iterator; \
\
DECLARE_SOA_TABLE_STAGED(Hf##_hf_type_##CollIds, "HF" _hf_description_ "COLLID", \

Check warning on line 83 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-table]

Use UpperCamelCase for names of O2 tables.
hf_cand::CollisionId, \
o2::soa::Marker<Marker##_hf_type_>);

Expand All @@ -90,10 +90,10 @@
{ \
namespace der_##_hf_namespace_ \
{ \
DECLARE_SOA_ARRAY_INDEX_COLUMN(Hf##_hf_type_##CollBase, hfCollBases); \

Check warning on line 93 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", \

Check warning on line 96 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-table]

Use UpperCamelCase for names of O2 tables.
o2::soa::Index<>, \
mccollision::PosX, \
mccollision::PosY, \
Expand All @@ -104,11 +104,11 @@
using Hf##_hf_type_##McCollBase = Hf##_hf_type_##McCollBases::iterator; \
using StoredHf##_hf_type_##McCollBase = StoredHf##_hf_type_##McCollBases::iterator; \
\
DECLARE_SOA_TABLE_STAGED(Hf##_hf_type_##McCollIds, "HF" _hf_description_ "MCCOLLID", \

Check warning on line 107 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-table]

Use UpperCamelCase for names of O2 tables.
hf_mc_coll::McCollisionId, \
o2::soa::Marker<Marker##_hf_type_>); \
\
DECLARE_SOA_TABLE_STAGED(Hf##_hf_type_##McRCollIds, "HF" _hf_description_ "MCRCOLLID", \

Check warning on line 111 in PWGHF/DataModel/DerivedTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-table]

Use UpperCamelCase for names of O2 tables.
hf_mc_coll::der_##_hf_namespace_::Hf##_hf_type_##CollBaseIds);

#define DECLARE_COLL_TABLES(_hf_type_, _hf_description_, _hf_namespace_) \
Expand Down Expand Up @@ -160,7 +160,7 @@
{ \
namespace der_##_hf_namespace_ \
{ \
DECLARE_SOA_INDEX_COLUMN(Hf##_hf_type_##CollBase, hfCollBase); \

Check warning on line 163 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 @@ -198,7 +198,7 @@
{ \
namespace der_##_hf_namespace_ \
{ \
DECLARE_SOA_INDEX_COLUMN(Hf##_hf_type_##McCollBase, hfMcCollBase); \

Check warning on line 201 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 @@ -236,17 +236,17 @@
DECLARE_CAND_3P_ID_TABLE(_hf_type_, _hf_description_)

#define DECLARE_2P_TABLES(_hf_type_, _hf_description_, _hf_namespace_, _marker_number_) \
constexpr uint Marker##_hf_type_ = _marker_number_; \

Check warning on line 239 in PWGHF/DataModel/DerivedTables.h

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".
DECLARE_COLL_TABLES(_hf_type_, _hf_description_, _hf_namespace_) \
DECLARE_CAND_2P_TABLES(_hf_type_, _hf_description_, _hf_namespace_)

#define DECLARE_3P_TABLES(_hf_type_, _hf_description_, _hf_namespace_, _marker_number_) \
constexpr uint Marker##_hf_type_ = _marker_number_; \

Check warning on line 244 in PWGHF/DataModel/DerivedTables.h

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".
DECLARE_COLL_TABLES(_hf_type_, _hf_description_, _hf_namespace_) \
DECLARE_CAND_3P_TABLES(_hf_type_, _hf_description_, _hf_namespace_)

DECLARE_2P_TABLES(D0, "D0", d0, 2);
DECLARE_3P_TABLES(3P, "3P", 3p, 3);
DECLARE_3P_TABLES(Lc, "LC", lc, 3);
DECLARE_3P_TABLES(Bplus, "BP", bplus, 4);

// ================
Expand Down Expand Up @@ -560,7 +560,7 @@
// PxProng0, PyProng0, PzProng0,... (same for 1, 2), we can keep Pt, Eta, Phi instead
// XY: CpaXY, DecayLengthXY, ErrorDecayLengthXY
// normalised: DecayLengthNormalised, DecayLengthXYNormalised, ImpactParameterNormalised0
DECLARE_SOA_TABLE_STAGED(Hf3PPars, "HF3PPAR", //! Table with candidate properties used for selection
DECLARE_SOA_TABLE_STAGED(HfLcPars, "HFLCPAR", //! Table with candidate properties used for selection
hf_cand::Chi2PCA,
hf_cand::NProngsContributorsPV,
hf_cand_par::Cpa,
Expand Down Expand Up @@ -593,9 +593,9 @@
hf_cand_par::NSigTofPr2,
hf_cand_par::NSigTpcTofPi2,
hf_cand_par::NSigTpcTofPr2,
o2::soa::Marker<Marker3P>);
o2::soa::Marker<MarkerLc>);

DECLARE_SOA_TABLE_STAGED(Hf3PParEs, "HF3PPARE", //! Table with additional candidate properties used for selection
DECLARE_SOA_TABLE_STAGED(HfLcParEs, "HFLCPARE", //! Table with additional candidate properties used for selection
hf_cand::XSecondaryVertex,
hf_cand::YSecondaryVertex,
hf_cand::ZSecondaryVertex,
Expand All @@ -618,21 +618,21 @@
hf_cand::ErrorImpactParameter1,
hf_cand::ErrorImpactParameter2,
hf_cand_par::Ct,
o2::soa::Marker<Marker3P>);
o2::soa::Marker<MarkerLc>);

DECLARE_SOA_TABLE_STAGED(Hf3PSels, "HF3PSEL", //! Table with candidate selection flags
DECLARE_SOA_TABLE_STAGED(HfLcSels, "HFLCSEL", //! Table with candidate selection flags
hf_cand_sel::CandidateSelFlag,
o2::soa::Marker<Marker3P>);
o2::soa::Marker<MarkerLc>);

DECLARE_SOA_TABLE_STAGED(Hf3PMls, "HF3PML", //! Table with candidate selection ML scores
DECLARE_SOA_TABLE_STAGED(HfLcMls, "HFLCML", //! Table with candidate selection ML scores
hf_cand_mc::MlScores,
o2::soa::Marker<Marker3P>);
o2::soa::Marker<MarkerLc>);

DECLARE_SOA_TABLE_STAGED(Hf3PMcs, "HF3PMC", //! Table with MC candidate info
DECLARE_SOA_TABLE_STAGED(HfLcMcs, "HFLCMC", //! Table with MC candidate info
hf_cand_mc::FlagMcMatchRec,
hf_cand_mc::OriginMcRec,
hf_cand_mc::IsCandidateSwapped,
o2::soa::Marker<Marker3P>);
o2::soa::Marker<MarkerLc>);

} // namespace o2::aod

Expand Down
28 changes: 14 additions & 14 deletions PWGHF/TableProducer/derivedDataCreatorLcToPKPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ using namespace o2::analysis::hf_derived;
/// Writes the full information in an output TTree
struct HfDerivedDataCreatorLcToPKPi {
// Candidates
Produces<o2::aod::Hf3PBases> rowCandidateBase;
Produces<o2::aod::Hf3PPars> rowCandidatePar;
Produces<o2::aod::Hf3PParEs> rowCandidateParE;
Produces<o2::aod::Hf3PSels> rowCandidateSel;
Produces<o2::aod::Hf3PMls> rowCandidateMl;
Produces<o2::aod::Hf3PIds> rowCandidateId;
Produces<o2::aod::Hf3PMcs> rowCandidateMc;
Produces<o2::aod::HfLcBases> rowCandidateBase;
Produces<o2::aod::HfLcPars> rowCandidatePar;
Produces<o2::aod::HfLcParEs> rowCandidateParE;
Produces<o2::aod::HfLcSels> rowCandidateSel;
Produces<o2::aod::HfLcMls> rowCandidateMl;
Produces<o2::aod::HfLcIds> rowCandidateId;
Produces<o2::aod::HfLcMcs> rowCandidateMc;
// Collisions
Produces<o2::aod::Hf3PCollBases> rowCollBase;
Produces<o2::aod::Hf3PCollIds> rowCollId;
Produces<o2::aod::HfLcCollBases> rowCollBase;
Produces<o2::aod::HfLcCollIds> rowCollId;
// MC collisions
Produces<o2::aod::Hf3PMcCollBases> rowMcCollBase;
Produces<o2::aod::Hf3PMcCollIds> rowMcCollId;
Produces<o2::aod::Hf3PMcRCollIds> rowMcRCollId;
Produces<o2::aod::HfLcMcCollBases> rowMcCollBase;
Produces<o2::aod::HfLcMcCollIds> rowMcCollId;
Produces<o2::aod::HfLcMcRCollIds> rowMcRCollId;
// MC particles
Produces<o2::aod::Hf3PPBases> rowParticleBase;
Produces<o2::aod::Hf3PPIds> rowParticleId;
Produces<o2::aod::HfLcPBases> rowParticleBase;
Produces<o2::aod::HfLcPIds> rowParticleId;

// Switches for filling tables
Configurable<bool> fillCandidateBase{"fillCandidateBase", true, "Fill candidate base properties"};
Expand Down
14 changes: 7 additions & 7 deletions PWGJE/Core/JetCandidateUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,30 +373,30 @@ float getCandidateInvariantMass(T const& candidate)
}

template <typename T, typename U, typename V>
void fillCandidateCollisionTable(T const& collision, U const& candidates, V& CandiateCollisionTable, int32_t& CandidateCollisionTableIndex)
void fillCandidateCollisionTable(T const& collision, U const& /*candidates*/, V& CandiateCollisionTable, int32_t& CandidateCollisionTableIndex)
{
if constexpr (jethfutilities::isHFTable<U>()) {
jethfutilities::fillHFCollisionTable(collision, candidates, CandiateCollisionTable, CandidateCollisionTableIndex);
jethfutilities::fillHFCollisionTable(collision, CandiateCollisionTable, CandidateCollisionTableIndex);
} else if constexpr (jetdqutilities::isDielectronTable<U>()) {
jetdqutilities::fillDielectronCollisionTable(collision, CandiateCollisionTable, CandidateCollisionTableIndex); // if more dilepton tables are added we would need a fillDQCollisionTable
}
}

template <typename T, typename U, typename V>
void fillCandidateMcCollisionTable(T const& mcCollision, U const& candidates, V& CandiateMcCollisionTable, int32_t& CandidateMcCollisionTableIndex)
void fillCandidateMcCollisionTable(T const& mcCollision, U const& /*candidates*/, V& CandiateMcCollisionTable, int32_t& CandidateMcCollisionTableIndex)
{
if constexpr (jethfutilities::isHFMcTable<U>()) {
jethfutilities::fillHFMcCollisionTable(mcCollision, candidates, CandiateMcCollisionTable, CandidateMcCollisionTableIndex);
jethfutilities::fillHFMcCollisionTable(mcCollision, CandiateMcCollisionTable, CandidateMcCollisionTableIndex);
} else if constexpr (jetdqutilities::isDielectronMcTable<U>()) {
jetdqutilities::fillDielectronMcCollisionTable(mcCollision, CandiateMcCollisionTable, CandidateMcCollisionTableIndex);
}
}

template <bool isMc, typename T, typename U, typename V, typename M, typename N, typename O, typename P>
void fillCandidateTable(T const& candidate, int32_t collisionIndex, U& BaseTable, V& HFParTable, M& HFParETable, N& HFSelectionFlagTable, O& HFMlTable, P& HFMCDTable, int32_t& candidateTableIndex)
template <bool isMc, typename T, typename U, typename V, typename M, typename N, typename O, typename P, typename Q, typename S>
void fillCandidateTable(T const& candidate, int32_t collisionIndex, U& BaseTable, V& HFParTable, M& HFParETable, N& HFParDaughterTable, O& HFSelectionFlagTable, P& HFMlTable, Q& HFMlDaughterTable, S& HFMCDTable, int32_t& candidateTableIndex)
{
if constexpr (jethfutilities::isHFCandidate<T>()) {
jethfutilities::fillHFCandidateTable<isMc>(candidate, collisionIndex, BaseTable, HFParTable, HFParETable, HFSelectionFlagTable, HFMlTable, HFMCDTable, candidateTableIndex);
jethfutilities::fillHFCandidateTable<isMc>(candidate, collisionIndex, BaseTable, HFParTable, HFParETable, HFParDaughterTable, HFSelectionFlagTable, HFMlTable, HFMlDaughterTable, HFMCDTable, candidateTableIndex);
} else if constexpr (jetdqutilities::isDielectronCandidate<T>()) {
jetdqutilities::fillDielectronCandidateTable(candidate, collisionIndex, BaseTable, candidateTableIndex);
}
Expand Down
12 changes: 2 additions & 10 deletions PWGJE/Core/JetDQUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,7 @@ auto slicedPerDielectronCollision(T const& table, U const& /*candidates*/, V con
template <typename T>
int getDielectronCandidateCollisionId(T const& candidate)
{
if constexpr (isDielectronCandidate<T>()) {
return candidate.reducedeventId();
} else {
return -1;
}
return candidate.reducedeventId();
}

/**
Expand Down Expand Up @@ -275,11 +271,7 @@ float getDielectronTablePDGMass()
template <typename T>
float getDielectronCandidateInvariantMass(T const& candidate)
{
if constexpr (isDielectronCandidate<T>()) {
return candidate.mass();
} else {
return -1.0;
}
return candidate.mass();
}

template <typename T, typename U>
Expand Down
Loading
Loading