Skip to content

Commit 79af250

Browse files
committed
Try again
1 parent 7f0818e commit 79af250

1 file changed

Lines changed: 43 additions & 1 deletion

File tree

PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
#include <cstdint>
5353
#include <cstdlib>
5454
#include <deque>
55+
#include <functional>
5556
#include <iterator>
5657
#include <memory>
5758
#include <string>
@@ -670,12 +671,53 @@ struct PhiStrangeCorrelation {
670671
}
671672
}
672673
} else if (analysisMode == kDeltaYvsDeltaPhi) {
674+
std::function<void()> fillSignal;
675+
std::function<void()> fillSideband;
676+
677+
if constexpr (PartType == kK0S) {
678+
if constexpr (IsME) {
679+
fillSignal = [&]() { customFillTHn(HIST("phiK0S/h5PhiK0SDataMESignal"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
680+
fillSideband = [&]() { customFillTHn(HIST("phiK0S/h5PhiK0SDataMESideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
681+
} else {
682+
fillSignal = [&]() { customFillTHn(HIST("phiK0S/h5PhiK0SDataSignal"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
683+
fillSideband = [&]() { customFillTHn(HIST("phiK0S/h5PhiK0SDataSideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
684+
}
685+
} else if constexpr (PartType == kXi) {
686+
if constexpr (IsME) {
687+
fillSignal = [&]() { customFillTHn(HIST("phiXi/h5PhiXiDataMESignal"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
688+
fillSideband = [&]() { customFillTHn(HIST("phiXi/h5PhiXiDataMESideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
689+
} else {
690+
fillSignal = [&]() { customFillTHn(HIST("phiXi/h5PhiXiDataSignal"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
691+
fillSideband = [&]() { customFillTHn(HIST("phiXi/h5PhiXiDataSideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
692+
}
693+
} else if constexpr (PartType == kPion) {
694+
if constexpr (IsME) {
695+
fillSignal = [&]() { customFillTHn(HIST("phiPi/h5PhiPiDataMESignal"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
696+
fillSideband = [&]() { customFillTHn(HIST("phiPi/h5PhiPiDataMESideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
697+
} else {
698+
fillSignal = [&]() { customFillTHn(HIST("phiPi/h5PhiPiDataSignal"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
699+
fillSideband = [&]() { customFillTHn(HIST("phiPi/h5PhiPiDataSideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); };
700+
}
701+
}
702+
673703
static_for<0, kPhiMassRegions - 1>([&](auto i_idx) {
674704
constexpr unsigned int Idx = i_idx.value;
675705
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
676706
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi)) {
677707
return;
678708
}
709+
if constexpr (Idx == kSignalRegion)
710+
fillSignal();
711+
else
712+
fillSideband();
713+
});
714+
715+
/*static_for<0, kPhiMassRegions - 1>([&](auto i_idx) {
716+
constexpr unsigned int Idx = i_idx.value;
717+
const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx];
718+
if (!phiCand.inMassRegion(minMassPhi, maxMassPhi)) {
719+
return;
720+
}
679721
680722
if constexpr (PartType == kK0S) {
681723
if constexpr (IsME) {
@@ -714,7 +756,7 @@ struct PhiStrangeCorrelation {
714756
customFillTHn(HIST("phiPi/h5PhiPiDataSideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi()));
715757
}
716758
}
717-
});
759+
});*/
718760
}
719761

720762
/*if (analysisMode == kMassvsMass) {

0 commit comments

Comments
 (0)