CMS 3D CMS Logo

PFRecTrack.cc
Go to the documentation of this file.
2 #include "Math/GenVector/PositionVector3D.h"
4 // #include "FWCore/MessageLogger/interface/MessageLogger.h"
5 
6 using namespace reco;
7 
8 PFRecTrack::PFRecTrack() : PFTrack(), algoType_(PFRecTrack::Unknown), trackId_(-1), STIP_(-99.) {}
9 
10 PFRecTrack::PFRecTrack(double charge, AlgoType_t algoType, int trackId, const reco::TrackRef& trackRef)
11  : PFTrack(charge), algoType_(algoType), trackId_(trackId), trackRef_(trackRef), STIP_(-99.) {}
12 
14  : PFTrack(charge), algoType_(algoType), trackId_(-1), STIP_(-99.) {}
15 
16 std::ostream& reco::operator<<(std::ostream& out, const PFRecTrack& track) {
17  if (!out)
18  return out;
19 
20  const reco::PFTrajectoryPoint& closestApproach = track.trajectoryPoint(reco::PFTrajectoryPoint::ClosestApproach);
21 
22  out << "Reco track charge = " << track.charge() << ", type = " << track.algoType()
23  << ", Pt = " << closestApproach.momentum().Pt() << ", P = " << closestApproach.momentum().P() << std::endl
24  << "\tR0 = " << closestApproach.position().Rho() << " Z0 = " << closestApproach.position().Z() << std::endl
25  << "\tnumber of tracker measurements = " << track.nTrajectoryMeasurements() << std::endl
26  << "\tnumber of points total = " << track.trajectoryPoints().size() << std::endl;
27 
28  for (unsigned i = 0; i < track.trajectoryPoints().size(); i++)
29  out << track.trajectoryPoints()[i] << std::endl;
30 
31  return out;
32 }
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:20
const math::XYZTLorentzVector & momentum() const
4-momenta quadrivector
Base class for particle flow input reconstructed tracks and simulated particles.
Definition: PFTrack.h:63
ALPAKA_FN_HOST_ACC ALPAKA_FN_INLINE constexpr float charge(ConstView const &tracks, int32_t i)
Definition: TracksSoA.h:73
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
Point of closest approach from beam axis (initial point in the case of PFSimParticle) ...
const math::XYZPoint & position() const
cartesian position (x, y, z)
fixed size matrix
AlgoType_t
different types of fitting algorithms
Definition: PFRecTrack.h:23
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...