CMS 3D CMS Logo

Jet.h
Go to the documentation of this file.
1 #ifndef JetReco_Jet_h
2 #define JetReco_Jet_h
3 
16 #include <string>
18 
19 namespace reco {
20  class Jet : public CompositePtrCandidate {
21  public:
23  typedef std::vector<Constituent> Constituents;
24 
26  class EtaPhiMoments {
27  public:
28  float etaMean;
29  float phiMean;
30  float etaEtaMoment;
31  float phiPhiMoment;
32  float etaPhiMoment;
33  };
34 
36  Jet () : mJetArea (0), mPileupEnergy (0), mPassNumber (0) {}
38  Jet (const LorentzVector& fP4, const Point& fVertex);
39  Jet (const LorentzVector& fP4, const Point& fVertex, const Constituents& fConstituents);
41  ~Jet () override {}
42 
45 
47  float etaetaMoment () const;
48 
50  float phiphiMoment () const;
51 
53  float etaphiMoment () const;
54 
56  float etInAnnulus (float fRmin, float fRmax) const;
57 
59  int nCarrying (float fFraction) const;
60 
62  float maxDistance () const;
63 
65  virtual int nConstituents () const {return numberOfDaughters();}
66 
68  static float physicsEta (float fZVertex, float fDetectorEta);
69 
71  static float detectorEta (float fZVertex, float fPhysicsEta);
72 
73  static Candidate::LorentzVector physicsP4 (const Candidate::Point &newVertex, const Candidate &inParticle,const Candidate::Point &oldVertex=Candidate::Point(0,0,0));
74 
75  static Candidate::LorentzVector detectorP4 (const Candidate::Point &vertex, const Candidate &inParticle);
76 
78  virtual Constituents getJetConstituents () const;
79 
81  virtual std::vector<const reco::Candidate*> getJetConstituentsQuick () const;
82 
83 
84  // jet structure variables:
85  // constituentPtDistribution is the pT distribution among the jet constituents
86  // (ptDistribution = 1 if jet made by one constituent carrying all its momentum,
87  // ptDistribution = 0 if jet made by infinite constituents carrying an infinitesimal fraction of pt):
88  float constituentPtDistribution() const;
89 
90  // rmsCand is the rms of the eta-phi spread of the jet's constituents wrt the jet axis:
91  float constituentEtaPhiSpread() const;
92 
93 
94 
95 
97  virtual std::string print () const;
98 
100  virtual void scaleEnergy (double fScale);
101 
103  virtual void setJetArea (float fArea) {mJetArea = fArea;}
105  virtual float jetArea () const {return mJetArea;}
106 
108  virtual void setPileup (float fEnergy) {mPileupEnergy = fEnergy;}
110  virtual float pileup () const {return mPileupEnergy;}
111 
113  virtual void setNPasses (int fPasses) {mPassNumber = fPasses;}
115  virtual int nPasses () const {return mPassNumber;}
116 
117  bool isJet() const override;
118 
119  private:
120  float mJetArea;
123  };
124 }
125 #endif
int mPassNumber
Definition: Jet.h:122
float etInAnnulus(float fRmin, float fRmax) const
ET in annulus between rmin and rmax around jet direction.
static float detectorEta(float fZVertex, float fPhysicsEta)
static function to convert physics eta to detector eta
virtual int nPasses() const
number of passes taken by algorithm
Definition: Jet.h:115
float constituentEtaPhiSpread() const
virtual void scaleEnergy(double fScale)
scale energy of the jet
virtual float pileup() const
pileup energy contribution as calculated by algorithm
Definition: Jet.h:110
virtual void setPileup(float fEnergy)
Set pileup energy contribution as calculated by algorithm.
Definition: Jet.h:108
std::vector< Constituent > Constituents
Definition: Jet.h:23
float etaetaMoment() const
eta-eta second moment, ET weighted
float mJetArea
Definition: Jet.h:120
virtual Constituents getJetConstituents() const
list of constituents
size_t numberOfDaughters() const override
number of daughters
virtual void setJetArea(float fArea)
set jet area
Definition: Jet.h:103
bool isJet() const override
record to store eta-phi first and second moments
Definition: Jet.h:26
virtual std::string print() const
Print object.
Definition: Jet.py:1
const Point & vertex() const override
vertex position (overwritten by PF...)
~Jet() override
Destructor.
Definition: Jet.h:41
edm::Ptr< Candidate > Constituent
Definition: Jet.h:22
EtaPhiMoments etaPhiStatistics() const
eta-phi statistics, ET weighted
static Candidate::LorentzVector detectorP4(const Candidate::Point &vertex, const Candidate &inParticle)
float etaphiMoment() const
eta-phi second moment, ET weighted
float maxDistance() const
maximum distance from jet to constituent
int nCarrying(float fFraction) const
return # of constituent carrying fraction of energy
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:37
float constituentPtDistribution() const
virtual void setNPasses(int fPasses)
Set number of passes taken by algorithm.
Definition: Jet.h:113
fixed size matrix
float phiphiMoment() const
phi-phi second moment, ET weighted
virtual float jetArea() const
get jet area
Definition: Jet.h:105
virtual int nConstituents() const
of constituents
Definition: Jet.h:65
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:55
Jet()
Default constructor.
Definition: Jet.h:36
math::XYZPoint Point
point in the space
Definition: Candidate.h:41
float mPileupEnergy
Definition: Jet.h:121
static Candidate::LorentzVector physicsP4(const Candidate::Point &newVertex, const Candidate &inParticle, const Candidate::Point &oldVertex=Candidate::Point(0, 0, 0))
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
static float physicsEta(float fZVertex, float fDetectorEta)
static function to convert detector eta to physics eta