File indexing completed on 2024-04-06 12:04:53
0001 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
0002 #include "Math/GenVector/PositionVector3D.h"
0003 #include "DataFormats/Math/interface/Point3D.h"
0004
0005
0006 using namespace reco;
0007
0008 PFRecTrack::PFRecTrack() : PFTrack(), algoType_(PFRecTrack::Unknown), trackId_(-1), STIP_(-99.) {}
0009
0010 PFRecTrack::PFRecTrack(double charge, AlgoType_t algoType, int trackId, const reco::TrackRef& trackRef)
0011 : PFTrack(charge), algoType_(algoType), trackId_(trackId), trackRef_(trackRef), STIP_(-99.) {}
0012
0013 PFRecTrack::PFRecTrack(double charge, AlgoType_t algoType)
0014 : PFTrack(charge), algoType_(algoType), trackId_(-1), STIP_(-99.) {}
0015
0016 std::ostream& reco::operator<<(std::ostream& out, const PFRecTrack& track) {
0017 if (!out)
0018 return out;
0019
0020 const reco::PFTrajectoryPoint& closestApproach = track.trajectoryPoint(reco::PFTrajectoryPoint::ClosestApproach);
0021
0022 out << "Reco track charge = " << track.charge() << ", type = " << track.algoType()
0023 << ", Pt = " << closestApproach.momentum().Pt() << ", P = " << closestApproach.momentum().P() << std::endl
0024 << "\tR0 = " << closestApproach.position().Rho() << " Z0 = " << closestApproach.position().Z() << std::endl
0025 << "\tnumber of tracker measurements = " << track.nTrajectoryMeasurements() << std::endl
0026 << "\tnumber of points total = " << track.trajectoryPoints().size() << std::endl;
0027
0028 for (unsigned i = 0; i < track.trajectoryPoints().size(); i++)
0029 out << track.trajectoryPoints()[i] << std::endl;
0030
0031 return out;
0032 }