CMS 3D CMS Logo

PFTrack.h
Go to the documentation of this file.
1 #ifndef DataFormats_ParticleFlowReco_PFTrack_h
2 #define DataFormats_ParticleFlowReco_PFTrack_h
3 
5 
6 #include <iostream>
7 #include <vector>
8 
9 namespace reco {
10 
63  class PFTrack {
64  public:
65  PFTrack();
66 
67  PFTrack(double charge);
68 
69  PFTrack(const PFTrack& other);
70 
73  void addPoint(const reco::PFTrajectoryPoint& trajPt);
74 
76  void setPoint(unsigned int index, const reco::PFTrajectoryPoint& measurement) {
77  trajectoryPoints_[index] = measurement;
78  }
79 
81  double charge() const { return charge_; }
82 
84  unsigned int nTrajectoryPoints() const { return trajectoryPoints_.size(); }
85 
87  unsigned int nTrajectoryMeasurements() const {
88  return (indexOutermost_ ? indexOutermost_ - indexInnermost_ + 1 : 0);
89  }
90 
92  const std::vector<reco::PFTrajectoryPoint>& trajectoryPoints() const { return trajectoryPoints_; }
93 
96 
99  const reco::PFTrajectoryPoint& extrapolatedPoint(unsigned layerid) const;
100 
102  std::vector<reco::PFTrajectoryPoint>::const_iterator innermostMeasurement() const {
103  return trajectoryPoints_.begin() + indexInnermost_;
104  }
105 
107  std::vector<reco::PFTrajectoryPoint>::const_iterator outermostMeasurement() const {
108  return trajectoryPoints_.begin() + indexOutermost_;
109  }
110 
111  protected:
113  static const unsigned int nMaxTrackingLayers_;
114 
116  double charge_;
117 
119  std::vector<reco::PFTrajectoryPoint> trajectoryPoints_;
120 
122  unsigned int indexInnermost_;
123 
125  unsigned int indexOutermost_;
126  };
127  std::ostream& operator<<(std::ostream& out, const PFTrack& track);
128 
129 } // namespace reco
130 
131 #endif
reco::PFTrack::extrapolatedPoint
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:46
reco::PFTrack::innermostMeasurement
std::vector< reco::PFTrajectoryPoint >::const_iterator innermostMeasurement() const
iterator on innermost tracker measurement
Definition: PFTrack.h:102
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
reco::PFTrack::addPoint
void addPoint(const reco::PFTrajectoryPoint &trajPt)
Definition: PFTrack.cc:28
reco::PFTrack
Base class for particle flow input reconstructed tracks and simulated particles.
Definition: PFTrack.h:63
reco::PFTrack::outermostMeasurement
std::vector< reco::PFTrajectoryPoint >::const_iterator outermostMeasurement() const
iterator on outermost tracker measurement
Definition: PFTrack.h:107
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::PFTrack::trajectoryPoint
const reco::PFTrajectoryPoint & trajectoryPoint(unsigned index) const
Definition: PFTrack.h:95
trackingPlots.other
other
Definition: trackingPlots.py:1460
reco::PFTrack::PFTrack
PFTrack()
Definition: PFTrack.cc:12
reco::operator<<
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
reco::PFTrack::charge
double charge() const
Definition: PFTrack.h:81
reco::PFTrack::nTrajectoryMeasurements
unsigned int nTrajectoryMeasurements() const
Definition: PFTrack.h:87
reco::PFTrack::charge_
double charge_
charge
Definition: PFTrack.h:116
reco::PFTrajectoryPoint
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
Definition: PFTrajectoryPoint.h:26
reco::PFTrack::trajectoryPoints_
std::vector< reco::PFTrajectoryPoint > trajectoryPoints_
vector of trajectory points
Definition: PFTrack.h:119
reco::PFTrack::indexOutermost_
unsigned int indexOutermost_
index outermost tracker measurement
Definition: PFTrack.h:125
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFTrack::nTrajectoryPoints
unsigned int nTrajectoryPoints() const
Definition: PFTrack.h:84
reco::PFTrack::trajectoryPoints
const std::vector< reco::PFTrajectoryPoint > & trajectoryPoints() const
Definition: PFTrack.h:92
reco::PFTrack::indexInnermost_
unsigned int indexInnermost_
index innermost tracker measurement
Definition: PFTrack.h:122
reco::PFTrack::nMaxTrackingLayers_
static const unsigned int nMaxTrackingLayers_
maximal number of tracking layers
Definition: PFTrack.h:113
reco::PFTrack::setPoint
void setPoint(unsigned int index, const reco::PFTrajectoryPoint &measurement)
set a trajectory point
Definition: PFTrack.h:76
PFTrajectoryPoint.h