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 #8781

Closed
wants to merge 3 commits into from
Closed
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
536 changes: 186 additions & 350 deletions PWGHF/DataModel/DerivedTables.h

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions PWGHF/TableProducer/derivedDataCreatorBplusToD0Pi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ struct HfDerivedDataCreatorBplusToD0Pi {
Produces<o2::aod::HfBplusIds> rowCandidateId;
Produces<o2::aod::HfBplusMcs> rowCandidateMc;
// Collisions
Produces<o2::aod::HfCollBases> rowCollBase;
Produces<o2::aod::HfCollIds> rowCollId;
Produces<o2::aod::HfBplusCollBases> rowCollBase;
Produces<o2::aod::HfBplusCollIds> rowCollId;
// MC collisions
Produces<o2::aod::HfMcCollBases> rowMcCollBase;
Produces<o2::aod::HfMcCollIds> rowMcCollId;
Produces<o2::aod::HfMcRCollIds> rowMcRCollId;
Produces<o2::aod::HfBplusMcCollBases> rowMcCollBase;
Produces<o2::aod::HfBplusMcCollIds> rowMcCollId;
Produces<o2::aod::HfBplusMcRCollIds> rowMcRCollId;
// MC particles
Produces<o2::aod::HfBplusPBases> rowParticleBase;
Produces<o2::aod::HfBplusPIds> rowParticleId;
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