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  {
65  public:
66 
67  PFTrack();
68 
69  PFTrack(double charge);
70 
71  PFTrack(const PFTrack& other);
72 
75  void addPoint(const reco::PFTrajectoryPoint& trajPt);
76 
78  void setPoint(unsigned int index,
79  const reco::PFTrajectoryPoint& measurement)
80  { trajectoryPoints_[index] = measurement; }
81 
84  void calculatePositionREP();
85 
87  double charge() const { return charge_; }
88 
90  unsigned int nTrajectoryPoints() const
91  { return trajectoryPoints_.size(); }
92 
94  unsigned int nTrajectoryMeasurements() const
95  { return (indexOutermost_ ? indexOutermost_ - indexInnermost_ + 1 : 0); }
96 
98  const std::vector< reco::PFTrajectoryPoint >& trajectoryPoints() const
99  { return trajectoryPoints_; }
100 
103  { return trajectoryPoints_[index]; }
104 
107  const reco::PFTrajectoryPoint& extrapolatedPoint(unsigned layerid) const;
108 
110  std::vector< reco::PFTrajectoryPoint >::const_iterator
112  { return trajectoryPoints_.begin() + indexInnermost_; }
113 
115  std::vector< reco::PFTrajectoryPoint >::const_iterator
117  { return trajectoryPoints_.begin() + indexOutermost_; }
118 
119 
120  void setColor(int color) {color_ = color;}
121 
122  int color() const { return color_; }
123 
124  protected:
125 
127  static const unsigned int nMaxTrackingLayers_;
128 
130  double charge_;
131 
133  std::vector< reco::PFTrajectoryPoint > trajectoryPoints_;
134 
136  unsigned int indexInnermost_;
137 
139  unsigned int indexOutermost_;
140 
142  int color_;
143 
144  };
145  std::ostream& operator<<(std::ostream& out,
146  const PFTrack& track);
147 
148 }
149 
150 #endif
std::vector< reco::PFTrajectoryPoint >::const_iterator outermostMeasurement() const
iterator on outermost tracker measurement
Definition: PFTrack.h:116
int color() const
Definition: PFTrack.h:122
int color_
color (transient)
Definition: PFTrack.h:142
Base class for particle flow input reconstructed tracks and simulated particles.
Definition: PFTrack.h:63
std::vector< reco::PFTrajectoryPoint >::const_iterator innermostMeasurement() const
iterator on innermost tracker measurement
Definition: PFTrack.h:111
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
void setColor(int color)
Definition: PFTrack.h:120
std::vector< reco::PFTrajectoryPoint > trajectoryPoints_
vector of trajectory points
Definition: PFTrack.h:133
double charge_
charge
Definition: PFTrack.h:130
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:76
void addPoint(const reco::PFTrajectoryPoint &trajPt)
Definition: PFTrack.cc:42
const std::vector< reco::PFTrajectoryPoint > & trajectoryPoints() const
Definition: PFTrack.h:98
void setPoint(unsigned int index, const reco::PFTrajectoryPoint &measurement)
set a trajectory point
Definition: PFTrack.h:78
const reco::PFTrajectoryPoint & trajectoryPoint(unsigned index) const
Definition: PFTrack.h:102
static const unsigned int nMaxTrackingLayers_
maximal number of tracking layers
Definition: PFTrack.h:127
void calculatePositionREP()
Definition: PFTrack.cc:68
unsigned int nTrajectoryMeasurements() const
Definition: PFTrack.h:94
unsigned int indexOutermost_
index outermost tracker measurement
Definition: PFTrack.h:139
fixed size matrix
unsigned int indexInnermost_
index innermost tracker measurement
Definition: PFTrack.h:136
unsigned int nTrajectoryPoints() const
Definition: PFTrack.h:90
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
double charge() const
Definition: PFTrack.h:87