File indexing completed on 2024-04-06 12:04:52
0001 #ifndef DataFormats_ParticleFlowReco_PFTrack_h
0002 #define DataFormats_ParticleFlowReco_PFTrack_h
0003
0004 #include "DataFormats/ParticleFlowReco/interface/PFTrajectoryPoint.h"
0005
0006 #include <iostream>
0007 #include <vector>
0008
0009 namespace reco {
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 class PFTrack {
0064 public:
0065 PFTrack();
0066
0067 PFTrack(double charge);
0068
0069 PFTrack(const PFTrack& other);
0070
0071 PFTrack& operator=(const PFTrack& other) = default;
0072
0073
0074
0075 void addPoint(const reco::PFTrajectoryPoint& trajPt);
0076
0077
0078 void setPoint(unsigned int index, const reco::PFTrajectoryPoint& measurement) {
0079 trajectoryPoints_[index] = measurement;
0080 }
0081
0082
0083 double charge() const { return charge_; }
0084
0085
0086 unsigned int nTrajectoryPoints() const { return trajectoryPoints_.size(); }
0087
0088
0089 unsigned int nTrajectoryMeasurements() const {
0090 return (indexOutermost_ ? indexOutermost_ - indexInnermost_ + 1 : 0);
0091 }
0092
0093
0094 const std::vector<reco::PFTrajectoryPoint>& trajectoryPoints() const { return trajectoryPoints_; }
0095
0096
0097 const reco::PFTrajectoryPoint& trajectoryPoint(unsigned index) const { return trajectoryPoints_[index]; }
0098
0099
0100
0101 const reco::PFTrajectoryPoint& extrapolatedPoint(unsigned layerid) const;
0102
0103
0104 std::vector<reco::PFTrajectoryPoint>::const_iterator innermostMeasurement() const {
0105 return trajectoryPoints_.begin() + indexInnermost_;
0106 }
0107
0108
0109 std::vector<reco::PFTrajectoryPoint>::const_iterator outermostMeasurement() const {
0110 return trajectoryPoints_.begin() + indexOutermost_;
0111 }
0112
0113 protected:
0114
0115 static const unsigned int nMaxTrackingLayers_;
0116
0117
0118 double charge_;
0119
0120
0121 std::vector<reco::PFTrajectoryPoint> trajectoryPoints_;
0122
0123
0124 unsigned int indexInnermost_;
0125
0126
0127 unsigned int indexOutermost_;
0128 };
0129 std::ostream& operator<<(std::ostream& out, const PFTrack& track);
0130
0131 }
0132
0133 #endif