2424#include " PWGHF/HFC/DataModel/CorrelationTables.h"
2525#include " PWGHF/HFC/DataModel/DMesonPairsTables.h"
2626
27+ #include " Common/CCDB/EventSelectionParams.h"
2728#include " Common/Core/RecoDecay.h"
29+ #include " Common/DataModel/EventSelection.h"
30+ #include " Common/DataModel/Multiplicity.h"
31+ #include " Common/DataModel/TrackSelectionTables.h"
2832
2933#include < CCDB/CcdbApi.h>
3034#include < CommonConstants/MathConstants.h>
4549
4650#include < Rtypes.h>
4751
52+ #include < array>
53+ #include < cmath>
4854#include < cstdint>
4955#include < string>
5056#include < vector>
@@ -164,7 +170,7 @@ struct HfCorrelatorDMesonPairs {
164170 Configurable<bool > applyMl{" applyMl" , false , " Flag to apply ML selections" };
165171 Configurable<std::vector<double >> binsPtMl{" binsPtMl" , std::vector<double >{hf_cuts_ml::vecBinsPt}, " pT bin limits for ML application" };
166172 Configurable<std::vector<int >> cutDirMl{" cutDirMl" , std::vector<int >{hf_cuts_ml::vecCutDir}, " Whether to reject score values greater or smaller than the threshold" };
167- Configurable<LabeledArray<double >> cutsMl{" cutsMl" , {hf_cuts_ml::Cuts[0 ], hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, " ML selections per pT bin" };
173+ Configurable<LabeledArray<double >> cutsMl{" cutsMl" , {static_cast < const double *>( hf_cuts_ml::Cuts[0 ]) , hf_cuts_ml::NBinsPt, hf_cuts_ml::NCutScores, hf_cuts_ml::labelsPt, hf_cuts_ml::labelsCutScore}, " ML selections per pT bin" };
168174 Configurable<int > nClassesMl{" nClassesMl" , static_cast <int >(hf_cuts_ml::NCutScores), " Number of classes in ML model" };
169175 Configurable<std::vector<std::string>> namesInputFeatures{" namesInputFeatures" , std::vector<std::string>{" feature1" , " feature2" }, " Names of ML model input features" };
170176
@@ -278,7 +284,7 @@ struct HfCorrelatorDMesonPairs {
278284
279285 auto vbins = (std::vector<double >)binsPt;
280286 constexpr int kNBinsSelStatus = 25 ;
281- std::string labels[ kNBinsSelStatus ] ;
287+ std::array<std:: string, kNBinsSelStatus > labels ;
282288
283289 labels[0 ] = " total # of Selected pairs" ;
284290 // Cand1 analysis
@@ -320,7 +326,7 @@ struct HfCorrelatorDMesonPairs {
320326 }
321327
322328 constexpr int kNBinsMatching = 8 ;
323- std::string labelsMatching[ kNBinsMatching ] ;
329+ std::array<std:: string, kNBinsMatching > labelsMatching ;
324330 // Cand1 analysis
325331 labelsMatching[0 ] = " total # of Cand 1" ;
326332 labelsMatching[1 ] = " # of matched D Cand 1" ;
@@ -342,7 +348,7 @@ struct HfCorrelatorDMesonPairs {
342348 }
343349
344350 constexpr int kNBinsSinglePart = 6 ;
345- std::string labelsSinglePart[ kNBinsSinglePart ] ;
351+ std::array<std:: string, kNBinsSinglePart > labelsSinglePart ;
346352 // Candidate analysis
347353 labelsSinglePart[0 ] = " total # of Candidates" ;
348354 labelsSinglePart[1 ] = " # of selected D" ;
@@ -576,7 +582,7 @@ struct HfCorrelatorDMesonPairs {
576582
577583 // / Fill selection status histogram
578584 void fillEntry (const bool & isDCand1, const bool & isDbarCand1, const bool & isDCand2, const bool & isDbarCand2,
579- const uint8_t & candidateType1, const uint8_t & candidateType2, float yCand1, float yCand2, float phiCand1 , float phiCand2 , float etaCand1 , float etaCand2 ,
585+ const uint8_t & candidateType1, const uint8_t & candidateType2, float yCand1, float yCand2, float etaCand1 , float etaCand2 , float phiCand1 , float phiCand2 ,
580586 double ptCand1, double ptCand2, float massDCand1, float massDbarCand1, float massDCand2, float massDbarCand2)
581587 {
582588
@@ -805,18 +811,23 @@ struct HfCorrelatorDMesonPairs {
805811 // Loop on the associated tracks for offline event mixing
806812 for (const auto & track : tracks) {
807813 // apply track selection
808- if (track.collisionId () != gCollisionId )
814+ if (track.collisionId () != gCollisionId ) {
809815 continue ;
816+ }
810817
811818 // Manual trackFilter check
812- if (std::abs (track.eta ()) >= etaTrackMax)
819+ if (std::abs (track.eta ()) >= etaTrackMax) {
813820 continue ;
814- if (track.pt () <= ptTrackMin)
821+ }
822+ if (track.pt () <= ptTrackMin) {
815823 continue ;
816- if (std::abs (track.dcaXY ()) >= dcaXYTrackMax)
824+ }
825+ if (std::abs (track.dcaXY ()) >= dcaXYTrackMax) {
817826 continue ;
818- if (std::abs (track.dcaZ ()) >= dcaZTrackMax)
827+ }
828+ if (std::abs (track.dcaZ ()) >= dcaZTrackMax) {
819829 continue ;
830+ }
820831 // Removing D0 daughters by checking track indices
821832 if (daughterTracksCutFlag) {
822833 if ((candidate1.prong0Id () == track.globalIndex ()) || (candidate1.prong1Id () == track.globalIndex ())) {
0 commit comments