File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ class CollisionAssociation
127127 TTracksUnfiltered const & tracksUnfiltered,
128128 TTracks const & tracks,
129129 TAmbiTracks const & ambiguousTracks,
130- o2::aod::BCs const &,
130+ o2::aod::BCs const & bcs ,
131131 Assoc& association,
132132 RevIndices& reverseIndices)
133133 {
@@ -151,6 +151,11 @@ class CollisionAssociation
151151 for (const auto & ambTrack : ambiguousTracks) {
152152 if constexpr (isCentralBarrel) { // FIXME: to be removed as soon as it is possible to use getId<Table>() for joined tables
153153 if (ambTrack.trackId () == track.globalIndex ()) {
154+ // special check to avoid crashes (in particular on some MC datasets)
155+ // related to shifts in ambiguous tracks association to bc slices (off by 1) - see https://mattermost.web.cern.ch/alice/pl/g9yaaf3tn3g4pgn7c1yex9copy
156+ if (ambTrack.bcIds ()[0 ] >= bcs.size () || ambTrack.bcIds ()[1 ] >= bcs.size ()) {
157+ break ;
158+ }
154159 if (!ambTrack.has_bc () || ambTrack.bc ().size () == 0 ) {
155160 break ;
156161 }
You can’t perform that action at this time.
0 commit comments