#include <Particle.h>
Public Types | |
typedef int | Charge |
electric charge type | |
typedef math::XYZTLorentzVector | LorentzVector |
Lorentz vector. | |
typedef math::XYZPoint | Point |
point in the space | |
typedef math::PtEtaPhiMLorentzVector | PolarLorentzVector |
Lorentz vector. | |
typedef math::XYZVector | Vector |
point in the space | |
Public Member Functions | |
Vector | boostToCM () const |
int | charge () const |
electric charge | |
double | energy () const |
energy | |
double | et () const |
transverse energy | |
double | eta () const |
momentum pseudorapidity | |
bool | longLived () const |
is long lived? | |
double | mass () const |
mass | |
double | massSqr () const |
mass squared | |
Vector | momentum () const |
spatial momentum vector | |
double | mt () const |
transverse mass | |
double | mtSqr () const |
transverse mass squared | |
double | p () const |
magnitude of momentum vector | |
const LorentzVector & | p4 () const |
four-momentum Lorentz vector | |
Particle () | |
default constructor | |
Particle (Charge q, const LorentzVector &p4, const Point &vertex=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
Particle (Charge q, const PolarLorentzVector &p4, const Point &vertex=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
int | pdgId () const |
PDG identifier. | |
double | phi () const |
momentum azimuthal angle | |
const PolarLorentzVector & | polarP4 () const |
four-momentum Lorentz vector | |
double | pt () const |
transverse momentum | |
double | px () const |
x coordinate of momentum vector | |
double | py () const |
y coordinate of momentum vector | |
double | pz () const |
z coordinate of momentum vector | |
double | rapidity () const |
repidity | |
void | setCharge (Charge q) |
set electric charge | |
void | setLongLived () |
set long lived flag | |
void | setMass (double m) |
set particle mass | |
void | setP4 (const PolarLorentzVector &p4) |
set 4-momentum | |
void | setP4 (const LorentzVector &p4) |
set 4-momentum | |
void | setPdgId (int pdgId) |
void | setPz (double pz) |
void | setStatus (int status) |
set status word | |
void | setThreeCharge (Charge qx3) |
set electric charge | |
void | setVertex (const Point &vertex) |
set vertex | |
int | status () const |
status word | |
double | theta () const |
momentum polar angle | |
int | threeCharge () const |
electric charge | |
const Point & | vertex () const |
vertex position | |
double | vx () const |
x coordinate of vertex position | |
double | vy () const |
y coordinate of vertex position | |
double | vz () const |
z coordinate of vertex position | |
double | y () const |
repidity | |
virtual | ~Particle () |
destructor | |
Static Public Attributes | |
static const unsigned int | longLivedTag = 65536 |
long lived flag | |
Protected Member Functions | |
void | cacheCartesian () const |
set internal cache | |
void | cachePolar () const |
set internal cache | |
void | clearCache () const |
clear internal cache | |
Protected Attributes | |
bool | cacheCartesianFixed_ |
bool | cachePolarFixed_ |
has cache been set? | |
float | eta_ |
float | mass_ |
LorentzVector | p4Cartesian_ |
internal cache for p4 | |
PolarLorentzVector | p4Polar_ |
internal cache for p4 | |
int | pdgId_ |
PDG identifier. | |
float | phi_ |
float | pt_ |
four-momentum Lorentz vector | |
Charge | qx3_ |
electric charge | |
int | status_ |
status word | |
Point | vertex_ |
vertex position |
Base class describing a generic reconstructed particle its main subclass is Candidate
Definition at line 20 of file Particle.h.
typedef int reco::Particle::Charge |
electric charge type
Definition at line 23 of file Particle.h.
Lorentz vector.
Definition at line 25 of file Particle.h.
typedef math::XYZPoint reco::Particle::Point |
point in the space
Definition at line 29 of file Particle.h.
Lorentz vector.
Definition at line 27 of file Particle.h.
point in the space
Definition at line 31 of file Particle.h.
reco::Particle::Particle | ( | ) | [inline] |
reco::Particle::Particle | ( | Charge | q, |
const LorentzVector & | p4, | ||
const Point & | vertex = Point( 0, 0, 0 ) , |
||
int | pdgId = 0 , |
||
int | status = 0 , |
||
bool | integerCharge = true |
||
) | [inline] |
reco::Particle::Particle | ( | Charge | q, |
const PolarLorentzVector & | p4, | ||
const Point & | vertex = Point( 0, 0, 0 ) , |
||
int | pdgId = 0 , |
||
int | status = 0 , |
||
bool | integerCharge = true |
||
) | [inline] |
virtual reco::Particle::~Particle | ( | ) | [inline, virtual] |
Vector reco::Particle::boostToCM | ( | ) | const [inline] |
boost vector to boost a Lorentz vector to the particle center of mass system
Definition at line 71 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.BoostToCM(); }
void reco::Particle::cacheCartesian | ( | ) | const [inline, protected] |
set internal cache
Definition at line 188 of file Particle.h.
References cacheCartesianFixed_, cachePolar(), p4Cartesian_, and p4Polar_.
Referenced by boostToCM(), energy(), momentum(), p(), p4(), px(), py(), pz(), setPz(), and theta().
{ if ( cacheCartesianFixed_ ) return; cachePolar(); p4Cartesian_ = p4Polar_; cacheCartesianFixed_ = true; }
void reco::Particle::cachePolar | ( | ) | const [inline, protected] |
set internal cache
Definition at line 182 of file Particle.h.
References cachePolarFixed_, eta_, mass_, p4Polar_, phi_, and pt_.
Referenced by cacheCartesian(), et(), mt(), mtSqr(), polarP4(), and rapidity().
{ if ( cachePolarFixed_ ) return; p4Polar_ = PolarLorentzVector( pt_, eta_, phi_, mass_ ); cachePolarFixed_ = true; }
int reco::Particle::charge | ( | ) | const [inline] |
void reco::Particle::clearCache | ( | ) | const [inline, protected] |
clear internal cache
Definition at line 195 of file Particle.h.
References cacheCartesianFixed_, and cachePolarFixed_.
Referenced by setMass().
{ cachePolarFixed_ = false; cacheCartesianFixed_ = false; }
double reco::Particle::energy | ( | ) | const [inline] |
energy
Definition at line 75 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by EmDQMReco::analyze().
{ cacheCartesian(); return p4Cartesian_.E(); }
double reco::Particle::et | ( | ) | const [inline] |
transverse energy
Definition at line 77 of file Particle.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_.Et(); }
double reco::Particle::eta | ( | ) | const [inline] |
momentum pseudorapidity
Definition at line 99 of file Particle.h.
References eta_.
Referenced by TopHLTDiMuonDQM::analyze(), and PFRootEventManager::fillOutEventWithClusters().
{ return eta_; }
bool reco::Particle::longLived | ( | ) | const [inline] |
is long lived?
Definition at line 162 of file Particle.h.
References longLivedTag, and status_.
{ return status_ & longLivedTag; }
double reco::Particle::mass | ( | ) | const [inline] |
double reco::Particle::massSqr | ( | ) | const [inline] |
Vector reco::Particle::momentum | ( | ) | const [inline] |
spatial momentum vector
Definition at line 68 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.Vect(); }
double reco::Particle::mt | ( | ) | const [inline] |
transverse mass
Definition at line 83 of file Particle.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_.Mt(); }
double reco::Particle::mtSqr | ( | ) | const [inline] |
transverse mass squared
Definition at line 85 of file Particle.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_.Mt2(); }
double reco::Particle::p | ( | ) | const [inline] |
magnitude of momentum vector
Definition at line 73 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.P(); }
const LorentzVector& reco::Particle::p4 | ( | ) | const [inline] |
four-momentum Lorentz vector
Definition at line 64 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by TtDilepLRSignalSelObservables::operator()(), TtSemiLRJetCombObservables::operator()(), CandidateTriggerObjectProducer::produce(), setP4(), ParticleReplacerClass::transformMuMu2TauNu(), and ParticleReplacerClass::transformMuMu2TauTau().
{ cacheCartesian(); return p4Cartesian_; }
int reco::Particle::pdgId | ( | ) | const [inline] |
PDG identifier.
Definition at line 150 of file Particle.h.
References pdgId_.
Referenced by TopHLTDiMuonDQM::analyze(), setPdgId(), ParticleReplacerClass::transformMuMu2TauNu(), and ParticleReplacerClass::transformMuMu2TauTau().
{ return pdgId_; }
double reco::Particle::phi | ( | ) | const [inline] |
momentum azimuthal angle
Definition at line 95 of file Particle.h.
References phi_.
Referenced by TopHLTDiMuonDQM::analyze(), and PFRootEventManager::fillOutEventWithClusters().
{ return phi_; }
const PolarLorentzVector& reco::Particle::polarP4 | ( | ) | const [inline] |
four-momentum Lorentz vector
Definition at line 66 of file Particle.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_; }
double reco::Particle::pt | ( | ) | const [inline] |
transverse momentum
Definition at line 93 of file Particle.h.
References pt_.
Referenced by IsMuMatchedToHLTSingleMu().
{ return pt_; }
double reco::Particle::px | ( | ) | const [inline] |
x coordinate of momentum vector
Definition at line 87 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.Px(); }
double reco::Particle::py | ( | ) | const [inline] |
y coordinate of momentum vector
Definition at line 89 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.Py(); }
double reco::Particle::pz | ( | ) | const [inline] |
z coordinate of momentum vector
Definition at line 91 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.Pz(); }
double reco::Particle::rapidity | ( | ) | const [inline] |
repidity
Definition at line 101 of file Particle.h.
References cachePolar(), and p4Polar_.
Referenced by y().
{ cachePolar(); return p4Polar_.Rapidity(); }
void reco::Particle::setCharge | ( | Charge | q | ) | [inline] |
void reco::Particle::setLongLived | ( | ) | [inline] |
set long lived flag
Definition at line 160 of file Particle.h.
References longLivedTag, and status_.
{ status_ |= longLivedTag; }
void reco::Particle::setMass | ( | double | m | ) | [inline] |
set particle mass
Definition at line 126 of file Particle.h.
References clearCache(), m, and mass_.
{ mass_ = m; clearCache(); }
void reco::Particle::setP4 | ( | const PolarLorentzVector & | p4 | ) | [inline] |
set 4-momentum
Definition at line 116 of file Particle.h.
References cacheCartesianFixed_, cachePolarFixed_, eta_, mass_, p4(), p4Polar_, phi_, and pt_.
void reco::Particle::setP4 | ( | const LorentzVector & | p4 | ) | [inline] |
set 4-momentum
Definition at line 105 of file Particle.h.
References cacheCartesianFixed_, cachePolarFixed_, eta_, mass_, p4(), p4Cartesian_, p4Polar_, phi_, and pt_.
Referenced by ParticleReplacerClass::transformMuMu2TauNu(), and ParticleReplacerClass::transformMuMu2TauTau().
{ p4Cartesian_ = p4; p4Polar_ = p4; pt_ = p4Polar_.pt(); eta_ = p4Polar_.eta(); phi_ = p4Polar_.phi(); mass_ = p4Polar_.mass(); cachePolarFixed_ = true; cacheCartesianFixed_ = true; }
void reco::Particle::setPdgId | ( | int | pdgId | ) | [inline] |
Definition at line 152 of file Particle.h.
References pdgId(), and pdgId_.
Referenced by TtDilepEvtSolution::getLeptNeg(), TtDilepEvtSolution::getLeptPos(), ParticleReplacerClass::transformMuMu2TauNu(), and ParticleReplacerClass::transformMuMu2TauTau().
void reco::Particle::setPz | ( | double | pz | ) | [inline] |
Definition at line 130 of file Particle.h.
References cacheCartesian(), eta_, mass_, p4Cartesian_, p4Polar_, phi_, and pt_.
{ cacheCartesian(); p4Cartesian_.SetPz(pz); p4Polar_ = p4Cartesian_; pt_ = p4Polar_.pt(); eta_ = p4Polar_.eta(); phi_ = p4Polar_.phi(); mass_ = p4Polar_.mass(); }
void reco::Particle::setStatus | ( | int | status | ) | [inline] |
set status word
Definition at line 156 of file Particle.h.
References status(), and status_.
Referenced by ParticleReplacerClass::produce(), ParticleReplacerClass::transformMuMu2TauNu(), and ParticleReplacerClass::transformMuMu2TauTau().
void reco::Particle::setThreeCharge | ( | Charge | qx3 | ) | [inline] |
void reco::Particle::setVertex | ( | const Point & | vertex | ) | [inline] |
int reco::Particle::status | ( | ) | const [inline] |
status word
Definition at line 154 of file Particle.h.
References status_.
Referenced by setStatus().
{ return status_; }
double reco::Particle::theta | ( | ) | const [inline] |
momentum polar angle
Definition at line 97 of file Particle.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.Theta(); }
int reco::Particle::threeCharge | ( | ) | const [inline] |
const Point& reco::Particle::vertex | ( | ) | const [inline] |
vertex position
Definition at line 140 of file Particle.h.
References vertex_.
Referenced by setVertex().
{ return vertex_; }
double reco::Particle::vx | ( | ) | const [inline] |
x coordinate of vertex position
Definition at line 142 of file Particle.h.
References vertex_.
{ return vertex_.X(); }
double reco::Particle::vy | ( | ) | const [inline] |
y coordinate of vertex position
Definition at line 144 of file Particle.h.
References vertex_.
{ return vertex_.Y(); }
double reco::Particle::vz | ( | ) | const [inline] |
z coordinate of vertex position
Definition at line 146 of file Particle.h.
References vertex_.
{ return vertex_.Z(); }
double reco::Particle::y | ( | ) | const [inline] |
bool reco::Particle::cacheCartesianFixed_ [mutable, protected] |
Definition at line 180 of file Particle.h.
Referenced by cacheCartesian(), clearCache(), and setP4().
bool reco::Particle::cachePolarFixed_ [mutable, protected] |
has cache been set?
Definition at line 180 of file Particle.h.
Referenced by cachePolar(), clearCache(), and setP4().
float reco::Particle::eta_ [protected] |
Definition at line 168 of file Particle.h.
Referenced by cachePolar(), eta(), setP4(), and setPz().
const unsigned int reco::Particle::longLivedTag = 65536 [static] |
long lived flag
Definition at line 158 of file Particle.h.
Referenced by longLived(), and setLongLived().
float reco::Particle::mass_ [protected] |
Definition at line 168 of file Particle.h.
Referenced by cachePolar(), mass(), massSqr(), setMass(), setP4(), and setPz().
LorentzVector reco::Particle::p4Cartesian_ [mutable, protected] |
internal cache for p4
Definition at line 178 of file Particle.h.
Referenced by boostToCM(), cacheCartesian(), energy(), momentum(), p(), p4(), px(), py(), pz(), setP4(), setPz(), and theta().
PolarLorentzVector reco::Particle::p4Polar_ [mutable, protected] |
internal cache for p4
Definition at line 176 of file Particle.h.
Referenced by cacheCartesian(), cachePolar(), et(), mt(), mtSqr(), polarP4(), rapidity(), setP4(), and setPz().
int reco::Particle::pdgId_ [protected] |
float reco::Particle::phi_ [protected] |
Definition at line 168 of file Particle.h.
Referenced by cachePolar(), phi(), setP4(), and setPz().
float reco::Particle::pt_ [protected] |
four-momentum Lorentz vector
Definition at line 168 of file Particle.h.
Referenced by cachePolar(), pt(), setP4(), and setPz().
Charge reco::Particle::qx3_ [protected] |
electric charge
Definition at line 166 of file Particle.h.
Referenced by charge(), Particle(), setCharge(), setThreeCharge(), and threeCharge().
int reco::Particle::status_ [protected] |
status word
Definition at line 174 of file Particle.h.
Referenced by longLived(), setLongLived(), setStatus(), and status().
Point reco::Particle::vertex_ [protected] |
vertex position
Definition at line 170 of file Particle.h.
Referenced by setVertex(), vertex(), vx(), vy(), and vz().