From 96bf7ba35e409a311acfb893a9d7c91bfe7f417c Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Tue, 4 Mar 2025 14:40:34 +0000 Subject: [PATCH] Please consider the following formatting changes --- PWGUD/TableProducer/UPCCandidateProducer.cxx | 74 ++++++++++---------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/PWGUD/TableProducer/UPCCandidateProducer.cxx b/PWGUD/TableProducer/UPCCandidateProducer.cxx index 40e0dd22b9d..7df1966e508 100644 --- a/PWGUD/TableProducer/UPCCandidateProducer.cxx +++ b/PWGUD/TableProducer/UPCCandidateProducer.cxx @@ -697,47 +697,45 @@ struct UpcCandProducer { } } - - template - void collectForwardGlobalTracks(std::vector& bcsMatchedTrIds, - int typeFilter, - TBCs const& /*bcs*/, - o2::aod::Collisions const& /*collisions*/, - ForwardTracks const& fwdTracks, - o2::aod::AmbiguousFwdTracks const& /*ambFwdTracks*/, - std::unordered_map& ambFwdTrBCs) - { - for (const auto& trk : fwdTracks) { - if (trk.trackType() != typeFilter) - continue; - if (!applyFwdCuts(trk)) - continue; - int64_t trkId = trk.globalIndex(); - int32_t nContrib = -1; - uint64_t trackBC = 0; - auto ambIter = ambFwdTrBCs.find(trkId); - if (ambIter == ambFwdTrBCs.end()) { - const auto& col = trk.collision(); - nContrib = col.numContrib(); - trackBC = col.bc_as().globalBC(); - const auto& bc = col.bc_as(); - if (fRequireNoTimeFrameBorder && !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { - continue; // skip this track if the kNoTimeFrameBorder bit is required but not set - } - if (fRequireNoITSROFrameBorder && !bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { - continue; // skip this track if the kNoITSROFrameBorder bit is required but not set - } - } else { - trackBC = ambIter->second; + template + void collectForwardGlobalTracks(std::vector& bcsMatchedTrIds, + int typeFilter, + TBCs const& /*bcs*/, + o2::aod::Collisions const& /*collisions*/, + ForwardTracks const& fwdTracks, + o2::aod::AmbiguousFwdTracks const& /*ambFwdTracks*/, + std::unordered_map& ambFwdTrBCs) + { + for (const auto& trk : fwdTracks) { + if (trk.trackType() != typeFilter) + continue; + if (!applyFwdCuts(trk)) + continue; + int64_t trkId = trk.globalIndex(); + int32_t nContrib = -1; + uint64_t trackBC = 0; + auto ambIter = ambFwdTrBCs.find(trkId); + if (ambIter == ambFwdTrBCs.end()) { + const auto& col = trk.collision(); + nContrib = col.numContrib(); + trackBC = col.bc_as().globalBC(); + const auto& bc = col.bc_as(); + if (fRequireNoTimeFrameBorder && !bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + continue; // skip this track if the kNoTimeFrameBorder bit is required but not set } - int64_t tint = TMath::FloorNint(trk.trackTime() / o2::constants::lhc::LHCBunchSpacingNS + static_cast(fMuonTrackTShift)); - uint64_t bc = trackBC + tint; - if (nContrib > upcCuts.getMaxNContrib()) - continue; - addTrack(bcsMatchedTrIds, bc, trkId); + if (fRequireNoITSROFrameBorder && !bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + continue; // skip this track if the kNoITSROFrameBorder bit is required but not set + } + } else { + trackBC = ambIter->second; } + int64_t tint = TMath::FloorNint(trk.trackTime() / o2::constants::lhc::LHCBunchSpacingNS + static_cast(fMuonTrackTShift)); + uint64_t bc = trackBC + tint; + if (nContrib > upcCuts.getMaxNContrib()) + continue; + addTrack(bcsMatchedTrIds, bc, trkId); } - + } int32_t searchTracks(uint64_t midbc, uint64_t range, uint32_t tracksToFind, std::vector& tracks,