CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
hitfit::Lepjets_Event_Lep Class Reference

Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: More...

#include <Lepjets_Event_Lep.h>

Inheritance diagram for hitfit::Lepjets_Event_Lep:
hitfit::Lepjets_Event_Jet

Public Member Functions

std::ostream & dump (std::ostream &s, bool full=false) const
 Print the content of this object. More...
 
double eta_sigma () const
 Return the uncertainty in pseudorapidity $\eta$. More...
 
 Lepjets_Event_Lep (const Fourvec &p, int type, const Vector_Resolution &res)
 Constructor, create a new instance of Lepjets_Event_Lep. More...
 
bool operator< (const Lepjets_Event_Lep &x) const
 Comparison operator for sorting purpose, based on $p_{T}$. More...
 
Fourvecp ()
 Return a reference to the four-momentum. More...
 
const Fourvecp () const
 Return a constant reference to the four-momentum. More...
 
double p_sigma () const
 Return the uncertainty in momentum $p$ or $p_{T}$ ( $1/p$ or $1/p_{T}$ if the lepton is a tracking object). More...
 
double phi_sigma () const
 Return the uncertainty in azimuthal angle $\phi$. More...
 
const Vector_Resolutionres () const
 Return a constant reference to the resolution. More...
 
Vector_Resolutionres ()
 Return a reference to the resolution. More...
 
void smear (CLHEP::HepRandomEngine &engine, bool smear_dir=false)
 Smear this object. More...
 
int & type ()
 Return a reference to the type code. More...
 
int type () const
 Return the type code. More...
 

Private Attributes

Fourvec _p
 
Vector_Resolution _res
 
int _type
 

Detailed Description

Represent a lepton in an instance of Lepjets_Event class. This class hold the following information:

Definition at line 68 of file Lepjets_Event_Lep.h.

Constructor & Destructor Documentation

hitfit::Lepjets_Event_Lep::Lepjets_Event_Lep ( const Fourvec p,
int  type,
const Vector_Resolution res 
)

Constructor, create a new instance of Lepjets_Event_Lep.

Parameters
pThe four-momentum.
typeThe type code.
resThe resolution.

Definition at line 41 of file Lepjets_Event_Lep.cc.

52  : _p (p),
53  _type (type),
54  _res (res)
55 {
56 }
type
Definition: HCALResponse.h:21
Definition: Electron.h:6
Fourvec & p()
Return a reference to the four-momentum.

Member Function Documentation

std::ostream & hitfit::Lepjets_Event_Lep::dump ( std::ostream &  s,
bool  full = false 
) const

Print the content of this object.

Parameters
sThe output stream to which to write.
fullIf TRUE, print all information about this instance of Lepjets_Event_Lep.
If FALSE, print partial information about this instance of Lepjets_Event_Lep.

Definition at line 181 of file Lepjets_Event_Lep.cc.

References _p, _res, _type, full, and alignCSCRings::s.

Referenced by hitfit::Lepjets_Event_Jet::dump(), and hitfit::operator<<().

193 {
194  s << "[" << _type << "] " << _p << "; pt: " << _p.perp() << ", eta: " << _p.eta() << ", phi: " << _p.phi() ;
195  if (full) {
196  s << "\n " << _res;
197  }
198  return s;
199 }
Definition: GenABIO.cc:168
double hitfit::Lepjets_Event_Lep::eta_sigma ( ) const

Return the uncertainty in pseudorapidity $\eta$.

Definition at line 143 of file Lepjets_Event_Lep.cc.

References _p, _res, and hitfit::Vector_Resolution::eta_sigma().

Referenced by hitfit::Constrained_Top::Constrained_Top(), and hitfit::Constrained_Z::Constrained_Z().

150 {
151  return _res.eta_sigma (_p);
152 }
double eta_sigma(const Fourvec &v) const
Calculate the pseudorapidity resolution of a four-momentum.
bool hitfit::Lepjets_Event_Lep::operator< ( const Lepjets_Event_Lep x) const

Comparison operator for sorting purpose, based on $p_{T}$.

