Skip to content

Commit

Permalink
Adding option to fill resolution matrix for 2kstar
Browse files Browse the repository at this point in the history
  • Loading branch information
prchakra committed Feb 17, 2025
1 parent 2e977ec commit 43e3cbb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,16 @@ class FemtoUniverseContainer
/// \param part2 Particle two
/// \param mult Multiplicity of the event
template <bool isMC, typename T>
void setPair(T const& part1, T const& part2, const int mult, bool use3dplots, float weight = 1.0f)
void setPair(T const& part1, T const& part2, const int mult, bool use3dplots, float weight = 1.0f, bool isiden = false)
{
float femtoObs, femtoObsMC;
// Calculate femto observable and the mT with reconstructed information
if constexpr (FemtoObs == femto_universe_container::Observable::kstar) {
femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo);
if (!isiden) {
femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo);
} else {
femtoObs = 2.0*FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo);
}
}
const float mT = FemtoUniverseMath::getmT(part1, mMassOne, part2, mMassTwo);

Expand All @@ -242,7 +246,11 @@ class FemtoUniverseContainer
if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) {
// calculate the femto observable and the mT with MC truth information
if constexpr (FemtoObs == femto_universe_container::Observable::kstar) {
femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
if (!isiden) {
femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
} else {
femtoObsMC = 2.0*FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
}
}
const float mTMC = FemtoUniverseMath::getmT(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);

Expand All @@ -260,6 +268,7 @@ class FemtoUniverseContainer
}
}


protected:
HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output
static constexpr std::string_view FolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to EventType
Expand Down

0 comments on commit 43e3cbb

Please sign in to comment.