Skip to content

Commit

Permalink
Further cleanup of the PFTrack class
Browse files Browse the repository at this point in the history
  • Loading branch information
hatakeyamak committed Aug 15, 2020
1 parent 5f91f5e commit 8e55e57
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions DataFormats/ParticleFlowReco/src/PFTrack.cc
Expand Up @@ -26,24 +26,21 @@ PFTrack::PFTrack(const PFTrack& other)
indexOutermost_(other.indexOutermost_) {}

void PFTrack::addPoint(const PFTrajectoryPoint& trajPt) {

if (trajPt.isTrackerLayer()) {
if (!indexOutermost_) { // first time a measurement is added
if (trajectoryPoints_.size() < PFTrajectoryPoint::BeamPipeOrEndVertex + 1) {
PFTrajectoryPoint dummyPt;
for (unsigned iPt = trajectoryPoints_.size(); iPt < PFTrajectoryPoint::BeamPipeOrEndVertex + 1; iPt++)
trajectoryPoints_.push_back(dummyPt);
} else if (trajectoryPoints_.size() > PFTrajectoryPoint::BeamPipeOrEndVertex + 1) {
edm::LogWarning("PFTrack")<<"trajectoryPoints_.size() is too large = "
<<trajectoryPoints_.size();
edm::LogWarning("PFTrack") << "trajectoryPoints_.size() is too large = " << trajectoryPoints_.size();
}
indexOutermost_ = indexInnermost_ = PFTrajectoryPoint::BeamPipeOrEndVertex + 1;
} else
indexOutermost_++;
}
// Use push_back instead of insert in order to gain time
trajectoryPoints_.push_back(trajPt);

}

const reco::PFTrajectoryPoint& PFTrack::extrapolatedPoint(unsigned layerid) const {
Expand Down

0 comments on commit 8e55e57

Please sign in to comment.