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
double pt() const final
transverse momentum
float rawPt_
Definition: PFJet.h:40
size_t size_type
Definition: Candidate.h:29
PFJet(const LorentzVector &p4, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFJet.h:19
const reco::Candidate * daughter(size_type i) const override
return daughter at a given position (throws an exception)
Definition: PFJet.h:35
delete x;
Definition: CaloConfig.h:22
Constituents constituents_
Definition: PFJet.h:41
void addConstituent(const edm::Ptr< l1t::L1Candidate > &cand)
adds a candidate to this cluster; note that this only records the information, it&#39;s up to you to also...
Definition: PFJet.h:31
const LorentzVector & p4() const final
four-momentum Lorentz vector
std::vector< l1t::PFJet > PFJetCollection
Definition: PFJet.h:44
const Candidate * daughter(size_type) const override
return daughter at a given position (throws an exception)
edm::Ptr< l1t::L1Candidate > daughterPtr(size_type i) const
Definition: PFJet.h:37
float rawPt() const
Definition: PFJet.h:26
PFJet(float pt, float eta, float phi, float mass=0, int hwpt=0, int hweta=0, int hwphi=0)
Definition: PFJet.h:16
void calibratePt(float newpt)
Definition: PFJet.cc:3
edm::Ref< l1t::PFJetCollection > PFJetRef
Definition: PFJet.h:45
PFJet()
Definition: PFJet.h:15
const Constituents & constituents() const
constituent information. note that this is not going to be available in the hardware! ...
Definition: PFJet.h:29
std::vector< l1t::PFJetRef > PFJetVectorRef
Definition: PFJet.h:46
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:36
double mass() const final
mass
double phi() const final
momentum azimuthal angle
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
size_t numberOfDaughters() const override
number of daughters
Definition: PFJet.h:34
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:38
double eta() const final
momentum pseudorapidity