Skip to content

Commit 7ee28fc

Browse files
authored
pT-dependent DCAz cut added
1 parent fdfcf77 commit 7ee28fc

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

PWGCF/Flow/Tasks/flowMc.cxx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ struct FlowMc {
8989
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunction, std::string, "(0.0015+0.005/(x^1.1))", "Functional form of pt-dependent DCAxy cut");
9090
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "DCAz cut for tracks")
9191
O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut")
92+
O2_DEFINE_CONFIGURABLE(cfgDCAzFunction, std::string, "(0.0015+0.005/(x^1.1))", "Functional form of pt-dependent DCAz cut");
93+
O2_DEFINE_CONFIGURABLE(cfgDCAzNSigma, float, 7, "Cut on number of sigma deviations from expected DCA in the z direction");
9294
O2_DEFINE_CONFIGURABLE(cfgEnableITSCuts, bool, true, "switch of enabling ITS based track selection cuts")
9395
O2_DEFINE_CONFIGURABLE(cfgTrkSelRun3ITSMatch, bool, false, "GlobalTrackRun3ITSMatching::Run3ITSall7Layers selection")
9496
O2_DEFINE_CONFIGURABLE(cfgFlowAcceptance, std::string, "", "CCDB path to acceptance object")
@@ -137,6 +139,7 @@ struct FlowMc {
137139
// Additional filters for tracks
138140
TrackSelection myTrackSel;
139141
TF1* fPtDepDCAxy = nullptr;
142+
TF1* fPtDepDCAz = nullptr;
140143

141144
// Cent vs IP
142145
TH1D* mCentVsIPTruth = nullptr;
@@ -310,9 +313,14 @@ struct FlowMc {
310313
myTrackSel.SetMinNCrossedRowsTPC(cfgCutTPCcrossedrows);
311314
if (cfgEnableITSCuts)
312315
myTrackSel.SetMinNClustersITS(cfgCutITSclu);
313-
if (!cfgCutDCAzPtDepEnabled)
316+
if (!cfgCutDCAzPtDepEnabled){
314317
myTrackSel.SetMaxDcaZ(cfgCutDCAz);
315-
318+
}
319+
else{
320+
fPtDepDCAz = new TF1("ptDepDCAxy", Form("[0]*%s", cfgDCAzFunction->c_str()), 0.001, 100);
321+
fPtDepDCAz->SetParameter(0, cfgDCAzNSigma);
322+
LOGF(info, "DCAz pt-dependence function: %s", Form("[0]*%s", cfgDCAzFunction->c_str()));
323+
}
316324
if (cfgTrackDensityCorrUse) {
317325
std::vector<double> pTEffBins = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.4, 1.8, 2.2, 2.6, 3.0};
318326
hFindPtBin = new TH1D("hFindPtBin", "hFindPtBin", pTEffBins.size() - 1, &pTEffBins[0]);
@@ -472,7 +480,7 @@ struct FlowMc {
472480
template <typename TTrack>
473481
bool trackSelected(TTrack track)
474482
{
475-
if (cfgCutDCAzPtDepEnabled && (track.dcaZ() > (0.004f + 0.013f / track.pt()))) {
483+
if (cfgCutDCAzPtDepEnabled && (fabs(track.dcaZ()) > fPtDepDCAz->Eval(track.pt()))) {
476484
return false;
477485
}
478486
return myTrackSel.IsSelected(track);
@@ -766,4 +774,4 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
766774
{
767775
return WorkflowSpec{
768776
adaptAnalysisTask<FlowMc>(cfgc)};
769-
}
777+
}

0 commit comments

Comments
 (0)