3737#include < TProfile.h>
3838#include < TRandom3.h>
3939#include < TPDGCode.h>
40+ #include < TF1.h>
4041
4142using namespace o2 ;
4243using namespace o2 ::framework;
@@ -57,6 +58,8 @@ struct FlowPtEfficiency {
5758 O2_DEFINE_CONFIGURABLE (cfgCutITSclu, float , 5 .0f , " minimum ITS clusters" )
5859 O2_DEFINE_CONFIGURABLE (cfgCutTPCcrossedrows, float , 70 .0f , " minimum TPC crossed rows" )
5960 O2_DEFINE_CONFIGURABLE (cfgCutDCAxy, float , 0 .2f , " DCAxy cut for tracks" )
61+ O2_DEFINE_CONFIGURABLE (cfgDCAxyNSigma, float , 7 , " Cut on number of sigma deviations from expected DCA in the transverse direction" );
62+ O2_DEFINE_CONFIGURABLE (cfgDCAxyFunction, std::string, " (0.0015+0.005/(x^1.1))" , " Functional form of pt-dependent DCAxy cut" );
6063 O2_DEFINE_CONFIGURABLE (cfgCutDCAz, float , 2 .0f , " DCAz cut for tracks" )
6164 O2_DEFINE_CONFIGURABLE (cfgCutDCAxyppPass3Enabled, bool , false , " switch of ppPass3 DCAxy pt dependent cut" )
6265 O2_DEFINE_CONFIGURABLE (cfgCutDCAzPtDepEnabled, bool , false , " switch of DCAz pt dependent cut" )
@@ -128,6 +131,7 @@ struct FlowPtEfficiency {
128131 std::vector<GFW::CorrConfig> corrconfigsTruth;
129132 std::vector<GFW::CorrConfig> corrconfigsReco;
130133 TRandom3* fRndm = new TRandom3(0 );
134+ TF1* fPtDepDCAxy = nullptr ;
131135
132136 bool isStable (int pdg)
133137 {
@@ -230,7 +234,16 @@ struct FlowPtEfficiency {
230234 if (cfgCutDCAxyppPass3Enabled) {
231235 myTrackSel.SetMaxDcaXYPtDep ([](float pt) { return 0 .004f + 0 .013f / pt; });
232236 } else {
233- myTrackSel.SetMaxDcaXY (cfgCutDCAxy);
237+ if (cfgCutDCAxy != 0.0 ){
238+ myTrackSel.SetMaxDcaXY (cfgCutDCAxy);
239+ }
240+ else {
241+ fPtDepDCAxy = new TF1 (" ptDepDCAxy" , Form (" [0]*%s" , cfgDCAxyFunction->c_str ()), 0.001 , 100 );
242+ fPtDepDCAxy ->SetParameter (0 , cfgDCAxyNSigma);
243+ LOGF (info, " DCAxy pt-dependence function: %s" , Form (" [0]*%s" , cfgDCAxyFunction->c_str ()));
244+ myTrackSel.SetMaxDcaXYPtDep ([fPtDepDCAxy = this ->fPtDepDCAxy ](float pt) { return fPtDepDCAxy ->Eval (pt); });
245+ }
246+
234247 }
235248 myTrackSel.SetMinNClustersTPC (cfgCutTPCclu);
236249 myTrackSel.SetMinNCrossedRowsTPC (cfgCutTPCcrossedrows);
0 commit comments