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 
82  void calculatePositionREP();
83 
85  double charge() const { return charge_; }
86 
88  unsigned int nTrajectoryPoints() const { return trajectoryPoints_.size(); }
89 
91  unsigned int nTrajectoryMeasurements() const {
92  return (indexOutermost_ ? indexOutermost_ - indexInnermost_ + 1 : 0);
93  }
94 
96  const std::vector<reco::PFTrajectoryPoint>& trajectoryPoints() const { return trajectoryPoints_; }
97 
100 
103  const reco::PFTrajectoryPoint& extrapolatedPoint(unsigned layerid) const;
104 
106  std::vector<reco::PFTrajectoryPoint>::const_iterator innermostMeasurement() const {
107  return trajectoryPoints_.begin() + indexInnermost_;
108  }
109 
111  std::vector<reco::PFTrajectoryPoint>::const_iterator outermostMeasurement() const {
112  return trajectoryPoints_.begin() + indexOutermost_;
113  }
114 
115  void setColor(int color) { color_ = color; }
116 
117  int color() const { return color_; }
118 
119  protected:
121  static const unsigned int nMaxTrackingLayers_;
122 
124  double charge_;
125 
127  std::vector<reco::PFTrajectoryPoint> trajectoryPoints_;
128 
130  unsigned int indexInnermost_;
131 
133  unsigned int indexOutermost_;
134 
136  int color_;
137  };
138  std::ostream& operator<<(std::ostream& out, const PFTrack& track);
139 
140 } // namespace reco
141 
142 #endif
reco::PFTrack::extrapolatedPoint
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:58
reco::PFTrack::innermostMeasurement
std::vector< reco::PFTrajectoryPoint >::const_iterator innermostMeasurement() const
iterator on innermost tracker measurement
Definition: PFTrack.h:106
reco::PFTrack::calculatePositionREP
void calculatePositionREP()
Definition: PFTrack.cc:52
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:111
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::PFTrack::setColor
void setColor(int color)
Definition: PFTrack.h:115
reco::PFTrack::color
int color() const
Definition: PFTrack.h:117
reco::PFTrack::trajectoryPoint
const reco::PFTrajectoryPoint & trajectoryPoint(unsigned index) const
Definition: PFTrack.h:99
reco::PFTrack::color_
int color_
color (transient)
Definition: PFTrack.h:136
trackingPlots.other
other
Definition: trackingPlots.py:1465
reco::PFTrack::PFTrack
PFTrack()
Definition: PFTrack.cc:11
reco::operator<<
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
reco::PFTrack::charge
double charge() const
Definition: PFTrack.h:85
reco::PFTrack::nTrajectoryMeasurements
unsigned int nTrajectoryMeasurements() const
Definition: PFTrack.h:91
reco::PFTrack::charge_
double charge_
charge
Definition: PFTrack.h:124
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:127
reco::PFTrack::indexOutermost_
unsigned int indexOutermost_
index outermost tracker measurement
Definition: PFTrack.h:133
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
reco::PFTrack::nTrajectoryPoints
unsigned int nTrajectoryPoints() const
Definition: PFTrack.h:88
reco::PFTrack::trajectoryPoints
const std::vector< reco::PFTrajectoryPoint > & trajectoryPoints() const
Definition: PFTrack.h:96
reco::PFTrack::indexInnermost_
unsigned int indexInnermost_
index innermost tracker measurement
Definition: PFTrack.h:130
reco::PFTrack::nMaxTrackingLayers_
static const unsigned int nMaxTrackingLayers_
maximal number of tracking layers
Definition: PFTrack.h:121
reco::PFTrack::setPoint
void setPoint(unsigned int index, const reco::PFTrajectoryPoint &measurement)
set a trajectory point
Definition: PFTrack.h:76
PFTrajectoryPoint.h