File indexing completed on 2024-09-07 04:35:53
0001 #ifndef JetReco_PFJet_h
0002 #define JetReco_PFJet_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "DataFormats/JetReco/interface/Jet.h"
0016 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
0017 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0018
0019 namespace reco {
0020 class PFJet : public Jet {
0021 public:
0022 typedef reco::PFCandidatePtr ConstituentTypePtr;
0023 typedef reco::PFCandidateFwdPtr ConstituentTypeFwdPtr;
0024
0025 struct Specific {
0026 Specific()
0027 : mChargedHadronEnergy(0),
0028 mNeutralHadronEnergy(0),
0029 mPhotonEnergy(0),
0030 mElectronEnergy(0),
0031 mMuonEnergy(0),
0032 mHFHadronEnergy(0),
0033 mHFEMEnergy(0),
0034
0035 mChargedHadronMultiplicity(0),
0036 mNeutralHadronMultiplicity(0),
0037 mPhotonMultiplicity(0),
0038 mElectronMultiplicity(0),
0039 mMuonMultiplicity(0),
0040 mHFHadronMultiplicity(0),
0041 mHFEMMultiplicity(0),
0042
0043 mChargedEmEnergy(0),
0044 mChargedMuEnergy(0),
0045 mNeutralEmEnergy(0),
0046
0047 mChargedMultiplicity(0),
0048 mNeutralMultiplicity(0),
0049
0050 mHOEnergy(0) {}
0051 float mChargedHadronEnergy;
0052 float mNeutralHadronEnergy;
0053 float mPhotonEnergy;
0054 float mElectronEnergy;
0055 float mMuonEnergy;
0056 float mHFHadronEnergy;
0057 float mHFEMEnergy;
0058
0059 int mChargedHadronMultiplicity;
0060 int mNeutralHadronMultiplicity;
0061 int mPhotonMultiplicity;
0062 int mElectronMultiplicity;
0063 int mMuonMultiplicity;
0064 int mHFHadronMultiplicity;
0065 int mHFEMMultiplicity;
0066
0067
0068
0069 float mChargedEmEnergy;
0070 float mChargedMuEnergy;
0071 float mNeutralEmEnergy;
0072 int mChargedMultiplicity;
0073 int mNeutralMultiplicity;
0074
0075 float mHOEnergy;
0076 };
0077
0078
0079 PFJet() {}
0080
0081
0082 PFJet(const LorentzVector& fP4,
0083 const Point& fVertex,
0084 const Specific& fSpecific,
0085 const Jet::Constituents& fConstituents);
0086
0087 PFJet(const LorentzVector& fP4, const Point& fVertex, const Specific& fSpecific);
0088
0089
0090 PFJet(const LorentzVector& fP4, const Specific& fSpecific, const Jet::Constituents& fConstituents);
0091
0092 ~PFJet() override {}
0093
0094
0095 float chargedHadronEnergy() const { return m_specific.mChargedHadronEnergy; }
0096
0097 float chargedHadronEnergyFraction() const { return chargedHadronEnergy() / energy(); }
0098
0099 float neutralHadronEnergy() const { return m_specific.mNeutralHadronEnergy; }
0100
0101 float neutralHadronEnergyFraction() const { return neutralHadronEnergy() / energy(); }
0102
0103 float photonEnergy() const { return m_specific.mPhotonEnergy; }
0104
0105 float photonEnergyFraction() const { return photonEnergy() / energy(); }
0106
0107 float electronEnergy() const { return m_specific.mElectronEnergy; }
0108
0109 float electronEnergyFraction() const { return electronEnergy() / energy(); }
0110
0111 float muonEnergy() const { return m_specific.mMuonEnergy; }
0112
0113 float muonEnergyFraction() const { return muonEnergy() / energy(); }
0114
0115 float HFHadronEnergy() const { return m_specific.mHFHadronEnergy; }
0116
0117 float HFHadronEnergyFraction() const { return HFHadronEnergy() / energy(); }
0118
0119 float HFEMEnergy() const { return m_specific.mHFEMEnergy; }
0120
0121 float HFEMEnergyFraction() const { return HFEMEnergy() / energy(); }
0122
0123
0124 int chargedHadronMultiplicity() const { return m_specific.mChargedHadronMultiplicity; }
0125
0126 int neutralHadronMultiplicity() const { return m_specific.mNeutralHadronMultiplicity; }
0127
0128 int photonMultiplicity() const { return m_specific.mPhotonMultiplicity; }
0129
0130 int electronMultiplicity() const { return m_specific.mElectronMultiplicity; }
0131
0132 int muonMultiplicity() const { return m_specific.mMuonMultiplicity; }
0133
0134 int HFHadronMultiplicity() const { return m_specific.mHFHadronMultiplicity; }
0135
0136 int HFEMMultiplicity() const { return m_specific.mHFEMMultiplicity; }
0137
0138
0139 float chargedEmEnergy() const { return m_specific.mChargedEmEnergy; }
0140
0141 float chargedEmEnergyFraction() const { return chargedEmEnergy() / energy(); }
0142
0143 float chargedMuEnergy() const { return m_specific.mChargedMuEnergy; }
0144
0145 float chargedMuEnergyFraction() const { return chargedMuEnergy() / energy(); }
0146
0147 float neutralEmEnergy() const { return m_specific.mNeutralEmEnergy; }
0148
0149 float neutralEmEnergyFraction() const { return neutralEmEnergy() / energy(); }
0150
0151
0152 int chargedMultiplicity() const { return m_specific.mChargedMultiplicity; }
0153
0154 int neutralMultiplicity() const { return m_specific.mNeutralMultiplicity; }
0155
0156
0157 float hoEnergy() const { return m_specific.mHOEnergy; }
0158
0159 float hoEnergyFraction() const { return hoEnergy() / energy(); }
0160
0161
0162 virtual reco::PFCandidatePtr getPFConstituent(unsigned fIndex) const;
0163
0164
0165 virtual std::vector<reco::PFCandidatePtr> getPFConstituents() const;
0166
0167
0168
0169
0170 reco::TrackRefVector getTrackRefs() const;
0171
0172
0173
0174 const Specific& getSpecific() const { return m_specific; }
0175
0176
0177 PFJet* clone() const override;
0178
0179
0180 std::string print() const override;
0181
0182 private:
0183
0184 bool overlap(const Candidate&) const override;
0185
0186
0187 Specific m_specific;
0188 };
0189
0190
0191 std::ostream& operator<<(std::ostream& out, const reco::PFJet& jet);
0192 }
0193
0194 #include "DataFormats/JetReco/interface/PFJetCollection.h" //INCLUDECHECKER:SKIP
0195 #endif