CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
reco::Particle Class Reference

#include <Particle.h>

Public Types

typedef int Charge
 electric charge type More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef math::PtEtaPhiMLorentzVector PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 

Public Member Functions

Vector boostToCM () const
 
int charge () const
 electric charge More...
 
void construct (int qx3, float pt, float eta, float phi, float mass, const Point &vtx, int pdgId, int status)
 
double energy () const
 energy More...
 
double et () const
 transverse energy More...
 
double et2 () const
 transverse energy squared (use this for cut!) More...
 
double eta () const
 momentum pseudorapidity More...
 
bool longLived () const
 is long lived? More...
 
double mass () const
 mass More...
 
bool massConstraint () const
 do mass constraint? More...
 
double massSqr () const
 mass squared More...
 
Vector momentum () const
 spatial momentum vector More...
 
double mt () const
 transverse mass More...
 
double mtSqr () const
 transverse mass squared More...
 
Particleoperator= (Particle &&)=default
 
Particleoperator= (Particle const &)=default
 
double p () const
 magnitude of momentum vector More...
 
const LorentzVectorp4 () const
 four-momentum Lorentz vector More...
 
template<typename... Args>
 Particle (Args &&... args)
 
 Particle (Particle &rh)
 
 Particle (Particle &&)=default
 
 Particle (Particle const &)=default
 
int pdgId () const
 PDG identifier. More...
 
double phi () const
 momentum azimuthal angle More...
 
const PolarLorentzVectorpolarP4 () const
 four-momentum Lorentz vector More...
 
double pt () const
 transverse momentum More...
 
double px () const
 x coordinate of momentum vector More...
 
double py () const
 y coordinate of momentum vector More...
 
double pz () const
 z coordinate of momentum vector More...
 
double rapidity () const
 rapidity More...
 
void setCharge (Charge q)
 set electric charge More...
 
void setLongLived ()
 
void setMass (double m)
 set particle mass More...
 
void setMassConstraint ()
 
void setP4 (const LorentzVector &p4)
 set 4-momentum More...
 
void setP4 (const PolarLorentzVector &p4)
 set 4-momentum More...
 
void setPdgId (int pdgId)
 
void setPz (double pz)
 
void setStatus (int status)
 set status word More...
 
void setThreeCharge (Charge qx3)
 set electric charge More...
 
void setVertex (const Point &vertex)
 set vertex More...
 
int status () const
 status word More...
 
double theta () const
 momentum polar angle More...
 
int threeCharge () const
 electric charge More...
 
const Pointvertex () const
 vertex position (overwritten by PF...) More...
 
double vx () const
 x coordinate of vertex position More...
 
double vy () const
 y coordinate of vertex position More...
 
double vz () const
 z coordinate of vertex position More...
 
double y () const
 rapidity More...
 
virtual ~Particle ()
 destructor More...
 

Private Attributes

ParticleState m_state
 

Detailed Description

Base class describing a generic reconstructed particle its main subclass is Candidate

Author
Luca Lista, INFN

Definition at line 16 of file Particle.h.

Member Typedef Documentation

◆ Charge

electric charge type

Definition at line 19 of file Particle.h.

◆ index

typedef unsigned int reco::Particle::index

Definition at line 29 of file Particle.h.

◆ LorentzVector

Lorentz vector.

Definition at line 21 of file Particle.h.

◆ Point

point in the space

Definition at line 25 of file Particle.h.

◆ PolarLorentzVector

Lorentz vector.

Definition at line 23 of file Particle.h.

◆ Vector

point in the space

Definition at line 27 of file Particle.h.

Constructor & Destructor Documentation

◆ Particle() [1/4]

template<typename... Args>
reco::Particle::Particle ( Args &&...  args)
inlineexplicit

Definition at line 33 of file Particle.h.

33 : m_state(std::forward<Args>(args)...) {}
ParticleState m_state
Definition: Particle.h:169

◆ Particle() [2/4]

reco::Particle::Particle ( Particle rh)
inline

Definition at line 35 of file Particle.h.

35 : m_state(rh.m_state) {}
ParticleState m_state
Definition: Particle.h:169

