@@ -48,6 +48,7 @@ struct HfTaskDirectedFlowCharmHadrons {
4848 Configurable<float > centralityMin{" centralityMin" , 0 ., " Minimum centrality accepted in SP computation" };
4949 Configurable<float > centralityMax{" centralityMax" , 100 ., " Maximum centrality accepted in SP computation" };
5050 Configurable<bool > storeMl{" storeMl" , false , " Flag to store ML scores" };
51+ Configurable<bool > direct{" direct" , false , " Flag to calculate direct v1 odd and even" };
5152 Configurable<std::string> ccdbUrl{" ccdbUrl" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
5253 Configurable<std::vector<int >> classMl{" classMl" , {0 , 2 }, " Indices of BDT scores to be stored. Two indexes max." };
5354
@@ -100,15 +101,23 @@ struct HfTaskDirectedFlowCharmHadrons {
100101 if (storeMl) {
101102 axes.insert (axes.end (), {thnAxisMlOne, thnAxisMlTwo});
102103 }
103- registry.add (" hpuxQxpvscentpteta" , " hpuxQxpvscentpteta" , HistType::kTHnSparseF , axes, true );
104- registry.add (" hpuyQypvscentpteta" , " hpuyQypvscentpteta" , HistType::kTHnSparseF , axes, true );
105- registry.add (" hpuxQxtvscentpteta" , " hpuxQxtvscentpteta" , HistType::kTHnSparseF , axes, true );
106- registry.add (" hpuyQytvscentpteta" , " hpuyQytvscentpteta" , HistType::kTHnSparseF , axes, true );
107104
108- registry.add (" hpQxtQxpvscent" , " hpQxtQxpvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
109- registry.add (" hpQytQypvscent" , " hpQytQypvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
110- registry.add (" hpQxtQypvscent" , " hpQxtQypvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
111- registry.add (" hpQxpQytvscent" , " hpQxpQytvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
105+ if (direct) {
106+ registry.add (" hpQxytpvscent" , " hpQxytpvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
107+ registry.add (" hpuxyQxypvscentpteta" , " hpuxyQxypvscentpteta" , HistType::kTHnSparseF , axes, true );
108+ registry.add (" hpuxyQxytvscentpteta" , " hpuxyQxytvscentpteta" , HistType::kTHnSparseF , axes, true );
109+ registry.add (" hpoddvscentpteta" , " hpoddvscentpteta" , HistType::kTHnSparseF , axes, true );
110+ registry.add (" hpevenvscentpteta" , " hpevenvscentpteta" , HistType::kTHnSparseF , axes, true );
111+ } else {
112+ registry.add (" hpQxtQxpvscent" , " hpQxtQxpvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
113+ registry.add (" hpQytQypvscent" , " hpQytQypvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
114+ registry.add (" hpQxtQypvscent" , " hpQxtQypvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
115+ registry.add (" hpQxpQytvscent" , " hpQxpQytvscent" , HistType::kTHnSparseF , {thnAxisCent, thnAxisScalarProd}, true );
116+ registry.add (" hpuxQxpvscentpteta" , " hpuxQxpvscentpteta" , HistType::kTHnSparseF , axes, true );
117+ registry.add (" hpuyQypvscentpteta" , " hpuyQypvscentpteta" , HistType::kTHnSparseF , axes, true );
118+ registry.add (" hpuxQxtvscentpteta" , " hpuxQxtvscentpteta" , HistType::kTHnSparseF , axes, true );
119+ registry.add (" hpuyQytvscentpteta" , " hpuyQytvscentpteta" , HistType::kTHnSparseF , axes, true );
120+ }
112121
113122 ccdb->setURL (ccdbUrl);
114123 ccdb->setCaching (true );
@@ -165,14 +174,19 @@ struct HfTaskDirectedFlowCharmHadrons {
165174
166175 auto QxtQxp = qxZDCC * qxZDCA;
167176 auto QytQyp = qyZDCC * qyZDCA;
177+ auto Qxytp = QxtQxp + QytQyp;
168178 auto QxpQyt = qxZDCA * qyZDCC;
169179 auto QxtQyp = qxZDCC * qyZDCA;
170180
171181 // correlations in the denominators for SP calculation
172- registry.fill (HIST (" hpQxtQxpvscent" ), cent, QxtQxp);
173- registry.fill (HIST (" hpQytQypvscent" ), cent, QytQyp);
174- registry.fill (HIST (" hpQxpQytvscent" ), cent, QxpQyt);
175- registry.fill (HIST (" hpQxtQypvscent" ), cent, QxtQyp);
182+ if (direct) {
183+ registry.fill (HIST (" hpQxytpvscent" ), cent, Qxytp);
184+ } else {
185+ registry.fill (HIST (" hpQxtQxpvscent" ), cent, QxtQxp);
186+ registry.fill (HIST (" hpQytQypvscent" ), cent, QytQyp);
187+ registry.fill (HIST (" hpQxpQytvscent" ), cent, QxpQyt);
188+ registry.fill (HIST (" hpQxtQypvscent" ), cent, QxtQyp);
189+ }
176190
177191 for (const auto & candidate : candidates) {
178192 double massCand = 0 .;
@@ -198,19 +212,37 @@ struct HfTaskDirectedFlowCharmHadrons {
198212 auto uy = sinNPhi; // imaginary part of candidate q vector
199213 auto uxQxp = ux * qxZDCA;
200214 auto uyQyp = uy * qyZDCA; // correlations of particle and ZDC q vectors
215+ auto uxyQxyp = uxQxp + uyQyp;
201216 auto uxQxt = ux * qxZDCC;
202217 auto uyQyt = uy * qyZDCC;
218+ auto uxyQxyt = uxQxt + uyQyt;
219+ auto oddv1 = ux * (qxZDCA - qxZDCC) + uy * (qyZDCA - qyZDCC);
220+ auto evenv1 = ux * (qxZDCA + qxZDCC) + uy * (qyZDCA + qyZDCC);
203221
204222 if (storeMl) {
205- registry.fill (HIST (" hpuxQxpvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxp, sign, outputMl[0 ], outputMl[1 ]);
206- registry.fill (HIST (" hpuyQypvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyp, sign, outputMl[0 ], outputMl[1 ]);
207- registry.fill (HIST (" hpuxQxtvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxt, sign, outputMl[0 ], outputMl[1 ]);
208- registry.fill (HIST (" hpuyQytvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyt, sign, outputMl[0 ], outputMl[1 ]);
223+ if (direct) {
224+ registry.fill (HIST (" hpuxyQxypvscentpteta" ), massCand, cent, ptCand, etaCand, uxyQxyp, sign, outputMl[0 ], outputMl[1 ]);
225+ registry.fill (HIST (" hpuxyQxytvscentpteta" ), massCand, cent, ptCand, etaCand, uxyQxyt, sign, outputMl[0 ], outputMl[1 ]);
226+ registry.fill (HIST (" hpoddvscentpteta" ), massCand, cent, ptCand, etaCand, oddv1, sign, outputMl[0 ], outputMl[1 ]);
227+ registry.fill (HIST (" hpevenvscentpteta" ), massCand, cent, ptCand, etaCand, evenv1, sign, outputMl[0 ], outputMl[1 ]);
228+ } else {
229+ registry.fill (HIST (" hpuxQxpvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxp, sign, outputMl[0 ], outputMl[1 ]);
230+ registry.fill (HIST (" hpuyQypvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyp, sign, outputMl[0 ], outputMl[1 ]);
231+ registry.fill (HIST (" hpuxQxtvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxt, sign, outputMl[0 ], outputMl[1 ]);
232+ registry.fill (HIST (" hpuyQytvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyt, sign, outputMl[0 ], outputMl[1 ]);
233+ }
209234 } else {
210- registry.fill (HIST (" hpuxQxpvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxp, sign);
211- registry.fill (HIST (" hpuyQypvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyp, sign);
212- registry.fill (HIST (" hpuxQxtvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxt, sign);
213- registry.fill (HIST (" hpuyQytvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyt, sign);
235+ if (direct) {
236+ registry.fill (HIST (" hpuxyQxypvscentpteta" ), massCand, cent, ptCand, etaCand, uxyQxyp, sign);
237+ registry.fill (HIST (" hpuxyQxytvscentpteta" ), massCand, cent, ptCand, etaCand, uxyQxyt, sign);
238+ registry.fill (HIST (" hpoddvscentpteta" ), massCand, cent, ptCand, etaCand, oddv1, sign);
239+ registry.fill (HIST (" hpevenvscentpteta" ), massCand, cent, ptCand, etaCand, evenv1, sign);
240+ } else {
241+ registry.fill (HIST (" hpuxQxpvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxp, sign);
242+ registry.fill (HIST (" hpuyQypvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyp, sign);
243+ registry.fill (HIST (" hpuxQxtvscentpteta" ), massCand, cent, ptCand, etaCand, uxQxt, sign);
244+ registry.fill (HIST (" hpuyQytvscentpteta" ), massCand, cent, ptCand, etaCand, uyQyt, sign);
245+ }
214246 }
215247 }
216248 }
0 commit comments