#include <DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h>
Public Member Functions | |
TrackCharge | charge () const |
Charge (-1, 0 or 1). | |
LocalTrajectoryParameters (const LocalPoint &pos, const LocalVector &p, TrackCharge charge) | |
Constructor from local position, momentum and charge. | |
LocalTrajectoryParameters (double aQbp, double aDxdz, double aDydz, double aX, double aY, double aPzSign, bool charged=true) | |
Constructor from individual parameters. | |
LocalTrajectoryParameters (const AlgebraicVector5 &v, double aPzSign, bool charged=true) | |
Constructor from vector of parameters. | |
LocalTrajectoryParameters (const AlgebraicVector &v, double aPzSign, bool charged=true) | |
Constructor from vector of parameters. | |
LocalTrajectoryParameters () | |
AlgebraicVector5 | mixedFormatVector () const |
Vector of parameters in internal representation. | |
AlgebraicVector | mixedFormatVector_old () const |
Vector of parameters in internal representation. | |
LocalVector | momentum () const |
Momentum vector in the local frame. | |
LocalPoint | position () const |
Local x and y position coordinates. | |
double | pzSign () const |
Sign of the z-component of the momentum in the local frame. | |
double | signedInverseMomentum () const |
Signed inverse momentum q/p (zero for neutrals). | |
bool | updateP (double dP) |
Update of momentum by a scalar dP. | |
AlgebraicVector5 | vector () const |
Vector of parameters with signed inverse momentum. | |
AlgebraicVector | vector_old () const |
Vector of parameters with signed inverse momentum. | |
Private Attributes | |
TrackCharge | theCharge |
charge | |
double | theDxdz |
tangent of direction in local x vs. z | |
double | theDydz |
tangent of direction in local y vs. z | |
double | thePzSign |
sign of local pz | |
double | theQbp |
q/p (charged) or 1/p (neutral) | |
double | theX |
local x position | |
double | theY |
local y position |
The set consists of the following parameters:
q/p : charged particles: charge (plus or minus one) divided by magnitude of momentum
neutral particles: inverse magnitude of momentum
dxdz : direction tangent in local xz-plane
dydz : direction tangent in local yz-plane
x : local x-coordinate
y : local y-coordinate
In addition, the sign of local p_z is needed to fully define the direction of the track in this local frame.
Definition at line 26 of file LocalTrajectoryParameters.h.
LocalTrajectoryParameters::LocalTrajectoryParameters | ( | ) | [inline] |
LocalTrajectoryParameters::LocalTrajectoryParameters | ( | const AlgebraicVector & | v, | |
double | aPzSign, | |||
bool | charged = true | |||
) | [inline] |
Constructor from vector of parameters.
Expects a vector of parameters as defined above, plus the sign of p_z. For charged particles the charge will be determined by the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.
Definition at line 39 of file LocalTrajectoryParameters.h.
References theCharge, theDxdz, theDydz, thePzSign, theQbp, theX, and theY.
00039 { 00040 theQbp = v[0]; 00041 theDxdz = v[1]; 00042 theDydz = v[2]; 00043 theX = v[3]; 00044 theY = v[4]; 00045 thePzSign = aPzSign; 00046 if ( charged ) 00047 theCharge = theQbp>0 ? 1 : -1; 00048 else 00049 theCharge = 0; 00050 }
LocalTrajectoryParameters::LocalTrajectoryParameters | ( | const AlgebraicVector5 & | v, | |
double | aPzSign, | |||
bool | charged = true | |||
) | [inline] |
Constructor from vector of parameters.
Expects a vector of parameters as defined above, plus the sign of p_z. For charged particles the charge will be determined by the sign of the first element. For neutral particles the last argument should be false, in which case the charge of the first element will be neglected.
Definition at line 59 of file LocalTrajectoryParameters.h.
References theCharge, theDxdz, theDydz, thePzSign, theQbp, theX, and theY.
00059 { 00060 theQbp = v[0]; 00061 theDxdz = v[1]; 00062 theDydz = v[2]; 00063 theX = v[3]; 00064 theY = v[4]; 00065 thePzSign = aPzSign; 00066 if ( charged ) 00067 theCharge = theQbp>0 ? 1 : -1; 00068 else 00069 theCharge = 0; 00070 }
LocalTrajectoryParameters::LocalTrajectoryParameters | ( | double | aQbp, | |
double | aDxdz, | |||
double | aDydz, | |||
double | aX, | |||
double | aY, | |||
double | aPzSign, | |||
bool | charged = true | |||
) | [inline] |
Constructor from individual parameters.
Expects parameters as defined above, plus the sign of p_z. For charged particles the charge will be determined by the sign of the first argument. For neutral particles the last argument should be false, in which case the charge of the first argument will be neglected.
Definition at line 80 of file LocalTrajectoryParameters.h.
References theCharge, and theQbp.
00081 : 00082 theDxdz(aDxdz), theDydz(aDydz), 00083 theX(aX), theY(aY), thePzSign(aPzSign) { 00084 if ( charged ) { 00085 theQbp = aQbp; 00086 theCharge = theQbp>0 ? 1 : -1; 00087 } 00088 else { 00089 theQbp = aQbp; 00090 theCharge = 0; 00091 } 00092 }
LocalTrajectoryParameters::LocalTrajectoryParameters | ( | const LocalPoint & | pos, | |
const LocalVector & | p, | |||
TrackCharge | charge | |||
) | [inline] |
Constructor from local position, momentum and charge.
Definition at line 95 of file LocalTrajectoryParameters.h.
References PV3DBase< T, PVType, FrameType >::mag(), and theQbp.
00096 : 00097 theQbp( charge/p.mag()), theDxdz( p.x()/p.z()), theDydz( p.y()/p.z()), 00098 theX( pos.x()), theY(pos.y()), thePzSign( p.z()>0. ? 1.:-1.), theCharge(charge) { 00099 if ( charge==0 ) theQbp = 1./p.mag(); 00100 }
TrackCharge LocalTrajectoryParameters::charge | ( | ) | const [inline] |
Charge (-1, 0 or 1).
Definition at line 120 of file LocalTrajectoryParameters.h.
References theCharge.
Referenced by HLTMuonDQMSource::analyze(), BzeroReferenceTrajectory::BzeroReferenceTrajectory(), BasicSingleTrajectoryState::checkGlobalParameters(), reco::ElectronPixelSeed::getCharge(), JacobianCartesianToLocal::JacobianCartesianToLocal(), JacobianLocalToCartesian::JacobianLocalToCartesian(), operator<<(), signedInverseMomentum(), and InOutConversionTrackFinder::tracks().
00120 {return theCharge;}
AlgebraicVector5 LocalTrajectoryParameters::mixedFormatVector | ( | ) | const [inline] |
Vector of parameters in internal representation.
Vector of parameters as defined above, with the first element = q/p for charged and = 1/p for neutral.
Definition at line 162 of file LocalTrajectoryParameters.h.
References theDxdz, theDydz, theQbp, theX, theY, and v.
Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), DualReferenceTrajectory::extractParameters(), DualBzeroReferenceTrajectory::extractParameters(), JacobianLocalToCartesian::JacobianLocalToCartesian(), KarimakiAlignmentDerivatives::operator()(), operator<<(), and ReferenceTrajectory::ReferenceTrajectory().
00162 { 00163 AlgebraicVector5 v; 00164 v[0] = theQbp; // signed in case of charged particles, 1/p for neutrals 00165 v[1] = theDxdz; 00166 v[2] = theDydz; 00167 v[3] = theX; 00168 v[4] = theY; 00169 return v; 00170 }
AlgebraicVector LocalTrajectoryParameters::mixedFormatVector_old | ( | ) | const [inline] |
Vector of parameters in internal representation.
Vector of parameters as defined above, with the first element = q/p for charged and = 1/p for neutral.
Definition at line 177 of file LocalTrajectoryParameters.h.
References theDxdz, theDydz, theQbp, theX, theY, and v.
00177 { 00178 AlgebraicVector v(5); 00179 v[0] = theQbp; // signed in case of charged particles, 1/p for neutrals 00180 v[1] = theDxdz; 00181 v[2] = theDydz; 00182 v[3] = theX; 00183 v[4] = theY; 00184 return v; 00185 }
LocalVector LocalTrajectoryParameters::momentum | ( | ) | const [inline] |
Momentum vector in the local frame.
Definition at line 110 of file LocalTrajectoryParameters.h.
References p, funct::sqrt(), theDxdz, theDydz, thePzSign, and theQbp.
Referenced by HLTMuonDQMSource::analyze(), BasicSingleTrajectoryState::checkGlobalParameters(), PixelCPEBase::computeAnglesFromTrajectory(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), IsGoodSeed(), JacobianCartesianToLocal::JacobianCartesianToLocal(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(), BasicSingleTrajectoryState::localMomentum(), StripCPEfromTrackAngle2::localParameters(), StripCPEfromTrackAngle::localParameters(), reco::TrackInfo::localTrackMomentum(), TrackCandidateProducer::produce(), TrackInfoProducerAlgorithm::run(), and InOutConversionTrackFinder::tracks().
00110 { 00111 double p = 1./fabs(theQbp); 00112 if ( p>1.e9 ) p = 1.e9; 00113 double dz = thePzSign/sqrt(1. + theDxdz*theDxdz + theDydz*theDydz); 00114 double dx = dz*theDxdz; 00115 double dy = dz*theDydz; 00116 return LocalVector(dx*p, dy*p, dz*p); 00117 }
LocalPoint LocalTrajectoryParameters::position | ( | ) | const [inline] |
Local x and y position coordinates.
Definition at line 105 of file LocalTrajectoryParameters.h.
Referenced by BasicSingleTrajectoryState::checkGlobalParameters(), PixelCPEBase::computeAnglesFromTrajectory(), OutInConversionSeedFinder::createSeed(), IsGoodSeed(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(), StripCPEfromTrackAngle2::localParameters(), StripCPEfromTrackAngle::localParameters(), BasicSingleTrajectoryState::localPosition(), reco::TrackInfo::localTrackPosition(), TrackInfoProducerAlgorithm::run(), and InOutConversionTrackFinder::tracks().
00105 { 00106 return LocalPoint(theX, theY); 00107 }
double LocalTrajectoryParameters::pzSign | ( | ) | const [inline] |
Sign of the z-component of the momentum in the local frame.
Definition at line 188 of file LocalTrajectoryParameters.h.
References thePzSign.
Referenced by BzeroReferenceTrajectory::BzeroReferenceTrajectory(), TrajectoryStateCombiner::combine(), JacobianLocalToCartesian::JacobianLocalToCartesian(), GsfTrackProducerBase::putInEvt(), GaussianStateConversions::tsosFromMultiGaussianState(), KFStripUpdator::update(), and KFStrip1DUpdator::update().
00188 { 00189 return thePzSign; 00190 }
double LocalTrajectoryParameters::signedInverseMomentum | ( | ) | const [inline] |
Signed inverse momentum q/p (zero for neutrals).
Definition at line 123 of file LocalTrajectoryParameters.h.
References charge(), and theQbp.
Referenced by ReferenceTrajectory::construct(), TwoBodyDecayTrajectory::constructSingleTsosWithErrors(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(), NuclearInteractionFinder::rescaleError(), vector(), and vector_old().
bool LocalTrajectoryParameters::updateP | ( | double | dP | ) | [inline] |
Update of momentum by a scalar dP.
Definition at line 193 of file LocalTrajectoryParameters.h.
Referenced by MaterialEffectsUpdator::updateState(), VolumeMaterialEffectsUpdator::updateState(), and GsfMaterialEffectsUpdator::updateState().
00193 { 00194 double p = 1./fabs(theQbp); 00195 if ((p += dP) <= 0.) return false; 00196 double newQbp = theQbp > 0. ? 1./p : -1./p; 00197 theQbp = newQbp; 00198 return true; 00199 }
AlgebraicVector5 LocalTrajectoryParameters::vector | ( | ) | const [inline] |
Vector of parameters with signed inverse momentum.
Vector of parameters as defined above, with the first element = q/p .
Definition at line 147 of file LocalTrajectoryParameters.h.
References signedInverseMomentum(), theDxdz, theDydz, theX, theY, and v.
Referenced by TrajectoryStateCombiner::combine(), PFGsfHelper::computeQpMode(), Chi2MeasurementEstimatorForTrackerHits::estimate(), CollinearFitAtTM::fit(), GlobalMuonTrackMatcher::match_Chi2(), MeasurementExtractor::measuredParameters(), PFGsfHelper::PFGsfHelper(), TrackAssociatorByPosition::quality(), ChargeSignificanceTrajectoryFilter::TBC(), CkfDebugger::testSeed(), Strip1DMeasurementTransformator::trajectoryParameters(), and StripMeasurementTransformator::trajectoryParameters().
00147 { 00148 AlgebraicVector5 v; 00149 v[0] = signedInverseMomentum(); 00150 v[1] = theDxdz; 00151 v[2] = theDydz; 00152 v[3] = theX; 00153 v[4] = theY; 00154 return v; 00155 }
AlgebraicVector LocalTrajectoryParameters::vector_old | ( | ) | const [inline] |
Vector of parameters with signed inverse momentum.
Vector of parameters as defined above, with the first element = q/p .
Definition at line 132 of file LocalTrajectoryParameters.h.
References signedInverseMomentum(), theDxdz, theDydz, theX, theY, and v.
00132 { 00133 AlgebraicVector v(5); 00134 v[0] = signedInverseMomentum(); 00135 v[1] = theDxdz; 00136 v[2] = theDydz; 00137 v[3] = theX; 00138 v[4] = theY; 00139 return v; 00140 }
charge
Definition at line 210 of file LocalTrajectoryParameters.h.
Referenced by charge(), and LocalTrajectoryParameters().
double LocalTrajectoryParameters::theDxdz [private] |
tangent of direction in local x vs. z
Definition at line 203 of file LocalTrajectoryParameters.h.
Referenced by LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), momentum(), vector(), and vector_old().
double LocalTrajectoryParameters::theDydz [private] |
tangent of direction in local y vs. z
Definition at line 204 of file LocalTrajectoryParameters.h.
Referenced by LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), momentum(), vector(), and vector_old().
double LocalTrajectoryParameters::thePzSign [private] |
sign of local pz
Definition at line 208 of file LocalTrajectoryParameters.h.
Referenced by LocalTrajectoryParameters(), momentum(), and pzSign().
double LocalTrajectoryParameters::theQbp [private] |
q/p (charged) or 1/p (neutral)
Definition at line 202 of file LocalTrajectoryParameters.h.
Referenced by LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), momentum(), signedInverseMomentum(), and updateP().
double LocalTrajectoryParameters::theX [private] |
local x position
Definition at line 205 of file LocalTrajectoryParameters.h.
Referenced by LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), position(), vector(), and vector_old().
double LocalTrajectoryParameters::theY [private] |
local y position
Definition at line 206 of file LocalTrajectoryParameters.h.
Referenced by LocalTrajectoryParameters(), mixedFormatVector(), mixedFormatVector_old(), position(), vector(), and vector_old().