Skip to content

Commit

Permalink
Update source/Utils/src/FilterTracks.cc
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Madlener <[email protected]>
  • Loading branch information
madbaron and tmadlener authored Nov 27, 2024
1 parent e44c841 commit 7397209
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions source/Utils/src/FilterTracks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,9 @@ void FilterTracks::processEvent( LCEvent * evt )
bool foundCaloState = false;
// Check if a TrackState at the calo surface exists
const std::vector<EVENT::TrackState*>& trackStates = trk->getTrackStates();
for (const auto& state : trackStates) {
if (state->getLocation() == EVENT::TrackState::AtCalorimeter) {
foundCaloState = true;
break;
}
}
const auto foundCaloState = std::find_if(trackStates.begin(), trackStates.end(),
[](const auto ts) { return ts->getLocation() == EVENT::TrackState::AtCalorimeter)
!= trackStates.end();
if (_HasCaloState && !foundCaloState) { continue; }

if(_BarrelOnly == true) {
Expand Down

0 comments on commit 7397209

Please sign in to comment.