◆ Particle() [3/4]

reco::Particle::Particle ( Particle &&  )
default

◆ Particle() [4/4]

reco::Particle::Particle ( Particle const &  )
default

◆ ~Particle()

virtual reco::Particle::~Particle ( )
inlinevirtual

destructor

Definition at line 77 of file Particle.h.

77 {}

Member Function Documentation

◆ boostToCM()

Vector reco::Particle::boostToCM ( ) const
inline

boost vector to boost a Lorentz vector to the particle center of mass system

Definition at line 95 of file Particle.h.

References reco::ParticleState::boostToCM(), and m_state.

95 { return m_state.boostToCM(); }
ParticleState m_state
Definition: Particle.h:169
Vector boostToCM() const

◆ charge()

int reco::Particle::charge ( ) const
inline

electric charge

Definition at line 80 of file Particle.h.

References reco::ParticleState::charge(), and m_state.

80 { return m_state.charge(); }
int charge() const
electric charge
Definition: ParticleState.h:98
ParticleState m_state
Definition: Particle.h:169

◆ construct()

void reco::Particle::construct ( int  qx3,
float  pt,
float  eta,
float  phi,
float  mass,
const Point vtx,
int  pdgId,
int  status 
)
inline

Definition at line 72 of file Particle.h.

References eta(), m_state, mass(), pdgId(), phi(), pt(), status(), and L1BJetProducer_cff::vtx.

72  {
73  m_state = ParticleState(qx3, PolarLorentzVector(pt, eta, phi, mass), vtx, pdgId, status, false);
74  }
int status() const
status word
Definition: Particle.h:154
int pdgId() const
PDG identifier.
Definition: Particle.h:150
double phi() const
momentum azimuthal angle
Definition: Particle.h:122
double pt() const
transverse momentum
Definition: Particle.h:120
double mass() const
mass
Definition: Particle.h:105
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
ParticleState m_state
Definition: Particle.h:169
double eta() const
momentum pseudorapidity
Definition: Particle.h:126

◆ energy()

double reco::Particle::energy ( ) const
inline

energy

Definition at line 99 of file Particle.h.

References reco::ParticleState::energy(), and m_state.

Referenced by EmDQMReco::analyze(), and Jet.Jet::rawEnergy().

99 { return m_state.energy(); }
ParticleState m_state
Definition: Particle.h:169
double energy() const
energy

◆ et()

double reco::Particle::et ( ) const
inline

transverse energy

Definition at line 101 of file Particle.h.

References reco::ParticleState::et(), and m_state.

101 { return m_state.et(); }
double et() const
transverse energy
ParticleState m_state
Definition: Particle.h:169

◆ et2()

double reco::Particle::et2 ( ) const
inline

transverse energy squared (use this for cut!)

Definition at line 103 of file Particle.h.

References reco::ParticleState::et2(), and m_state.

103 { return m_state.et2(); }
double et2() const
transverse energy squared (use this for cuts)!
ParticleState m_state
Definition: Particle.h:169

◆ eta()

double reco::Particle::eta ( ) const
inline

momentum pseudorapidity

Definition at line 126 of file Particle.h.

References reco::ParticleState::eta(), and m_state.

Referenced by Particle.Particle::__str__(), DQMExample_Step1::analyze(), construct(), datamodel.Object::DeltaR(), Jet.Jet::jetID(), datamodel.Object::p4(), and Jet.Jet::puJetId().

126 { return m_state.eta(); }
double eta() const
momentum pseudorapidity
ParticleState m_state
Definition: Particle.h:169

◆ longLived()

bool reco::Particle::longLived ( ) const
inline

is long lived?

Definition at line 161 of file Particle.h.

References reco::ParticleState::longLived(), and m_state.

161 { return m_state.longLived(); }
ParticleState m_state
Definition: Particle.h:169
bool longLived() const
is long lived?

◆ mass()

double reco::Particle::mass ( ) const
inline

mass

Definition at line 105 of file Particle.h.

References m_state, and reco::ParticleState::mass().

Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), construct(), massSqr(), and datamodel.Object::p4().

