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),
40  trackWord_(*tkPtr) {
42  setVertex(vtx);
43  }
44 
45  const TrackRef& track() const { return trackRef_; }
46  void setTrack(const TrackRef& ref) { trackRef_ = ref; }
47 
49  float caloEta() const { return caloEta_; }
51  float caloPhi() const { return caloPhi_; }
52  void setCaloEtaPhi(float eta, float phi) {
53  caloEta_ = eta;
54  caloPhi_ = phi;
55  }
56 
58  float trkPtError() const { return trkPtError_; }
59  void setTrkPtError(float ptErr) { trkPtError_ = ptErr; }
60 
62  float caloPtError() const { return caloPtError_; }
64 
65  bool isMuon() const override { return isMuon_; }
66  void setIsMuon(bool isMuon) { isMuon_ = isMuon; }
67 
68  int quality() const { return hwQual(); }
70 
71  unsigned int nPar() const { return nPar_; }
72  unsigned int nStubs() const { return track()->getStubRefs().size(); }
73  float normalizedChi2() const { return track()->chi2Red(); }
74  float chi2() const { return track()->chi2(); }
75 
76  const TTTrack_TrackWord& trackWord() const { return trackWord_; }
78 
79  private:
82  float trkPtError_;
83  float caloPtError_;
84  bool isMuon_;
85  unsigned int nPar_;
87  };
88 
89  typedef std::vector<l1t::PFTrack> PFTrackCollection;
92  typedef std::vector<l1t::PFTrackRef> PFTrackVectorRef;
93 } // namespace l1t
94 #endif
int quality() const
Definition: PFTrack.h:68
void setIsMuon(bool isMuon)
Definition: PFTrack.h:66
float caloEta() const
eta coordinate propagated at the calorimeter surface used for track-cluster matching ...
Definition: PFTrack.h:49
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
Definition: PFTrack.h:14
bool isMuon() const override
Definition: PFTrack.h:65
const TTTrack_TrackWord & trackWord() const
Definition: PFTrack.h:76
float caloPtError_
Definition: PFTrack.h:83
TTTrack_TrackWord & trackWord()
Definition: PFTrack.h:77
TrackRef trackRef_
Definition: PFTrack.h:80
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:62
edm::RefVector< l1t::PFTrackCollection > PFTrackRefVector
Definition: PFTrack.h:91
void setHwQual(int qual)
Definition: L1Candidate.h:31
edm::Ref< l1t::PFTrackCollection > PFTrackRef
Definition: PFTrack.h:90
delete x;
Definition: CaloConfig.h:22
const LorentzVector & p4() const final
four-momentum Lorentz vector
TTTrack_TrackWord trackWord_
Definition: PFTrack.h:86
int hwQual() const
Definition: L1Candidate.h:38
void setVertex(const Point &vertex) override
set vertex
float caloEta_
Definition: PFTrack.h:81
void setCharge(Charge q) final
set electric charge
void setCaloPtError(float ptErr)
Definition: PFTrack.h:63
float chi2() const
Definition: PFTrack.h:74
unsigned int nStubs() const
Definition: PFTrack.h:72
const TrackRef & track() const
Definition: PFTrack.h:45
math::XYZPoint Point
point in the space
Definition: Particle.h:25
std::vector< l1t::PFTrackRef > PFTrackVectorRef
Definition: PFTrack.h:92
float caloPhi_
Definition: PFTrack.h:81
void setTrack(const TrackRef &ref)
Definition: PFTrack.h:46
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
float normalizedChi2() const
Definition: PFTrack.h:73
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:89
float caloPhi() const
phi coordinate propagated at the calorimeter surface used for track-cluster matching ...
Definition: PFTrack.h:51
void setTrkPtError(float ptErr)
Definition: PFTrack.h:59
float trkPtError() const
uncertainty on track pt
Definition: PFTrack.h:58
void setQuality(int quality)
Definition: PFTrack.h:69
void setCaloEtaPhi(float eta, float phi)
Definition: PFTrack.h:52
bool isMuon_
Definition: PFTrack.h:84
double phi() const final
momentum azimuthal angle
unsigned int nPar_
Definition: PFTrack.h:85
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
int charge() const final
electric charge
unsigned int nPar() const
Definition: PFTrack.h:71
float trkPtError_
Definition: PFTrack.h:82
double eta() const final
momentum pseudorapidity