@@ -84,10 +84,11 @@ enum KindOfCorrType {
8484 kFT0AGLOBAL ,
8585 kFT0CGLOBAL ,
8686 kMFTGLOBAL ,
87- kFT0AMFT
87+ kFT0AMFT ,
88+ kFT0AFT0C
8889};
8990
90- static constexpr std::string_view kCorrType [] = {" Ft0aGlobal/" , " Ft0cGlobal/" , " MftGlobal/" , " Ft0aMft/" };
91+ static constexpr std::string_view kCorrType [] = {" Ft0aGlobal/" , " Ft0cGlobal/" , " MftGlobal/" , " Ft0aMft/" , " Ft0aFt0c " };
9192static constexpr std::string_view kEvntType [] = {" SE/" , " ME/" };
9293
9394AxisSpec axisEvent{10 , 0.5 , 9.5 , " #Event" , " EventAxis" };
@@ -156,6 +157,8 @@ struct LongrangeCorrelation {
156157 OutputObj<CorrelationContainer> mixedMftGlobal{Form (" mixedEventMftGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
157158 OutputObj<CorrelationContainer> sameFt0aMft{Form (" sameEventFt0aMft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
158159 OutputObj<CorrelationContainer> mixedFt0aMft{Form (" mixedEventFt0aMft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
160+ OutputObj<CorrelationContainer> sameFt0aFt0c{Form (" sameEventFt0aFt0c_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
161+ OutputObj<CorrelationContainer> mixedFt0aFt0c{Form (" mixedEventFt0aFt0c_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
159162
160163 template <KindOfCorrType corrType, KindOfEvntType evntType>
161164 void addHistos ()
@@ -238,6 +241,13 @@ struct LongrangeCorrelation {
238241 sameFt0aMft.setObject (new CorrelationContainer (Form (" sameEventFt0aMft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFt0aMft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
239242 mixedFt0aMft.setObject (new CorrelationContainer (Form (" mixedEventFt0aMft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFt0aMft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
240243 }
244+
245+ if (doprocessFt0aFt0cSE || doprocessFt0aFt0cME) {
246+ addHistos<kFT0AFT0C , kSE >();
247+ addHistos<kFT0AFT0C , kME >();
248+ sameFt0aFt0c.setObject (new CorrelationContainer (Form (" sameEventFt0aFt0c_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFt0aFt0c_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
249+ mixedFt0aFt0c.setObject (new CorrelationContainer (Form (" mixedEventFt0aFt0c_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFt0aFt0c_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
250+ }
241251 }
242252
243253 Filter fTrackSelectionITS = ncheckbit(aod::track::v001::detectorMap, (uint8_t )o2::aod::track::ITS) &&
@@ -486,6 +496,64 @@ struct LongrangeCorrelation {
486496 } // trigger tracks
487497 } // fillCorrFt0aMft
488498
499+ template <CorrelationContainer::CFStep step, typename TTarget, typename TTriggers, typename TFT0As, typename TFT0Cs>
500+ void fillCorrFt0aFt0c (TTarget target, TTriggers const & triggers, TFT0As const & ft0a, TFT0Cs const & ft0c, bool mixing, float vz)
501+ {
502+ int fSampleIndex = gRandom ->Uniform (0 , cfgSampleSize);
503+ if (!mixing)
504+ histos.fill (HIST (" Ft0aFt0c/SE/hMult_used" ), triggers.size ());
505+
506+ for (std::size_t iChA = 0 ; iChA < ft0a.channelA ().size (); iChA++) {
507+ if (!mixing)
508+ histos.fill (HIST (" Ft0aFt0c/SE/Trig_hist" ), fSampleIndex , vz, -1 );
509+
510+ auto chanelidA = ft0a.channelA ()[iChA];
511+ auto phiA = getPhiFT0 (chanelidA, 0 );
512+ auto etaA = getEtaFT0 (chanelidA, 0 );
513+
514+ if (mixing) {
515+ histos.fill (HIST (" Ft0aFt0c/ME/Trig_eta" ), etaA);
516+ histos.fill (HIST (" Ft0aFt0c/ME/Trig_phi" ), phiA);
517+ histos.fill (HIST (" Ft0aFt0c/ME/Trig_etavsphi" ), phiA, etaA);
518+ } else {
519+ histos.fill (HIST (" Ft0aFt0c/SE/Trig_eta" ), etaA);
520+ histos.fill (HIST (" Ft0aFt0c/SE/Trig_phi" ), phiA);
521+ histos.fill (HIST (" Ft0aFt0c/SE/Trig_etavsphi" ), phiA, etaA);
522+ }
523+
524+ for (std::size_t iChC = 0 ; iChC < ft0c.channelC ().size (); iChC++) {
525+
526+ auto chanelidC = ft0c.channelC ()[iChC] + 96 ;
527+ float ampl = ft0c.amplitudeC ()[iChC];
528+ auto phiC = getPhiFT0 (chanelidC, 1 );
529+ auto etaC = getEtaFT0 (chanelidC, 1 );
530+
531+ if (mixing)
532+ histos.fill (HIST (" Ft0aFt0c/ME/Assoc_amp" ), chanelidC, ampl);
533+ else
534+ histos.fill (HIST (" Ft0aFt0c/SE/Assoc_amp" ), chanelidC, ampl);
535+
536+ if (mixing) {
537+ histos.fill (HIST (" Ft0aFt0c/ME/Assoc_eta" ), etaC);
538+ histos.fill (HIST (" Ft0aFt0c/ME/Assoc_phi" ), phiC);
539+ histos.fill (HIST (" Ft0aFt0c/ME/Assoc_etavsphi" ), phiC, etaC);
540+ } else {
541+ histos.fill (HIST (" Ft0aFt0c/SE/Assoc_eta" ), etaC);
542+ histos.fill (HIST (" Ft0aFt0c/SE/Assoc_phi" ), phiC);
543+ histos.fill (HIST (" Ft0aFt0c/SE/Assoc_etavsphi" ), phiC, etaC);
544+ }
545+
546+ float deltaPhi = RecoDecay::constrainAngle (phiA - phiC, -PIHalf);
547+ float deltaEta = etaA - etaC;
548+ if (mixing)
549+ histos.fill (HIST (" Ft0aFt0c/ME/deltaEta_deltaPhi" ), deltaPhi, deltaEta);
550+ else
551+ histos.fill (HIST (" Ft0aFt0c/SE/deltaEta_deltaPhi" ), deltaPhi, deltaEta);
552+ target->getPairHist ()->Fill (step, fSampleIndex , vz, -1 , -1 , deltaPhi, deltaEta);
553+ } // associated ft0 tracks
554+ } // trigger tracks
555+ } // fillCorrFt0aFt0c
556+
489557 void processEventStat (CollTable::iterator const & col)
490558 {
491559 histos.fill (HIST (" QA/EventHist" ), 1 );
@@ -565,6 +633,21 @@ struct LongrangeCorrelation {
565633 }
566634 } // same event
567635
636+ void processFt0aFt0cSE (CollTable::iterator const & col, aod::FT0s const &, TrksTable const & tracks)
637+ {
638+ if (!isEventSelected (col)) {
639+ return ;
640+ }
641+ if (col.has_foundFT0 ()) {
642+ histos.fill (" Ft0aFt0c/SE/hMult" , tracks.size ());
643+ const auto & ft0 = col.foundFT0 ();
644+ if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
645+ return ;
646+ }
647+ fillCorrFt0aFt0c<CorrelationContainer::kCFStepReconstructed >(sameFt0aFt0c, tracks, ft0, ft0, false , col.posZ ());
648+ }
649+ } // same event
650+
568651 void processFt0aGlobalME (CollTable const & col, aod::FT0s const &, TrksTable const & tracks)
569652 {
570653 auto getTracksSize = [&tracks, this ](CollTable::iterator const & collision) {
@@ -672,6 +755,35 @@ struct LongrangeCorrelation {
672755 }
673756 } // mixed event
674757
758+ void processFt0aFt0cME (CollTable const & col, aod::FT0s const &, TrksTable const & tracks)
759+ {
760+ auto getTracksSize = [&tracks, this ](CollTable::iterator const & collision) {
761+ auto associatedTracks = tracks.sliceByCached (o2::aod::track::collisionId, collision.globalIndex (), this ->cache );
762+ return associatedTracks.size ();
763+ };
764+
765+ using MixedBinning = FlexibleBinningPolicy<std::tuple<decltype (getTracksSize)>, aod::collision::PosZ, decltype (getTracksSize)>;
766+ MixedBinning binningOnVtxAndMult{{getTracksSize}, {axisVtxZME, axisMultME}, true };
767+ for (auto const & [col1, col2] : soa::selfCombinations (binningOnVtxAndMult, mixingParameter, -1 , col, col)) {
768+ if (!isEventSelected (col1) || !isEventSelected (col2)) {
769+ continue ;
770+ }
771+ if (col1.globalIndex () == col2.globalIndex ()) {
772+ continue ;
773+ }
774+ if (col1.has_foundFT0 () && col2.has_foundFT0 ()) {
775+ auto slicedTriggerTracks = tracks.sliceBy (perColGlobal, col1.globalIndex ());
776+ histos.fill (" Ft0aFt0c/ME/hMult" , slicedTriggerTracks.size ());
777+ const auto & ft0a = col1.foundFT0 ();
778+ const auto & ft0c = col2.foundFT0 ();
779+ if (slicedTriggerTracks.size () < cfgMinMult || slicedTriggerTracks.size () >= cfgMaxMult) {
780+ continue ;
781+ }
782+ fillCorrFt0aFt0c<CorrelationContainer::kCFStepReconstructed >(mixedFt0aFt0c, slicedTriggerTracks, ft0a, ft0c, true , col1.posZ ());
783+ }
784+ }
785+ } // mixed event
786+
675787 PROCESS_SWITCH (LongrangeCorrelation, processEventStat, " event stat" , false );
676788 PROCESS_SWITCH (LongrangeCorrelation, processFt0aGlobalSE, " same event FT0a vs global" , false );
677789 PROCESS_SWITCH (LongrangeCorrelation, processFt0aGlobalME, " mixed event FT0a vs global" , false );
@@ -681,6 +793,8 @@ struct LongrangeCorrelation {
681793 PROCESS_SWITCH (LongrangeCorrelation, processMftGlobalME, " mixed event MFT vs global" , false );
682794 PROCESS_SWITCH (LongrangeCorrelation, processFt0aMftSE, " same event FT0a vs MFT" , false );
683795 PROCESS_SWITCH (LongrangeCorrelation, processFt0aMftME, " mixed event FT0a vs MFT" , false );
796+ PROCESS_SWITCH (LongrangeCorrelation, processFt0aFt0cSE, " same event FT0a vs FT0c" , false );
797+ PROCESS_SWITCH (LongrangeCorrelation, processFt0aFt0cME, " mixed event FT0a vs FT0c" , false );
684798};
685799
686800WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments