1212// / \file longrangeCorrelation.cxx
1313// /
1414// / \brief task for long range correlation analysis
15- // / \author Abhi Modak (abhi.modak@cern.ch) and Debojit sarkar (debojit.sarkar@cern.ch)
15+ // / \author Abhi Modak (abhi.modak@cern.ch) and Debojit Sarkar (debojit.sarkar@cern.ch)
1616// / \since April 22, 2025
1717
1818#include < TH1F.h>
@@ -72,8 +72,6 @@ static constexpr TrackSelectionFlags::flagtype TrackSelectionDcaxyOnly =
7272 TrackSelectionFlags::kDCAxy ;
7373
7474AxisSpec axisEvent{10 , 0.5 , 9.5 , " #Event" , " EventAxis" };
75- AxisSpec amplitudeFT0{5000 , 0 , 10000 , " FT0 amplitude" };
76- AxisSpec channelFT0Axis{96 , 0.0 , 96.0 , " FT0 channel" };
7775
7876struct LongrangeCorrelation {
7977
@@ -96,6 +94,7 @@ struct LongrangeCorrelation {
9694 Configurable<int > cfgMinMult{" cfgMinMult" , 0 , " Minimum multiplicity for collision" };
9795 Configurable<int > cfgMaxMult{" cfgMaxMult" , 10 , " Maximum multiplicity for collision" };
9896 Configurable<double > cfgSampleSize{" cfgSampleSize" , 10 , " Sample size for mixed event" };
97+ Configurable<bool > isApplySameBunchPileup{" isApplySameBunchPileup" , false , " Enable SameBunchPileup cut" };
9998 ConfigurableAxis axisDeltaPhi{" axisDeltaPhi" , {72 , -PIHalf, PIHalf * 3 }, " delta phi axis for histograms" };
10099 ConfigurableAxis axisDeltaEta{" axisDeltaEta" , {40 , -6 , -2 }, " delta eta axis for histograms" };
101100 ConfigurableAxis axisPtTrigger{" axisPtTrigger" , {VARIABLE_WIDTH , 0.5 , 1.0 , 1.5 , 2.0 , 3.0 , 4.0 , 6.0 , 10.0 }, " pt trigger axis for histograms" };
@@ -111,13 +110,15 @@ struct LongrangeCorrelation {
111110 ConfigurableAxis axisEtaAssoc{" axisEtaAssoc" , {96 , 3.5 , 4.9 }, " #eta assoc axis" };
112111 ConfigurableAxis axisSample{" axisSample" , {cfgSampleSize, 0 , cfgSampleSize}, " sample axis for histograms" };
113112 ConfigurableAxis axisMultiplicity{" axisMultiplicity" , {VARIABLE_WIDTH , 0 , 5 , 10 , 15 , 20 , 25 , 30 , 35 , 40 , 50 , 60 , 80 , 100 }, " multiplicity / centrality axis for histograms" };
113+ ConfigurableAxis amplitudeFt0a{" amplitudeFt0a" , {5000 , 0 , 10000 }, " FT0A amplitude" };
114+ ConfigurableAxis channelFt0aAxis{" channelFt0aAxis" , {96 , 0.0 , 96.0 }, " FT0A channel" };
114115
115116 using CollTable = soa::Join<aod::Collisions, aod::EvSels>;
116117 using TrksTable = soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::TrackSelection>>;
117118 Preslice<TrksTable> perCollision = aod::track::collisionId;
118119
119- OutputObj<CorrelationContainer> same {Form (" sameEvent_ %i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
120- OutputObj<CorrelationContainer> mixed {Form (" mixedEvent_ %i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
120+ OutputObj<CorrelationContainer> sameFt0aGlobalIts {Form (" sameEventFt0aGlobalIts_ %i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
121+ OutputObj<CorrelationContainer> mixedFt0aGlobalIts {Form (" mixedEventFt0aGlobalIts_ %i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
121122
122123 void init (InitContext const &)
123124 {
@@ -142,31 +143,8 @@ struct LongrangeCorrelation {
142143 auto * x = hstat->GetXaxis ();
143144 x->SetBinLabel (1 , " All events" );
144145 x->SetBinLabel (2 , " sel8" );
145- x->SetBinLabel (3 , " |vz|<10" );
146-
147- histos.add (" SE/hMult" , " event multiplicity" , kTH1D , {axisMultiplicity});
148- histos.add (" SE/Trig_etavsphi" , " ;#eta;#phi" , kTH2D , {axisPhi, axisEtaTrig});
149- histos.add (" SE/Trig_eta" , " #eta" , kTH1D , {axisEtaTrig});
150- histos.add (" SE/Trig_phi" , " #eta" , kTH1D , {axisPhi});
151- histos.add (" SE/Trig_pt" , " p_{T}" , kTH1D , {axisPtTrigger});
152- histos.add (" SE/hMult_used" , " event multiplicity" , kTH1F , {axisMultiplicity});
153- histos.add (" SE/Trig_hist" , " trig hist" , kTHnSparseF , {axisSample, axisVtxZ, axisPtTrigger});
154- histos.add (" SE/FT0Amp" , " ftoamult" , kTH2D , {channelFT0Axis, amplitudeFT0});
155- histos.add (" SE/FT0Aeta" , " ft0a;#eta" , kTH1D , {axisEtaAssoc});
156- histos.add (" SE/FT0Aphi" , " ft0a;#phi" , kTH1D , {axisPhi});
157- histos.add (" SE/FT0Aetavsphi" , " ;ft0a;#eta;#phi" , kTH2D , {axisPhi, axisEtaAssoc});
158- histos.add (" SE/deltaEta_deltaPhi" , " ;#delta#eta;#delta#phi" , kTH2D , {axisDeltaPhi, axisDeltaEta});
159-
160- histos.add (" ME/hMult" , " event multiplicity" , kTH1D , {axisMultiplicity});
161- histos.add (" ME/Trig_etavsphi" , " ;#eta;#phi" , kTH2D , {axisPhi, axisEtaTrig});
162- histos.add (" ME/Trig_eta" , " #eta" , kTH1D , {axisEtaTrig});
163- histos.add (" ME/Trig_phi" , " #eta" , kTH1D , {axisPhi});
164- histos.add (" ME/Trig_pt" , " p_{T}" , kTH1D , {axisPtTrigger});
165- histos.add (" ME/FT0Amp" , " ftoamult" , kTH2D , {channelFT0Axis, amplitudeFT0});
166- histos.add (" ME/FT0Aeta" , " ft0a;#eta" , kTH1D , {axisEtaAssoc});
167- histos.add (" ME/FT0Aphi" , " ft0a;#phi" , kTH1D , {axisPhi});
168- histos.add (" ME/FT0Aetavsphi" , " ;ft0a;#eta;#phi" , kTH2D , {axisPhi, axisEtaAssoc});
169- histos.add (" ME/deltaEta_deltaPhi" , " ;#delta#eta;#delta#phi" , kTH2D , {axisDeltaPhi, axisDeltaEta});
146+ x->SetBinLabel (3 , " kNoSameBunchPileup" ); // reject collisions in case of pileup with another collision in the same foundBC
147+ x->SetBinLabel (4 , " |vz|<10" );
170148
171149 std::vector<AxisSpec> corrAxis = {{axisSample, " Sample" },
172150 {axisVtxZ, " z-vtx (cm)" },
@@ -180,8 +158,34 @@ struct LongrangeCorrelation {
180158
181159 std::vector<AxisSpec> userAxis;
182160
183- same.setObject (new CorrelationContainer (Form (" sameEvent_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEvent_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
184- mixed.setObject (new CorrelationContainer (Form (" mixedEvent_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEvent_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
161+ if (doprocessFt0aGlobalItsSE || doprocessFt0aGlobalItsME) {
162+ histos.add (" Ft0aGlobal/SE/hMult" , " event multiplicity" , kTH1D , {axisMultiplicity});
163+ histos.add (" Ft0aGlobal/SE/Trig_etavsphi" , " ;#eta;#phi" , kTH2D , {axisPhi, axisEtaTrig});
164+ histos.add (" Ft0aGlobal/SE/Trig_eta" , " #eta" , kTH1D , {axisEtaTrig});
165+ histos.add (" Ft0aGlobal/SE/Trig_phi" , " #eta" , kTH1D , {axisPhi});
166+ histos.add (" Ft0aGlobal/SE/Trig_pt" , " p_{T}" , kTH1D , {axisPtTrigger});
167+ histos.add (" Ft0aGlobal/SE/hMult_used" , " event multiplicity" , kTH1F , {axisMultiplicity});
168+ histos.add (" Ft0aGlobal/SE/Trig_hist" , " trig hist" , kTHnSparseF , {axisSample, axisVtxZ, axisPtTrigger});
169+ histos.add (" Ft0aGlobal/SE/FT0Amp" , " ftoamult" , kTH2D , {channelFt0aAxis, amplitudeFt0a});
170+ histos.add (" Ft0aGlobal/SE/FT0Aeta" , " ft0a;#eta" , kTH1D , {axisEtaAssoc});
171+ histos.add (" Ft0aGlobal/SE/FT0Aphi" , " ft0a;#phi" , kTH1D , {axisPhi});
172+ histos.add (" Ft0aGlobal/SE/FT0Aetavsphi" , " ;ft0a;#eta;#phi" , kTH2D , {axisPhi, axisEtaAssoc});
173+ histos.add (" Ft0aGlobal/SE/deltaEta_deltaPhi" , " ;#delta#eta;#delta#phi" , kTH2D , {axisDeltaPhi, axisDeltaEta});
174+
175+ histos.add (" Ft0aGlobal/ME/hMult" , " event multiplicity" , kTH1D , {axisMultiplicity});
176+ histos.add (" Ft0aGlobal/ME/Trig_etavsphi" , " ;#eta;#phi" , kTH2D , {axisPhi, axisEtaTrig});
177+ histos.add (" Ft0aGlobal/ME/Trig_eta" , " #eta" , kTH1D , {axisEtaTrig});
178+ histos.add (" Ft0aGlobal/ME/Trig_phi" , " #eta" , kTH1D , {axisPhi});
179+ histos.add (" Ft0aGlobal/ME/Trig_pt" , " p_{T}" , kTH1D , {axisPtTrigger});
180+ histos.add (" Ft0aGlobal/ME/FT0Amp" , " ftoamult" , kTH2D , {channelFt0aAxis, amplitudeFt0a});
181+ histos.add (" Ft0aGlobal/ME/FT0Aeta" , " ft0a;#eta" , kTH1D , {axisEtaAssoc});
182+ histos.add (" Ft0aGlobal/ME/FT0Aphi" , " ft0a;#phi" , kTH1D , {axisPhi});
183+ histos.add (" Ft0aGlobal/ME/FT0Aetavsphi" , " ;ft0a;#eta;#phi" , kTH2D , {axisPhi, axisEtaAssoc});
184+ histos.add (" Ft0aGlobal/ME/deltaEta_deltaPhi" , " ;#delta#eta;#delta#phi" , kTH2D , {axisDeltaPhi, axisDeltaEta});
185+
186+ sameFt0aGlobalIts.setObject (new CorrelationContainer (Form (" sameEventFt0aGlobalIts_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFt0aGlobalIts_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
187+ mixedFt0aGlobalIts.setObject (new CorrelationContainer (Form (" mixedEventFt0aGlobalIts_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFt0aGlobalIts_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
188+ }
185189 }
186190
187191 double getPhiFT0 (int chno, double offsetX, double offsetY)
@@ -222,10 +226,14 @@ struct LongrangeCorrelation {
222226 return false ;
223227 }
224228 histos.fill (HIST (" QA/EventHist" ), 2 );
225- if (std::abs ( col.posZ ()) >= cfgVtxCut ) {
229+ if (isApplySameBunchPileup && ! col.selection_bit (o2::aod::evsel:: kNoSameBunchPileup ) ) {
226230 return false ;
227231 }
228232 histos.fill (HIST (" QA/EventHist" ), 3 );
233+ if (std::abs (col.posZ ()) >= cfgVtxCut) {
234+ return false ;
235+ }
236+ histos.fill (HIST (" QA/EventHist" ), 4 );
229237 histos.fill (HIST (" QA/VtxZHist" ), col.posZ ());
230238 return true ;
231239 }
@@ -234,33 +242,36 @@ struct LongrangeCorrelation {
234242 void fillYield (TTracks tracks, bool mixing)
235243 {
236244 if (mixing) {
237- histos.fill (HIST (" ME/hMult" ), tracks.size ());
245+ histos.fill (HIST (" Ft0aGlobal/ ME/hMult" ), tracks.size ());
238246 for (auto const & triggerTrack : tracks) {
239- histos.fill (HIST (" ME/Trig_etavsphi" ), triggerTrack.phi (), triggerTrack.eta ());
240- histos.fill (HIST (" ME/Trig_eta" ), triggerTrack.eta ());
241- histos.fill (HIST (" ME/Trig_phi" ), triggerTrack.phi ());
242- histos.fill (HIST (" ME/Trig_pt" ), triggerTrack.pt ());
247+ histos.fill (HIST (" Ft0aGlobal/ ME/Trig_etavsphi" ), triggerTrack.phi (), triggerTrack.eta ());
248+ histos.fill (HIST (" Ft0aGlobal/ ME/Trig_eta" ), triggerTrack.eta ());
249+ histos.fill (HIST (" Ft0aGlobal/ ME/Trig_phi" ), triggerTrack.phi ());
250+ histos.fill (HIST (" Ft0aGlobal/ ME/Trig_pt" ), triggerTrack.pt ());
243251 }
244252 } else {
245- histos.fill (HIST (" SE/hMult" ), tracks.size ());
253+ histos.fill (HIST (" Ft0aGlobal/ SE/hMult" ), tracks.size ());
246254 for (auto const & triggerTrack : tracks) {
247- histos.fill (HIST (" SE/Trig_etavsphi" ), triggerTrack.phi (), triggerTrack.eta ());
248- histos.fill (HIST (" SE/Trig_eta" ), triggerTrack.eta ());
249- histos.fill (HIST (" SE/Trig_phi" ), triggerTrack.phi ());
250- histos.fill (HIST (" SE/Trig_pt" ), triggerTrack.pt ());
255+ histos.fill (HIST (" Ft0aGlobal/ SE/Trig_etavsphi" ), triggerTrack.phi (), triggerTrack.eta ());
256+ histos.fill (HIST (" Ft0aGlobal/ SE/Trig_eta" ), triggerTrack.eta ());
257+ histos.fill (HIST (" Ft0aGlobal/ SE/Trig_phi" ), triggerTrack.phi ());
258+ histos.fill (HIST (" Ft0aGlobal/ SE/Trig_pt" ), triggerTrack.pt ());
251259 }
252260 }
253261 }
254262
255263 template <CorrelationContainer::CFStep step, typename TTarget, typename TTriggers, typename TFT0s>
256- void fillCorrelation (TTarget target, TTriggers const & triggers, TFT0s const & ft0, bool mixing, float vz)
264+ void fillCorrFt0aGlobalIts (TTarget target, TTriggers const & triggers, TFT0s const & ft0, bool mixing, float vz)
257265 {
266+ int count = 0 ;
258267 int fSampleIndex = gRandom ->Uniform (0 , cfgSampleSize);
259268 if (!mixing)
260- histos.fill (HIST (" SE/hMult_used" ), triggers.size ());
269+ histos.fill (HIST (" Ft0aGlobal/ SE/hMult_used" ), triggers.size ());
261270 for (auto const & triggerTrack : triggers) {
271+ count++;
272+ if (count >= 5 ) break ;
262273 if (!mixing)
263- histos.fill (HIST (" SE/Trig_hist" ), fSampleIndex , vz, triggerTrack.pt ());
274+ histos.fill (HIST (" Ft0aGlobal/ SE/Trig_hist" ), fSampleIndex , vz, triggerTrack.pt ());
264275
265276 auto offsetFT0Ax = (*offsetFT0)[0 ].getX ();
266277 auto offsetFT0Ay = (*offsetFT0)[0 ].getY ();
@@ -271,34 +282,34 @@ struct LongrangeCorrelation {
271282 if (ampl <= 0 )
272283 continue ;
273284 if (mixing)
274- histos.fill (HIST (" ME/FT0Amp" ), chanelid, ampl);
285+ histos.fill (HIST (" Ft0aGlobal/ ME/FT0Amp" ), chanelid, ampl);
275286 else
276- histos.fill (HIST (" SE/FT0Amp" ), chanelid, ampl);
287+ histos.fill (HIST (" Ft0aGlobal/ SE/FT0Amp" ), chanelid, ampl);
277288
278289 auto phiA = getPhiFT0 (chanelid, offsetFT0Ax, offsetFT0Ay);
279290 auto etaA = getEtaFT0 (chanelid, offsetFT0Ax, offsetFT0Ay, offsetFT0Az);
280291
281292 if (mixing) {
282- histos.fill (HIST (" ME/FT0Aeta" ), etaA);
283- histos.fill (HIST (" ME/FT0Aphi" ), phiA);
284- histos.fill (HIST (" ME/FT0Aetavsphi" ), phiA, etaA);
293+ histos.fill (HIST (" Ft0aGlobal/ ME/FT0Aeta" ), etaA);
294+ histos.fill (HIST (" Ft0aGlobal/ ME/FT0Aphi" ), phiA);
295+ histos.fill (HIST (" Ft0aGlobal/ ME/FT0Aetavsphi" ), phiA, etaA);
285296 } else {
286- histos.fill (HIST (" SE/FT0Aeta" ), etaA);
287- histos.fill (HIST (" SE/FT0Aphi" ), phiA);
288- histos.fill (HIST (" SE/FT0Aetavsphi" ), phiA, etaA);
297+ histos.fill (HIST (" Ft0aGlobal/ SE/FT0Aeta" ), etaA);
298+ histos.fill (HIST (" Ft0aGlobal/ SE/FT0Aphi" ), phiA);
299+ histos.fill (HIST (" Ft0aGlobal/ SE/FT0Aetavsphi" ), phiA, etaA);
289300 }
290301 float deltaPhi = RecoDecay::constrainAngle (triggerTrack.phi () - phiA, -PIHalf);
291302 float deltaEta = triggerTrack.eta () - etaA;
292303 if (mixing)
293- histos.fill (HIST (" ME/deltaEta_deltaPhi" ), deltaPhi, deltaEta);
304+ histos.fill (HIST (" Ft0aGlobal/ ME/deltaEta_deltaPhi" ), deltaPhi, deltaEta);
294305 else
295- histos.fill (HIST (" SE/deltaEta_deltaPhi" ), deltaPhi, deltaEta);
306+ histos.fill (HIST (" Ft0aGlobal/ SE/deltaEta_deltaPhi" ), deltaPhi, deltaEta);
296307 target->getPairHist ()->Fill (step, fSampleIndex , vz, triggerTrack.pt (), triggerTrack.pt (), deltaPhi, deltaEta);
297308 } // associated ft0 tracks
298309 } // trigger tracks
299- } // fillCorrelation
310+ } // fillCorrFt0aGlobalIts
300311
301- void processSE (CollTable::iterator const & col, aod::FT0s const &, TrksTable const & tracks)
312+ void processFt0aGlobalItsSE (CollTable::iterator const & col, aod::FT0s const &, TrksTable const & tracks)
302313 {
303314 if (!isEventSelected (col)) {
304315 return ;
@@ -309,11 +320,11 @@ struct LongrangeCorrelation {
309320 if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
310321 return ;
311322 }
312- fillCorrelation <CorrelationContainer::kCFStepReconstructed >(same , tracks, ft0, false , col.posZ ());
323+ fillCorrFt0aGlobalIts <CorrelationContainer::kCFStepReconstructed >(sameFt0aGlobalIts , tracks, ft0, false , col.posZ ());
313324 }
314325 } // same event
315326
316- void processME (CollTable const & col, aod::FT0s const &, TrksTable const & tracks)
327+ void processFt0aGlobalItsME (CollTable const & col, aod::FT0s const &, TrksTable const & tracks)
317328 {
318329 auto getTracksSize = [&tracks, this ](CollTable::iterator const & collision) {
319330 auto associatedTracks = tracks.sliceByCached (o2::aod::track::collisionId, collision.globalIndex (), this ->cache );
@@ -338,13 +349,13 @@ struct LongrangeCorrelation {
338349 if (slicedTriggerTracks.size () < cfgMinMult || slicedTriggerTracks.size () >= cfgMaxMult) {
339350 continue ;
340351 }
341- fillCorrelation <CorrelationContainer::kCFStepReconstructed >(mixed , slicedTriggerTracks, ft0, true , col1.posZ ());
352+ fillCorrFt0aGlobalIts <CorrelationContainer::kCFStepReconstructed >(mixedFt0aGlobalIts , slicedTriggerTracks, ft0, true , col1.posZ ());
342353 }
343354 }
344355 } // mixed event
345356
346- PROCESS_SWITCH (LongrangeCorrelation, processSE , " process same event" , false );
347- PROCESS_SWITCH (LongrangeCorrelation, processME , " process mixed event" , false );
357+ PROCESS_SWITCH (LongrangeCorrelation, processFt0aGlobalItsSE , " process same event" , false );
358+ PROCESS_SWITCH (LongrangeCorrelation, processFt0aGlobalItsME , " process mixed event" , false );
348359};
349360
350361WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments