Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 31 additions & 22 deletions PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

Declare struct members in the conventional order. See the PWGHF coding guidelines.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -54,11 +54,12 @@
Configurable<float> centralityMax{"centralityMax", 100., "Maximum centrality accepted in SP computation"};
Configurable<bool> storeMl{"storeMl", false, "Flag to store ML scores"};
Configurable<bool> direct{"direct", false, "Flag to calculate direct v1 odd and even"};
Configurable<bool> correction{"correction", false, "Flag for correction"};
Configurable<bool> userap{"userap", false, "Flag to fill rapidity vs eta "};
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
Configurable<std::vector<int>> classMl{"classMl", {0, 2}, "Indices of BDT scores to be stored. Two indexes max."};

ConfigurableAxis thnConfigAxisInvMass{"thnConfigAxisInvMass", {100, 1.78, 2.05}, ""};

Check warning on line 62 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfTaskDirectedFlowCharmHadrons: ConfigurableAxis appears too early (before end of Partition<).
ConfigurableAxis thnConfigAxisPt{"thnConfigAxisPt", {VARIABLE_WIDTH, 0.2, 0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 4.0, 5.0, 6.5, 8.0, 10.0}, ""};
ConfigurableAxis thnConfigAxisEta{"thnConfigAxisEta", {VARIABLE_WIDTH, -0.8, -0.4, 0, 0.4, 0.8}, ""};
ConfigurableAxis thnConfigAxisCent{"thnConfigAxisCent", {VARIABLE_WIDTH, 0.0, 10.0, 40.0, 80.0}, ""};
Expand All @@ -67,7 +68,7 @@
ConfigurableAxis thnConfigAxisMlOne{"thnConfigAxisMlOne", {1000, 0., 1.}, ""};
ConfigurableAxis thnConfigAxisMlTwo{"thnConfigAxisMlTwo", {1000, 0., 1.}, ""};

using CandDplusDataWMl = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi, aod::HfMlDplusToPiKPi>>;

Check warning on line 71 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfTaskDirectedFlowCharmHadrons: using appears too early (before end of SliceCache).
using CandDplusData = soa::Filtered<soa::Join<aod::HfCand3Prong, aod::HfSelDplusToPiKPi>>;
using CandD0DataWMl = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0, aod::HfMlD0>>;
using CandD0Data = soa::Filtered<soa::Join<aod::HfCand2Prong, aod::HfSelD0>>;
Expand All @@ -85,7 +86,7 @@
Partition<CandD0DataWMl> selectedD0ToPiKWMl = aod::hf_sel_candidate_d0::isSelD0 >= selectionFlag;
Partition<CandD0DataWMl> selectedD0ToKPiWMl = aod::hf_sel_candidate_d0::isSelD0bar >= selectionFlag;

SliceCache cache;

Check warning on line 89 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfTaskDirectedFlowCharmHadrons: SliceCache appears too early (before end of HfHelper).
HfHelper hfHelper;
EventPlaneHelper epHelper;
HfEventSelection hfEvSel; // event selection and monitoring
Expand Down Expand Up @@ -121,17 +122,19 @@