105 { return m_state.mass(); }
double mass() const
mass
ParticleState m_state
Definition: Particle.h:169

◆ massConstraint()

bool reco::Particle::massConstraint ( ) const
inline

do mass constraint?

Definition at line 166 of file Particle.h.

References m_state, and reco::ParticleState::massConstraint().

166 { return m_state.massConstraint(); }
bool massConstraint() const
do mass constraint?
ParticleState m_state
Definition: Particle.h:169

◆ massSqr()

double reco::Particle::massSqr ( ) const
inline

mass squared

Definition at line 107 of file Particle.h.

References mass().

107 { return mass() * mass(); }
double mass() const
mass
Definition: Particle.h:105

◆ momentum()

Vector reco::Particle::momentum ( ) const
inline

spatial momentum vector

Definition at line 92 of file Particle.h.

References m_state, and reco::ParticleState::momentum().

92 { return m_state.momentum(); }
Vector momentum() const
spatial momentum vector
ParticleState m_state
Definition: Particle.h:169

◆ mt()

double reco::Particle::mt ( ) const
inline

transverse mass

Definition at line 110 of file Particle.h.

References m_state, and reco::ParticleState::mt().

110 { return m_state.mt(); }
double mt() const
transverse mass
ParticleState m_state
Definition: Particle.h:169

◆ mtSqr()

double reco::Particle::mtSqr ( ) const
inline

transverse mass squared

Definition at line 112 of file Particle.h.

References m_state, and reco::ParticleState::mtSqr().

112 { return m_state.mtSqr(); }
double mtSqr() const
transverse mass squared
ParticleState m_state
Definition: Particle.h:169

◆ operator=() [1/2]

Particle& reco::Particle::operator= ( Particle &&  )
default

◆ operator=() [2/2]

Particle& reco::Particle::operator= ( Particle const &  )
default

◆ p()

double reco::Particle::p ( ) const
inline

magnitude of momentum vector

Definition at line 97 of file Particle.h.

References m_state, and reco::ParticleState::p().

Referenced by Electron.Electron::ptErr().

97 { return m_state.p(); }
double p() const
magnitude of momentum vector
ParticleState m_state
Definition: Particle.h:169

◆ p4()

const LorentzVector& reco::Particle::p4 ( ) const
inline

four-momentum Lorentz vector

Definition at line 88 of file Particle.h.

References m_state, and reco::ParticleState::p4().

Referenced by Tau.Tau::dxy_approx(), Tau.Tau::dz(), TtDilepLRSignalSelObservables::operator()(), TtSemiLRJetCombObservables::operator()(), Lepton.Lepton::p4WithFSR(), CandidateTriggerObjectProducer::produce(), and setP4().

88 { return m_state.p4(); }
const LorentzVector & p4() const
four-momentum Lorentz vector
ParticleState m_state
Definition: Particle.h:169

◆ pdgId()

int reco::Particle::pdgId ( ) const
inline

PDG identifier.

Definition at line 150 of file Particle.h.

References m_state, and reco::ParticleState::pdgId().

Referenced by Particle.Particle::__str__(), DQMExample_Step1::analyze(), construct(), and setPdgId().

150 { return m_state.pdgId(); }
int pdgId() const
PDG identifier.
ParticleState m_state
Definition: Particle.h:169

◆ phi()

double reco::Particle::phi ( ) const
inline

momentum azimuthal angle

Definition at line 122 of file Particle.h.

References m_state, and reco::ParticleState::phi().

Referenced by Particle.Particle::__str__(), DQMExample_Step1::analyze(), construct(), datamodel.Object::DeltaR(), datamodel.Object::p4(), and ntupleDataFormat.Track::phiPull().

122 { return m_state.phi(); }
double phi() const
momentum azimuthal angle
ParticleState m_state
Definition: Particle.h:169

◆ polarP4()

const PolarLorentzVector& reco::Particle::polarP4 ( ) const
inline

four-momentum Lorentz vector

Definition at line 90 of file Particle.h.

References m_state, and reco::ParticleState::polarP4().

90 { return m_state.polarP4(); }
const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
ParticleState m_state
Definition: Particle.h:169

◆ pt()

