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

electric charge type

Definition at line 19 of file Particle.h.

typedef unsigned int reco::Particle::index

Definition at line 29 of file Particle.h.

Lorentz vector.

Definition at line 21 of file Particle.h.

point in the space

Definition at line 25 of file Particle.h.

Lorentz vector.

Definition at line 23 of file Particle.h.

point in the space

Definition at line 27 of file Particle.h.

Constructor & Destructor Documentation

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

Definition at line 33 of file Particle.h.

Referenced by Particle().

33  :
34  m_state(std::forward<Args>(args)...) {}
ParticleState m_state
Definition: Particle.h:153
reco::Particle::Particle ( Particle rh)
inline

Definition at line 36 of file Particle.h.

References operator=(), p3, p4(), Particle(), pdgId(), lumiQueryAPI::q, status(), and extraflags_cff::vtx.

36 : m_state(rh.m_state){}
ParticleState m_state
Definition: Particle.h:153
reco::Particle::Particle ( Particle &&  )
default
reco::Particle::Particle ( Particle const &  )
default
virtual reco::Particle::~Particle ( )
inlinevirtual

destructor

Definition at line 60 of file Particle.h.

60 {}

Member Function Documentation

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

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

Definition at line 79 of file Particle.h.

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

79 { return m_state.boostToCM(); }
Vector boostToCM() const
Definition: ParticleState.h:87
ParticleState m_state
Definition: Particle.h:153
int reco::Particle::charge ( ) const
inline

electric charge

Definition at line 64 of file Particle.h.

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

64 { return m_state.charge(); }
int charge() const
electric charge
Definition: ParticleState.h:72
ParticleState m_state
Definition: Particle.h:153
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 55 of file Particle.h.

References m_state.

55  {
56  m_state = ParticleState(qx3, PolarLorentzVector(pt,eta,phi,mass), vtx, pdgId, status, false);
57  }
int status() const
status word
Definition: Particle.h:138
double pt() const
transverse momentum
Definition: Particle.h:104
int pdgId() const
PDG identifier.
Definition: Particle.h:134
double phi() const
momentum azimuthal angle
Definition: Particle.h:106
double mass() const
mass
Definition: Particle.h:89
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Particle.h:23
ParticleState m_state
Definition: Particle.h:153
double eta() const
momentum pseudorapidity
Definition: Particle.h:110
double reco::Particle::energy ( ) const
inline

energy

Definition at line 83 of file Particle.h.

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

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

83 { return m_state.energy(); }
double energy() const
energy
Definition: ParticleState.h:91
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::et ( ) const
inline

transverse energy

Definition at line 85 of file Particle.h.

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

85 { return m_state.et(); }
double et() const
transverse energy
Definition: ParticleState.h:93
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::et2 ( ) const
inline

transverse energy squared (use this for cut!)

Definition at line 87 of file Particle.h.

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

87 { return m_state.et2(); }
double et2() const
transverse energy squared (use this for cuts)!
Definition: ParticleState.h:95
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::eta ( ) const
inline

momentum pseudorapidity

Definition at line 110 of file Particle.h.

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

Referenced by Particle.Particle::__str__(), DQMExample_Step1::analyze(), Jet.Jet::jetID(), and Jet.Jet::puJetId().

110 { return m_state.eta(); }
ParticleState m_state
Definition: Particle.h:153
double eta() const
momentum pseudorapidity
bool reco::Particle::longLived ( ) const
inline

is long lived?

Definition at line 145 of file Particle.h.

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

145 { return m_state.longLived(); }
bool longLived() const
is long lived?
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::mass ( ) const
inline

mass

Definition at line 89 of file Particle.h.

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

Referenced by Particle.Particle::__str__(), DiObject.DiMuon::__str__(), and massSqr().

89 { return m_state.mass(); }
double mass() const
mass
Definition: ParticleState.h:97
ParticleState m_state
Definition: Particle.h:153
bool reco::Particle::massConstraint ( ) const
inline

do mass constraint?

Definition at line 150 of file Particle.h.

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

150 { return m_state.massConstraint(); }
bool massConstraint() const
do mass constraint?
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::massSqr ( ) const
inline

