CMS 3D CMS Logo

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