CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PFTrack.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TParticleFlow_PFTrack_h
2 #define DataFormats_L1TParticleFlow_PFTrack_h
3 
4 #include <vector>
9 
10 namespace l1t {
11 
12  class PFTrack : public L1Candidate {
13  public:
16 
17  PFTrack() {}
20  const reco::Particle::Point& vtx,
21  const TrackRef& tkPtr,
22  int nPar,
23  float caloEta,
24  float caloPhi,
25  float trkPtError = -1,
26  float caloPtError = -1,
27  int quality = 1,
28  bool isMuon = false,
29  int hwpt = 0,
30  int hweta = 0,
31  int hwphi = 0)
32  : L1Candidate(p4, hwpt, hweta, hwphi, quality),
33  trackRef_(tkPtr),
34  caloEta_(caloEta),
35  caloPhi_(caloPhi),
38  isMuon_(isMuon),
39  nPar_(nPar) {
40  setCharge(charge);
41  setVertex(vtx);
42  }
43 
44  const TrackRef& track() const { return trackRef_; }
45  void setTrack(const TrackRef& ref) { trackRef_ = ref; }
46 
48  float caloEta() const { return caloEta_; }
50  float caloPhi() const { return caloPhi_; }
51  void setCaloEtaPhi(float eta, float phi) {
52  caloEta_ = eta;
53  caloPhi_ = phi;
54  }
55 
57  float trkPtError() const { return trkPtError_; }
58  void setTrkPtError(float ptErr) { trkPtError_ = ptErr; }
59 
61  float caloPtError() const { return caloPtError_; }
62  void setCaloPtError(float ptErr) { caloPtError_ = ptErr; }
63 
64  bool isMuon() const override { return isMuon_; }
65  void setIsMuon(bool isMuon) { isMuon_ = isMuon; }
66 
67  int quality() const { return hwQual(); }
68  void setQuality(int quality) { setHwQual(quality); }
69 
70  unsigned int nPar() const { return nPar_; }
71  unsigned int nStubs() const { return track()->getStubRefs().size(); }
72  float normalizedChi2() const { return track()->chi2Red(); }
73  float chi2() const { return track()->chi2(); }
74 
75  private:
78  float trkPtError_;
79  float caloPtError_;
80  bool isMuon_;
81  unsigned int nPar_;
82  };
83 
84  typedef std::vector<l1t::PFTrack> PFTrackCollection;
87  typedef std::vector<l1t::PFTrackRef> PFTrackVectorRef;
88 } // namespace l1t
89 #endif
void setIsMuon(bool isMuon)
Definition: PFTrack.h:65
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
Definition: PFTrack.h:14
bool isMuon() const override
Definition: PFTrack.h:64
float caloPtError_
Definition: PFTrack.h:79
TrackRef trackRef_
Definition: PFTrack.h:76
edm::Ref< std::vector< L1TTTrackType > > TrackRef
Definition: PFTrack.h:15
float chi2() const
Definition: PFTrack.h:73
edm::RefVector< l1t::PFTrackCollection > PFTrackRefVector
Definition: PFTrack.h:86
void setHwQual(int qual)
Definition: L1Candidate.h:31
edm::Ref< l1t::PFTrackCollection > PFTrackRef
Definition: PFTrack.h:85
float caloEta() const
eta coordinate propagated at the calorimeter surface used for track-cluster matching ...
Definition: PFTrack.h:48
float trkPtError() const
uncertainty on track pt
Definition: PFTrack.h:57
const LorentzVector & p4() const final
four-momentum Lorentz vector
void setVertex(const Point &vertex) override
set vertex
float caloEta_
Definition: PFTrack.h:77
void setCharge(Charge q) final
set electric charge
void setCaloPtError(float ptErr)
Definition: PFTrack.h:62
float normalizedChi2() const
Definition: PFTrack.h:72
unsigned int nPar() const
Definition: PFTrack.h:70
math::XYZPoint Point
point in the space
Definition: Particle.h:25
int hwQual() const
Definition: L1Candidate.h:38
const TrackRef & track() const
Definition: PFTrack.h:44
std::vector< l1t::PFTrackRef > PFTrackVectorRef
Definition: PFTrack.h:87
float caloPhi_
Definition: PFTrack.h:77
void setTrack(const TrackRef &ref)
Definition: PFTrack.h:45
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
PFTrack(int charge, const reco::Particle::LorentzVector &p4, const reco::Particle::Point &vtx, const TrackRef &tkPtr, int nPar, float caloEta, float caloPhi, float trkPtError=-1, float caloPtError=-1, int quality=1, bool isMuon=false, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFTrack.h:18
std::vector< l1t::PFTrack > PFTrackCollection
Definition: PFTrack.h:84
void setTrkPtError(float ptErr)
Definition: PFTrack.h:58
void setQuality(int quality)
Definition: PFTrack.h:68
void setCaloEtaPhi(float eta, float phi)
Definition: PFTrack.h:51
bool isMuon_
Definition: PFTrack.h:80
int quality() const
Definition: PFTrack.h:67
double phi() const final
momentum azimuthal angle
float caloPhi() const
phi coordinate propagated at the calorimeter surface used for track-cluster matching ...
Definition: PFTrack.h:50
unsigned int nPar_
Definition: PFTrack.h:81
unsigned int nStubs() const
Definition: PFTrack.h:71
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
int charge() const final
electric charge
float caloPtError() const
uncertainty on calorimetric response for a hadron with pt equal to this track&#39;s pt ...
Definition: PFTrack.h:61
float trkPtError_
Definition: PFTrack.h:78
double eta() const final
momentum pseudorapidity