double reco::Particle::pt ( ) const
inline

◆ px()

double reco::Particle::px ( ) const
inline

x coordinate of momentum vector

Definition at line 114 of file Particle.h.

References m_state, and reco::ParticleState::px().

114 { return m_state.px(); }
double px() const
x coordinate of momentum vector
ParticleState m_state
Definition: Particle.h:169

◆ py()

double reco::Particle::py ( ) const
inline

y coordinate of momentum vector

Definition at line 116 of file Particle.h.

References m_state, and reco::ParticleState::py().

116 { return m_state.py(); }
double py() const
y coordinate of momentum vector
ParticleState m_state
Definition: Particle.h:169

◆ pz()

double reco::Particle::pz ( ) const
inline

z coordinate of momentum vector

Definition at line 118 of file Particle.h.

References m_state, and reco::ParticleState::pz().

Referenced by setPz().

118 { return m_state.pz(); }
ParticleState m_state
Definition: Particle.h:169
double pz() const
z coordinate of momentum vector

◆ rapidity()

double reco::Particle::rapidity ( ) const
inline

rapidity

Definition at line 128 of file Particle.h.

References m_state, and reco::ParticleState::rapidity().

Referenced by y().

128 { return m_state.rapidity(); }
double rapidity() const
repidity
ParticleState m_state
Definition: Particle.h:169

◆ setCharge()

void reco::Particle::setCharge ( Charge  q)
inline

set electric charge

Definition at line 82 of file Particle.h.

References m_state, submitPVResolutionJobs::q, and reco::ParticleState::setCharge().

82 { m_state.setCharge(q); }
ParticleState m_state
Definition: Particle.h:169
void setCharge(Charge q)
set electric charge

◆ setLongLived()

void reco::Particle::setLongLived ( )
inline

long lived flag set long lived flag

Definition at line 159 of file Particle.h.

References m_state, and reco::ParticleState::setLongLived().

159 { m_state.setLongLived(); }
void setLongLived()
set long lived flag
ParticleState m_state
Definition: Particle.h:169

◆ setMass()

void reco::Particle::setMass ( double  m)
inline

set particle mass

Definition at line 136 of file Particle.h.

References visualization-live-secondInstance_cfg::m, m_state, and reco::ParticleState::setMass().

◆ setMassConstraint()

void reco::Particle::setMassConstraint ( )
inline

do mass constraint flag set mass constraint flag

Definition at line 164 of file Particle.h.

References m_state, and reco::ParticleState::setMassConstraint().

void setMassConstraint()
set mass constraint flag
ParticleState m_state
Definition: Particle.h:169

◆ setP4() [1/2]

void reco::Particle::setP4 ( const LorentzVector p4)
inline

set 4-momentum

Definition at line 132 of file Particle.h.

References m_state, p4(), and reco::ParticleState::setP4().

Referenced by Jet.Jet::setCorrP4().

132 { m_state.setP4(p4); }
const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: Particle.h:88
ParticleState m_state
Definition: Particle.h:169
void setP4(const LorentzVector &p4)
set 4-momentum

◆ setP4() [2/2]

void reco::Particle::setP4 ( const PolarLorentzVector p4)
inline

set 4-momentum

Definition at line 134 of file Particle.h.

References m_state, p4(), and reco::ParticleState::setP4().

Referenced by Jet.Jet::setCorrP4().

134 { m_state.setP4(p4); }
const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: Particle.h:88
ParticleState m_state
Definition: Particle.h:169
void setP4(const LorentzVector &p4)
set 4-momentum

◆ setPdgId()

void reco::Particle::setPdgId ( int  pdgId)
inline

Definition at line 152 of file Particle.h.

References m_state, pdgId(), and reco::ParticleState::setPdgId().

152 { m_state.setPdgId(pdgId); }
void setPdgId(int pdgId)
int pdgId() const
PDG identifier.
Definition: Particle.h:150
ParticleState m_state
Definition: Particle.h:169

◆ setPz()

void reco::Particle::setPz ( double  pz)
inline

Definition at line 137 of file Particle.h.

References m_state, pz(), and reco::ParticleState::setPz().

