@@ -187,6 +187,27 @@ class FemtoUniverseDetaDphiStar
187187 }
188188 }
189189
190+ template <typename t1>
191+ void init_kT (HistogramRegistry* registry, t1& ktbins)
192+ {
193+ mHistogramRegistry = registry;
194+ ktBins = ktbins;
195+
196+ if constexpr (kPartOneType == o2::aod::femtouniverseparticle::ParticleType::kTrack && kPartTwoType == o2::aod::femtouniverseparticle::ParticleType::kTrack ) {
197+ std::string dirName = static_cast <std::string>(DirNames[0 ]);
198+ for (int j = 0 ; j < static_cast <int >(ktBins.size () - 1 ); j++) {
199+ std::string histSuffixkT1 = std::to_string (static_cast <int >(ktBins[j] * 100.0 ));
200+ std::string histSuffixkT2 = std::to_string (static_cast <int >(ktBins[j + 1 ] * 100.0 ));
201+ std::string histFolderkT = " kT_" + histSuffixkT1 + " _" + histSuffixkT2 + " /" ;
202+
203+ histdetadphisamebeforekT[j] = mHistogramRegistry ->add <TH2>((dirName + histFolderkT + " detadphidetadphiBeforeSame" ).c_str (), " ; #Delta #eta; #Delta #phi" , kTH2F , {{100 , -0.15 , 0.15 }, {100 , -0.15 , 0.15 }});
204+ histdetadphimixedbeforekT[j] = mHistogramRegistry ->add <TH2>((dirName + histFolderkT + " detadphidetadphiBeforeMixed" ).c_str (), " ; #Delta #eta; #Delta #phi" , kTH2F , {{100 , -0.15 , 0.15 }, {100 , -0.15 , 0.15 }});
205+ histdetadphisameafterkT[j] = mHistogramRegistry ->add <TH2>((dirName + histFolderkT + " detadphidetadphiAfterSame" ).c_str (), " ; #Delta #eta; #Delta #phi" , kTH2F , {{100 , -0.15 , 0.15 }, {100 , -0.15 , 0.15 }});
206+ histdetadphimixedafterkT[j] = mHistogramRegistry ->add <TH2>((dirName + histFolderkT + " detadphidetadphiAfterMixed" ).c_str (), " ; #Delta #eta; #Delta #phi" , kTH2F , {{100 , -0.15 , 0.15 }, {100 , -0.15 , 0.15 }});
207+ }
208+ }
209+ }
210+
190211 // / Check if pair is close or not
191212 template <typename Part, typename Parts>
192213 bool isClosePair (Part const & part1, Part const & part2, Parts const & particles, float lmagfield, uint8_t ChosenEventType)
@@ -620,6 +641,62 @@ class FemtoUniverseDetaDphiStar
620641 }
621642 }
622643
644+ // / Templated function to access different kT directory and call addEventPair
645+ // / \param part1 particle 1
646+ // / \param part2 particle 2
647+ // / \param ChosenEventType Same or Mixed evet type
648+ // / \param maxl Maximum valie of L component of the spherical harmonics
649+ // / \param multval Multiplicity value
650+ // / \param ktval kT value
651+ template <typename Part>
652+ void kTdetadphi (Part const & part1, Part const & part2, uint8_t ChosenEventType, float ktval)
653+ {
654+ int ktbinval = -1 ;
655+ if (ktval >= ktBins[0 ] && ktval < ktBins[1 ]) {
656+ ktbinval = 0 ;
657+ } else if (ktval >= ktBins[1 ] && ktval < ktBins[2 ]) {
658+ ktbinval = 1 ;
659+ } else if (ktval >= ktBins[2 ] && ktval < ktBins[3 ]) {
660+ ktbinval = 2 ;
661+ } else if (ktval >= ktBins[3 ] && ktval < ktBins[4 ]) {
662+ ktbinval = 3 ;
663+ } else {
664+ return ;
665+ }
666+ isClosePairkT (part1, part2, ChosenEventType, ktbinval);
667+ }
668+
669+ // / Check if pair is close or not
670+ template <typename Part>
671+ void isClosePairkT (Part const & part1, Part const & part2, uint8_t ChosenEventType, int ktbinval)
672+ {
673+ // / Track-Track combination
674+ // check if provided particles are in agreement with the class instantiation
675+ if (part1.partType () != o2::aod::femtouniverseparticle::ParticleType::kTrack || part2.partType () != o2::aod::femtouniverseparticle::ParticleType::kTrack ) {
676+ LOG (fatal) << " FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar instantiation! Please provide kTrack,kTrack candidates." ;
677+ return ;
678+ }
679+ auto deta = part1.eta () - part2.eta ();
680+ auto dphiAvg = averagePhiStar (part1, part2, 0 );
681+ if (ChosenEventType == femto_universe_container::EventType::same) {
682+ histdetadphisamebeforekT[ktbinval]->Fill (deta, dphiAvg);
683+ } else if (ChosenEventType == femto_universe_container::EventType::mixed) {
684+ histdetadphimixedbeforekT[ktbinval]->Fill (deta, dphiAvg);
685+ } else {
686+ LOG (fatal) << " FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed." ;
687+ }
688+
689+ if (std::pow (dphiAvg, 2 ) / std::pow (cutDeltaPhiStarMax, 2 ) + std::pow (deta, 2 ) / std::pow (cutDeltaEtaMax, 2 ) > 1 .) {
690+ if (ChosenEventType == femto_universe_container::EventType::same) {
691+ histdetadphisameafterkT[ktbinval]->Fill (deta, dphiAvg);
692+ } else if (ChosenEventType == femto_universe_container::EventType::mixed) {
693+ histdetadphimixedafterkT[ktbinval]->Fill (deta, dphiAvg);
694+ } else {
695+ LOG (fatal) << " FemtoUniverseDetaDphiStar: passed arguments don't agree with FemtoUniverseDetaDphiStar's type of events! Please provide same or mixed." ;
696+ }
697+ }
698+ }
699+
623700 // / Check if pair is close or not
624701 template <typename Part>
625702 void ClosePairqLCMS (Part const & part1, Part const & part2, float lmagfield, uint8_t ChosenEventType, double qlcms) // add typename Parts and variable parts for adding MClabels
@@ -698,9 +775,15 @@ class FemtoUniverseDetaDphiStar
698775 float cutPhiInvMassLow;
699776 float cutPhiInvMassHigh;
700777 bool isSameSignCPR = false ;
778+ std::vector<double > ktBins;
701779
702780 std::array<std::array<std::shared_ptr<TH2>, 2 >, 7 > histdetadpisame{};
703781 std::array<std::array<std::shared_ptr<TH2>, 2 >, 7 > histdetadpimixed{};
782+ std::array<std::shared_ptr<TH2>, 4 > histdetadphisamebeforekT{};
783+ std::array<std::shared_ptr<TH2>, 4 > histdetadphimixedbeforekT{};
784+ std::array<std::shared_ptr<TH2>, 4 > histdetadphisameafterkT{};
785+ std::array<std::shared_ptr<TH2>, 4 > histdetadphimixedafterkT{};
786+
704787 std::array<std::array<std::shared_ptr<TH2>, 9 >, 7 > histdetadpiRadii{};
705788
706789 std::shared_ptr<TH3> histdetadpiqlcmssame{};
0 commit comments