Skip to content

Commit dc36de2

Browse files
authored
[PWGCF] FemtoUnivserse: Filling resolution matrix for 2kstar (#10030)
1 parent 337e834 commit dc36de2

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,16 @@ class FemtoUniverseContainer
226226
/// \param part2 Particle two
227227
/// \param mult Multiplicity of the event
228228
template <bool isMC, typename T>
229-
void setPair(T const& part1, T const& part2, const int mult, bool use3dplots, float weight = 1.0f)
229+
void setPair(T const& part1, T const& part2, const int mult, bool use3dplots, float weight = 1.0f, bool isiden = false)
230230
{
231231
float femtoObs, femtoObsMC;
232232
// Calculate femto observable and the mT with reconstructed information
233233
if constexpr (FemtoObs == femto_universe_container::Observable::kstar) {
234-
femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo);
234+
if (!isiden) {
235+
femtoObs = FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo);
236+
} else {
237+
femtoObs = 2.0 * FemtoUniverseMath::getkstar(part1, mMassOne, part2, mMassTwo);
238+
}
235239
}
236240
const float mT = FemtoUniverseMath::getmT(part1, mMassOne, part2, mMassTwo);
237241

@@ -242,7 +246,11 @@ class FemtoUniverseContainer
242246
if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) {
243247
// calculate the femto observable and the mT with MC truth information
244248
if constexpr (FemtoObs == femto_universe_container::Observable::kstar) {
245-
femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
249+
if (!isiden) {
250+
femtoObsMC = FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
251+
} else {
252+
femtoObsMC = 2.0 * FemtoUniverseMath::getkstar(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
253+
}
246254
}
247255
const float mTMC = FemtoUniverseMath::getmT(part1.fdMCParticle(), mMassOne, part2.fdMCParticle(), mMassTwo);
248256

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrack3DMultKtExtended.cxx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -546,9 +546,9 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended {
546546
}
547547
float weight = 1.0f;
548548
if constexpr (std::is_same<PartType, FilteredFemtoRecoParticles>::value) {
549-
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
549+
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
550550
} else {
551-
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
551+
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
552552
}
553553
} else {
554554
if (!cfgProcessMultBins) {
@@ -559,9 +559,9 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended {
559559
}
560560
float weight = 1.0f;
561561
if constexpr (std::is_same<PartType, FemtoRecoParticles>::value) {
562-
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
562+
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
563563
} else {
564-
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
564+
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
565565
}
566566
}
567567
break;
@@ -581,9 +581,9 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended {
581581
}
582582
float weight = 1.0f;
583583
if constexpr (std::is_same<PartType, FilteredFemtoRecoParticles>::value) {
584-
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
584+
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
585585
} else {
586-
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
586+
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
587587
}
588588
} else {
589589
if (!cfgProcessMultBins) {
@@ -594,9 +594,9 @@ struct femtoUniversePairTaskTrackTrack3DMultKtExtended {
594594
}
595595
float weight = 1.0f;
596596
if constexpr (std::is_same<PartType, FemtoRecoParticles>::value) {
597-
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
597+
sameEventCont1D.setPair<true>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
598598
} else {
599-
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight);
599+
sameEventCont1D.setPair<false>(p1, p2, multCol, twotracksconfigs.ConfUse3D, weight, ConfIsIden);
600600
}
601601
}
602602
break;

0 commit comments

Comments
 (0)