@@ -72,7 +72,9 @@ struct FlowDecorrelation {
7272 O2_DEFINE_CONFIGURABLE (cfgCutTPCCrossedRows, float , 70 .0f , " minimum TPC crossed rows" )
7373 O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 5 .0f , " minimum ITS clusters" )
7474 O2_DEFINE_CONFIGURABLE (cfgCutDCAz, float , 2 .0f , " max DCA to vertex z" )
75- O2_DEFINE_CONFIGURABLE (cfgCutDCAxy, float , 7 .0f , " max DCA to vertex xy" )
75+ O2_DEFINE_CONFIGURABLE (cfgCutDCAxy, float , -1 .0f , " max DCA to vertex xy, pT dependent in terms of N sigma. -1 for default cut" )
76+ O2_DEFINE_CONFIGURABLE (cfgDCAxyFunc, std::string, " (0.0026+0.005/(x^1.01))" , " Functional form of pt-dependent DCAxy cut" )
77+ TF1 * fPtDepDCAxy = nullptr ;
7678 O2_DEFINE_CONFIGURABLE (cfgCutMultMin, int , 0 , " Minimum multiplicity for collision" )
7779 O2_DEFINE_CONFIGURABLE (cfgCutMultMax, int , 10 , " Maximum multiplicity for collision" )
7880 O2_DEFINE_CONFIGURABLE (cfgCutCentMin, float , 60 .0f , " Minimum centrality for collision" )
@@ -181,7 +183,7 @@ struct FlowDecorrelation {
181183 AxisSpec axisChID = {220 , 0 , 220 };
182184 // make the filters and cuts.
183185 Filter collisionFilter = (nabs(aod::collision::posZ) < cfgGeneralCuts.cfgCutVtxZ);
184- Filter trackFilter = (aod::track::pt > cfgGeneralCuts.cfgCutPtMin) && (aod::track::pt < cfgGeneralCuts.cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast <uint8_t >(true ))) && (aod::track::tpcChi2NCl < cfgGeneralCuts.cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgGeneralCuts.cfgCutDCAz) && (nabs(aod::track::dcaXY) < cfgGeneralCuts.cfgCutDCAxy) ;
186+ Filter trackFilter = (aod::track::pt > cfgGeneralCuts.cfgCutPtMin) && (aod::track::pt < cfgGeneralCuts.cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == static_cast <uint8_t >(true ))) && (aod::track::tpcChi2NCl < cfgGeneralCuts.cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgGeneralCuts.cfgCutDCAz);
185187 using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
186188 using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
187189
@@ -200,8 +202,8 @@ struct FlowDecorrelation {
200202 o2::ft0::Geometry ft0Det;
201203 o2::fv0::Geometry* fv0Det{};
202204 static constexpr uint64_t Ft0IndexA = 96 ;
203- std::vector<o2::detectors::AlignParam>* offsetFT0;
204- std::vector<o2::detectors::AlignParam>* offsetFV0;
205+ std::vector<o2::detectors::AlignParam>* offsetFT0{} ;
206+ std::vector<o2::detectors::AlignParam>* offsetFV0{} ;
205207 std::vector<float > cstFT0RelGain{};
206208
207209 // Corrections
@@ -256,9 +258,6 @@ struct FlowDecorrelation {
256258 kFT0COuterRingMin = 144 ,
257259 kFT0COuterRingMax = 207
258260 };
259- std::array<float , 6 > tofNsigmaCut;
260- std::array<float , 6 > itsNsigmaCut;
261- std::array<float , 6 > tpcNsigmaCut;
262261 struct Ft0cCConstants {
263262 double zFt0cDistance = -83.44 ;
264263 double maxWidth = 12 .;
@@ -283,7 +282,6 @@ struct FlowDecorrelation {
283282 LOGF (fatal, " Centrality table is unavailable, cannot select collisions by centrality" );
284283 }
285284 const AxisSpec axisPhi{72 , 0.0 , constants::math::TwoPI, " #varphi" };
286- const AxisSpec axisEta{40 , -1 ., 1 ., " #eta" };
287285 const AxisSpec axisEtaFull{90 , -6 ., 6 ., " #eta" };
288286 const AxisSpec axisCentrality{20 , 0 ., 100 ., " cent" };
289287
@@ -370,6 +368,7 @@ struct FlowDecorrelation {
370368 if (doprocessSameTpcFt0a || doprocessSameTpcFt0c || doprocessSameFt0aFt0c || doprocessSameTpcMft || doprocessSameTpcFv0) {
371369 registry.add (" Phi" , " Phi" , {HistType::kTH1D , {axisPhi}});
372370 registry.add (" Eta" , " Eta" , {HistType::kTH1D , {axisEta}});
371+ registry.add (" hDCAxy" , " DCAxy after cuts; DCAxy (cm); Pt" , {HistType::kTH2D , {{200 , -1 ., 1 .}, {200 , 0 , 5 }}});
373372 registry.add (" EtaCorrected" , " EtaCorrected" , {HistType::kTH1D , {axisEta}});
374373 registry.add (" Nch" , " N_{ch}" , {HistType::kTH1D , {axisMultiplicity}});
375374 registry.add (" Nch_used" , " N_{ch}" , {HistType::kTH1D , {axisMultiplicity}}); // histogram to see how many events are in the same and mixed event
@@ -494,6 +493,13 @@ struct FlowDecorrelation {
494493 same.setObject (new CorrelationContainer (" sameEvent_TPC_FV0" , " sameEvent_TPC_FT0A" , corrAxisTpcFt0a, effAxis, userAxis));
495494 mixed.setObject (new CorrelationContainer (" mixedEvent_TPC_FV0" , " mixedEvent_TPC_FT0A" , corrAxisTpcFt0a, effAxis, userAxis));
496495 }
496+
497+ if (cfgGeneralCuts.cfgCutDCAxy > 0 .) {
498+ cfgGeneralCuts.fPtDepDCAxy = new TF1 (" ptDepDCAxy" , Form (" [0]*%s" , cfgGeneralCuts.cfgDCAxyFunc ->c_str ()), 0.001 , 1000 );
499+ cfgGeneralCuts.fPtDepDCAxy ->SetParameter (0 , cfgGeneralCuts.cfgCutDCAxy );
500+ LOGF (info, " DCAxy pt-dependence function: %s" , Form (" %0.1f * %s" , cfgGeneralCuts.cfgCutDCAxy .value , cfgGeneralCuts.cfgDCAxyFunc ->c_str ()));
501+ }
502+
497503 LOGF (info, " End of init" );
498504 }
499505
@@ -615,6 +621,9 @@ struct FlowDecorrelation {
615621 template <typename TTrack>
616622 bool trackSelected (TTrack track)
617623 {
624+ if (cfgGeneralCuts.cfgCutDCAxy > 0 . && (std::fabs (track.dcaXY ()) > cfgGeneralCuts.fPtDepDCAxy ->Eval (track.pt ())))
625+ return false ;
626+
618627 return ((track.tpcNClsFound () >= cfgGeneralCuts.cfgCutTPCclu ) && (track.tpcNClsCrossedRows () >= cfgGeneralCuts.cfgCutTPCCrossedRows ) && (track.itsNCls () >= cfgGeneralCuts.cfgCutITSclu ));
619628 }
620629
@@ -671,14 +680,14 @@ struct FlowDecorrelation {
671680 if (mEfficiency == nullptr ) {
672681 LOGF (fatal, " Could not load efficiency histogram for trigger particles from %s" , cfgEfficiency.value .c_str ());
673682 }
674- LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgEfficiency.value .c_str (), ( void *) mEfficiency );
683+ LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgEfficiency.value .c_str (), static_cast < void *>( mEfficiency ) );
675684 }
676685 if (cfgCentralityWeight.value .empty () == false ) {
677686 mCentralityWeight = ccdb->getForTimeStamp <TH1D >(cfgCentralityWeight, timestamp);
678687 if (mCentralityWeight == nullptr ) {
679688 LOGF (fatal, " Could not load efficiency histogram for trigger particles from %s" , cfgCentralityWeight.value .c_str ());
680689 }
681- LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgCentralityWeight.value .c_str (), ( void *) mCentralityWeight );
690+ LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgCentralityWeight.value .c_str (), static_cast < void *>( mCentralityWeight ) );
682691 }
683692 correctionsLoaded = true ;
684693 }
@@ -788,6 +797,7 @@ struct FlowDecorrelation {
788797 if (cfgDrawEtaPhiDis && corType == kFT0A )
789798 registry.fill (HIST (" EtaPhi" ), track1.eta (), track1.phi (), eventWeight * triggerWeight);
790799 }
800+ registry.fill (HIST (" hDCAxy" ), track1.dcaXY (), track1.pt ());
791801
792802 std::size_t channelSize = 0 ;
793803 if (corType == kFT0A )
@@ -920,6 +930,7 @@ struct FlowDecorrelation {
920930 if (system == SameEvent) {
921931 registry.fill (HIST (" Trig_hist_TPC_FV0" ), fSampleIndex , posZ, track1.eta (), eventWeight * triggerWeight);
922932 }
933+ registry.fill (HIST (" hDCAxy" ), track1.dcaXY (), track1.pt ());
923934
924935 std::size_t channelSize = 0 ;
925936 channelSize = fv0.channel ().size ();
@@ -1093,8 +1104,6 @@ struct FlowDecorrelation {
10931104 if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY ) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY )) {
10941105 return true ;
10951106 }
1096- }
1097- if (x < (Ft0aLocations.blockFar + Ft0aLocations.offSetX ) && x > (Ft0aLocations.blockClose + Ft0aLocations.offSetX )) {
10981107 if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY ) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY )) {
10991108 return true ;
11001109 }
@@ -1104,8 +1113,6 @@ struct FlowDecorrelation {
11041113 if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY ) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY )) {
11051114 return true ;
11061115 }
1107- }
1108- if (x > (-Ft0aLocations.blockFar + Ft0aLocations.offSetX ) && x < (-Ft0aLocations.blockClose + Ft0aLocations.offSetX )) {
11091116 if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY ) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY )) {
11101117 return true ;
11111118 }
@@ -1115,9 +1122,6 @@ struct FlowDecorrelation {
11151122 if (y > (-Ft0aLocations.blockFar + Ft0aLocations.offSetY - Ft0aLocations.rectOffSet ) && y < (-Ft0aLocations.blockClose + Ft0aLocations.offSetY - Ft0aLocations.rectOffSet )) {
11161123 return true ;
11171124 }
1118- }
1119-
1120- if (x < (Ft0aLocations.blockClose + Ft0aLocations.offSetX ) && x > (-Ft0aLocations.blockClose + Ft0aLocations.offSetX )) {
11211125 if (y < (Ft0aLocations.blockFar + Ft0aLocations.offSetY + Ft0aLocations.rectOffSet ) && y > (Ft0aLocations.blockClose + Ft0aLocations.offSetY + Ft0aLocations.rectOffSet )) {
11221126 return true ;
11231127 }
@@ -1127,13 +1131,11 @@ struct FlowDecorrelation {
11271131 if (x > (-Ft0aLocations.blockFar + Ft0aLocations.offSetX - Ft0aLocations.rectOffSet ) && x < (-Ft0aLocations.blockClose + Ft0aLocations.offSetX - Ft0aLocations.rectOffSet )) {
11281132 return true ;
11291133 }
1130- }
1131-
1132- if (y < (Ft0aLocations.blockClose + Ft0aLocations.offSetY ) && y > (-Ft0aLocations.blockClose + Ft0aLocations.offSetY )) {
11331134 if (x < (Ft0aLocations.blockFar + Ft0aLocations.offSetX + Ft0aLocations.rectOffSet ) && x > (Ft0aLocations.blockClose + Ft0aLocations.offSetX + Ft0aLocations.rectOffSet )) {
11341135 return true ;
11351136 }
11361137 }
1138+
11371139 return false ;
11381140 }
11391141
@@ -1474,6 +1476,7 @@ struct FlowDecorrelation {
14741476 if (system == SameEvent) {
14751477 registry.fill (HIST (" Trig_hist_TPC_MFT" ), fSampleIndex , posZ, track1.pt (), eventWeight * triggerWeight);
14761478 }
1479+ registry.fill (HIST (" hDCAxy" ), track1.dcaXY (), track1.pt ());
14771480
14781481 for (auto const & track2 : tracks2) {
14791482
0 commit comments