mass squared

Definition at line 91 of file Particle.h.

References mass().

91 { return mass() * mass(); }
double mass() const
mass
Definition: Particle.h:89
Vector reco::Particle::momentum ( ) const
inline

spatial momentum vector

Definition at line 76 of file Particle.h.

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

76 { return m_state.momentum(); }
Vector momentum() const
spatial momentum vector
Definition: ParticleState.h:84
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::mt ( ) const
inline

transverse mass

Definition at line 94 of file Particle.h.

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

94 { return m_state.mt(); }
double mt() const
transverse mass
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::mtSqr ( ) const
inline

transverse mass squared

Definition at line 96 of file Particle.h.

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

96 { return m_state.mtSqr(); }
double mtSqr() const
transverse mass squared
ParticleState m_state
Definition: Particle.h:153
Particle& reco::Particle::operator= ( Particle &&  )
default

Referenced by Particle().

Particle& reco::Particle::operator= ( Particle const &  )
default
double reco::Particle::p ( ) const
inline

magnitude of momentum vector

Definition at line 81 of file Particle.h.

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

Referenced by Electron.Electron::ptErr().

81 { return m_state.p(); }
ParticleState m_state
Definition: Particle.h:153
double p() const
magnitude of momentum vector
Definition: ParticleState.h:89
const LorentzVector& reco::Particle::p4 ( ) const
inline

four-momentum Lorentz vector

Definition at line 72 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(), Particle(), and CandidateTriggerObjectProducer::produce().

72 { return m_state.p4(); }
const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: ParticleState.h:80
ParticleState m_state
Definition: Particle.h:153
int reco::Particle::pdgId ( ) const
inline

PDG identifier.

Definition at line 134 of file Particle.h.

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

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

134 { return m_state.pdgId(); }
int pdgId() const
PDG identifier.
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::phi ( ) const
inline

momentum azimuthal angle

Definition at line 106 of file Particle.h.

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

Referenced by Particle.Particle::__str__(), DQMExample_Step1::analyze(), and ntupleDataFormat.Track::phiPull().

106 { return m_state.phi(); }
double phi() const
momentum azimuthal angle
ParticleState m_state
Definition: Particle.h:153
const PolarLorentzVector& reco::Particle::polarP4 ( ) const
inline

four-momentum Lorentz vector

Definition at line 74 of file Particle.h.

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

74 { return m_state.polarP4(); }
const PolarLorentzVector & polarP4() const
four-momentum Lorentz vector
Definition: ParticleState.h:82
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::pt ( ) const
inline
double reco::Particle::px ( ) const
inline

x coordinate of momentum vector

Definition at line 98 of file Particle.h.

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

98 { return m_state.px(); }
double px() const
x coordinate of momentum vector
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::py ( ) const
inline

y coordinate of momentum vector

Definition at line 100 of file Particle.h.

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

100 { return m_state.py(); }
ParticleState m_state
Definition: Particle.h:153
double py() const
y coordinate of momentum vector
double reco::Particle::pz ( ) const
inline

z coordinate of momentum vector

Definition at line 102 of file Particle.h.

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

102 { return m_state.pz(); }
double pz() const
z coordinate of momentum vector
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::rapidity ( ) const
inline

rapidity

Definition at line 112 of file Particle.h.

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

Referenced by y().

112 { return m_state.rapidity(); }
double rapidity() const
repidity
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setCharge ( Charge  q)
inline

set electric charge

Definition at line 66 of file Particle.h.

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

66 { m_state.setCharge(q); }
ParticleState m_state
Definition: Particle.h:153
void setCharge(Charge q)
set electric charge
Definition: ParticleState.h:74
void reco::Particle::setLongLived ( )
inline

long lived flag set long lived flag

Definition at line 143 of file Particle.h.

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

143 { m_state.setLongLived(); }
void setLongLived()
set long lived flag
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setMass ( double  m)
inline

set particle mass

Definition at line 120 of file Particle.h.

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

120 {m_state.setMass(m);}
ParticleState m_state
Definition: Particle.h:153
void setMass(double m)
set particle mass
void reco::Particle::setMassConstraint ( )
inline

