CMS 3D CMS Logo

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() {}
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),
38  isMuon_(isMuon),
39  nPar_(nPar) {
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_; }
63 
64  bool isMuon() const override { return isMuon_; }
65  void setIsMuon(bool isMuon) { isMuon_ = isMuon; }
66 
67  int quality() const { return hwQual(); }
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
int quality() const
Definition: PFTrack.h:67
void setIsMuon(bool isMuon)
Definition: PFTrack.h:65
float caloEta() const
eta coordinate propagated at the calorimeter surface used for track-cluster matching ...
Definition: PFTrack.h:48
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 caloPtError() const
uncertainty on calorimetric response for a hadron with pt equal to this track&#39;s pt ...
Definition: PFTrack.h:61
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
delete x;
Definition: CaloConfig.h:22
const LorentzVector & p4() const final
four-momentum Lorentz vector
int hwQual() const
Definition: L1Candidate.h:38
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 chi2() const
Definition: PFTrack.h:73
unsigned int nStubs() const
Definition: PFTrack.h:71
const TrackRef & track() const
Definition: PFTrack.h:44
math::XYZPoint Point
point in the space
Definition: Particle.h:25
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
float normalizedChi2() const
Definition: PFTrack.h:72
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
float caloPhi() const
phi coordinate propagated at the calorimeter surface used for track-cluster matching ...
Definition: PFTrack.h:50
void setTrkPtError(float ptErr)
Definition: PFTrack.h:58
float trkPtError() const
uncertainty on track pt
Definition: PFTrack.h:57
void setQuality(int quality)
Definition: PFTrack.h:68
void setCaloEtaPhi(float eta, float phi)
Definition: PFTrack.h:51
bool isMuon_
Definition: PFTrack.h:80
double phi() const final
momentum azimuthal angle
unsigned int nPar_
Definition: PFTrack.h:81
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
int charge() const final
electric charge
unsigned int nPar() const
Definition: PFTrack.h:70
float trkPtError_
Definition: PFTrack.h:78
double eta() const final
momentum pseudorapidity