@@ -73,6 +73,9 @@ struct DiHadronCor {
7373 O2_DEFINE_CONFIGURABLE (cfgCutTPCCrossedRows, float , 70 .0f , " minimum TPC crossed rows" )
7474 O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 5 .0f , " minimum ITS clusters" )
7575 O2_DEFINE_CONFIGURABLE (cfgCutDCAz, float , 2 .0f , " max DCA to vertex z" )
76+ O2_DEFINE_CONFIGURABLE (cfgCutDCAxy, float , -1 .0f , " max DCA to vertex xy, pT dependent in terms of N sigma. -1 for default cut" )
77+ O2_DEFINE_CONFIGURABLE (cfgDCAxyFunc, std::string, " (0.0026+0.005/(x^1.01))" , " Functional form of pt-dependent DCAxy cut" )
78+ TF1 * fPtDepDCAxy = nullptr ;
7679 O2_DEFINE_CONFIGURABLE (cfgCutMerging, float , 0.0 , " Merging cut on track merge" )
7780 O2_DEFINE_CONFIGURABLE (cfgSelCollByNch, bool , true , " Select collisions by Nch or centrality" )
7881 O2_DEFINE_CONFIGURABLE (cfgCutMultMin, int , 0 , " Minimum multiplicity for collision" )
@@ -102,7 +105,7 @@ struct DiHadronCor {
102105 O2_DEFINE_CONFIGURABLE (cfgEfficiency, std::string, " " , " CCDB path to efficiency object" )
103106 O2_DEFINE_CONFIGURABLE (cfgCentralityWeight, std::string, " " , " CCDB path to centrality weight object" )
104107 O2_DEFINE_CONFIGURABLE (cfgLocalEfficiency, bool , false , " Use local efficiency object" )
105- O2_DEFINE_CONFIGURABLE (cfgVerbosity2 , bool , false , " Verbose output" )
108+ O2_DEFINE_CONFIGURABLE (cfgVerbosity , bool , false , " Verbose output" )
106109 O2_DEFINE_CONFIGURABLE (cfgUseEventWeights, bool , false , " Use event weights for mixed event" )
107110 O2_DEFINE_CONFIGURABLE (cfgUsePtOrder, bool , true , " enable trigger pT < associated pT cut" )
108111 O2_DEFINE_CONFIGURABLE (cfgUsePtOrderInMixEvent, bool , true , " enable trigger pT < associated pT cut in mixed event" )
@@ -160,7 +163,7 @@ struct DiHadronCor {
160163
161164 // make the filters and cuts.
162165 Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ);
163- Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t ) true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
166+ Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t )true )) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
164167 using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
165168 using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
166169 using FilteredTracksWithMCLabels = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA, aod::McTrackLabels>>;
@@ -287,6 +290,7 @@ struct DiHadronCor {
287290 registry.add (" zVtx" , " zVtx" , {HistType::kTH1D , {axisVertex}});
288291 registry.add (" zVtx_used" , " zVtx_used" , {HistType::kTH1D , {axisVertex}});
289292 registry.add (" Trig_hist" , " " , {HistType::kTHnSparseF , {{axisSample, axisVertex, axisPtTrigger}}});
293+ registry.add (" hDCAxy" , " DCAxy after cuts; DCAxy (cm); Pt" , {HistType::kTH2D , {{200 , -1 ., 1 .}, {200 , 0 , 5 }}});
290294 }
291295 if (cfgSoloPtTrack && doprocessSame) {
292296 registry.add (" Nch_final_pt" , " pT" , {HistType::kTH1D , {axisPtTrigger}});
@@ -345,6 +349,12 @@ struct DiHadronCor {
345349 same.setObject (new CorrelationContainer (" sameEvent" , " sameEvent" , corrAxis, effAxis, userAxis));
346350 mixed.setObject (new CorrelationContainer (" mixedEvent" , " mixedEvent" , corrAxis, effAxis, userAxis));
347351
352+ if (cfgCutDCAxy > 0 .) {
353+ fPtDepDCAxy = new TF1 (" ptDepDCAxy" , Form (" [0]*%s" , cfgDCAxyFunc->c_str ()), 0.001 , 1000 );
354+ fPtDepDCAxy ->SetParameter (0 , cfgCutDCAxy);
355+ LOGF (info, " DCAxy pt-dependence function: %s" , Form (" %0.1f * %s" , cfgCutDCAxy.value , cfgDCAxyFunc->c_str ()));
356+ }
357+
348358 LOGF (info, " End of init" );
349359 }
350360
@@ -389,6 +399,9 @@ struct DiHadronCor {
389399 template <typename TTrack>
390400 bool trackSelected (TTrack track)
391401 {
402+ if (cfgCutDCAxy > 0 . && (std::fabs (track.dcaXY ()) > fPtDepDCAxy ->Eval (track.pt ())))
403+ return false ;
404+
392405 return ((track.tpcNClsFound () >= cfgCutTPCclu) && (track.tpcNClsCrossedRows () >= cfgCutTPCCrossedRows) && (track.itsNCls () >= cfgCutITSclu));
393406 }
394407
@@ -425,14 +438,14 @@ struct DiHadronCor {
425438 if (mEfficiency == nullptr ) {
426439 LOGF (fatal, " Could not load efficiency histogram for trigger particles from %s" , cfgEfficiency.value .c_str ());
427440 }
428- LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgEfficiency.value .c_str (), ( void *) mEfficiency );
441+ LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgEfficiency.value .c_str (), static_cast < void *>( mEfficiency ) );
429442 }
430443 if (cfgCentralityWeight.value .empty () == false ) {
431444 mCentralityWeight = ccdb->getForTimeStamp <TH1D >(cfgCentralityWeight, timestamp);
432445 if (mCentralityWeight == nullptr ) {
433446 LOGF (fatal, " Could not load efficiency histogram for trigger particles from %s" , cfgCentralityWeight.value .c_str ());
434447 }
435- LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgCentralityWeight.value .c_str (), ( void *) mCentralityWeight );
448+ LOGF (info, " Loaded efficiency histogram from %s (%p)" , cfgCentralityWeight.value .c_str (), static_cast < void *>( mCentralityWeight ) );
436449 }
437450 correctionsLoaded = true ;
438451 }
@@ -544,6 +557,7 @@ struct DiHadronCor {
544557 if (system == SameEvent) {
545558 registry.fill (HIST (" Trig_hist" ), fSampleIndex , posZ, track1.pt (), eventWeight * triggerWeight);
546559 }
560+ registry.fill (HIST (" hDCAxy" ), track1.dcaXY (), track1.pt ());
547561
548562 for (auto const & track2 : tracks2) {
549563
@@ -1107,7 +1121,7 @@ struct DiHadronCor {
11071121 continue ;
11081122
11091123 auto groupedCollisions = collisions.sliceBy (collisionPerMCCollision, collision1.globalIndex ());
1110- if (cfgVerbosity2 > 0 ) {
1124+ if (cfgVerbosity > 0 ) {
11111125 LOGF (info, " Found %d related collisions" , groupedCollisions.size ());
11121126 }
11131127 float cent = -1 ;
0 commit comments