File tree Expand file tree Collapse file tree
Detectors/ITSMFT/ITS/tracking/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,18 +269,20 @@ void VertexerTraits::computeTracklets(const int iteration)
269269 if (mTimeFrame ->hasMCinformation ()) {
270270 for (const auto & trk : mTimeFrame ->getTracklets ()[0 ]) {
271271 o2::MCCompLabel label;
272- int sortedId0{mTimeFrame ->getSortedIndex (trk.rof [0 ], 0 , trk.firstClusterIndex )};
273- int sortedId1{mTimeFrame ->getSortedIndex (trk.rof [1 ], 1 , trk.secondClusterIndex )};
274- for (const auto & lab0 : mTimeFrame ->getClusterLabels (0 , mTimeFrame ->getClusters ()[0 ][sortedId0].clusterId )) {
275- for (const auto & lab1 : mTimeFrame ->getClusterLabels (1 , mTimeFrame ->getClusters ()[1 ][sortedId1].clusterId )) {
276- if (lab0 == lab1 && lab0.isValid ()) {
277- label = lab0;
272+ if (!trk.isEmpty ()) {
273+ int sortedId0{mTimeFrame ->getSortedIndex (trk.rof [0 ], 0 , trk.firstClusterIndex )};
274+ int sortedId1{mTimeFrame ->getSortedIndex (trk.rof [1 ], 1 , trk.secondClusterIndex )};
275+ for (const auto & lab0 : mTimeFrame ->getClusterLabels (0 , mTimeFrame ->getClusters ()[0 ][sortedId0].clusterId )) {
276+ for (const auto & lab1 : mTimeFrame ->getClusterLabels (1 , mTimeFrame ->getClusters ()[1 ][sortedId1].clusterId )) {
277+ if (lab0 == lab1 && lab0.isValid ()) {
278+ label = lab0;
279+ break ;
280+ }
281+ }
282+ if (label.isValid ()) {
278283 break ;
279284 }
280285 }
281- if (label.isValid ()) {
282- break ;
283- }
284286 }
285287 mTimeFrame ->getTrackletsLabel (0 ).emplace_back (label);
286288 }
You can’t perform that action at this time.
0 commit comments