CMS 3D CMS Logo

PFJet.h
Go to the documentation of this file.
1 #ifndef DataFormats_L1TParticleFlow_PFJet_h
2 #define DataFormats_L1TParticleFlow_PFJet_h
3 
4 #include <vector>
7 
8 namespace l1t {
9 
10  class PFJet : public L1Candidate {
11  public:
13  typedef std::vector<edm::Ptr<l1t::L1Candidate>> Constituents;
14 
15  PFJet() {}
16  PFJet(float pt, float eta, float phi, float mass = 0, int hwpt = 0, int hweta = 0, int hwphi = 0)
17  : L1Candidate(PolarLorentzVector(pt, eta, phi, mass), hwpt, hweta, hwphi, /*hwQuality=*/0), rawPt_(pt) {}
18 
19  PFJet(const LorentzVector& p4, int hwpt = 0, int hweta = 0, int hwphi = 0)
20  : L1Candidate(p4, hwpt, hweta, hwphi, /*hwQuality=*/0), rawPt_(p4.Pt()) {}
21 
22  // change the pt (but doesn't change the raw pt)
23  void calibratePt(float newpt);
24 
25  // return the raw pT()
26  float rawPt() const { return rawPt_; }
27 
29  const Constituents& constituents() const { return constituents_; }
32 
33  // candidate interface
34  size_t numberOfDaughters() const override { return constituents_.size(); }
35  const reco::Candidate* daughter(size_type i) const override { return constituents_[i].get(); }
36  using reco::LeafCandidate::daughter; // avoid hiding the base
38 
39  private:
40  float rawPt_;
42  };
43 
44  typedef std::vector<l1t::PFJet> PFJetCollection;
46  typedef std::vector<l1t::PFJetRef> PFJetVectorRef;
47 } // namespace l1t
48 #endif
l1t::PFJet::daughter
const reco::Candidate * daughter(size_type i) const override
return daughter at a given position (throws an exception)
Definition: PFJet.h:35
mps_fire.i
i
Definition: mps_fire.py:428
l1t::PFJet::Constituents
std::vector< edm::Ptr< l1t::L1Candidate > > Constituents
constituent information. note that this is not going to be available in the hardware!
Definition: PFJet.h:13
reco::Candidate::PolarLorentzVector
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
l1t::PFJetVectorRef
std::vector< l1t::PFJetRef > PFJetVectorRef
Definition: PFJet.h:46
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
edm::Ref< l1t::PFJetCollection >
l1t::L1Candidate
Definition: L1Candidate.h:15
l1t::PFJet::constituents_
Constituents constituents_
Definition: PFJet.h:41
l1t::PFJet::numberOfDaughters
size_t numberOfDaughters() const override
number of daughters
Definition: PFJet.h:34
reco::LeafCandidate::mass
double mass() const final
mass
Definition: LeafCandidate.h:131
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
reco::LeafCandidate::daughter
const Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
Definition: LeafCandidate.cc:29
l1t::PFJet
Definition: PFJet.h:10
l1t
delete x;
Definition: CaloConfig.h:22
cand
Definition: decayParser.h:32
Ptr.h
reco::LeafCandidate::p4
const LorentzVector & p4() const final
four-momentum Lorentz vector
Definition: LeafCandidate.h:114
l1t::PFJet::PFJet
PFJet(float pt, float eta, float phi, float mass=0, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFJet.h:16
L1Candidate.h
l1t::PFJet::rawPt_
float rawPt_
Definition: PFJet.h:40
l1t::PFJet::calibratePt
void calibratePt(float newpt)
Definition: PFJet.cc:3
edm::Ptr
Definition: AssociationVector.h:31
reco::Candidate
Definition: Candidate.h:27
l1t::PFJet::PFJet
PFJet()
Definition: PFJet.h:15
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
l1t::PFJet::constituents
const Constituents & constituents() const
constituent information. note that this is not going to be available in the hardware!
Definition: PFJet.h:29
l1t::PFJet::addConstituent
void addConstituent(const edm::Ptr< l1t::L1Candidate > &cand)
adds a candidate to this cluster; note that this only records the information, it's up to you to also...
Definition: PFJet.h:31
l1t::PFJet::daughterPtr
edm::Ptr< l1t::L1Candidate > daughterPtr(size_type i) const
Definition: PFJet.h:37
l1t::PFJetRef
edm::Ref< l1t::PFJetCollection > PFJetRef
Definition: PFJet.h:45
l1t::PFJetCollection
std::vector< l1t::PFJet > PFJetCollection
Definition: PFJet.h:44
reco::Candidate::LorentzVector
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
l1t::PFJet::rawPt
float rawPt() const
Definition: PFJet.h:26
l1t::PFJet::PFJet
PFJet(const LorentzVector &p4, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFJet.h:19
reco::Candidate::size_type
size_t size_type
Definition: Candidate.h:29