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 }
mps_fire.i
i
Definition: mps_fire.py:355
reco::PFTrajectoryPoint::momentum
const math::XYZTLorentzVector & momentum() const
4-momenta quadrivector
Definition: PFTrajectoryPoint.h:109
reco::PFTrack
Base class for particle flow input reconstructed tracks and simulated particles.
Definition: PFTrack.h:63
reco::Unknown
Definition: MuonSimInfo.h:32
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
edm::Ref< TrackCollection >
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
reco::PFTrajectoryPoint::position
const math::XYZPoint & position() const
cartesian position (x, y, z)
Definition: PFTrajectoryPoint.h:100
reco::PFRecTrack::PFRecTrack
PFRecTrack()
Definition: PFRecTrack.cc:8
reco::operator<<
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
reco::PFRecTrack::AlgoType_t
AlgoType_t
different types of fitting algorithms
Definition: PFRecTrack.h:25
PFRecTrack.h
reco::PFRecTrack
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:22
reco::PFTrajectoryPoint
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
Definition: PFTrajectoryPoint.h:26
Point3D.h
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
reco::PFTrajectoryPoint::ClosestApproach
Point of closest approach from beam axis (initial point in the case of PFSimParticle)
Definition: PFTrajectoryPoint.h:36