@@ -217,8 +217,8 @@ struct HfTaskCharmPolarisation {
217217 EventPlaneHelper epHelper;
218218
219219 using CollisionsWithMcLabels = soa::SmallGroups<soa::Join<aod::Collisions, aod::McCollisionLabels>>;
220- using CollsWithQvecs = soa::Join<aod::Collisions, aod::EvSels, aod::QvectorFT0Cs, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::CentFT0Ms, aod::CentFT0Cs>;
221- using CollsWithQvecsWithMcLabels = soa::SmallGroups<soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::QvectorFT0Cs, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::CentFT0Ms, aod::CentFT0Cs>>;
220+ using CollsWithQVecs = soa::Join<aod::Collisions, aod::EvSels, aod::QvectorFT0Cs, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::CentFT0Ms, aod::CentFT0Cs>;
221+ using CollsWithQVecsWithMcLabels = soa::SmallGroups<soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels, aod::QvectorFT0Cs, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::CentFT0Ms, aod::CentFT0Cs>>;
222222 using GenCollisWithQvecs = soa::Join<aod::McCollisions, aod::QvectorFT0Cs, aod::QvectorFT0Ms, aod::QvectorFV0As, aod::CentFT0Ms, aod::CentFT0Cs>;
223223 using TracksWithMcLabels = soa::Join<aod::Tracks, aod::TracksExtra, aod::McTrackLabels>;
224224 using TracksWithExtra = soa::Join<aod::Tracks, aod::TracksExtra>;
@@ -1413,15 +1413,15 @@ struct HfTaskCharmPolarisation {
14131413 float invMassMin = 0 .f ;
14141414 float invMassMax = 100 .f ;
14151415 if constexpr (channel == charm_polarisation::DecayChannel::DstarToDzeroPi) { // D*+
1416- minInvMass = 0 .142f ;
1417- maxInvMass = 0 .15f ;
1418- if (minInvMass < invMass && invMass < maxInvMass ) {
1416+ invMassMin = 0 .142f ;
1417+ invMassMax = 0 .15f ;
1418+ if (invMassMin < invMass && invMass < invMassMax ) {
14191419 return true ;
14201420 }
14211421 } else if constexpr (channel == charm_polarisation::DecayChannel::LcToPKPi) { // Lc+ (to be tuned!)
1422- minInvMass = 2 .25f ;
1423- maxInvMass = 2 .35f ;
1424- if (minInvMass < invMass && invMass < maxInvMass ) {
1422+ invMassMin = 2 .25f ;
1423+ invMassMax = 2 .35f ;
1424+ if (invMassMin < invMass && invMass < invMassMax ) {
14251425 return true ;
14261426 }
14271427 }
@@ -1500,7 +1500,7 @@ struct HfTaskCharmPolarisation {
15001500 float xQVec = -999 .;
15011501 float yQVec = -999 .;
15021502 float amplQVec = -999 .;
1503- switch (qvecDetector ) {
1503+ switch (qVecDetector ) {
15041504 case charm_polarisation::QvecEstimator::FV0A:
15051505 xQVec = collision.qvecFV0ARe ();
15061506 yQVec = collision.qvecFV0AIm ();
@@ -1534,6 +1534,9 @@ struct HfTaskCharmPolarisation {
15341534 if constexpr (withEP) {
15351535 assert (qVecs && " EP analysis requested but qVecs == nullptr" );
15361536 }
1537+ if constexpr (withMl) {
1538+ constexpr std::size_t NScores{3u };
1539+ }
15371540 bool isCandidateInSignalRegion{false };
15381541 int8_t origin{RecoDecay::OriginType::None};
15391542 int8_t massHypoMcTruth{-1 };
@@ -1698,8 +1701,7 @@ struct HfTaskCharmPolarisation {
16981701 invMassCharmHadForSparse = hfHelper.invMassLcToPKPi (candidate);
16991702 }
17001703 if constexpr (withMl) {
1701- const int scoresNum = 3 ;
1702- if (candidate.mlProbLcToPKPi ().size () == scoresNum) {
1704+ if (candidate.mlProbLcToPKPi ().size () == NScores) {
17031705 // protect from empty vectors
17041706 // the BDT output score might be empty if no preselections were enabled (selectionFlag null)
17051707 // !!! NB: each rotated candidates inherits the BDT scores of the original candidate, even if the candidate pt changed after the rotation of the kaon-track pt !!!
@@ -1733,8 +1735,7 @@ struct HfTaskCharmPolarisation {
17331735 invMassCharmHadForSparse = hfHelper.invMassLcToPiKP (candidate);
17341736 }
17351737 if constexpr (withMl) {
1736- const int scoresNum = 3 ;
1737- if (candidate.mlProbLcToPiKP ().size () == scoresNum) {
1738+ if (candidate.mlProbLcToPiKP ().size () == NScores) {
17381739 // protect from empty vectors
17391740 // the BDT output score might be empty if no preselections were enabled (selectionFlag null)
17401741 // !!! NB: each rotated candidates inherits the BDT scores of the original candidate, even if the candidate pt changed after the rotation of the kaon-track pt !!!
@@ -2314,13 +2315,13 @@ struct HfTaskCharmPolarisation {
23142315 }
23152316 PROCESS_SWITCH (HfTaskCharmPolarisation, processDstarMcWithMl, " Process Dstar candidates in MC with ML" , false );
23162317
2317- void processDstarInPbPb (CollsWithQvecs ::iterator const & collision,
2318+ void processDstarInPbPb (CollsWithQVecs ::iterator const & collision,
23182319 FilteredCandDstarWSelFlagAndMl const & dstarCandidates,
23192320 TracksWithExtra const & tracks)
23202321 {
23212322 float centrality = {-1 .f };
23222323 centrality = o2::hf_centrality::getCentralityColl (collision, centEstimator);
2323- if (centrality < minCent || centrality > maxCent ) {
2324+ if (centrality < centralityMin || centrality > centralityMax ) {
23242325 return ; // skip this collision if outside of the centrality range
23252326 }
23262327 auto thisCollId = collision.globalIndex ();
@@ -2340,13 +2341,13 @@ struct HfTaskCharmPolarisation {
23402341 }
23412342 PROCESS_SWITCH (HfTaskCharmPolarisation, processDstarInPbPb, " Process Dstar candidates in PbPb collisions" , false );
23422343
2343- void processDstarWithMlInPbPb (CollsWithQvecs ::iterator const & collision,
2344+ void processDstarWithMlInPbPb (CollsWithQVecs ::iterator const & collision,
23442345 FilteredCandDstarWSelFlagAndMl const & dstarCandidates,
23452346 TracksWithExtra const & tracks)
23462347 {
23472348 float centrality = {-1 .f };
23482349 centrality = o2::hf_centrality::getCentralityColl (collision, centEstimator);
2349- if (centrality < minCent || centrality > maxCent ) {
2350+ if (centrality < centralityMin || centrality > centralityMax ) {
23502351 return ; // skip this collision if outside of the centrality range
23512352 }
23522353 auto thisCollId = collision.globalIndex ();
@@ -2368,13 +2369,13 @@ struct HfTaskCharmPolarisation {
23682369
23692370 void processDstarMcInPbPb (GenCollisWithQvecs::iterator const & collision,
23702371 McParticlesDstarMatched const & mcParticles,
2371- CollsWithQvecsWithMcLabels const & collisions, // this is grouped with SmallGroupsCollisionsWithMcLabels const& collisions,
2372+ CollsWithQVecsWithMcLabels const & collisions, // this is grouped with SmallGroupsCollisionsWithMcLabels const& collisions,
23722373 FilteredCandDstarWSelFlagAndMc const & dstarCandidates,
23732374 TracksWithExtra const & tracks)
23742375 {
23752376 float centrality = {-1 .f };
23762377 centrality = o2::hf_centrality::getCentralityColl (collision, centEstimator);
2377- if (centrality < minCent || centrality > maxCent ) {
2378+ if (centrality < centralityMin || centrality > centralityMax ) {
23782379 return ; // skip this collision if outside of the centrality range
23792380 }
23802381 int numPvContributorsGen{0 };
@@ -2407,13 +2408,13 @@ struct HfTaskCharmPolarisation {
24072408
24082409 void processDstarMcWithMlInPbPb (GenCollisWithQvecs::iterator const & collision,
24092410 McParticlesDstarMatched const & mcParticles,
2410- CollsWithQvecsWithMcLabels const & collisions, // this is grouped with SmallGroupsCollisionsWithMcLabels const& collisions,
2411+ CollsWithQVecsWithMcLabels const & collisions, // this is grouped with SmallGroupsCollisionsWithMcLabels const& collisions,
24112412 FilteredCandDstarWSelFlagAndMcAndMl const & dstarCandidates,
24122413 TracksWithExtra const & tracks)
24132414 {
24142415 float centrality = {-1 .f };
24152416 centrality = o2::hf_centrality::getCentralityColl (collision, centEstimator);
2416- if (centrality < minCent || centrality > maxCent ) {
2417+ if (centrality < centralityMin || centrality > centralityMax ) {
24172418 return ; // skip this collision if outside of the centrality range
24182419 }
24192420 int numPvContributorsGen{0 };
0 commit comments