@@ -197,6 +197,7 @@ struct HfTaskPidStudies {
197197 using CollisionsMc = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels, aod::CentFT0Cs, aod::CentFT0Ms>;
198198 using V0sMcRec = soa::Join<aod::V0Datas, aod::V0CoreMCLabels>;
199199 using CascsMcRec = soa::Join<aod::CascDatas, aod::CascCoreMCLabels>;
200+ using BCs = soa::Join<aod::BCsWithTimestamps, aod::BcSels, aod::Run3MatchedToBCSparse>;
200201
201202 ctpRateFetcher rateFetcher;
202203 HfEventSelection hfEvSel;
@@ -336,17 +337,17 @@ struct HfTaskPidStudies {
336337 return Particle::NotMatched;
337338 }
338339
339- template <typename Coll>
340- bool isCollSelected (const Coll& coll)
340+ template <typename Coll, typename BCs >
341+ bool isCollSelected (const Coll& coll, const BCs& bcs )
341342 {
342- auto bc = coll.template bc_as <aod::BCsWithTimestamps >();
343+ auto bc = coll.template bc_as <BCs >();
343344 interactionRate = rateFetcher.fetch (ccdb.service , bc.timestamp (), bc.runNumber (), ctpFetcherSource.value ) * 1 .e -3 ; // convert to kHz
344345 if (interactionRate < interactionRateMin || interactionRate > interactionRateMax) {
345346 return false ;
346347 }
347348
348349 float cent{-1 .f };
349- const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask <true , o2::hf_centrality::CentralityEstimator::None, aod::BCsWithTimestamps >(coll, cent, ccdb, registry);
350+ const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask <true , o2::hf_centrality::CentralityEstimator::None, BCs >(coll, cent, ccdb, registry, bcs );
350351 // / monitor the satisfied event selections
351352 hfEvSel.fillHistograms (coll, rejectionMask, cent);
352353 return rejectionMask == 0 ;
@@ -503,10 +504,10 @@ struct HfTaskPidStudies {
503504 aod::V0MCCores const &,
504505 aod::McParticles const & /* particlesMc*/ ,
505506 PidTracks const & /* tracks*/ ,
506- aod::BCsWithTimestamps const &)
507+ BCs const & bcs )
507508 {
508509 for (const auto & v0 : V0s) {
509- if (applyEvSels && !isCollSelected (v0.collision_as <CollisionsMc>())) {
510+ if (applyEvSels && !isCollSelected (v0.collision_as <CollisionsMc>(), bcs )) {
510511 continue ;
511512 }
512513 if (applyTrackSels && !isTrackSelected<true >(v0)) {
@@ -524,11 +525,11 @@ struct HfTaskPidStudies {
524525
525526 void processV0Data (aod::V0Datas const & V0s,
526527 PidTracks const &,
527- aod::BCsWithTimestamps const &,
528+ BCs const & bcs ,
528529 CollSels const &)
529530 {
530531 for (const auto & v0 : V0s) {
531- if (applyEvSels && !isCollSelected (v0.collision_as <CollSels>())) {
532+ if (applyEvSels && !isCollSelected (v0.collision_as <CollSels>(), bcs )) {
532533 continue ;
533534 }
534535 if (applyTrackSels && !isTrackSelected<true >(v0)) {
@@ -546,10 +547,10 @@ struct HfTaskPidStudies {
546547 aod::CascMCCores const &,
547548 aod::McParticles const & /* particlesMc*/ ,
548549 PidTracks const &,
549- aod::BCsWithTimestamps const &)
550+ BCs const & bcs )
550551 {
551552 for (const auto & casc : cascades) {
552- if (applyEvSels && !isCollSelected (casc.collision_as <CollisionsMc>())) {
553+ if (applyEvSels && !isCollSelected (casc.collision_as <CollisionsMc>(), bcs )) {
553554 continue ;
554555 }
555556 if (applyTrackSels && !isTrackSelected<false >(casc)) {
@@ -567,11 +568,11 @@ struct HfTaskPidStudies {
567568
568569 void processCascData (aod::CascDatas const & cascades,
569570 PidTracks const &,
570- aod::BCsWithTimestamps const &,
571+ BCs const & bcs ,
571572 CollSels const &)
572573 {
573574 for (const auto & casc : cascades) {
574- if (applyEvSels && !isCollSelected (casc.collision_as <CollSels>())) {
575+ if (applyEvSels && !isCollSelected (casc.collision_as <CollSels>(), bcs )) {
575576 continue ;
576577 }
577578 if (applyTrackSels && !isTrackSelected<false >(casc)) {
0 commit comments