Skip to content

Commit afa21ee

Browse files
authored
[PWGCF] add dcaxy pt-dep (#12222)
1 parent 6525fe3 commit afa21ee

File tree

2 files changed

+43
-20
lines changed

2 files changed

+43
-20
lines changed

PWGCF/Flow/Tasks/flowPtEfficiency.cxx

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,32 @@
1414
/// \since Jun/08/2023
1515
/// \brief a task to calculate the pt efficiency
1616

17-
#include <CCDB/BasicCCDBManager.h>
18-
#include <vector>
19-
#include <string>
20-
#include "Framework/runDataProcessing.h"
21-
#include "Framework/AnalysisTask.h"
22-
#include "Framework/ASoAHelpers.h"
23-
#include "Framework/RunningWorkflowInfo.h"
24-
#include "Framework/HistogramRegistry.h"
17+
#include "FlowContainer.h"
18+
#include "GFW.h"
19+
#include "GFWCumulant.h"
20+
#include "GFWPowerArray.h"
21+
#include "GFWWeights.h"
2522

2623
#include "Common/Core/RecoDecay.h"
27-
#include "Common/DataModel/EventSelection.h"
2824
#include "Common/Core/TrackSelection.h"
2925
#include "Common/Core/TrackSelectionDefaults.h"
26+
#include "Common/DataModel/EventSelection.h"
3027
#include "Common/DataModel/TrackSelectionTables.h"
3128

32-
#include "GFWPowerArray.h"
33-
#include "GFW.h"
34-
#include "GFWCumulant.h"
35-
#include "GFWWeights.h"
36-
#include "FlowContainer.h"
29+
#include "Framework/ASoAHelpers.h"
30+
#include "Framework/AnalysisTask.h"
31+
#include "Framework/HistogramRegistry.h"
32+
#include "Framework/RunningWorkflowInfo.h"
33+
#include "Framework/runDataProcessing.h"
34+
#include <CCDB/BasicCCDBManager.h>
35+
36+
#include <TF1.h>
37+
#include <TPDGCode.h>
3738
#include <TProfile.h>
3839
#include <TRandom3.h>
39-
#include <TPDGCode.h>
40+
41+
#include <string>
42+
#include <vector>
4043

4144
using namespace o2;
4245
using namespace o2::framework;
@@ -57,6 +60,8 @@ struct FlowPtEfficiency {
5760
O2_DEFINE_CONFIGURABLE(cfgCutITSclu, float, 5.0f, "minimum ITS clusters")
5861
O2_DEFINE_CONFIGURABLE(cfgCutTPCcrossedrows, float, 70.0f, "minimum TPC crossed rows")
5962
O2_DEFINE_CONFIGURABLE(cfgCutDCAxy, float, 0.2f, "DCAxy cut for tracks")
63+
O2_DEFINE_CONFIGURABLE(cfgDCAxyNSigma, float, 7, "Cut on number of sigma deviations from expected DCA in the transverse direction");
64+
O2_DEFINE_CONFIGURABLE(cfgDCAxyFunction, std::string, "(0.0015+0.005/(x^1.1))", "Functional form of pt-dependent DCAxy cut");
6065
O2_DEFINE_CONFIGURABLE(cfgCutDCAz, float, 2.0f, "DCAz cut for tracks")
6166
O2_DEFINE_CONFIGURABLE(cfgCutDCAxyppPass3Enabled, bool, false, "switch of ppPass3 DCAxy pt dependent cut")
6267
O2_DEFINE_CONFIGURABLE(cfgCutDCAzPtDepEnabled, bool, false, "switch of DCAz pt dependent cut")
@@ -128,6 +133,7 @@ struct FlowPtEfficiency {
128133
std::vector<GFW::CorrConfig> corrconfigsTruth;
129134
std::vector<GFW::CorrConfig> corrconfigsReco;
130135
TRandom3* fRndm = new TRandom3(0);
136+
TF1* fPtDepDCAxy = nullptr;
131137

132138
bool isStable(int pdg)
133139
{
@@ -230,7 +236,14 @@ struct FlowPtEfficiency {
230236
if (cfgCutDCAxyppPass3Enabled) {
231237
myTrackSel.SetMaxDcaXYPtDep([](float pt) { return 0.004f + 0.013f / pt; });
232238
} else {
233-
myTrackSel.SetMaxDcaXY(cfgCutDCAxy);
239+
if (cfgCutDCAxy != 0.0) {
240+
myTrackSel.SetMaxDcaXY(cfgCutDCAxy);
241+
} else {
242+
fPtDepDCAxy = new TF1("ptDepDCAxy", Form("[0]*%s", cfgDCAxyFunction->c_str()), 0.001, 100);
243+
fPtDepDCAxy->SetParameter(0, cfgDCAxyNSigma);
244+
LOGF(info, "DCAxy pt-dependence function: %s", Form("[0]*%s", cfgDCAxyFunction->c_str()));
245+
myTrackSel.SetMaxDcaXYPtDep([fPtDepDCAxy = this->fPtDepDCAxy](float pt) { return fPtDepDCAxy->Eval(pt); });
246+
}
234247
}
235248
myTrackSel.SetMinNClustersTPC(cfgCutTPCclu);
236249
myTrackSel.SetMinNCrossedRowsTPC(cfgCutTPCcrossedrows);

PWGCF/GenericFramework/Tasks/flowGfwLightIons.cxx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ GFWRegions regions;
7878
GFWCorrConfigs configs;
7979
std::vector<double> multGlobalCorrCutPars;
8080
std::vector<double> multPVCorrCutPars;
81+
std::vector<double> multGlobalPVCorrCutPars;
8182
std::vector<int> firstRunsOfFill;
8283
} // namespace o2::analysis::gfw
8384

@@ -127,10 +128,12 @@ struct FlowGfwLightIons {
127128
O2_DEFINE_CONFIGURABLE(cfgUseDensityDependentCorrection, bool, false, "Use density dependent efficiency correction based on Run 2 measurements");
128129
Configurable<std::vector<double>> cfgTrackDensityP0{"cfgTrackDensityP0", std::vector<double>{0.7217476707, 0.7384792571, 0.7542625668, 0.7640680200, 0.7701951667, 0.7755299053, 0.7805901710, 0.7849446786, 0.7957356586, 0.8113039262, 0.8211968966, 0.8280558878, 0.8329342135}, "parameter 0 for track density efficiency correction"};
129130
Configurable<std::vector<double>> cfgTrackDensityP1{"cfgTrackDensityP1", std::vector<double>{-2.169488e-05, -2.191913e-05, -2.295484e-05, -2.556538e-05, -2.754463e-05, -2.816832e-05, -2.846502e-05, -2.843857e-05, -2.705974e-05, -2.477018e-05, -2.321730e-05, -2.203315e-05, -2.109474e-05}, "parameter 1 for track density efficiency correction"};
130-
Configurable<std::vector<double>> cfgMultGlobalCutPars{"cfgMultGlobalCutPars", std::vector<double>{2272.16, -76.6932, 1.01204, -0.00631545, 1.59868e-05, 136.336, -4.97006, 0.121199, -0.0015921, 7.66197e-06}, "Global multiplicity cut parameter values"};
131-
Configurable<std::vector<double>> cfgMultPVCutPars{"cfgMultPVCutPars", std::vector<double>{3074.43, -106.192, 1.46176, -0.00968364, 2.61923e-05, 182.128, -7.43492, 0.193901, -0.00256715, 1.22594e-05}, "PV multiplicity cut parameter values"};
131+
Configurable<std::vector<double>> cfgMultGlobalCutPars{"cfgMultGlobalCutPars", std::vector<double>{2272.16, -76.6932, 1.01204, -0.00631545, 1.59868e-05, 136.336, -4.97006, 0.121199, -0.0015921, 7.66197e-06}, "Global vs FT0C multiplicity cut parameter values"};
132+
Configurable<std::vector<double>> cfgMultPVCutPars{"cfgMultPVCutPars", std::vector<double>{3074.43, -106.192, 1.46176, -0.00968364, 2.61923e-05, 182.128, -7.43492, 0.193901, -0.00256715, 1.22594e-05}, "PV vs FT0C multiplicity cut parameter values"};
133+
Configurable<std::vector<double>> cfgMultGlobalPVCutPars{"cfgMultGlobalPVCutPars", std::vector<double>{-0.223013, 0.715849, 0.664242, 0.0829653, -0.000503733, 1.21185e-06}, "Global vs PV multiplicity cut parameter values"};
132134
O2_DEFINE_CONFIGURABLE(cfgMultCorrHighCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x + 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
133135
O2_DEFINE_CONFIGURABLE(cfgMultCorrLowCutFunction, std::string, "[0] + [1]*x + [2]*x*x + [3]*x*x*x + [4]*x*x*x*x - 3.*([5] + [6]*x + [7]*x*x + [8]*x*x*x + [9]*x*x*x*x)", "Functional for multiplicity correlation cut");
136+
O2_DEFINE_CONFIGURABLE(cfgMultGlobalPVCorrCutFunction, std::string, "[0] + [1]*x + 3*([2] + [3]*x + [4]*x*x + [5]*x*x*x)", "Functional for global vs pv multiplicity correlation cut");
134137

135138
Configurable<GFWBinningCuts> cfgGFWBinning{"cfgGFWBinning", {40, 16, 72, 300, 0, 3000, 0.2, 10.0, 0.2, 3.0, {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75, 4, 4.5, 5, 5.5, 6, 7, 8, 9, 10}, {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90}}, "Configuration for binning"};
136139
Configurable<GFWRegions> cfgRegions{"cfgRegions", {{"refN", "refP", "refFull"}, {-0.8, 0.4, -0.8}, {-0.4, 0.8, 0.8}, {0, 0, 0}, {1, 1, 1}}, "Configurations for GFW regions"};
@@ -237,6 +240,7 @@ struct FlowGfwLightIons {
237240
TF1* fMultPVCutHigh = nullptr;
238241
TF1* fMultCutLow = nullptr;
239242
TF1* fMultCutHigh = nullptr;
243+
TF1* fMultPVGlobalCutHigh = nullptr;
240244

241245
TF1* fPtDepDCAxy = nullptr;
242246

@@ -282,6 +286,7 @@ struct FlowGfwLightIons {
282286
cfgGFWBinning->Print();
283287
o2::analysis::gfw::multGlobalCorrCutPars = cfgMultGlobalCutPars;
284288
o2::analysis::gfw::multPVCorrCutPars = cfgMultPVCutPars;
289+
o2::analysis::gfw::multGlobalPVCorrCutPars = cfgMultGlobalPVCutPars;
285290
o2::analysis::gfw::firstRunsOfFill = cfgFirstRunsOfFill;
286291
if (cfgTimeDependent && !std::is_sorted(o2::analysis::gfw::firstRunsOfFill.begin(), o2::analysis::gfw::firstRunsOfFill.end())) {
287292
std::sort(o2::analysis::gfw::firstRunsOfFill.begin(), o2::analysis::gfw::firstRunsOfFill.end());
@@ -334,8 +339,8 @@ struct FlowGfwLightIons {
334339
});
335340
AxisSpec bAxis = {bbinning, "#it{b}"};
336341
AxisSpec t0cAxis = {1000, 0, 10000, "N_{ch} (T0C)"};
337-
AxisSpec t0aAxis = {500, 0, 500, "N_{ch} (T0A)"};
338-
AxisSpec v0aAxis = {500, 0, 500, "N_{ch} (V0A)"};
342+
AxisSpec t0aAxis = {300, 0, 30000, "N_{ch} (T0A)"};
343+
AxisSpec v0aAxis = {800, 0, 80000, "N_{ch} (V0A)"};
339344
AxisSpec multpvAxis = {600, 0, 600, "N_{ch} (PV)"};
340345
AxisSpec dcaZAXis = {200, -2, 2, "DCA_{z} (cm)"};
341346
AxisSpec dcaXYAXis = {200, -0.5, 0.5, "DCA_{xy} (cm)"};
@@ -472,6 +477,8 @@ struct FlowGfwLightIons {
472477
fMultCutLow->SetParameters(&(o2::analysis::gfw::multGlobalCorrCutPars[0]));
473478
fMultCutHigh = new TF1("fMultCutHigh", cfgMultCorrHighCutFunction->c_str(), 0, 100);
474479
fMultCutHigh->SetParameters(&(o2::analysis::gfw::multGlobalCorrCutPars[0]));
480+
fMultPVGlobalCutHigh = new TF1("fMultPVGlobalCutHigh", cfgMultGlobalPVCorrCutFunction->c_str(), 0, nchbinning.back());
481+
fMultPVGlobalCutHigh->SetParameters(&(o2::analysis::gfw::multGlobalPVCorrCutPars[0]));
475482
}
476483
if (cfgUseDensityDependentCorrection) {
477484
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};
@@ -681,6 +688,8 @@ struct FlowGfwLightIons {
681688
return 0;
682689
if (multTrk > fMultCutHigh->Eval(centrality))
683690
return 0;
691+
if (multTrk > fMultPVGlobalCutHigh->Eval(collision.multNTracksPV()))
692+
return 0;
684693
registry.fill(HIST("eventQA/eventSel"), kMultCuts);
685694
if (cfgRunByRun)
686695
th1sList[run][hEventSel]->Fill(kMultCuts);
@@ -1199,6 +1208,7 @@ struct FlowGfwLightIons {
11991208
for (const auto& collision : collisions) {
12001209
centrality = getCentrality(collision);
12011210
}
1211+
12021212
std::vector<int> numberOfTracks;
12031213
for (auto const& collision : collisions) {
12041214
auto groupedTracks = tracks.sliceBy(perCollision, collision.globalIndex());

0 commit comments

Comments
 (0)