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
l1t::PFCandidate::muonRef_
MuonRef muonRef_
Definition: PFCandidate.h:51
l1t::PFCandidate::pfTrack
const PFTrackRef & pfTrack() const
Definition: PFCandidate.h:36
l1t::PFCandidate::setPFTrack
void setPFTrack(const PFTrackRef &ref)
Definition: PFCandidate.h:37
l1t::PFCandidate::clusterRef_
PFClusterRef clusterRef_
Definition: PFCandidate.h:49
l1t::PFCandidate::trackRef_
PFTrackRef trackRef_
Definition: PFCandidate.h:50
Electron
Definition: Electron.py:1
l1t::PFCandidate::pfCluster
const PFClusterRef & pfCluster() const
Definition: PFCandidate.h:39
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
Muon.h
l1t::L1Candidate::hwQual
int hwQual() const
Definition: L1Candidate.h:38
edm::RefVector< l1t::PFCandidateCollection >
Muon
Definition: Muon.py:1
edm::Ref< l1t::PFTrackCollection >
l1t::PFCandidate::MuonRef
edm::Ptr< l1t::Muon > MuonRef
Definition: PFCandidate.h:14
l1t::PFCandidate::muon
const MuonRef & muon() const
Definition: PFCandidate.h:42
l1t::L1Candidate
Definition: L1Candidate.h:15
l1t::PFCandidateRef
edm::Ref< l1t::PFCandidateCollection > PFCandidateRef
Definition: PFCandidate.h:58
reco::LeafCandidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: LeafCandidate.h:25
l1t::PFCandidate::puppiWeight
float puppiWeight() const
PUPPI weight (-1 if not available)
Definition: PFCandidate.h:46
l1t::PFCandidate::setMuon
void setMuon(const MuonRef &ref)
Definition: PFCandidate.h:43
l1t
delete x;
Definition: CaloConfig.h:22
Photon
Definition: Photon.py:1
l1t::PFCandidate::ChargedHadron
Definition: PFCandidate.h:15
PFTrack.h
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition: LeafCandidate.h:106
l1t::PFCandidate::PFCandidate
PFCandidate(ParticleType kind, int charge, const LorentzVector &p, float puppiWeight=-1, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFCandidate.h:18
l1t::PFCandidate::setPdgIdFromParticleType
void setPdgIdFromParticleType(int charge, ParticleType kind)
Definition: PFCandidate.cc:10
L1Candidate.h
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
l1t::PFCandidateCollection
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:57
l1t::PFCandidateRefVector
edm::RefVector< l1t::PFCandidateCollection > PFCandidateRefVector
Definition: PFCandidate.h:59
edm::Ptr< l1t::Muon >
PFCluster.h
l1t::PFCandidate::setPFCluster
void setPFCluster(const PFClusterRef &ref)
Definition: PFCandidate.h:40
l1t::PFCandidate::id
ParticleType id() const
Definition: PFCandidate.h:34
l1t::PFCandidate::ParticleType
ParticleType
Definition: PFCandidate.h:15
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
l1t::PFCandidate::PFCandidate
PFCandidate()
Definition: PFCandidate.h:17
l1t::PFCandidate
Definition: PFCandidate.h:12
l1t::PFCandidate::NeutralHadron
Definition: PFCandidate.h:15
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
l1t::PFCandidate::puppiWeight_
float puppiWeight_
Definition: PFCandidate.h:52