CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
std::vector< reco::PFTrajectoryPoint >::const_iterator innermostMeasurement() const
iterator on innermost tracker measurement
Definition: PFTrack.h:102
Base class for particle flow input reconstructed tracks and simulated particles.
Definition: PFTrack.h:63
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
double charge_
charge
Definition: PFTrack.h:116
const std::vector< reco::PFTrajectoryPoint > & trajectoryPoints() const
Definition: PFTrack.h:92
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:46
void addPoint(const reco::PFTrajectoryPoint &trajPt)
Definition: PFTrack.cc:28
std::vector< reco::PFTrajectoryPoint >::const_iterator outermostMeasurement() const
iterator on outermost tracker measurement
Definition: PFTrack.h:107
std::vector< reco::PFTrajectoryPoint > trajectoryPoints_
vector of trajectory points
Definition: PFTrack.h:119
void setPoint(unsigned int index, const reco::PFTrajectoryPoint &measurement)
set a trajectory point
Definition: PFTrack.h:76
const reco::PFTrajectoryPoint & trajectoryPoint(unsigned index) const
Definition: PFTrack.h:95
static const unsigned int nMaxTrackingLayers_
maximal number of tracking layers
Definition: PFTrack.h:113
unsigned int nTrajectoryMeasurements() const
Definition: PFTrack.h:87
unsigned int indexOutermost_
index outermost tracker measurement
Definition: PFTrack.h:125
unsigned int indexInnermost_
index innermost tracker measurement
Definition: PFTrack.h:122
unsigned int nTrajectoryPoints() const
Definition: PFTrack.h:84
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
double charge() const
Definition: PFTrack.h:81