@@ -47,7 +47,7 @@ using namespace o2;
4747using namespace o2 ::hf_centrality;
4848using namespace o2 ::hf_evsel;
4949
50- enum DecayChannel {
50+ enum DecayChannel {
5151 DplusToPiKPi = 0 ,
5252 DsToKKPi,
5353 DsToPiKK
@@ -106,7 +106,8 @@ struct HfCorrelatorFlowCharmHadrons {
106106
107107 HistogramRegistry registry{" registry" , {}};
108108
109- void init (InitContext&) {
109+ void init (InitContext&)
110+ {
110111 if (doprocessDplus || doprocessDplusWithMl) {
111112 massCharm = o2::constants::physics::MassDPlus;
112113 } else if (doprocessDs || doprocessDsWithMl) {
@@ -159,32 +160,32 @@ struct HfCorrelatorFlowCharmHadrons {
159160 if constexpr (channel == DecayChannel::DsToKKPi) {
160161 return hfHelper.invMassDsToKKPi (candidate);
161162 }
162- if constexpr (channel == DecayChannel::DsToPiKK){
163+ if constexpr (channel == DecayChannel::DsToPiKK) {
163164 return hfHelper.invMassDsToPiKK (candidate);
164165 }
165- if constexpr (channel == DecayChannel::DplusToPiKPi){
166+ if constexpr (channel == DecayChannel::DplusToPiKPi) {
166167 return hfHelper.invMassDplusToPiKPi (candidate);
167168 }
168169 return -1 .;
169170 }
170-
171+
171172 // / Get charm hadron bdt scores
172173 // / \param candidate is the charm hadron candidate
173174 template <DecayChannel channel, typename TCand>
174175 std::vector<float > getCandMlScores (const TCand& candidate)
175176 {
176- std::vector<float > outputMl{ -999 ., -999 . };
177+ std::vector<float > outputMl{-999 ., -999 .};
177178 if constexpr (channel == DecayChannel::DsToKKPi) {
178179 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
179180 outputMl[iclass] = candidate.mlProbDsToKKPi ()[classMl->at (iclass)];
180181 }
181182 }
182- if constexpr (channel == DecayChannel::DsToPiKK){
183+ if constexpr (channel == DecayChannel::DsToPiKK) {
183184 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
184185 outputMl[iclass] = candidate.mlProbDsToPiKK ()[classMl->at (iclass)];
185186 }
186187 }
187- if constexpr (channel == DecayChannel::DplusToPiKPi){
188+ if constexpr (channel == DecayChannel::DplusToPiKPi) {
188189 for (unsigned int iclass = 0 ; iclass < classMl->size (); iclass++) {
189190 outputMl[iclass] = candidate.mlProbDplusToPiKPi ()[classMl->at (iclass)];
190191 }
@@ -204,7 +205,7 @@ struct HfCorrelatorFlowCharmHadrons {
204205 }
205206 double massCand = getCandMass<channel>(candidate);
206207 rowCharmCandidates (indexRedColl, candidate.phi (), candidate.eta (), candidate.pt (), massCand, candidate.prong0Id (), candidate.prong1Id (), candidate.prong2Id ());
207-
208+
208209 if constexpr (applyMl) {
209210 std::vector<float > outputMl = getCandMlScores<channel>(candidate);
210211 rowCharmCandidatesMl (indexRedColl, outputMl[0 ], outputMl[1 ]);
@@ -236,32 +237,32 @@ struct HfCorrelatorFlowCharmHadrons {
236237 auto thisCollId = coll.globalIndex ();
237238 auto candsCThisColl = candsDplus.sliceBy (candsDplusPerColl, thisCollId);
238239 if (forceCharmInCollision && candsCThisColl.size () < 1 ) {
239- continue ;
240+ continue ;
240241 }
241242 if (!checkAndFillCollision (coll)) {
242- continue ;
243+ continue ;
243244 }
244245 auto trackIdsThisColl = tracks.sliceBy (trackIndicesPerColl, thisCollId);
245246 fillCharmHadronTables<DecayChannel::DplusToPiKPi, false >(candsCThisColl);
246247 fillTracksTables (trackIdsThisColl);
247248 }
248249 }
249250 PROCESS_SWITCH (HfCorrelatorFlowCharmHadrons, processDplus, " Process Dplus candidates" , true );
250-
251+
251252 // Dplus with ML selections
252253 void processDplusWithMl (CollsWithCentMult const & colls,
253254 CandDplusDataWMl const & candsDplus,
254255 TracksData const & tracks)
255- {
256- for (const auto & coll : colls) {
257- auto thisCollId = coll.globalIndex ();
258- auto candsCThisColl = candsDplus.sliceBy (candsDplusPerColl, thisCollId);
259- if (forceCharmInCollision && candsCThisColl.size () < 1 ) {
260- continue ;
261- }
262- if (!checkAndFillCollision (coll)) {
263- continue ;
264- }
256+ {
257+ for (const auto & coll : colls) {
258+ auto thisCollId = coll.globalIndex ();
259+ auto candsCThisColl = candsDplus.sliceBy (candsDplusPerColl, thisCollId);
260+ if (forceCharmInCollision && candsCThisColl.size () < 1 ) {
261+ continue ;
262+ }
263+ if (!checkAndFillCollision (coll)) {
264+ continue ;
265+ }
265266 auto trackIdsThisColl = tracks.sliceBy (trackIndicesPerColl, thisCollId);
266267 fillCharmHadronTables<DecayChannel::DplusToPiKPi, true >(candsCThisColl);
267268 fillTracksTables (trackIdsThisColl);
@@ -279,10 +280,10 @@ struct HfCorrelatorFlowCharmHadrons {
279280 auto candsDsToKKPi = selectedDsToKKPi->sliceByCached (aod::hf_cand::collisionId, thisCollId, cache);
280281 auto candsDsToPiKK = selectedDsToPiKK->sliceByCached (aod::hf_cand::collisionId, thisCollId, cache);
281282 if (forceCharmInCollision && candsDsToKKPi.size () < 1 && candsDsToPiKK.size () < 1 ) {
282- continue ;
283+ continue ;
283284 }
284285 if (!checkAndFillCollision (coll)) {
285- continue ;
286+ continue ;
286287 }
287288 auto trackIdsThisColl = tracks.sliceBy (trackIndicesPerColl, thisCollId);
288289 fillCharmHadronTables<DecayChannel::DsToPiKK, false >(candsDsToPiKK);
@@ -314,7 +315,6 @@ struct HfCorrelatorFlowCharmHadrons {
314315 }
315316 }
316317 PROCESS_SWITCH (HfCorrelatorFlowCharmHadrons, processDsWithMl, " Process Ds candidates with ML info" , false );
317-
318318};
319319
320320WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
0 commit comments