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>
9 
10 namespace l1t {
11 
12  class PFCandidate : public L1Candidate {
13  public:
15  enum ParticleType { ChargedHadron = 0, Electron = 1, NeutralHadron = 2, Photon = 3, Muon = 4 };
16 
19  int charge,
20  const LorentzVector& p,
21  float puppiWeight = -1,
22  int hwpt = 0,
23  int hweta = 0,
24  int hwphi = 0)
25  : PFCandidate(kind, charge, PolarLorentzVector(p), puppiWeight, hwpt, hweta, hwphi) {}
27  int charge,
28  const PolarLorentzVector& p,
29  float puppiWeight = -1,
30  int hwpt = 0,
31  int hweta = 0,
32  int hwphi = 0);
33 
34  ParticleType id() const { return ParticleType(hwQual()); }
35 
36  const PFTrackRef& pfTrack() const { return trackRef_; }
37  void setPFTrack(const PFTrackRef& ref) { trackRef_ = ref; }
38 
39  const PFClusterRef& pfCluster() const { return clusterRef_; }
40  void setPFCluster(const PFClusterRef& ref) { clusterRef_ = ref; }
41 
42  const MuonRef& muon() const { return muonRef_; }
43  void setMuon(const MuonRef& ref) { muonRef_ = ref; }
44 
46  float puppiWeight() const { return puppiWeight_; }
47 
48  private:
52  float puppiWeight_;
53 
55  };
56 
57  typedef std::vector<l1t::PFCandidate> PFCandidateCollection;
60 } // namespace l1t
61 #endif
Definition: Photon.py:1
edm::Ptr< l1t::Muon > MuonRef
Definition: PFCandidate.h:14
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:57
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: LeafCandidate.h:25
edm::RefVector< l1t::PFCandidateCollection > PFCandidateRefVector
Definition: PFCandidate.h:59
delete x;
Definition: CaloConfig.h:22
PFTrackRef trackRef_
Definition: PFCandidate.h:50
PFClusterRef clusterRef_
Definition: PFCandidate.h:49
int hwQual() const
Definition: L1Candidate.h:38
const PFClusterRef & pfCluster() const
Definition: PFCandidate.h:39
void setMuon(const MuonRef &ref)
Definition: PFCandidate.h:43
double p() const final
magnitude of momentum vector
Definition: Muon.py:1
const MuonRef & muon() const
Definition: PFCandidate.h:42
float puppiWeight() const
PUPPI weight (-1 if not available)
Definition: PFCandidate.h:46
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
MuonRef muonRef_
Definition: PFCandidate.h:51
PFCandidate(ParticleType kind, int charge, const LorentzVector &p, float puppiWeight=-1, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFCandidate.h:18
const PFTrackRef & pfTrack() const
Definition: PFCandidate.h:36
void setPdgIdFromParticleType(int charge, ParticleType kind)
Definition: PFCandidate.cc:10
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
Definition: PFCandidate.h:58
void setPFCluster(const PFClusterRef &ref)
Definition: PFCandidate.h:40
void setPFTrack(const PFTrackRef &ref)
Definition: PFCandidate.h:37
ParticleType id() const
Definition: PFCandidate.h:34
int charge() const final
electric charge
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38