@@ -75,6 +75,19 @@ static constexpr TrackSelectionFlags::flagtype TrackSelectionDca =
7575static constexpr TrackSelectionFlags::flagtype TrackSelectionDcaxyOnly =
7676 TrackSelectionFlags::kDCAxy ;
7777
78+ enum KindOfEvntType {
79+ kSE ,
80+ kME
81+ };
82+
83+ enum KindOfCorrType {
84+ kFT0AGLOBAL ,
85+ kFT0CGLOBAL ,
86+ kFV0GLOBAL ,
87+ kMFTGLOBAL ,
88+ kFV0MFT
89+ };
90+
7891static constexpr std::string_view kCorrType [] = {" Ft0aGlobal/" , " Ft0cGlobal/" , " Fv0Global/" , " MftGlobal/" , " Fv0Mft/" };
7992static constexpr std::string_view kEvntType [] = {" SE/" , " ME/" };
8093
@@ -107,6 +120,8 @@ struct LongrangeCorrelation {
107120 Configurable<int > cfigMftCluster{" cfigMftCluster" , 5 , " cut on MFT Cluster" };
108121 Configurable<double > cfgSampleSize{" cfgSampleSize" , 10 , " Sample size for mixed event" };
109122 Configurable<bool > isApplySameBunchPileup{" isApplySameBunchPileup" , false , " Enable SameBunchPileup cut" };
123+ Configurable<bool > isApplyGoodZvtxFT0vsPV{" isApplyGoodZvtxFT0vsPV" , false , " Enable GoodZvtxFT0vsPV cut" };
124+ Configurable<bool > isReadoutCenter{" isReadoutCenter" , false , " Enable Readout Center" };
110125 ConfigurableAxis axisDeltaPhi{" axisDeltaPhi" , {72 , -PIHalf, PIHalf * 3 }, " delta phi axis for histograms" };
111126 ConfigurableAxis axisDeltaEta{" axisDeltaEta" , {40 , -6 , -2 }, " delta eta axis for histograms" };
112127 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" };
@@ -145,7 +160,7 @@ struct LongrangeCorrelation {
145160 OutputObj<CorrelationContainer> sameFv0Mft{Form (" sameEventFv0Mft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
146161 OutputObj<CorrelationContainer> mixedFv0Mft{Form (" mixedEventFv0Mft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult))};
147162
148- template <int corrType, int evntType>
163+ template <KindOfCorrType corrType, KindOfEvntType evntType>
149164 void addHistos ()
150165 {
151166 histos.add (Form (" %s%shMult" , kCorrType [corrType].data (), kEvntType [evntType].data ()), " " , kTH1D , {axisMultiplicity});
@@ -200,40 +215,41 @@ struct LongrangeCorrelation {
200215 x->SetBinLabel (1 , " All events" );
201216 x->SetBinLabel (2 , " sel8" );
202217 x->SetBinLabel (3 , " kNoSameBunchPileup" ); // reject collisions in case of pileup with another collision in the same foundBC
203- x->SetBinLabel (4 , " |vz|<10" );
218+ x->SetBinLabel (4 , " kIsGoodZvtxFT0vsPV" ); // small difference between z-vertex from PV and from FT0
219+ x->SetBinLabel (5 , " |vz|<10" );
204220 }
205221
206222 if (doprocessFt0aGlobalSE || doprocessFt0aGlobalME) {
207- addHistos<0 , 0 >();
208- addHistos<0 , 1 >();
223+ addHistos<kFT0AGLOBAL , kSE >();
224+ addHistos<kFT0AGLOBAL , kME >();
209225 sameFt0aGlobal.setObject (new CorrelationContainer (Form (" sameEventFt0aGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFt0aGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
210226 mixedFt0aGlobal.setObject (new CorrelationContainer (Form (" mixedEventFt0aGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFt0aGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
211227 }
212228
213229 if (doprocessFt0cGlobalSE || doprocessFt0cGlobalME) {
214- addHistos<1 , 0 >();
215- addHistos<1 , 1 >();
230+ addHistos<kFT0CGLOBAL , kSE >();
231+ addHistos<kFT0CGLOBAL , kME >();
216232 sameFt0cGlobal.setObject (new CorrelationContainer (Form (" sameEventFt0cGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFt0cGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
217233 mixedFt0cGlobal.setObject (new CorrelationContainer (Form (" mixedEventFt0cGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFt0cGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
218234 }
219235
220236 if (doprocessFv0GlobalSE || doprocessFv0GlobalME) {
221- addHistos<2 , 0 >();
222- addHistos<2 , 1 >();
237+ addHistos<kFV0GLOBAL , kSE >();
238+ addHistos<kFV0GLOBAL , kME >();
223239 sameFv0Global.setObject (new CorrelationContainer (Form (" sameEventFv0Global_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFv0Global_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
224240 mixedFv0Global.setObject (new CorrelationContainer (Form (" mixedEventFv0Global_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFv0Global_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
225241 }
226242
227243 if (doprocessMftGlobalSE || doprocessMftGlobalME) {
228- addHistos<3 , 0 >();
229- addHistos<3 , 1 >();
244+ addHistos<kMFTGLOBAL , kSE >();
245+ addHistos<kMFTGLOBAL , kME >();
230246 sameMftGlobal.setObject (new CorrelationContainer (Form (" sameEventMftGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventMftGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
231247 mixedMftGlobal.setObject (new CorrelationContainer (Form (" mixedEventMftGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventMftGlobal_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
232248 }
233249
234250 if (doprocessFv0MftSE || doprocessFv0MftME) {
235- addHistos<4 , 0 >();
236- addHistos<4 , 1 >();
251+ addHistos<kFV0MFT , kSE >();
252+ addHistos<kFV0MFT , kME >();
237253 sameFv0Mft.setObject (new CorrelationContainer (Form (" sameEventFv0Mft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" sameEventFv0Mft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
238254 mixedFv0Mft.setObject (new CorrelationContainer (Form (" mixedEventFv0Mft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), Form (" mixedEventFv0Mft_%i_%i" , static_cast <int >(cfgMinMult), static_cast <int >(cfgMaxMult)), corrAxis, effAxis, userAxis));
239255 }
@@ -252,14 +268,14 @@ struct LongrangeCorrelation {
252268 Filter fMftTrackColID = (aod::fwdtrack::bestCollisionId >= 0 );
253269 Filter fMftTrackDca = (nabs(aod::fwdtrack::bestDCAXY) < cfigMftDcaxy);
254270
255- double getPhiFT0 (int chno, int i)
271+ double getPhiFT0 (UInt_t chno, int i)
256272 {
257273 ft0Det.calculateChannelCenter ();
258274 auto chPos = ft0Det.getChannelCenter (chno);
259275 return RecoDecay::phi (chPos.X () + (*offsetFT0)[i].getX (), chPos.Y () + (*offsetFT0)[i].getY ());
260276 }
261277
262- double getPhiFV0 (int chno)
278+ double getPhiFV0 (UInt_t chno)
263279 {
264280 int cellsInLeft[] = {0 , 1 , 2 , 3 , 8 , 9 , 10 , 11 , 16 , 17 , 18 , 19 , 24 , 25 , 26 , 27 , 32 , 40 , 33 , 41 , 34 , 42 , 35 , 43 };
265281 bool isChnoInLeft = std::find (std::begin (cellsInLeft), std::end (cellsInLeft), chno) != std::end (cellsInLeft);
@@ -272,11 +288,15 @@ struct LongrangeCorrelation {
272288 offsetY = (*offsetFV0)[1 ].getY ();
273289 }
274290
275- auto chPos = fv0Det->getReadoutCenter (chno);
291+ o2::fv0::Point3Dsimple chPos;
292+ if (isReadoutCenter)
293+ chPos = fv0Det->getReadoutCenter (chno);
294+ else
295+ chPos = fv0Det->getCellCenter (chno);
276296 return RecoDecay::phi (chPos.x + offsetX, chPos.y + offsetY);
277297 }
278298
279- double getEtaFT0 (int chno, int i)
299+ double getEtaFT0 (UInt_t chno, int i)
280300 {
281301 ft0Det.calculateChannelCenter ();
282302 auto chPos = ft0Det.getChannelCenter (chno);
@@ -288,7 +308,7 @@ struct LongrangeCorrelation {
288308 return -std::log (std::tan (0.5 * theta));
289309 }
290310
291- double getEtaFV0 (int chno)
311+ double getEtaFV0 (UInt_t chno)
292312 {
293313 int cellsInLeft[] = {0 , 1 , 2 , 3 , 8 , 9 , 10 , 11 , 16 , 17 , 18 , 19 , 24 , 25 , 26 , 27 , 32 , 40 , 33 , 41 , 34 , 42 , 35 , 43 };
294314 bool isChnoInLeft = std::find (std::begin (cellsInLeft), std::end (cellsInLeft), chno) != std::end (cellsInLeft);
@@ -303,7 +323,12 @@ struct LongrangeCorrelation {
303323 offsetZ = (*offsetFV0)[1 ].getZ ();
304324 }
305325
306- auto chPos = fv0Det->getReadoutCenter (chno);
326+ o2::fv0::Point3Dsimple chPos;
327+ if (isReadoutCenter)
328+ chPos = fv0Det->getReadoutCenter (chno);
329+ else
330+ chPos = fv0Det->getCellCenter (chno);
331+
307332 auto x = chPos.x + offsetX;
308333 auto y = chPos.y + offsetY;
309334 auto z = chPos.z + offsetZ;
@@ -321,6 +346,9 @@ struct LongrangeCorrelation {
321346 if (isApplySameBunchPileup && !col.selection_bit (o2::aod::evsel::kNoSameBunchPileup )) {
322347 return false ;
323348 }
349+ if (isApplyGoodZvtxFT0vsPV && !col.selection_bit (o2::aod::evsel::kIsGoodZvtxFT0vsPV )) {
350+ return false ;
351+ }
324352 if (std::abs (col.posZ ()) >= cfgVtxCut) {
325353 return false ;
326354 }
@@ -336,7 +364,7 @@ struct LongrangeCorrelation {
336364 return true ;
337365 }
338366
339- template <int corrType, int evntType, typename TTracks>
367+ template <KindOfCorrType corrType, KindOfEvntType evntType, typename TTracks>
340368 void fillYield (TTracks tracks)
341369 {
342370 if (evntType == 1 ) {
@@ -371,8 +399,7 @@ struct LongrangeCorrelation {
371399 for (std::size_t iCh = 0 ; iCh < ft0.channelA ().size (); iCh++) {
372400 auto chanelid = ft0.channelA ()[iCh];
373401 float ampl = ft0.amplitudeA ()[iCh];
374- if (ampl <= 0 )
375- continue ;
402+
376403 if (mixing)
377404 histos.fill (HIST (" Ft0aGlobal/ME/Assoc_amp" ), chanelid, ampl);
378405 else
@@ -414,8 +441,7 @@ struct LongrangeCorrelation {
414441 for (std::size_t iCh = 0 ; iCh < ft0.channelC ().size (); iCh++) {
415442 auto chanelid = ft0.channelC ()[iCh];
416443 float ampl = ft0.amplitudeC ()[iCh];
417- if (ampl <= 0 )
418- continue ;
444+
419445 if (mixing)
420446 histos.fill (HIST (" Ft0cGlobal/ME/Assoc_amp" ), chanelid, ampl);
421447 else
@@ -493,8 +519,7 @@ struct LongrangeCorrelation {
493519 for (std::size_t iCh = 0 ; iCh < fv0.channel ().size (); iCh++) {
494520 auto chanelid = fv0.channel ()[iCh];
495521 float ampl = fv0.amplitude ()[iCh];
496- if (ampl <= 0 )
497- continue ;
522+
498523 if (mixing)
499524 histos.fill (HIST (" Fv0Global/ME/Assoc_amp" ), chanelid, ampl);
500525 else
@@ -542,8 +567,7 @@ struct LongrangeCorrelation {
542567 for (std::size_t iCh = 0 ; iCh < fv0.channel ().size (); iCh++) {
543568 auto chanelid = fv0.channel ()[iCh];
544569 float ampl = fv0.amplitude ()[iCh];
545- if (ampl <= 0 )
546- continue ;
570+
547571 if (mixing)
548572 histos.fill (HIST (" Fv0Mft/ME/Assoc_amp" ), chanelid, ampl);
549573 else
@@ -584,10 +608,14 @@ struct LongrangeCorrelation {
584608 return ;
585609 }
586610 histos.fill (HIST (" QA/EventHist" ), 3 );
587- if (std::abs ( col.posZ ()) >= cfgVtxCut ) {
611+ if (isApplyGoodZvtxFT0vsPV && ! col.selection_bit (o2::aod::evsel:: kIsGoodZvtxFT0vsPV ) ) {
588612 return ;
589613 }
590614 histos.fill (HIST (" QA/EventHist" ), 4 );
615+ if (std::abs (col.posZ ()) >= cfgVtxCut) {
616+ return ;
617+ }
618+ histos.fill (HIST (" QA/EventHist" ), 5 );
591619 histos.fill (HIST (" QA/VtxZHist" ), col.posZ ());
592620 }
593621
@@ -597,7 +625,7 @@ struct LongrangeCorrelation {
597625 return ;
598626 }
599627 if (col.has_foundFT0 ()) {
600- fillYield<0 , 0 >(tracks);
628+ fillYield<kFT0AGLOBAL , kSE >(tracks);
601629 const auto & ft0 = col.foundFT0 ();
602630 if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
603631 return ;
@@ -612,7 +640,7 @@ struct LongrangeCorrelation {
612640 return ;
613641 }
614642 if (col.has_foundFT0 ()) {
615- fillYield<1 , 0 >(tracks);
643+ fillYield<kFT0CGLOBAL , kSE >(tracks);
616644 const auto & ft0 = col.foundFT0 ();
617645 if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
618646 return ;
@@ -626,7 +654,7 @@ struct LongrangeCorrelation {
626654 if (!isEventSelected (col)) {
627655 return ;
628656 }
629- fillYield<3 , 0 >(tracks);
657+ fillYield<kMFTGLOBAL , kSE >(tracks);
630658 if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
631659 return ;
632660 }
@@ -639,7 +667,7 @@ struct LongrangeCorrelation {
639667 return ;
640668 }
641669 if (col.has_foundFV0 ()) {
642- fillYield<2 , 0 >(tracks);
670+ fillYield<kFV0GLOBAL , kSE >(tracks);
643671 const auto & fv0 = col.foundFV0 ();
644672 if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
645673 return ;
@@ -654,7 +682,7 @@ struct LongrangeCorrelation {
654682 return ;
655683 }
656684 if (col.has_foundFV0 ()) {
657- fillYield<4 , 0 >(mfttracks);
685+ fillYield<kFV0MFT , kSE >(mfttracks);
658686 const auto & fv0 = col.foundFV0 ();
659687 if (tracks.size () < cfgMinMult || tracks.size () >= cfgMaxMult) {
660688 return ;
@@ -681,7 +709,7 @@ struct LongrangeCorrelation {
681709 }
682710 if (col1.has_foundFT0 () && col2.has_foundFT0 ()) {
683711 auto slicedTriggerTracks = tracks.sliceBy (perColGlobal, col1.globalIndex ());
684- fillYield<0 , 1 >(slicedTriggerTracks);
712+ fillYield<kFT0AGLOBAL , kME >(slicedTriggerTracks);
685713 const auto & ft0 = col2.foundFT0 ();
686714 if (slicedTriggerTracks.size () < cfgMinMult || slicedTriggerTracks.size () >= cfgMaxMult) {
687715 continue ;
@@ -709,7 +737,7 @@ struct LongrangeCorrelation {
709737 }
710738 if (col1.has_foundFT0 () && col2.has_foundFT0 ()) {
711739 auto slicedTriggerTracks = tracks.sliceBy (perColGlobal, col1.globalIndex ());
712- fillYield<1 , 1 >(slicedTriggerTracks);
740+ fillYield<kFT0CGLOBAL , kME >(slicedTriggerTracks);
713741 const auto & ft0 = col2.foundFT0 ();
714742 if (slicedTriggerTracks.size () < cfgMinMult || slicedTriggerTracks.size () >= cfgMaxMult) {
715743 continue ;
@@ -759,7 +787,7 @@ struct LongrangeCorrelation {
759787 }
760788 if (col1.has_foundFV0 () && col2.has_foundFV0 ()) {
761789 auto slicedTriggerTracks = tracks.sliceBy (perColGlobal, col1.globalIndex ());
762- fillYield<2 , 1 >(slicedTriggerTracks);
790+ fillYield<kFV0GLOBAL , kME >(slicedTriggerTracks);
763791 const auto & fv0 = col2.foundFV0 ();
764792 if (slicedTriggerTracks.size () < cfgMinMult || slicedTriggerTracks.size () >= cfgMaxMult) {
765793 continue ;
@@ -788,7 +816,7 @@ struct LongrangeCorrelation {
788816 if (col1.has_foundFV0 () && col2.has_foundFV0 ()) {
789817 auto slicedGlobalTracks = tracks.sliceBy (perColGlobal, col1.globalIndex ());
790818 auto slicedTriggerMftTracks = mfttracks.sliceBy (perColMft, col1.globalIndex ());
791- fillYield<4 , 1 >(slicedTriggerMftTracks);
819+ fillYield<kFV0MFT , kME >(slicedTriggerMftTracks);
792820 const auto & fv0 = col2.foundFV0 ();
793821 if (slicedGlobalTracks.size () < cfgMinMult || slicedGlobalTracks.size () >= cfgMaxMult) {
794822 continue ;
0 commit comments