|
52 | 52 | #include <cstdint> |
53 | 53 | #include <cstdlib> |
54 | 54 | #include <deque> |
| 55 | +#include <functional> |
55 | 56 | #include <iterator> |
56 | 57 | #include <memory> |
57 | 58 | #include <string> |
@@ -670,12 +671,53 @@ struct PhiStrangeCorrelation { |
670 | 671 | } |
671 | 672 | } |
672 | 673 | } 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 | + |
673 | 703 | static_for<0, kPhiMassRegions - 1>([&](auto i_idx) { |
674 | 704 | constexpr unsigned int Idx = i_idx.value; |
675 | 705 | const auto& [minMassPhi, maxMassPhi] = phiMassRegions[Idx]; |
676 | 706 | if (!phiCand.inMassRegion(minMassPhi, maxMassPhi)) { |
677 | 707 | return; |
678 | 708 | } |
| 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 | + } |
679 | 721 |
|
680 | 722 | if constexpr (PartType == kK0S) { |
681 | 723 | if constexpr (IsME) { |
@@ -714,7 +756,7 @@ struct PhiStrangeCorrelation { |
714 | 756 | customFillTHn(HIST("phiPi/h5PhiPiDataSideband"), weight, multiplicity, phiCand.pt(), assoc.pt(), phiCand.y() - assoc.y(), getDeltaPhi(phiCand.phi(), assoc.phi())); |
715 | 757 | } |
716 | 758 | } |
717 | | - }); |
| 759 | + });*/ |
718 | 760 | } |
719 | 761 |
|
720 | 762 | /*if (analysisMode == kMassvsMass) { |
|
0 commit comments