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
l1t::PFTrack::caloPhi_
float caloPhi_
Definition: PFTrack.h:77
l1t::PFTrack::caloPhi
float caloPhi() const
phi coordinate propagated at the calorimeter surface used for track-cluster matching
Definition: PFTrack.h:50
l1t::PFTrack::trkPtError_
float trkPtError_
Definition: PFTrack.h:78
muons_cff.ptErr
ptErr
Definition: muons_cff.py:124
l1t::PFTrack::nStubs
unsigned int nStubs() const
Definition: PFTrack.h:71
TTTypes.h
l1t::PFTrack
Definition: PFTrack.h:12
l1t::PFTrack::track
const TrackRef & track() const
Definition: PFTrack.h:44
l1t::PFTrackVectorRef
std::vector< l1t::PFTrackRef > PFTrackVectorRef
Definition: PFTrack.h:87
l1t::L1Candidate::hwQual
int hwQual() const
Definition: L1Candidate.h:38
l1t::PFTrack::trkPtError
float trkPtError() const
uncertainty on track pt
Definition: PFTrack.h:57
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:29
edm::RefVector
Definition: EDProductfwd.h:27
l1t::PFTrack::quality
int quality() const
Definition: PFTrack.h:67
reco::Particle::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Particle.h:21
edm::Ref
Definition: AssociativeIterator.h:58
l1t::L1Candidate
Definition: L1Candidate.h:15
l1t::PFTrack::trackRef_
TrackRef trackRef_
Definition: PFTrack.h:76
l1t::L1Candidate::setHwQual
void setHwQual(int qual)
Definition: L1Candidate.h:31
l1t::PFTrack::PFTrack
PFTrack()
Definition: PFTrack.h:17
l1t::PFTrack::L1TTTrackType
TTTrack< Ref_Phase2TrackerDigi_ > L1TTTrackType
Definition: PFTrack.h:14
TTTrack.h
l1t::PFTrack::caloEta_
float caloEta_
Definition: PFTrack.h:77
l1t::PFTrackCollection
std::vector< l1t::PFTrack > PFTrackCollection
Definition: PFTrack.h:84
l1t::PFTrack::caloPtError
float caloPtError() const
uncertainty on calorimetric response for a hadron with pt equal to this track's pt
Definition: PFTrack.h:61
reco::LeafCandidate::setVertex
void setVertex(const Point &vertex) override
set vertex
Definition: LeafCandidate.h:173
l1t::PFTrack::setCaloEtaPhi
void setCaloEtaPhi(float eta, float phi)
Definition: PFTrack.h:51
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
l1t::PFTrack::isMuon_
bool isMuon_
Definition: PFTrack.h:80
l1t::PFTrack::caloPtError_
float caloPtError_
Definition: PFTrack.h:79
l1t
delete x;
Definition: CaloConfig.h:22
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition: LeafCandidate.h:106
l1t::PFTrack::isMuon
bool isMuon() const override
Definition: PFTrack.h:64
L1Candidate.h
l1t::PFTrack::setTrkPtError
void setTrkPtError(float ptErr)
Definition: PFTrack.h:58
l1t::PFTrack::setQuality
void setQuality(int quality)
Definition: PFTrack.h:68
l1t::PFTrack::nPar_
unsigned int nPar_
Definition: PFTrack.h:81
l1t::PFTrackRef
edm::Ref< l1t::PFTrackCollection > PFTrackRef
Definition: PFTrack.h:85
l1t::PFTrackRefVector
edm::RefVector< l1t::PFTrackCollection > PFTrackRefVector
Definition: PFTrack.h:86
Ref.h
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
l1t::PFTrack::PFTrack
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
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
l1t::PFTrack::TrackRef
edm::Ref< std::vector< L1TTTrackType > > TrackRef
Definition: PFTrack.h:15
l1t::PFTrack::normalizedChi2
float normalizedChi2() const
Definition: PFTrack.h:72
l1t::PFTrack::nPar
unsigned int nPar() const
Definition: PFTrack.h:70
l1t::PFTrack::setCaloPtError
void setCaloPtError(float ptErr)
Definition: PFTrack.h:62
reco::LeafCandidate::setCharge
void setCharge(Charge q) final
set electric charge
Definition: LeafCandidate.h:108
reco::Particle::Point
math::XYZPoint Point
point in the space
Definition: Particle.h:25
l1t::PFTrack::chi2
float chi2() const
Definition: PFTrack.h:73
l1t::PFTrack::setIsMuon
void setIsMuon(bool isMuon)
Definition: PFTrack.h:65
l1t::PFTrack::setTrack
void setTrack(const TrackRef &ref)
Definition: PFTrack.h:45
l1t::PFTrack::caloEta
float caloEta() const
eta coordinate propagated at the calorimeter surface used for track-cluster matching
Definition: PFTrack.h:48