test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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  {
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  friend std::ostream& operator<<(std::ostream& out,
125  const PFTrack& track);
126 
127  protected:
128 
130  static const unsigned int nMaxTrackingLayers_;
131 
133  double charge_;
134 
136  std::vector< reco::PFTrajectoryPoint > trajectoryPoints_;
137 
139  unsigned int indexInnermost_;
140 
142  unsigned int indexOutermost_;
143 
145  int color_;
146 
147  };
148 
149 }
150 
151 #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:145
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
void setColor(int color)
Definition: PFTrack.h:120
std::vector< reco::PFTrajectoryPoint > trajectoryPoints_
vector of trajectory points
Definition: PFTrack.h:136
double charge_
charge
Definition: PFTrack.h:133
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:76
friend std::ostream & operator<<(std::ostream &out, const PFTrack &track)
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:130
void calculatePositionREP()
Definition: PFTrack.cc:68
unsigned int nTrajectoryMeasurements() const
Definition: PFTrack.h:94
unsigned int indexOutermost_
index outermost tracker measurement
Definition: PFTrack.h:142
unsigned int indexInnermost_
index innermost tracker measurement
Definition: PFTrack.h:139
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