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
float detectorEta(float fZVertex) const
Detector Eta (use reference Z and jet kinematics only)
Definition: GenJet.cc:26
float hadEnergy() const
Definition: GenJet.h:88
float auxiliaryEnergy() const
Definition: GenJet.h:92
int neutralHadronMultiplicity() const
Definition: GenJet.h:101
int chargedEmMultiplicity() const
Definition: GenJet.h:102
virtual const GenParticle * getGenConstituent(unsigned fIndex) const
get specific constituent
Definition: GenJet.cc:38
float m_NeutralHadronEnergy
K0, etc.
Definition: GenJet.h:56
std::string print() const override
Print object.
Definition: GenJet.cc:62
int m_ChargedEmMultiplicity
Definition: GenJet.h:66
int neutralEmMultiplicity() const
Definition: GenJet.h:103
std::vector< Constituent > Constituents
Definition: Jet.h:23
float m_MuonEnergy
Muons.
Definition: GenJet.h:62
Specific m_specific
Definition: GenJet.h:135
float m_ChargedEmEnergy
Electrons.
Definition: GenJet.h:58
const Specific & getSpecific() const
Definition: GenJet.h:118
int muonMultiplicity() const
Definition: GenJet.h:104
int m_NeutralEmMultiplicity
Definition: GenJet.h:67
float chargedEmEnergy() const
Definition: GenJet.h:97
Definition: Jet.py:1
float invisibleEnergy() const
Definition: GenJet.h:90
Jets made from MC generator particles.
Definition: GenJet.h:23
math::XYZTLorentzVector LorentzVector
int m_ChargedHadronMultiplicity
Corresponding multiplicities:
Definition: GenJet.h:64
float m_InvisibleEnergy
Invisible energy (mu, nu, ...)
Definition: GenJet.h:48
int chargedHadronMultiplicity() const
Definition: GenJet.h:100
float m_ChargedHadronEnergy
Definition: GenJet.h:54
float neutralHadronEnergy() const
Definition: GenJet.h:96
float muonEnergy() const
Definition: GenJet.h:99
float m_AuxiliaryEnergy
Anything else (undecayed Sigmas etc.)
Definition: GenJet.h:50
float m_NeutralEmEnergy
Photons.
Definition: GenJet.h:60
fixed size matrix
Structure Point Contains parameters of Gaussian fits to DMRs.
virtual std::vector< const GenParticle * > getGenConstituents() const
get all constituents
Definition: GenJet.cc:51
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
GenJet * clone() const override
Polymorphic clone.
Definition: GenJet.cc:58
int m_NeutralHadronMultiplicity
Definition: GenJet.h:65
float m_HadEnergy
Energy of Hadrons.
Definition: GenJet.h:46
bool overlap(const Candidate &) const override
Polymorphic overlap.
Definition: GenJet.cc:60
float chargedHadronEnergy() const
Definition: GenJet.h:95
static const GenParticle * genParticle(const reco::Candidate *fConstituent)
convert generic constituent to specific type
Definition: GenJet.cc:28
float neutralEmEnergy() const
Definition: GenJet.h:98
~GenJet() override
Definition: GenJet.h:84
float emEnergy() const
Definition: GenJet.h:86