3030#include " Common/DataModel/Centrality.h"
3131#include " Common/DataModel/CollisionAssociationTables.h"
3232#include " Common/DataModel/EventSelection.h"
33+ #include " Common/DataModel/Multiplicity.h"
3334#include " Common/DataModel/PIDResponseTPC.h"
3435#include " Common/DataModel/TrackSelectionTables.h"
3536#include " Tools/ML/MlResponse.h"
@@ -235,7 +236,7 @@ struct HfTrackSelectorTagSelCollisions {
235236
236237 // / Event selection with trigger and FT0A centrality selection
237238 void processTrigAndCentFT0ASel (soa::Join<aod::Collisions,
238- aod::EvSels, aod::CentFT0As>::iterator const & collision,
239+ aod::EvSels, aod::PVMults, aod:: CentFT0As>::iterator const & collision,
239240 aod::BcFullInfos const & bcs)
240241 {
241242 selectCollision<true , false , CentralityEstimator::FT0A >(collision, bcs);
@@ -244,7 +245,7 @@ struct HfTrackSelectorTagSelCollisions {
244245
245246 // / Event selection with trigger and FT0C centrality selection
246247 void processTrigAndCentFT0CSel (soa::Join<aod::Collisions,
247- aod::EvSels, aod::CentFT0Cs>::iterator const & collision,
248+ aod::EvSels, aod::PVMults, aod:: CentFT0Cs>::iterator const & collision,
248249 aod::BcFullInfos const & bcs)
249250 {
250251 selectCollision<true , false , CentralityEstimator::FT0C >(collision, bcs);
@@ -253,7 +254,7 @@ struct HfTrackSelectorTagSelCollisions {
253254
254255 // / Event selection with trigger and FT0M centrality selection
255256 void processTrigAndCentFT0MSel (soa::Join<aod::Collisions,
256- aod::EvSels, aod::CentFT0Ms>::iterator const & collision,
257+ aod::EvSels, aod::PVMults, aod:: CentFT0Ms>::iterator const & collision,
257258 aod::BcFullInfos const & bcs)
258259 {
259260 selectCollision<true , false , CentralityEstimator::FT0M >(collision, bcs);
@@ -262,7 +263,7 @@ struct HfTrackSelectorTagSelCollisions {
262263
263264 // / Event selection with trigger and FV0A centrality selection
264265 void processTrigAndCentFV0ASel (soa::Join<aod::Collisions,
265- aod::EvSels, aod::CentFV0As>::iterator const & collision,
266+ aod::EvSels, aod::PVMults, aod:: CentFV0As>::iterator const & collision,
266267 aod::BcFullInfos const & bcs)
267268 {
268269 selectCollision<true , false , CentralityEstimator::FV0A >(collision, bcs);
@@ -271,23 +272,23 @@ struct HfTrackSelectorTagSelCollisions {
271272
272273 // / Event selection with trigger selection
273274 void processTrigSel (soa::Join<aod::Collisions,
274- aod::EvSels>::iterator const & collision,
275+ aod::EvSels, aod::PVMults >::iterator const & collision,
275276 aod::BcFullInfos const & bcs)
276277 {
277278 selectCollision<true , false , CentralityEstimator::None>(collision, bcs);
278279 }
279280 PROCESS_SWITCH (HfTrackSelectorTagSelCollisions, processTrigSel, " Use trigger selection" , false );
280281
281282 // / Event selection without trigger selection
282- void processNoTrigSel (aod::Collision const & collision,
283+ void processNoTrigSel (soa::Join< aod::Collisions, aod::PVMults>::iterator const & collision,
283284 aod::BcFullInfos const & bcs)
284285 {
285286 selectCollision<false , false , CentralityEstimator::None>(collision, bcs);
286287 }
287288 PROCESS_SWITCH (HfTrackSelectorTagSelCollisions, processNoTrigSel, " Do not use trigger selection" , true );
288289
289290 // / Event selection with UPC
290- void processUpcSel (soa::Join<aod::Collisions, aod::EvSels>::iterator const & collision,
291+ void processUpcSel (soa::Join<aod::Collisions, aod::EvSels, aod::PVMults >::iterator const & collision,
291292 aod::BcFullInfos const & bcs,
292293 aod::FT0s const & /* ft0s*/ ,
293294 aod::FV0As const & /* fv0as*/ ,
@@ -457,7 +458,7 @@ struct HfTrackSelectorTagSelTracks {
457458 registry.add (" hScorePionDs" , " D_{s}^{#plus} pion-class score;#it{p}_{T}^{track} (GeV/#it{c});score;entries" , {HistType::kTH2D , {axisPtProng, axisScore}});
458459 registry.add (" hScoreKaonDs" , " D_{s}^{#plus} kaon-class score;#it{p}_{T}^{track} (GeV/#it{c});score;entries" , {HistType::kTH2D , {axisPtProng, axisScore}});
459460 // seconds, accumulated over the run via Fill(bin, weight); per-call cost = bin / hPtQuality entries
460- auto hTiming = registry.add <TH1 >(" hTiming" , " CPU of the ML track selection;;seconds" , {HistType::kTH1D , {{NTrackTimingSteps, -0 .5f , NTrackTimingSteps - 0 .5f }}});
461+ auto hTiming = registry.add <TH1 >(" hTiming" , " CPU of the ML track selection;;seconds" , {HistType::kTH1D , {{NTrackTimingSteps, -0 .5f , static_cast < float >( NTrackTimingSteps) - 0 .5f }}});
461462 hTiming->GetXaxis ()->SetBinLabel (TrackTimeTotal + 1 , " track loop total" );
462463 hTiming->GetXaxis ()->SetBinLabel (TrackTimeFeatures + 1 , " features" );
463464 hTiming->GetXaxis ()->SetBinLabel (TrackTimeModelDplus + 1 , " D+ model" );
@@ -701,7 +702,7 @@ struct HfTrackSelectorTagSelTracks {
701702};
702703
703704// / Pre-selection of 3-prong secondary vertices
704- struct HfTrackSelector {
705+ struct HfMlBasedTrackSelector {
705706 Produces<aod::Hf3Prongs> rowTrackIndexProng3;
706707
707708 struct : ConfigurableGroup {
@@ -752,9 +753,9 @@ struct HfTrackSelector {
752753 // / One track of the collision under study, already propagated to that collision's PV.
753754 struct HfProngCandidate {
754755 o2::track::TrackParCov parCov;
755- std::array<float , 3 > pVec;
756- uint32_t mask; // /< aod::HfSelTrack::isIdentifiedPid
757- int64_t globalIndex; // /< index in the track table, written to the skim
756+ std::array<float , 3 > pVec{} ;
757+ uint32_t mask{} ; // /< aod::HfSelTrack::isIdentifiedPid
758+ int64_t globalIndex{} ; // /< index in the track table, written to the skim
758759 };
759760
760761 // / Cache of propagated tracks for one collision, split by charge.
@@ -837,13 +838,13 @@ struct HfTrackSelector {
837838 const AxisSpec axisNumCands{1000 , -0 .5f , 999 .5f , " Number of candidates" };
838839 registry.add (" hNTracks" , " Number of selected tracks;# of selected tracks;entries" , {HistType::kTH1D , {axisNumTracks}});
839840 // seconds and raw counts, accumulated over the run via Fill(bin, weight)
840- auto hTiming = registry.add <TH1 >(" hTiming" , " CPU inside the triple loop;;seconds" , {HistType::kTH1D , {{NTimingSteps, -0 .5f , NTimingSteps - 0 .5f }}});
841+ auto hTiming = registry.add <TH1 >(" hTiming" , " CPU inside the triple loop;;seconds" , {HistType::kTH1D , {{NTimingSteps, -0 .5f , static_cast < float >( NTimingSteps) - 0 .5f }}});
841842 hTiming->GetXaxis ()->SetBinLabel (TimeLoopTotal + 1 , " triple loop total" );
842843 hTiming->GetXaxis ()->SetBinLabel (TimeFit2Prong + 1 , " 2-prong vertex fit" );
843844 hTiming->GetXaxis ()->SetBinLabel (TimeFit3Prong + 1 , " 3-prong vertex fit" );
844845 hTiming->GetXaxis ()->SetBinLabel (TimeCacheFill + 1 , " prong cache fill" );
845846 hTiming->GetXaxis ()->SetBinLabel (TimeCachePropagate + 1 , " cache re-propagation" );
846- auto hLoopCounters = registry.add <TH1 >(" hLoopCounters" , " Triple loop stages;;entries" , {HistType::kTH1D , {{NLoopCounters, -0 .5f , NLoopCounters - 0 .5f }}});
847+ auto hLoopCounters = registry.add <TH1 >(" hLoopCounters" , " Triple loop stages;;entries" , {HistType::kTH1D , {{NLoopCounters, -0 .5f , static_cast < float >( NLoopCounters) - 0 .5f }}});
847848 hLoopCounters->GetXaxis ()->SetBinLabel (CountPairsSeen + 1 , " pairs seen" );
848849 hLoopCounters->GetXaxis ()->SetBinLabel (CountPairsCandidateOk + 1 , " pairs passing ML roles" );
849850 hLoopCounters->GetXaxis ()->SetBinLabel (CountFit2Prong + 1 , " 2-prong fits" );
@@ -1332,20 +1333,20 @@ struct HfTrackSelector {
13321333 }
13331334 }
13341335 }
1335- PROCESS_SWITCH (HfTrackSelector , process3Prongs, " Process 3-prong skim" , true );
1336+ PROCESS_SWITCH (HfMlBasedTrackSelector , process3Prongs, " Process 3-prong skim" , true );
13361337
13371338 void processNo3Prongs (SelectedCollisions const &)
13381339 {
13391340 // dummy
13401341 }
1341- PROCESS_SWITCH (HfTrackSelector , processNo3Prongs, " Do not process 3-prongs" , false );
1342+ PROCESS_SWITCH (HfMlBasedTrackSelector , processNo3Prongs, " Do not process 3-prongs" , false );
13421343};
13431344
13441345WorkflowSpec defineDataProcessing (ConfigContext const & cfgc)
13451346{
13461347 WorkflowSpec workflow{};
13471348 workflow.push_back (adaptAnalysisTask<HfTrackSelectorTagSelCollisions>(cfgc));
13481349 workflow.push_back (adaptAnalysisTask<HfTrackSelectorTagSelTracks>(cfgc));
1349- workflow.push_back (adaptAnalysisTask<HfTrackSelector >(cfgc));
1350+ workflow.push_back (adaptAnalysisTask<HfMlBasedTrackSelector >(cfgc));
13501351 return workflow;
13511352}
0 commit comments