137 { m_state.setPz(pz); }
void setPz(double pz)
double pz() const
z coordinate of momentum vector
Definition: Particle.h:118
ParticleState m_state
Definition: Particle.h:169

◆ setStatus()

void reco::Particle::setStatus ( int  status)
inline

set status word

Definition at line 156 of file Particle.h.

References m_state, reco::ParticleState::setStatus(), and status().

int status() const
status word
Definition: Particle.h:154
void setStatus(int status)
set status word
ParticleState m_state
Definition: Particle.h:169

◆ setThreeCharge()

void reco::Particle::setThreeCharge ( Charge  qx3)
inline

set electric charge

Definition at line 86 of file Particle.h.

References m_state, and reco::ParticleState::setThreeCharge().

86 { m_state.setThreeCharge(qx3); }
void setThreeCharge(Charge qx3)
set electric charge
ParticleState m_state
Definition: Particle.h:169

◆ setVertex()

void reco::Particle::setVertex ( const Point vertex)
inline

set vertex

Definition at line 147 of file Particle.h.

References m_state, reco::ParticleState::setVertex(), and vertex().

void setVertex(const Point &vertex)
set vertex
const Point & vertex() const
vertex position (overwritten by PF...)
Definition: Particle.h:139
ParticleState m_state
Definition: Particle.h:169

◆ status()

int reco::Particle::status ( ) const
inline

status word

Definition at line 154 of file Particle.h.

References m_state, and reco::ParticleState::status().

Referenced by construct(), and setStatus().

154 { return m_state.status(); }
ParticleState m_state
Definition: Particle.h:169
int status() const
status word

◆ theta()

double reco::Particle::theta ( ) const
inline

momentum polar angle

Definition at line 124 of file Particle.h.

References m_state, and reco::ParticleState::theta().

Referenced by Tau.Tau::zImpact().

124 { return m_state.theta(); }
double theta() const
momentum polar angle
ParticleState m_state
Definition: Particle.h:169

◆ threeCharge()

int reco::Particle::threeCharge ( ) const
inline

electric charge

Definition at line 84 of file Particle.h.

References m_state, and reco::ParticleState::threeCharge().

84 { return m_state.threeCharge(); }
int threeCharge() const
electric charge
ParticleState m_state
Definition: Particle.h:169

◆ vertex()

const Point& reco::Particle::vertex ( ) const
inline

vertex position (overwritten by PF...)

Definition at line 139 of file Particle.h.

References m_state, and reco::ParticleState::vertex().

Referenced by Tau.Tau::dxy(), and setVertex().

139 { return m_state.vertex(); }
ParticleState m_state
Definition: Particle.h:169
const Point & vertex() const
vertex position

◆ vx()

double reco::Particle::vx ( ) const
inline

x coordinate of vertex position

Definition at line 141 of file Particle.h.

References m_state, and reco::ParticleState::vx().

141 { return m_state.vx(); }
double vx() const
x coordinate of vertex position
ParticleState m_state
Definition: Particle.h:169

◆ vy()

double reco::Particle::vy ( ) const
inline

y coordinate of vertex position

Definition at line 143 of file Particle.h.

References m_state, and reco::ParticleState::vy().

143 { return m_state.vy(); }
double vy() const
y coordinate of vertex position
ParticleState m_state
Definition: Particle.h:169

◆ vz()

double reco::Particle::vz ( ) const
inline

z coordinate of vertex position

Definition at line 145 of file Particle.h.

References m_state, and reco::ParticleState::vz().

145 { return m_state.vz(); }
double vz() const
z coordinate of vertex position
ParticleState m_state
Definition: Particle.h:169

◆ y()

double reco::Particle::y ( ) const
inline

rapidity

Definition at line 130 of file Particle.h.

References rapidity().

Referenced by svgfig.Ellipse::__repr__(), geometryXMLparser.Alignable::pos(), ntupleDataFormat._HitObject::r(), and ntupleDataFormat._HitObject::r3D().

130 { return rapidity(); }
double rapidity() const
rapidity
Definition: Particle.h:128

Member Data Documentation

◆ m_state

ParticleState reco::Particle::m_state
private