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...
 
Vector_Resolutionres ()
 Return a reference to the resolution. More...
 
const Vector_Resolutionres () const
 Return a constant 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 64 of file Lepjets_Event_Lep.h.

Constructor & Destructor Documentation

◆ Lepjets_Event_Lep()

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

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

Member Function Documentation

◆ dump()

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

171  {
172  s << "[" << _type << "] " << _p << "; pt: " << _p.perp() << ", eta: " << _p.eta() << ", phi: " << _p.phi();
173  if (full) {
174  s << "\n " << _res;
175  }
176  return s;
177  }

References full, and alignCSCRings::s.

Referenced by hitfit::Lepjets_Event_Jet::dump().

◆ eta_sigma()

double hitfit::Lepjets_Event_Lep::eta_sigma ( ) const

Return the uncertainty in pseudorapidity $\eta$.

Definition at line 126 of file Lepjets_Event_Lep.cc.

133  {
134  return _res.eta_sigma(_p);
135  }

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

◆ operator<()

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

208  {
209  return p().perp2() < x.p().perp2();
210  }

References AlCaHLTBitMon_ParallelJobs::p.

◆ p() [1/2]

Fourvec & hitfit::Lepjets_Event_Lep::p ( )

Return a reference to the four-momentum.

Definition at line 49 of file Lepjets_Event_Lep.cc.

56  {
57  return _p;
58  }

References _p.

Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce(), and Electron.Electron::ptErr().

◆ p() [2/2]

const Fourvec & hitfit::Lepjets_Event_Lep::p ( ) const

Return a constant reference to the four-momentum.

Definition at line 60 of file Lepjets_Event_Lep.cc.

67  {
68  return _p;
69  }

References _p.

Referenced by Electron.Electron::ptErr().

◆ p_sigma()

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

122  {
123  return _res.p_sigma(_p);
124  }

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

◆ phi_sigma()

double hitfit::Lepjets_Event_Lep::phi_sigma ( ) const

Return the uncertainty in azimuthal angle $\phi$.

Definition at line 137 of file Lepjets_Event_Lep.cc.

144  {
145  return _res.phi_sigma(_p);
146  }

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

◆ res() [1/2]

Vector_Resolution & hitfit::Lepjets_Event_Lep::res ( )

Return a reference to the resolution.

Definition at line 104 of file Lepjets_Event_Lep.cc.

111  {
112  return _res;
113  }

References _res.

◆ res() [2/2]

const Vector_Resolution & hitfit::Lepjets_Event_Lep::res ( ) const

Return a constant reference to the resolution.

Definition at line 93 of file Lepjets_Event_Lep.cc.

100  {
101  return _res;
102  }

References _res.

◆ smear()

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

156  {
157  _res.smear(_p, engine, smear_dir);
158  }

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

◆ type() [1/2]

int & hitfit::Lepjets_Event_Lep::type ( )

Return a reference to the type code.

Definition at line 71 of file Lepjets_Event_Lep.cc.

78  {
79  return _type;
80  }

References _type.

Referenced by TtSemiLepHitFitProducer< LeptonCollection >::produce(), and hitfit::Lepjets_Event::set_jet_types().

◆ type() [2/2]

int hitfit::Lepjets_Event_Lep::type ( ) const

Return the type code.

Definition at line 82 of file Lepjets_Event_Lep.cc.

89  {
90  return _type;
91  }

References _type.

Member Data Documentation

◆ _p

Fourvec hitfit::Lepjets_Event_Lep::_p
private

The four-momentum.

Definition at line 172 of file Lepjets_Event_Lep.h.

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

◆ _res

Vector_Resolution hitfit::Lepjets_Event_Lep::_res
private

The resolution.

Definition at line 182 of file Lepjets_Event_Lep.h.

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

◆ _type

int hitfit::Lepjets_Event_Lep::_type
private

The type code.

Definition at line 177 of file Lepjets_Event_Lep.h.

Referenced by type().

hitfit::Vector_Resolution::smear
void smear(Fourvec &v, CLHEP::HepRandomEngine &engine, bool do_smear_dir=false) const
Smear a four-momentum according to the resolutions.
Definition: Vector_Resolution.cc:316
full
Definition: GenABIO.cc:168
DDAxes::x
hitfit::Vector_Resolution::phi_sigma
double phi_sigma(const Fourvec &v) const
Calculate the azimuthal angle resolution of a four-momentum.
Definition: Vector_Resolution.cc:240
alignCSCRings.s
s
Definition: alignCSCRings.py:92
hitfit::Vector_Resolution::p_sigma
double p_sigma(const Fourvec &v) const
Calculate the momentum resolution of a four-momentum.
Definition: Vector_Resolution.cc:204
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
hitfit::Lepjets_Event_Lep::p
Fourvec & p()
Return a reference to the four-momentum.
Definition: Lepjets_Event_Lep.cc:49
hitfit::Lepjets_Event_Lep::_p
Fourvec _p
Definition: Lepjets_Event_Lep.h:172
res
Definition: Electron.h:6
hitfit::Lepjets_Event_Lep::_type
int _type
Definition: Lepjets_Event_Lep.h:177
hitfit::Vector_Resolution::eta_sigma
double eta_sigma(const Fourvec &v) const
Calculate the pseudorapidity resolution of a four-momentum.
Definition: Vector_Resolution.cc:226
hitfit::Lepjets_Event_Lep::_res
Vector_Resolution _res
Definition: Lepjets_Event_Lep.h:182