Parameters
xThe other instance of Lepjets_Event to be compared.

Definition at line 226 of file Lepjets_Event_Lep.cc.

References p().

232 {
233  return p().perp2() < x.p().perp2();
234 }
Fourvec & p()
Return a reference to the four-momentum.
Fourvec & hitfit::Lepjets_Event_Lep::p ( )
const Fourvec & hitfit::Lepjets_Event_Lep::p ( ) const

Return a constant reference to the four-momentum.

Definition at line 71 of file Lepjets_Event_Lep.cc.

References _p.

Referenced by Electron.Electron::ptErr().

78 {
79  return _p;
80 }
double hitfit::Lepjets_Event_Lep::p_sigma ( ) const

Return the uncertainty in momentum $p$ or $p_{T}$ ( $1/p$ or $1/p_{T}$ if the lepton is a tracking object).

Definition at line 131 of file Lepjets_Event_Lep.cc.

References _p, _res, and hitfit::Vector_Resolution::p_sigma().

Referenced by hitfit::Constrained_Top::Constrained_Top(), and hitfit::Constrained_Z::Constrained_Z().

138 {
139  return _res.p_sigma (_p);
140 }
double p_sigma(const Fourvec &v) const
Calculate the momentum resolution of a four-momentum.
double hitfit::Lepjets_Event_Lep::phi_sigma ( ) const

Return the uncertainty in azimuthal angle $\phi$.

Definition at line 155 of file Lepjets_Event_Lep.cc.

References _p, _res, and hitfit::Vector_Resolution::phi_sigma().

Referenced by hitfit::Constrained_Top::Constrained_Top(), and hitfit::Constrained_Z::Constrained_Z().

162 {
163  return _res.phi_sigma (_p);
164 }
double phi_sigma(const Fourvec &v) const
Calculate the azimuthal angle resolution of a four-momentum.
const Vector_Resolution & hitfit::Lepjets_Event_Lep::res ( ) const

Return a constant reference to the resolution.

Definition at line 107 of file Lepjets_Event_Lep.cc.

References _res.

Referenced by hitfit::Constrained_Top::Constrained_Top(), and hitfit::Constrained_Z::Constrained_Z().

114 {
115  return _res;
116 }
Vector_Resolution & hitfit::Lepjets_Event_Lep::res ( )

Return a reference to the resolution.

Definition at line 119 of file Lepjets_Event_Lep.cc.

References _res.

126 {
127  return _res;
128 }
void hitfit::Lepjets_Event_Lep::smear ( CLHEP::HepRandomEngine &  engine,
bool  smear_dir = false 
)

Smear this object.

Parameters
engineThe underlying random number generator.
smear_dirIf TRUE, also smear the object's direction.
If FALSE, then only smear the magnitude of three-momentum.

Definition at line 167 of file Lepjets_Event_Lep.cc.

References _p, _res, and hitfit::Vector_Resolution::smear().

176 {
177  _res.smear (_p, engine, smear_dir);
178 }
void smear(Fourvec &v, CLHEP::HepRandomEngine &engine, bool do_smear_dir=false) const
Smear a four-momentum according to the resolutions.
int & hitfit::Lepjets_Event_Lep::type ( )
int hitfit::Lepjets_Event_Lep::type ( ) const

Return the type code.

Definition at line 95 of file Lepjets_Event_Lep.cc.

References _type.

102 {
103  return _type;
104 }

Member Data Documentation

Fourvec hitfit::Lepjets_Event_Lep::_p
private

The four-momentum.

Definition at line 179 of file Lepjets_Event_Lep.h.

Referenced by dump(), eta_sigma(), p(), p_sigma(), phi_sigma(), and smear().

Vector_Resolution hitfit::Lepjets_Event_Lep::_res
private

The resolution.

Definition at line 189 of file Lepjets_Event_Lep.h.

Referenced by dump(), eta_sigma(), p_sigma(), phi_sigma(), res(), and smear().

int hitfit::Lepjets_Event_Lep::_type
private

The type code.

Definition at line 184 of file Lepjets_Event_Lep.h.

Referenced by dump(), and type().