CMS 3D CMS Logo

GenJet.h
Go to the documentation of this file.
1 #ifndef JetReco_GenJet_h
2 #define JetReco_GenJet_h
3 
19 
20 namespace reco {
21  class GenParticle;
22 
23  class GenJet : public Jet {
24  public:
25  struct Specific {
27  : m_EmEnergy(0),
28  m_HadEnergy(0),
35  m_MuonEnergy(0),
40  m_MuonMultiplicity(0) {}
41 
44  float m_EmEnergy;
46  float m_HadEnergy;
51 
62  float m_MuonEnergy;
69  };
70 
72  GenJet() {}
73 
75  GenJet(const LorentzVector& fP4,
76  const Point& fVertex,
77  const Specific& fSpecific,
78  const Jet::Constituents& fConstituents);
79  GenJet(const LorentzVector& fP4, const Point& fVertex, const Specific& fSpecific);
80 
82  GenJet(const LorentzVector& fP4, const Specific& fSpecific, const Jet::Constituents& fConstituents);
83 
84  ~GenJet() override{};
86  float emEnergy() const { return m_specific.m_EmEnergy; };
88  float hadEnergy() const { return m_specific.m_HadEnergy; };
90  float invisibleEnergy() const { return m_specific.m_InvisibleEnergy; };
92  float auxiliaryEnergy() const { return m_specific.m_AuxiliaryEnergy; };
93 
94  // PF-like definitions
97  float chargedEmEnergy() const { return m_specific.m_ChargedEmEnergy; }
98  float neutralEmEnergy() const { return m_specific.m_NeutralEmEnergy; }
99  float muonEnergy() const { return m_specific.m_MuonEnergy; }
105 
107  float detectorEta(float fZVertex) const;
108 
110  static const GenParticle* genParticle(const reco::Candidate* fConstituent);
112  virtual const GenParticle* getGenConstituent(unsigned fIndex) const;
114  virtual std::vector<const GenParticle*> getGenConstituents() const;
115 
116  // block accessors
117 
118  const Specific& getSpecific() const { return m_specific; }
119 
121  void setSpecific(const Specific& spec) { m_specific = spec; }
122 
124  GenJet* clone() const override;
125 
127  std::string print() const override;
128 
129  private:
131  bool overlap(const Candidate&) const override;
132 
133  // Data members
134  //Variables specific to to the GenJet class
136  };
137 } // namespace reco
138 // temporary fix before include_checcker runs globally
139 #include "DataFormats/JetReco/interface/GenJetCollection.h" //INCLUDECHECKER:SKIP
140 #endif
reco::GenJet::getGenConstituents
virtual std::vector< const GenParticle * > getGenConstituents() const
get all constituents
Definition: GenJet.cc:51
reco::GenJet::neutralHadronEnergy
float neutralHadronEnergy() const
Definition: GenJet.h:96
GenJetCollection.h
reco::GenJet::auxiliaryEnergy
float auxiliaryEnergy() const
Definition: GenJet.h:92
reco::GenJet::neutralEmMultiplicity
int neutralEmMultiplicity() const
Definition: GenJet.h:103
reco::GenJet::Specific::m_NeutralHadronEnergy
float m_NeutralHadronEnergy
K0, etc.
Definition: GenJet.h:56
reco::GenJet
Jets made from MC generator particles.
Definition: GenJet.h:23
reco::GenJet::Specific::m_HadEnergy
float m_HadEnergy
Energy of Hadrons.
Definition: GenJet.h:46
reco::Jet::Constituents
std::vector< Constituent > Constituents
Definition: Jet.h:23
reco::GenJet::setSpecific
void setSpecific(const Specific &spec)
set the specific (note: responsibility of keeping it consistent with the jet daughers belongs to the ...
Definition: GenJet.h:121
reco::GenJet::muonMultiplicity
int muonMultiplicity() const
Definition: GenJet.h:104
reco::GenJet::neutralHadronMultiplicity
int neutralHadronMultiplicity() const
Definition: GenJet.h:101
reco::GenJet::Specific::m_NeutralEmEnergy
float m_NeutralEmEnergy
Photons.
Definition: GenJet.h:60
reco::GenJet::Specific::m_MuonMultiplicity
int m_MuonMultiplicity
Definition: GenJet.h:68
reco::GenJet::Specific::m_ChargedEmEnergy
float m_ChargedEmEnergy
Electrons.
Definition: GenJet.h:58
reco::GenJet::chargedEmEnergy
float chargedEmEnergy() const
Definition: GenJet.h:97
Jet.h
reco::GenJet::Specific::m_InvisibleEnergy
float m_InvisibleEnergy
Invisible energy (mu, nu, ...)
Definition: GenJet.h:48
reco::GenJet::Specific::m_NeutralEmMultiplicity
int m_NeutralEmMultiplicity
Definition: GenJet.h:67
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
reco::GenJet::Specific::m_EmEnergy
float m_EmEnergy
Definition: GenJet.h:44
GenParticle
Definition: GenParticle.py:1
reco::GenJet::Specific::m_ChargedHadronMultiplicity
int m_ChargedHadronMultiplicity
Corresponding multiplicities:
Definition: GenJet.h:64
reco::GenJet::Specific::m_MuonEnergy
float m_MuonEnergy
Muons.
Definition: GenJet.h:62
reco::GenJet::print
std::string print() const override
Print object.
Definition: GenJet.cc:62
reco::GenJet::Specific
Definition: GenJet.h:25
Jet
Definition: Jet.py:1
reco::GenJet::chargedHadronMultiplicity
int chargedHadronMultiplicity() const
Definition: GenJet.h:100
reco::GenJet::invisibleEnergy
float invisibleEnergy() const
Definition: GenJet.h:90
reco::GenJet::hadEnergy
float hadEnergy() const
Definition: GenJet.h:88
reco::GenJet::m_specific
Specific m_specific
Definition: GenJet.h:135
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Point
Structure Point Contains parameters of Gaussian fits to DMRs.
Definition: DMRtrends.cc:57
reco::GenJet::clone
GenJet * clone() const override
Polymorphic clone.
Definition: GenJet.cc:58
reco::GenJet::Specific::Specific
Specific()
Definition: GenJet.h:26
reco::GenJet::Specific::m_AuxiliaryEnergy
float m_AuxiliaryEnergy
Anything else (undecayed Sigmas etc.)
Definition: GenJet.h:50
reco::GenJet::Specific::m_NeutralHadronMultiplicity
int m_NeutralHadronMultiplicity
Definition: GenJet.h:65
reco::GenJet::getSpecific
const Specific & getSpecific() const
Definition: GenJet.h:118
reco::Candidate
Definition: Candidate.h:27
reco::GenJet::GenJet
GenJet()
Definition: GenJet.h:72
reco::GenJet::overlap
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: GenJet.cc:60
reco::GenJet::chargedHadronEnergy
float chargedHadronEnergy() const
Definition: GenJet.h:95
LorentzVector
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonMatchAndPlot.h:49
reco::GenJet::getGenConstituent
virtual const GenParticle * getGenConstituent(unsigned fIndex) const
get specific constituent
Definition: GenJet.cc:38
reco::GenJet::genParticle
static const GenParticle * genParticle(const reco::Candidate *fConstituent)
convert generic constituent to specific type
Definition: GenJet.cc:28
reco::GenJet::~GenJet
~GenJet() override
Definition: GenJet.h:84
reco::GenJet::emEnergy
float emEnergy() const
Definition: GenJet.h:86
reco::GenJet::muonEnergy
float muonEnergy() const
Definition: GenJet.h:99
reco::GenJet::Specific::m_ChargedEmMultiplicity
int m_ChargedEmMultiplicity
Definition: GenJet.h:66
reco::GenJet::detectorEta
float detectorEta(float fZVertex) const
Detector Eta (use reference Z and jet kinematics only)
Definition: GenJet.cc:26
reco::GenJet::Specific::m_ChargedHadronEnergy
float m_ChargedHadronEnergy
Definition: GenJet.h:54
reco::GenJet::chargedEmMultiplicity
int chargedEmMultiplicity() const
Definition: GenJet.h:102
reco::GenJet::neutralEmEnergy
float neutralEmEnergy() const
Definition: GenJet.h:98