Skip to content

Commit 469299c

Browse files
prottayCMTProttay Das
andauthored
[PWGHF] added rapidity flag and corrected trigger condition (AliceO2Group#8747)
Co-authored-by: Prottay Das <[email protected]>
1 parent 233caf5 commit 469299c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

PWGHF/D2H/Tasks/taskDirectedFlowCharmHadrons.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ struct HfTaskDirectedFlowCharmHadrons {
5252
Configurable<float> centralityMax{"centralityMax", 100., "Maximum centrality accepted in SP computation"};
5353
Configurable<bool> storeMl{"storeMl", false, "Flag to store ML scores"};
5454
Configurable<bool> direct{"direct", false, "Flag to calculate direct v1 odd and even"};
55+
Configurable<bool> userap{"userap", false, "Flag to fill rapidity vs eta "};
5556
Configurable<std::string> ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
5657
Configurable<std::vector<int>> classMl{"classMl", {0, 2}, "Indices of BDT scores to be stored. Two indexes max."};
5758

@@ -201,9 +202,11 @@ struct HfTaskDirectedFlowCharmHadrons {
201202

202203
for (const auto& candidate : candidates) {
203204
double massCand = 0.;
205+
double rapCand = 0.;
204206
std::vector<double> outputMl = {-999., -999.};
205207
if constexpr (std::is_same_v<T1, CandDplusData> || std::is_same_v<T1, CandDplusDataWMl>) {
206208
massCand = hfHelper.invMassDplusToPiKPi(candidate);
209+
rapCand = hfHelper.yDplus(candidate);
207210
if constexpr (std::is_same_v<T1, CandDplusDataWMl>) {
208211
for (unsigned int iclass = 0; iclass < classMl->size(); iclass++)
209212
outputMl[iclass] = candidate.mlProbDplusToPiKPi()[classMl->at(iclass)];
@@ -238,6 +241,9 @@ struct HfTaskDirectedFlowCharmHadrons {
238241
double cosNPhi = std::cos(phiCand);
239242
double sinNPhi = std::sin(phiCand);
240243

244+
if (userap)
245+
etaCand = rapCand;
246+
241247
auto ux = cosNPhi; // real part of candidate q vector
242248
auto uy = sinNPhi; // imaginary part of candidate q vector
243249
auto uxQxp = ux * qxZDCA;

0 commit comments

Comments
 (0)