File indexing completed on 2024-04-06 12:04:24
0001 #ifndef JetReco_Jet_h
0002 #define JetReco_Jet_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include <string>
0017 #include "DataFormats/Candidate/interface/CompositePtrCandidate.h"
0018
0019 namespace reco {
0020 class Jet : public CompositePtrCandidate {
0021 public:
0022 typedef edm::Ptr<Candidate> Constituent;
0023 typedef std::vector<Constituent> Constituents;
0024
0025
0026 class EtaPhiMoments {
0027 public:
0028 float etaMean;
0029 float phiMean;
0030 float etaEtaMoment;
0031 float phiPhiMoment;
0032 float etaPhiMoment;
0033 };
0034
0035
0036 Jet() : mJetArea(0), mPileupEnergy(0), mPassNumber(0), mIsWeighted(false) {}
0037
0038 Jet(const LorentzVector& fP4, const Point& fVertex);
0039 Jet(const LorentzVector& fP4, const Point& fVertex, const Constituents& fConstituents);
0040
0041 ~Jet() override {}
0042
0043
0044 EtaPhiMoments etaPhiStatistics() const;
0045
0046
0047 float etaetaMoment() const;
0048
0049
0050 float phiphiMoment() const;
0051
0052
0053 float etaphiMoment() const;
0054
0055
0056 float etInAnnulus(float fRmin, float fRmax) const;
0057
0058
0059 int nCarrying(float fFraction) const;
0060
0061
0062 float maxDistance() const;
0063
0064
0065 virtual int nConstituents() const { return numberOfDaughters(); }
0066
0067
0068 static float physicsEta(float fZVertex, float fDetectorEta);
0069
0070
0071 static float detectorEta(float fZVertex, float fPhysicsEta);
0072
0073 static Candidate::LorentzVector physicsP4(const Candidate::Point& newVertex,
0074 const Candidate& inParticle,
0075 const Candidate::Point& oldVertex = Candidate::Point(0, 0, 0));
0076
0077 static Candidate::LorentzVector detectorP4(const Candidate::Point& vertex, const Candidate& inParticle);
0078
0079
0080 virtual Constituents getJetConstituents() const;
0081
0082
0083 virtual std::vector<const reco::Candidate*> getJetConstituentsQuick() const;
0084
0085
0086
0087
0088
0089 float constituentPtDistribution() const;
0090
0091
0092 float constituentEtaPhiSpread() const;
0093
0094
0095 virtual std::string print() const;
0096
0097
0098 virtual void scaleEnergy(double fScale);
0099
0100
0101 virtual void setJetArea(float fArea) { mJetArea = fArea; }
0102
0103 virtual float jetArea() const { return mJetArea; }
0104
0105
0106 virtual void setPileup(float fEnergy) { mPileupEnergy = fEnergy; }
0107
0108 virtual float pileup() const { return mPileupEnergy; }
0109
0110
0111 virtual void setNPasses(int fPasses) { mPassNumber = fPasses; }
0112
0113 virtual int nPasses() const { return mPassNumber; }
0114
0115
0116 virtual void setIsWeighted(bool isWeighted) { mIsWeighted = isWeighted; }
0117
0118 virtual int isWeighted() const { return mIsWeighted; }
0119
0120 bool isJet() const override;
0121
0122 private:
0123 float mJetArea;
0124 float mPileupEnergy;
0125 int mPassNumber;
0126 bool mIsWeighted;
0127 };
0128 }
0129 #endif