if (direct) {
registry.add("hpQxytpvscent", "hpQxytpvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpuxyQxypvscentpteta", "hpuxyQxypvscentpteta", HistType::kTHnSparseF, axes, true);
registry.add("hpuxyQxytvscentpteta", "hpuxyQxytvscentpteta", HistType::kTHnSparseF, axes, true);
registry.add("hpoddvscentpteta", "hpoddvscentpteta", HistType::kTHnSparseF, axes, true);
registry.add("hpevenvscentpteta", "hpevenvscentpteta", HistType::kTHnSparseF, axes, true);

registry.add("hpQxpvscent", "hpQxpvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQypvscent", "hpQypvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQxtvscent", "hpQxtvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQytvscent", "hpQytvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpuxvscentpteta", "hpuxvscentpteta", HistType::kTHnSparseF, axes, true);
registry.add("hpuyvscentpteta", "hpuyvscentpteta", HistType::kTHnSparseF, axes, true);
if (correction) {
registry.add("hpuxyQxypvscentpteta", "hpuxyQxypvscentpteta", HistType::kTHnSparseF, axes, true);
registry.add("hpuxyQxytvscentpteta", "hpuxyQxytvscentpteta", HistType::kTHnSparseF, axes, true);

registry.add("hpQxpvscent", "hpQxpvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQypvscent", "hpQypvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQxtvscent", "hpQxtvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQytvscent", "hpQytvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpuxvscentpteta", "hpuxvscentpteta", HistType::kTHnSparseF, axes, true);
registry.add("hpuyvscentpteta", "hpuyvscentpteta", HistType::kTHnSparseF, axes, true);
}
} else {
registry.add("hpQxtQxpvscent", "hpQxtQxpvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
registry.add("hpQytQypvscent", "hpQytQypvscent", HistType::kTHnSparseF, {thnAxisCent, thnAxisScalarProd}, true);
Expand Down Expand Up @@ -203,19 +206,21 @@
auto qxZDCC = collision.qxZDCC(); // extracting q vectors of ZDC
auto qyZDCC = collision.qyZDCC();

auto QxtQxp = qxZDCC * qxZDCA;

Check warning on line 209 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
auto QytQyp = qyZDCC * qyZDCA;

Check warning on line 210 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
auto Qxytp = QxtQxp + QytQyp;

Check warning on line 211 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
auto QxpQyt = qxZDCA * qyZDCC;

Check warning on line 212 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
auto QxtQyp = qxZDCC * qyZDCA;

Check warning on line 213 in PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.

// correlations in the denominators for SP calculation
if (direct) {
registry.fill(HIST("hpQxytpvscent"), cent, Qxytp);
registry.fill(HIST("hpQxpvscent"), cent, qxZDCA);
registry.fill(HIST("hpQxtvscent"), cent, qxZDCC);
registry.fill(HIST("hpQypvscent"), cent, qyZDCA);
registry.fill(HIST("hpQytvscent"), cent, qyZDCC);
if (correction) {
registry.fill(HIST("hpQxpvscent"), cent, qxZDCA);
registry.fill(HIST("hpQxtvscent"), cent, qxZDCC);
registry.fill(HIST("hpQypvscent"), cent, qyZDCA);
registry.fill(HIST("hpQytvscent"), cent, qyZDCC);
}
} else {
registry.fill(HIST("hpQxtQxpvscent"), cent, QxtQxp);
registry.fill(HIST("hpQytQypvscent"), cent, QytQyp);
Expand Down Expand Up @@ -305,14 +310,15 @@

if (storeMl) {
if (direct) {
registry.fill(HIST("hpuxyQxypvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyp, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpuxyQxytvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyt, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpoddvscentpteta"), massCand, cent, ptCand, etaCand, oddv1, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpevenvscentpteta"), massCand, cent, ptCand, etaCand, evenv1, sign, outputMl[0], outputMl[1]);
if (correction) {
registry.fill(HIST("hpuxyQxypvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyp, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpuxyQxytvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyt, sign, outputMl[0], outputMl[1]);

registry.fill(HIST("hpuxvscentpteta"), massCand, cent, ptCand, etaCand, ux, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpuyvscentpteta"), massCand, cent, ptCand, etaCand, uy, sign, outputMl[0], outputMl[1]);

registry.fill(HIST("hpuxvscentpteta"), massCand, cent, ptCand, etaCand, ux, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpuyvscentpteta"), massCand, cent, ptCand, etaCand, uy, sign, outputMl[0], outputMl[1]);
}
} else {
registry.fill(HIST("hpuxQxpvscentpteta"), massCand, cent, ptCand, etaCand, uxQxp, sign, outputMl[0], outputMl[1]);
registry.fill(HIST("hpuyQypvscentpteta"), massCand, cent, ptCand, etaCand, uyQyp, sign, outputMl[0], outputMl[1]);
Expand All @@ -324,13 +330,16 @@
}
} else {
if (direct) {
registry.fill(HIST("hpuxyQxypvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyp, sign);
registry.fill(HIST("hpuxyQxytvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyt, sign);
registry.fill(HIST("hpoddvscentpteta"), massCand, cent, ptCand, etaCand, oddv1, sign);
registry.fill(HIST("hpevenvscentpteta"), massCand, cent, ptCand, etaCand, evenv1, sign);

registry.fill(HIST("hpuxvscentpteta"), massCand, cent, ptCand, etaCand, ux, sign);
registry.fill(HIST("hpuyvscentpteta"), massCand, cent, ptCand, etaCand, uy, sign);
if (correction) {
registry.fill(HIST("hpuxyQxypvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyp, sign);
registry.fill(HIST("hpuxyQxytvscentpteta"), massCand, cent, ptCand, etaCand, uxyQxyt, sign);

registry.fill(HIST("hpuxvscentpteta"), massCand, cent, ptCand, etaCand, ux, sign);
registry.fill(HIST("hpuyvscentpteta"), massCand, cent, ptCand, etaCand, uy, sign);
}
} else {
registry.fill(HIST("hpuxQxpvscentpteta"), massCand, cent, ptCand, etaCand, uxQxp, sign);
registry.fill(HIST("hpuyQypvscentpteta"), massCand, cent, ptCand, etaCand, uyQyp, sign);
Expand Down
Loading