File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1009,8 +1009,12 @@ struct EventSelectionQaTask {
10091009
10101010 // special check to avoid crashes (in particular, on some MC Pb-Pb datasets)
10111011 // (related to shifts in ambiguous tracks association to bc slices (off by 1) - see https://mattermost.web.cern.ch/alice/pl/g9yaaf3tn3g4pgn7c1yex9copy
1012- if (ambTrId >= 0 && (ambTracks.iteratorAt (ambTrId).bcIds ()[0 ] >= bcs.size ()))
1013- continue ;
1012+ // an empty slice (-1, -1) passes the upper check, so test it as well
1013+ if (ambTrId >= 0 ) {
1014+ const auto & ambTrack = ambTracks.iteratorAt (ambTrId);
1015+ if (!ambTrack.has_bc () || ambTrack.bcIds ()[0 ] >= bcs.size () || ambTrack.bcIds ()[1 ] >= bcs.size ())
1016+ continue ;
1017+ }
10141018
10151019 int indexBc = ambTrId < 0 ? track.collision_as <ColEvSels>().bc_as <BCsRun3>().globalIndex () : ambTracks.iteratorAt (ambTrId).bc_as <BCsRun3>().begin ().globalIndex ();
10161020 auto bc = bcs.iteratorAt (indexBc);
You can’t perform that action at this time.
0 commit comments