Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/KDTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Parameters.h"

#include <cmath>
#include <stdexcept>

class TH2F;

Expand Down Expand Up @@ -35,6 +36,9 @@ class KDTrack {
m_nPoints++;
}
void remove(int clusterN) {
if(clusterN < 0 || clusterN >= int(m_clusters.size())) {
throw std::out_of_range("KDTrack::remove: clusterN out of range");
}
m_clusters.erase(m_clusters.begin() + clusterN);
m_nPoints--;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ConformalTracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,7 @@ void ConformalTracking::extendTracksPerLayer(UniqueKDTracks& conformalTracks, Sh
deltaChi2zs = newchi2zs - chi2zs;
streamlog_out(DEBUG9) << "-- hit was fitted and has a delta chi2 of " << deltaChi2 << " and delta chi2zs of "
<< deltaChi2zs << std::endl;
tempTrack.remove(tempTrack.m_clusters.size());
tempTrack.remove(tempTrack.m_clusters.size() - 1);
streamlog_out(DEBUG9) << "-- tempTrack has now " << tempTrack.m_clusters.size() << " hits " << std::endl;

double chi2cut = parameters._chi2cut;
Expand Down