do mass constraint flag set mass constraint flag

Definition at line 148 of file Particle.h.

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

void setMassConstraint()
set mass constraint flag
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setP4 ( const LorentzVector p4)
inline

set 4-momentum

Definition at line 116 of file Particle.h.

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

Referenced by Jet.Jet::setCorrP4().

116 { m_state.setP4(p4);}
const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: Particle.h:72
ParticleState m_state
Definition: Particle.h:153
void setP4(const LorentzVector &p4)
set 4-momentum
void reco::Particle::setP4 ( const PolarLorentzVector p4)
inline

set 4-momentum

Definition at line 118 of file Particle.h.

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

Referenced by Jet.Jet::setCorrP4().

118 {m_state.setP4(p4); }
const LorentzVector & p4() const
four-momentum Lorentz vector
Definition: Particle.h:72
ParticleState m_state
Definition: Particle.h:153
void setP4(const LorentzVector &p4)
set 4-momentum
void reco::Particle::setPdgId ( int  pdgId)
inline

Definition at line 136 of file Particle.h.

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

Referenced by TtDilepEvtSolution::getLeptNeg(), and TtDilepEvtSolution::getLeptPos().

136 { m_state.setPdgId(pdgId); }
void setPdgId(int pdgId)
int pdgId() const
PDG identifier.
Definition: Particle.h:134
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setPz ( double  pz)
inline

Definition at line 121 of file Particle.h.

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

121 { m_state.setPz(pz);}
double pz() const
z coordinate of momentum vector
Definition: Particle.h:102
void setPz(double pz)
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setStatus ( int  status)
inline

set status word

Definition at line 140 of file Particle.h.

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

int status() const
status word
Definition: Particle.h:138
void setStatus(int status)
set status word
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setThreeCharge ( Charge  qx3)
inline

set electric charge

Definition at line 70 of file Particle.h.

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

70 {m_state.setThreeCharge(qx3); }
void setThreeCharge(Charge qx3)
set electric charge
Definition: ParticleState.h:78
ParticleState m_state
Definition: Particle.h:153
void reco::Particle::setVertex ( const Point vertex)
inline

set vertex

Definition at line 131 of file Particle.h.

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

131 { m_state.setVertex(vertex); }
void setVertex(const Point &vertex)
set vertex
ParticleState m_state
Definition: Particle.h:153
int reco::Particle::status ( ) const
inline

status word

Definition at line 138 of file Particle.h.

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

Referenced by Particle().

138 { return m_state.status(); }
int status() const
status word
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::theta ( ) const
inline

momentum polar angle

Definition at line 108 of file Particle.h.

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

Referenced by Tau.Tau::zImpact().

108 { return m_state.theta(); }
double theta() const
momentum polar angle
ParticleState m_state
Definition: Particle.h:153
int reco::Particle::threeCharge ( ) const
inline

electric charge

Definition at line 68 of file Particle.h.

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

68 { return m_state.threeCharge(); }
int threeCharge() const
electric charge
Definition: ParticleState.h:76
ParticleState m_state
Definition: Particle.h:153
const Point& reco::Particle::vertex ( ) const
inline

vertex position (overwritten by PF...)

Definition at line 123 of file Particle.h.

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

Referenced by Tau.Tau::dxy().

123 { return m_state.vertex(); }
const Point & vertex() const
vertex position
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::vx ( ) const
inline

x coordinate of vertex position

Definition at line 125 of file Particle.h.

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

125 { return m_state.vx(); }
ParticleState m_state
Definition: Particle.h:153
double vx() const
x coordinate of vertex position
double reco::Particle::vy ( ) const
inline

y coordinate of vertex position

Definition at line 127 of file Particle.h.

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

127 { return m_state.vy(); }
double vy() const
y coordinate of vertex position
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::vz ( ) const
inline

z coordinate of vertex position

Definition at line 129 of file Particle.h.

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

129 { return m_state.vz(); }
double vz() const
z coordinate of vertex position
ParticleState m_state
Definition: Particle.h:153
double reco::Particle::y ( ) const
inline

Member Data Documentation

ParticleState reco::Particle::m_state
private