CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/ParticleFlowReco/interface/PFTrack.h

Go to the documentation of this file.
00001 #ifndef DataFormats_ParticleFlowReco_PFTrack_h
00002 #define DataFormats_ParticleFlowReco_PFTrack_h
00003 
00004 #include "DataFormats/ParticleFlowReco/interface/PFTrajectoryPoint.h"
00005 
00006 #include <iostream>
00007 #include <vector>
00008 
00009 namespace reco {
00010 
00063   class PFTrack
00064     {
00065     public:
00066     
00067       PFTrack();
00068     
00069       PFTrack(double charge);
00070 
00071       PFTrack(const PFTrack& other);
00072    
00075       void addPoint(const reco::PFTrajectoryPoint& trajPt);
00076 
00078       void setPoint(unsigned int index,
00079                     const reco::PFTrajectoryPoint& measurement)
00080         { trajectoryPoints_[index] = measurement; }
00081 
00084       void calculatePositionREP();
00085 
00087       double charge() const { return charge_; }
00088 
00090       unsigned int nTrajectoryPoints() const 
00091         { return trajectoryPoints_.size(); }
00092     
00094       unsigned int nTrajectoryMeasurements() const 
00095         { return (indexOutermost_ ? indexOutermost_ - indexInnermost_ + 1 : 0); }
00096 
00098       const std::vector< reco::PFTrajectoryPoint >& trajectoryPoints() const 
00099         { return trajectoryPoints_; }
00100     
00102       const reco::PFTrajectoryPoint& trajectoryPoint(unsigned index) const 
00103         { return trajectoryPoints_[index]; }
00104 
00107       const reco::PFTrajectoryPoint& extrapolatedPoint(unsigned layerid) const; 
00108 
00110       std::vector< reco::PFTrajectoryPoint >::const_iterator 
00111         innermostMeasurement() const
00112         { return trajectoryPoints_.begin() + indexInnermost_; }
00113     
00115       std::vector< reco::PFTrajectoryPoint >::const_iterator 
00116         outermostMeasurement() const
00117         { return trajectoryPoints_.begin() + indexOutermost_; }
00118     
00119 
00120       void         setColor(int color) {color_ = color;}
00121     
00122       int          color() const { return color_; }    
00123 
00124       friend  std::ostream& operator<<(std::ostream& out, 
00125                                        const PFTrack& track);
00126 
00127     protected:
00128 
00130       static const unsigned int nMaxTrackingLayers_;
00131   
00133       double charge_;
00134 
00136       std::vector< reco::PFTrajectoryPoint > trajectoryPoints_;
00137 
00139       unsigned int indexInnermost_;
00140 
00142       unsigned int indexOutermost_;
00143 
00145       int  color_;
00146 
00147     };
00148 
00149 }
00150 
00151 #endif