#include <ParticleBase.h>
Public Types | |
typedef int | Charge |
electric charge type | |
typedef math::XYZTLorentzVectorD | LorentzVector |
Lorentz vector. | |
typedef math::XYZPointD | Point |
point in the space | |
typedef math::PtEtaPhiMLorentzVector | PolarLorentzVector |
Lorentz vector. | |
typedef math::XYZVectorD | 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 | |
ParticleBase () | |
default constructor | |
ParticleBase (Charge q, const LorentzVector &p4, const Point &vertex=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true) | |
constructor from values | |
ParticleBase (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 | ~ParticleBase () |
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 |
Definition at line 18 of file ParticleBase.h.
typedef int ParticleBase::Charge |
electric charge type
Definition at line 22 of file ParticleBase.h.
Lorentz vector.
Definition at line 24 of file ParticleBase.h.
typedef math::XYZPointD ParticleBase::Point |
point in the space
Definition at line 28 of file ParticleBase.h.
Lorentz vector.
Definition at line 26 of file ParticleBase.h.
typedef math::XYZVectorD ParticleBase::Vector |
point in the space
Definition at line 30 of file ParticleBase.h.
ParticleBase::ParticleBase | ( | ) | [inline] |
default constructor
Definition at line 32 of file ParticleBase.h.
: cachePolarFixed_( false ), cacheCartesianFixed_( false ) { }
ParticleBase::ParticleBase | ( | Charge | q, |
const LorentzVector & | p4, | ||
const Point & | vertex = Point( 0, 0, 0 ) , |
||
int | pdgId = 0 , |
||
int | status = 0 , |
||
bool | integerCharge = true |
||
) | [inline] |
ParticleBase::ParticleBase | ( | Charge | q, |
const PolarLorentzVector & | p4, | ||
const Point & | vertex = Point( 0, 0, 0 ) , |
||
int | pdgId = 0 , |
||
int | status = 0 , |
||
bool | integerCharge = true |
||
) | [inline] |
virtual ParticleBase::~ParticleBase | ( | ) | [inline, virtual] |
Vector ParticleBase::boostToCM | ( | ) | const [inline] |
boost vector to boost a Lorentz vector to the particle center of mass system
Definition at line 93 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.BoostToCM(); }
void ParticleBase::cacheCartesian | ( | ) | const [inline, protected] |
set internal cache
Definition at line 310 of file ParticleBase.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 ParticleBase::cachePolar | ( | ) | const [inline, protected] |
set internal cache
Definition at line 303 of file ParticleBase.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 ParticleBase::charge | ( | void | ) | const [inline] |
electric charge
Definition at line 54 of file ParticleBase.h.
References qx3_.
Referenced by FWTrackingParticleProxyBuilder::build(), MuonMCClassifier::convertAndPush(), RecoMuonValidator::MuonME::fill(), CosmicParametersDefinerForTP::momentum(), ParametersDefinerForTP::momentum(), CosmicTrackingParticleSelector::operator()(), TrackingParticleSelector::operator()(), operator<<(), ShallowSimTracksProducer::produce(), RecoTracktoTP::s_qoverp(), TPtoRecoTrack::s_qoverp(), CosmicParametersDefinerForTP::vertex(), and ParametersDefinerForTP::vertex().
{ return qx3_ / 3; }
void ParticleBase::clearCache | ( | ) | const [inline, protected] |
clear internal cache
Definition at line 318 of file ParticleBase.h.
References cacheCartesianFixed_, and cachePolarFixed_.
Referenced by setMass().
{ cachePolarFixed_ = false; cacheCartesianFixed_ = false; }
double ParticleBase::energy | ( | void | ) | const [inline] |
energy
Definition at line 105 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
{ cacheCartesian(); return p4Cartesian_.E(); }
double ParticleBase::et | ( | ) | const [inline] |
transverse energy
Definition at line 111 of file ParticleBase.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_.Et(); }
double ParticleBase::eta | ( | void | ) | const [inline] |
momentum pseudorapidity
Definition at line 173 of file ParticleBase.h.
References eta_.
Referenced by RecoMuonValidator::MuonME::fill(), and ShallowSimTracksProducer::produce().
{ return eta_; }
bool ParticleBase::longLived | ( | ) | const [inline] |
is long lived?
Definition at line 280 of file ParticleBase.h.
References longLivedTag, and status_.
{ return status_ & longLivedTag; }
double ParticleBase::mass | ( | ) | const [inline] |
double ParticleBase::massSqr | ( | ) | const [inline] |
Vector ParticleBase::momentum | ( | ) | const [inline] |
spatial momentum vector
Definition at line 86 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by MultiTrackValidator::analyze(), V0Validator::analyze(), MuonTrackValidator::analyze(), RecoMuonValidator::MuonME::fill(), ParametersDefinerForTP::momentum(), TrackingParticleSelector::operator()(), and ParametersDefinerForTP::vertex().
{ cacheCartesian(); return p4Cartesian_.Vect(); }
double ParticleBase::mt | ( | ) | const [inline] |
transverse mass
Definition at line 127 of file ParticleBase.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_.Mt(); }
double ParticleBase::mtSqr | ( | ) | const [inline] |
transverse mass squared
Definition at line 133 of file ParticleBase.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_.Mt2(); }
double ParticleBase::p | ( | ) | const [inline] |
magnitude of momentum vector
Definition at line 99 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by RecoMuonValidator::MuonME::fill(), and ShallowSimTracksProducer::produce().
{ cacheCartesian(); return p4Cartesian_.P(); }
const LorentzVector& ParticleBase::p4 | ( | ) | const [inline] |
four-momentum Lorentz vector
Definition at line 74 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by MuonMCClassifier::convertAndPush(), operator<<(), and setP4().
{ cacheCartesian(); return p4Cartesian_; }
int ParticleBase::pdgId | ( | ) | const [inline] |
PDG identifier.
Reimplemented in TrackingParticle.
Definition at line 253 of file ParticleBase.h.
References pdgId_.
Referenced by setPdgId().
{ return pdgId_; }
double ParticleBase::phi | ( | void | ) | const [inline] |
momentum azimuthal angle
Definition at line 162 of file ParticleBase.h.
References phi_.
Referenced by RecoMuonValidator::MuonME::fill(), and ShallowSimTracksProducer::produce().
{ return phi_; }
const PolarLorentzVector& ParticleBase::polarP4 | ( | ) | const [inline] |
four-momentum Lorentz vector
Definition at line 80 of file ParticleBase.h.
References cachePolar(), and p4Polar_.
{ cachePolar(); return p4Polar_; }
double ParticleBase::pt | ( | ) | const [inline] |
transverse momentum
Definition at line 157 of file ParticleBase.h.
References pt_.
Referenced by RecoMuonValidator::MuonME::fill(), and ShallowSimTracksProducer::produce().
{ return pt_; }
double ParticleBase::px | ( | ) | const [inline] |
x coordinate of momentum vector
Definition at line 139 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by FWTrackingParticleProxyBuilder::build().
{ cacheCartesian(); return p4Cartesian_.Px(); }
double ParticleBase::py | ( | ) | const [inline] |
y coordinate of momentum vector
Definition at line 145 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by FWTrackingParticleProxyBuilder::build().
{ cacheCartesian(); return p4Cartesian_.Py(); }
double ParticleBase::pz | ( | ) | const [inline] |
z coordinate of momentum vector
Definition at line 151 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by FWTrackingParticleProxyBuilder::build().
{ cacheCartesian(); return p4Cartesian_.Pz(); }
double ParticleBase::rapidity | ( | ) | const [inline] |
repidity
Definition at line 178 of file ParticleBase.h.
References cachePolar(), and p4Polar_.
Referenced by y().
{ cachePolar(); return p4Polar_.Rapidity(); }
void ParticleBase::setCharge | ( | Charge | q | ) | [inline] |
void ParticleBase::setLongLived | ( | ) | [inline] |
set long lived flag
Definition at line 275 of file ParticleBase.h.
References longLivedTag, and status_.
{ status_ |= longLivedTag; }
void ParticleBase::setMass | ( | double | m | ) | [inline] |
set particle mass
Definition at line 212 of file ParticleBase.h.
References clearCache(), m, and mass_.
{ mass_ = m; clearCache(); }
void ParticleBase::setP4 | ( | const PolarLorentzVector & | p4 | ) | [inline] |
set 4-momentum
Definition at line 201 of file ParticleBase.h.
References cacheCartesianFixed_, cachePolarFixed_, eta_, mass_, p4(), p4Polar_, phi_, and pt_.
void ParticleBase::setP4 | ( | const LorentzVector & | p4 | ) | [inline] |
set 4-momentum
Definition at line 189 of file ParticleBase.h.
References cacheCartesianFixed_, cachePolarFixed_, eta_, mass_, p4(), p4Cartesian_, p4Polar_, phi_, and pt_.
{ p4Cartesian_ = p4; p4Polar_ = p4; pt_ = p4Polar_.pt(); eta_ = p4Polar_.eta(); phi_ = p4Polar_.phi(); mass_ = p4Polar_.mass(); cachePolarFixed_ = true; cacheCartesianFixed_ = true; }
void ParticleBase::setPdgId | ( | int | pdgId | ) | [inline] |
void ParticleBase::setPz | ( | double | pz | ) | [inline] |
Definition at line 217 of file ParticleBase.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 ParticleBase::setStatus | ( | int | status | ) | [inline] |
void ParticleBase::setThreeCharge | ( | Charge | qx3 | ) | [inline] |
void ParticleBase::setVertex | ( | const Point & | vertex | ) | [inline] |
int ParticleBase::status | ( | void | ) | const [inline] |
status word
Definition at line 263 of file ParticleBase.h.
References status_.
Referenced by MuonMCClassifier::convertAndPush(), TrackingParticleSelector::operator()(), and setStatus().
{ return status_; }
double ParticleBase::theta | ( | void | ) | const [inline] |
momentum polar angle
Definition at line 167 of file ParticleBase.h.
References cacheCartesian(), and p4Cartesian_.
Referenced by ShallowSimTracksProducer::produce().
{ cacheCartesian(); return p4Cartesian_.Theta(); }
int ParticleBase::threeCharge | ( | ) | const [inline] |
const Point& ParticleBase::vertex | ( | ) | const [inline] |
vertex position
Definition at line 228 of file ParticleBase.h.
References vertex_.
Referenced by MultiTrackValidator::analyze(), V0Validator::analyze(), MuonTrackValidator::analyze(), MuonMCClassifier::convertAndPush(), RecoMuonValidator::MuonME::fill(), ParametersDefinerForTP::momentum(), TrackingParticleSelector::operator()(), operator<<(), setVertex(), and ParametersDefinerForTP::vertex().
{ return vertex_; }
double ParticleBase::vx | ( | ) | const [inline] |
x coordinate of vertex position
Definition at line 233 of file ParticleBase.h.
References vertex_.
Referenced by FWTrackingParticleProxyBuilder::build().
{ return vertex_.X(); }
double ParticleBase::vy | ( | ) | const [inline] |
y coordinate of vertex position
Definition at line 238 of file ParticleBase.h.
References vertex_.
Referenced by FWTrackingParticleProxyBuilder::build().
{ return vertex_.Y(); }
double ParticleBase::vz | ( | ) | const [inline] |
z coordinate of vertex position
Definition at line 243 of file ParticleBase.h.
References vertex_.
Referenced by FWTrackingParticleProxyBuilder::build().
{ return vertex_.Z(); }
double ParticleBase::y | ( | ) | const [inline] |
repidity
Definition at line 184 of file ParticleBase.h.
References rapidity().
{ return rapidity(); }
bool ParticleBase::cacheCartesianFixed_ [mutable, protected] |
Definition at line 301 of file ParticleBase.h.
Referenced by cacheCartesian(), clearCache(), and setP4().
bool ParticleBase::cachePolarFixed_ [mutable, protected] |
has cache been set?
Definition at line 301 of file ParticleBase.h.
Referenced by cachePolar(), clearCache(), and setP4().
float ParticleBase::eta_ [protected] |
Definition at line 289 of file ParticleBase.h.
Referenced by cachePolar(), eta(), setP4(), and setPz().
const unsigned int ParticleBase::longLivedTag = 65536 [static] |
long lived flag
Definition at line 273 of file ParticleBase.h.
Referenced by longLived(), and setLongLived().
float ParticleBase::mass_ [protected] |
Definition at line 289 of file ParticleBase.h.
Referenced by cachePolar(), mass(), massSqr(), setMass(), setP4(), and setPz().
LorentzVector ParticleBase::p4Cartesian_ [mutable, protected] |
internal cache for p4
Definition at line 299 of file ParticleBase.h.
Referenced by boostToCM(), cacheCartesian(), energy(), momentum(), p(), p4(), px(), py(), pz(), setP4(), setPz(), and theta().
PolarLorentzVector ParticleBase::p4Polar_ [mutable, protected] |
internal cache for p4
Definition at line 297 of file ParticleBase.h.
Referenced by cacheCartesian(), cachePolar(), et(), mt(), mtSqr(), polarP4(), rapidity(), setP4(), and setPz().
int ParticleBase::pdgId_ [protected] |
PDG identifier.
Reimplemented in TrackingParticle.
Definition at line 293 of file ParticleBase.h.
Referenced by pdgId(), and setPdgId().
float ParticleBase::phi_ [protected] |
Definition at line 289 of file ParticleBase.h.
Referenced by cachePolar(), phi(), setP4(), and setPz().
float ParticleBase::pt_ [protected] |
four-momentum Lorentz vector
Definition at line 289 of file ParticleBase.h.
Referenced by cachePolar(), pt(), setP4(), and setPz().
Charge ParticleBase::qx3_ [protected] |
electric charge
Definition at line 287 of file ParticleBase.h.
Referenced by charge(), ParticleBase(), setCharge(), setThreeCharge(), and threeCharge().
int ParticleBase::status_ [protected] |
status word
Definition at line 295 of file ParticleBase.h.
Referenced by longLived(), setLongLived(), setStatus(), and status().
Point ParticleBase::vertex_ [protected] |
vertex position
Definition at line 291 of file ParticleBase.h.
Referenced by setVertex(), vertex(), vx(), vy(), and vz().