CMS 3D CMS Logo

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

List of all members.

Public Member Functions

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

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 69 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 42 of file Lepjets_Event_Lep.cc.

  : _p (p),
    _type (type),
    _res (res)
{
}

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.

Reimplemented in hitfit::Lepjets_Event_Jet.

Definition at line 182 of file Lepjets_Event_Lep.cc.

References full, and alignCSCRings::s.

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

{
    s << "[" << _type << "] " << _p << "; pt: " << _p.perp() << ", eta: " << _p.eta() << ", phi: " << _p.phi() ;
  if (full) {
    s << "\n    " << _res;
  }
  return s;
}
double hitfit::Lepjets_Event_Lep::eta_sigma ( ) const

Return the uncertainty in pseudorapidity $\eta$.

Definition at line 144 of file Lepjets_Event_Lep.cc.

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

{
  return _res.eta_sigma (_p);
}
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 227 of file Lepjets_Event_Lep.cc.

References AlCaHLTBitMon_ParallelJobs::p, and x.

{
  return p().perp2() < x.p().perp2();
}
const Fourvec & hitfit::Lepjets_Event_Lep::p ( ) const

Return a constant reference to the four-momentum.

Definition at line 72 of file Lepjets_Event_Lep.cc.

References _p.

{
  return _p;
}
Fourvec & hitfit::Lepjets_Event_Lep::p ( )

Return a reference to the four-momentum.

Definition at line 60 of file Lepjets_Event_Lep.cc.

References _p.

Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce().

{
  return _p;
}
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 132 of file Lepjets_Event_Lep.cc.

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

{
  return _res.p_sigma (_p);
}
double hitfit::Lepjets_Event_Lep::phi_sigma ( ) const

Return the uncertainty in azimuthal angle $\phi$.

Definition at line 156 of file Lepjets_Event_Lep.cc.

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

{
  return _res.phi_sigma (_p);
}
Vector_Resolution & hitfit::Lepjets_Event_Lep::res ( )

Return a reference to the resolution.

Definition at line 120 of file Lepjets_Event_Lep.cc.

References _res.

{
  return _res;
}
const Vector_Resolution & hitfit::Lepjets_Event_Lep::res ( ) const

Return a constant reference to the resolution.

Definition at line 108 of file Lepjets_Event_Lep.cc.

References _res.

{
  return _res;
}
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 168 of file Lepjets_Event_Lep.cc.

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

{
  _res.smear (_p, engine, smear_dir);
}
int hitfit::Lepjets_Event_Lep::type ( ) const

Return the type code.

Definition at line 96 of file Lepjets_Event_Lep.cc.

References _type.

{
  return _type;
}
int & hitfit::Lepjets_Event_Lep::type ( )

Return a reference to the type code.

Definition at line 84 of file Lepjets_Event_Lep.cc.

References _type.

Referenced by hitfit::Lepjets_Event::set_jet_types().

{
  return _type;
}

Member Data Documentation

The four-momentum.

Definition at line 180 of file Lepjets_Event_Lep.h.

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

The resolution.

Definition at line 190 of file Lepjets_Event_Lep.h.

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

The type code.

Definition at line 185 of file Lepjets_Event_Lep.h.

Referenced by type().