CMS 3D CMS Logo

PFCandidate.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TParticleFlow_PFCandidate_h
2 #define DataFormats_L1TParticleFlow_PFCandidate_h
3 
4 #include <vector>
10 
11 namespace l1t {
12 
13  class PFCandidate : public L1Candidate {
14  public:
16  enum ParticleType { ChargedHadron = 0, Electron = 1, NeutralHadron = 2, Photon = 3, Muon = 4 };
17 
20  int charge,
21  const LorentzVector& p,
22  float puppiWeight = -1,
23  int hwpt = 0,
24  int hweta = 0,
25  int hwphi = 0)
26  : PFCandidate(kind, charge, PolarLorentzVector(p), puppiWeight, hwpt, hweta, hwphi) {}
28  int charge,
29  const PolarLorentzVector& p,
30  float puppiWeight = -1,
31  int hwpt = 0,
32  int hweta = 0,
33  int hwphi = 0);
34 
35  ParticleType id() const { return ParticleType(hwQual()); }
36 
37  const PFTrackRef& pfTrack() const { return trackRef_; }
38  void setPFTrack(const PFTrackRef& ref) { trackRef_ = ref; }
39 
40  const PFClusterRef& pfCluster() const { return clusterRef_; }
41  void setPFCluster(const PFClusterRef& ref) { clusterRef_ = ref; }
42 
43  const MuonRef& muon() const { return muonRef_; }
44  void setMuon(const MuonRef& ref) { muonRef_ = ref; }
45 
47  float puppiWeight() const { return puppiWeight_; }
48 
49  void setZ0(float z0) { setVertex(reco::Particle::Point(0, 0, z0)); }
50  void setDxy(float dxy) { dxy_ = dxy; }
51 
52  float z0() const { return vz(); }
53  float dxy() const { return dxy_; }
54 
55  int16_t hwZ0() const { return hwZ0_; }
56  int16_t hwDxy() const { return hwDxy_; }
57  uint16_t hwTkQuality() const { return hwTkQuality_; }
58  uint16_t hwPuppiWeight() const { return hwPuppiWeight_; }
59  uint16_t hwEmID() const { return hwEmID_; }
61 
62  void setHwZ0(int16_t hwZ0) { hwZ0_ = hwZ0; }
63  void setHwDxy(int16_t hwDxy) { hwDxy_ = hwDxy; }
66  void setHwEmID(uint16_t hwEmID) { hwEmID_ = hwEmID; }
68 
69  private:
74 
75  int16_t hwZ0_, hwDxy_;
78 
80  };
81 
82  typedef std::vector<l1t::PFCandidate> PFCandidateCollection;
86 } // namespace l1t
87 #endif
uint16_t hwPuppiWeight() const
Definition: PFCandidate.h:58
uint16_t hwTkQuality_
Definition: PFCandidate.h:76
Definition: Photon.py:1
l1t::SAMuonRef MuonRef
Definition: PFCandidate.h:15
double vz() const override
z coordinate of vertex position
void setDxy(float dxy)
Definition: PFCandidate.h:50
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:82
void setHwZ0(int16_t hwZ0)
Definition: PFCandidate.h:62
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: LeafCandidate.h:25
edm::RefVector< l1t::PFCandidateCollection > PFCandidateRefVector
Definition: PFCandidate.h:84
delete x;
Definition: CaloConfig.h:22
float dxy() const
Definition: PFCandidate.h:53
PFTrackRef trackRef_
Definition: PFCandidate.h:71
uint16_t hwTkQuality() const
Definition: PFCandidate.h:57
PFClusterRef clusterRef_
Definition: PFCandidate.h:70
int hwQual() const
Definition: L1Candidate.h:38
void setVertex(const Point &vertex) override
set vertex
const PFClusterRef & pfCluster() const
Definition: PFCandidate.h:40
void setMuon(const MuonRef &ref)
Definition: PFCandidate.h:44
void setHwEmID(uint16_t hwEmID)
Definition: PFCandidate.h:66
double p() const final
magnitude of momentum vector
Definition: Muon.py:1
float z0() const
Definition: PFCandidate.h:52
int16_t hwDxy() const
Definition: PFCandidate.h:56
math::XYZPoint Point
point in the space
Definition: Particle.h:25
uint64_t encodedPuppi64() const
Definition: PFCandidate.h:60
void setHwDxy(int16_t hwDxy)
Definition: PFCandidate.h:63
uint16_t hwEmID() const
Definition: PFCandidate.h:59
const MuonRef & muon() const
Definition: PFCandidate.h:43
void setZ0(float z0)
Definition: PFCandidate.h:49
void setHwPuppiWeight(uint16_t hwPuppiWeight)
Definition: PFCandidate.h:65
void setHwTkQuality(uint16_t hwTkQuality)
Definition: PFCandidate.h:64
l1t::RegionalOutput< l1t::PFCandidateCollection > PFCandidateRegionalOutput
Definition: PFCandidate.h:85
float puppiWeight() const
PUPPI weight (-1 if not available)
Definition: PFCandidate.h:47
unsigned long long uint64_t
Definition: Time.h:13
void setEncodedPuppi64(uint64_t encodedPuppi64)
Definition: PFCandidate.h:67
uint64_t encodedPuppi64_
Definition: PFCandidate.h:77
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
int16_t hwZ0() const
Definition: PFCandidate.h:55
MuonRef muonRef_
Definition: PFCandidate.h:72
PFCandidate(ParticleType kind, int charge, const LorentzVector &p, float puppiWeight=-1, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFCandidate.h:19
uint16_t hwEmID_
Definition: PFCandidate.h:76
const PFTrackRef & pfTrack() const
Definition: PFCandidate.h:37
void setPdgIdFromParticleType(int charge, ParticleType kind)
Definition: PFCandidate.cc:18
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
Definition: PFCandidate.h:83
void setPFCluster(const PFClusterRef &ref)
Definition: PFCandidate.h:41
void setPFTrack(const PFTrackRef &ref)
Definition: PFCandidate.h:38
uint16_t hwPuppiWeight_
Definition: PFCandidate.h:76
ParticleType id() const
Definition: PFCandidate.h:35
int charge() const final
electric charge
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38