#include <DataFormats/GeometryVector/interface/Vector3DBase.h>
Public Types | |
typedef PV3DBase< T, VectorTag, FrameTag > | BaseClass |
typedef BaseClass::BasicVectorType | BasicVectorType |
typedef BaseClass::Cylindrical | Cylindrical |
typedef BaseClass::Polar | Polar |
typedef BaseClass::Spherical | Spherical |
typedef Vector3DBase< T, FrameTag > | VectorType |
Public Member Functions | |
template<class U> | |
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > | cross (const Vector3DBase< U, FrameTag > &v) const |
Vector (or cross) product with a vector of possibly different precision, defined in the same reference frame. | |
template<class U> | |
PreciseFloatType< T, U >::Type | dot (const Vector3DBase< U, FrameTag > &v) const |
Scalar (or dot) product with a vector of possibly different precision, defined in the same reference frame. | |
Vector3DBase & | operator *= (const T &t) |
Scaling by a scalar value (multiplication). | |
template<class U> | |
Vector3DBase & | operator+= (const Vector3DBase< U, FrameTag > &v) |
Increment by another Vector of possibly different precision, defined in the same reference frame. | |
Vector3DBase | operator- () const |
Unary minus, returns a vector with components (-x(),-y(),-z()). | |
template<class U> | |
Vector3DBase & | operator-= (const Vector3DBase< U, FrameTag > &v) |
Decrement by another Vector of possibly different precision, defined in the same reference frame. | |
Vector3DBase & | operator/= (const T &t) |
Scaling by a scalar value (division). | |
Vector3DBase | unit () const |
Unit vector parallel to this. | |
template<class U> | |
Vector3DBase (const Basic3DVector< U > &v) | |
Explicit constructor from BasicVectorType, bypasses consistency checks for point/vector and for coordinate frame. | |
Vector3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r) | |
Deprecated construct from polar coordinates, use constructor from Polar( theta, phi, r) instead. | |
Vector3DBase (const Polar &set) | |
construct from polar coordinates | |
Vector3DBase (const Cylindrical &set) | |
Construct from cylindrical coordinates. | |
Vector3DBase (const T &x, const T &y, const T &z) | |
construct from cartesian coordinates | |
template<class U> | |
Vector3DBase (const Vector3DBase< U, FrameTag > &v) | |
Construct from another point in the same reference frame, possiblly with different precision. | |
Vector3DBase () | |
default constructor uses default constructor of T to initialize the components. |
Definition at line 9 of file Vector3DBase.h.
typedef PV3DBase<T, VectorTag, FrameTag> Vector3DBase< T, FrameTag >::BaseClass |
Definition at line 12 of file Vector3DBase.h.
typedef BaseClass::BasicVectorType Vector3DBase< T, FrameTag >::BasicVectorType |
Reimplemented from PV3DBase< T, VectorTag, FrameTag >.
Definition at line 17 of file Vector3DBase.h.
typedef BaseClass::Cylindrical Vector3DBase< T, FrameTag >::Cylindrical |
Reimplemented from PV3DBase< T, VectorTag, FrameTag >.
Definition at line 14 of file Vector3DBase.h.
typedef BaseClass::Polar Vector3DBase< T, FrameTag >::Polar |
Reimplemented from PV3DBase< T, VectorTag, FrameTag >.
Definition at line 16 of file Vector3DBase.h.
typedef BaseClass::Spherical Vector3DBase< T, FrameTag >::Spherical |
Reimplemented from PV3DBase< T, VectorTag, FrameTag >.
Definition at line 15 of file Vector3DBase.h.
typedef Vector3DBase< T, FrameTag> Vector3DBase< T, FrameTag >::VectorType |
Definition at line 13 of file Vector3DBase.h.
Vector3DBase< T, FrameTag >::Vector3DBase | ( | ) | [inline] |
default constructor uses default constructor of T to initialize the components.
For built-in floating-point types this means initialization to zero
Definition at line 23 of file Vector3DBase.h.
Referenced by Vector3DBase< T, FrameTag >::operator-(), and Vector3DBase< T, FrameTag >::unit().
Vector3DBase< T, FrameTag >::Vector3DBase | ( | const Vector3DBase< U, FrameTag > & | v | ) | [inline] |
Construct from another point in the same reference frame, possiblly with different precision.
Definition at line 29 of file Vector3DBase.h.
00029 : BaseClass( v.basicVector()) {}
Vector3DBase< T, FrameTag >::Vector3DBase | ( | const T & | x, | |
const T & | y, | |||
const T & | z | |||
) | [inline] |
Vector3DBase< T, FrameTag >::Vector3DBase | ( | const Cylindrical & | set | ) | [inline, explicit] |
Construct from cylindrical coordinates.
Definition at line 36 of file Vector3DBase.h.
00036 : BaseClass( set) {}
Vector3DBase< T, FrameTag >::Vector3DBase | ( | const Polar & | set | ) | [inline, explicit] |
construct from polar coordinates
Definition at line 39 of file Vector3DBase.h.
00039 : BaseClass( set) {}
Vector3DBase< T, FrameTag >::Vector3DBase | ( | const Geom::Theta< T > & | th, | |
const Geom::Phi< T > & | ph, | |||
const T & | r | |||
) | [inline] |
Deprecated construct from polar coordinates, use constructor from Polar( theta, phi, r) instead.
Definition at line 44 of file Vector3DBase.h.
Vector3DBase< T, FrameTag >::Vector3DBase | ( | const Basic3DVector< U > & | v | ) | [inline, explicit] |
Explicit constructor from BasicVectorType, bypasses consistency checks for point/vector and for coordinate frame.
To be used as carefully as e.g. const_cast.
Definition at line 52 of file Vector3DBase.h.
00052 : BaseClass(v) {}
Vector3DBase< typename PreciseFloatType<T,U>::Type, FrameTag> Vector3DBase< T, FrameTag >::cross | ( | const Vector3DBase< U, FrameTag > & | v | ) | const [inline] |
Vector (or cross) product with a vector of possibly different precision, defined in the same reference frame.
The product is computed without loss of precision. The precision of the returned Vector is the higher precision of the scalar types of the two vectors.
Definition at line 113 of file Vector3DBase.h.
References PV3DBase< T, VectorTag, FrameTag >::basicVector().
Referenced by L1MuonPixelTrackFitter::Circle::Circle(), PlaneBuilderForGluedDet::computeRotation(), DTDigitizer::computeTime(), Line::distance(), SignedImpactParameter3D::distanceWithJetAxis(), TransverseImpactPointExtrapolator::doExtrapolation(), JacobianCartesianToCurvilinear::JacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToCartesian::JacobianCurvilinearToCartesian(), PerigeeConversions::jacobianPerigee2Curvilinear(), IPTools::jetTrackDistance(), PathToPlane2Order::operator()(), TransverseBoundPlaneFactory::operator()(), PerpendicularBoundPlaneBuilder::operator()(), AlCaHOCalibProducer::produce(), NavPropagator::propagateInVolume(), VisMuon::refitTrack(), VisEventSetupService::refitTrack(), SeedFromNuclearInteraction::rotationMatrix(), TransverseImpactPointExtrapolator::tipSurface(), TkRotation< T >::TkRotation(), and L1MuonPixelTrackFitter::valPhi().
00113 { 00114 typedef Vector3DBase< typename PreciseFloatType<T,U>::Type, FrameTag> RT; 00115 return RT( this->theVector.cross( v.basicVector())); 00116 }
PreciseFloatType<T,U>::Type Vector3DBase< T, FrameTag >::dot | ( | const Vector3DBase< U, FrameTag > & | v | ) | const [inline] |
Scalar (or dot) product with a vector of possibly different precision, defined in the same reference frame.
The product is computed without loss of precision. The type of the returned scalar is the more precise of the scalar types of the two vectors.
Definition at line 101 of file Vector3DBase.h.
References PV3DBase< T, VectorTag, FrameTag >::basicVector(), Basic3DVector< T >::dot(), and PV3DBase< T, VectorTag, FrameTag >::theVector.
Referenced by SignedImpactParameter3D::apply(), SignedDecayLength3D::apply(), LayerCrossingSide::barrelSide(), TwoTrackMinimumDistanceLineLine::calculate(), Line::closerPointToLine(), TIBRing::computeHelicity(), ForwardDetLayer::computeSurface(), DTDigitizer::computeTime(), Line::distance(), SignedImpactParameter3D::distanceWithJetAxis(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(), PerigeeConversions::jacobianPerigee2Curvilinear(), IPTools::jetTrackDistance(), Plane::localZ(), OuterDetCompatibility::maximalLocalDisplacement(), TrackingRecHitProjector< ResultingHit >::project(), GSRecHitMatcher::projectOnly(), RectangularCartesianMFGrid::RectangularCartesianMFGrid(), RectangularCylindricalMFGrid::RectangularCylindricalMFGrid(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), IPTools::signedDecayLength3D(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), TkGluedMeasurementDet::testStrips(), trajectorymeasurementOrder(), TrapezoidalCartesianMFGrid::TrapezoidalCartesianMFGrid(), and TrapezoidalCylindricalMFGrid::TrapezoidalCylindricalMFGrid().
00101 { 00102 return this->theVector.dot( v.basicVector()); 00103 }
Vector3DBase& Vector3DBase< T, FrameTag >::operator *= | ( | const T & | t | ) | [inline] |
Scaling by a scalar value (multiplication).
Definition at line 82 of file Vector3DBase.h.
References PV3DBase< T, VectorTag, FrameTag >::theVector.
Vector3DBase& Vector3DBase< T, FrameTag >::operator+= | ( | const Vector3DBase< U, FrameTag > & | v | ) | [inline] |
Increment by another Vector of possibly different precision, defined in the same reference frame.
Definition at line 63 of file Vector3DBase.h.
References PV3DBase< T, VectorTag, FrameTag >::basicVector(), and PV3DBase< T, VectorTag, FrameTag >::theVector.
00063 { 00064 this->theVector += v.basicVector(); 00065 return *this; 00066 }
Vector3DBase Vector3DBase< T, FrameTag >::operator- | ( | ) | const [inline] |
Unary minus, returns a vector with components (-x(),-y(),-z()).
Definition at line 78 of file Vector3DBase.h.
References Vector3DBase< T, FrameTag >::Vector3DBase().
00078 { return Vector3DBase(-this->basicVector());}
Vector3DBase& Vector3DBase< T, FrameTag >::operator-= | ( | const Vector3DBase< U, FrameTag > & | v | ) | [inline] |
Decrement by another Vector of possibly different precision, defined in the same reference frame.
Definition at line 72 of file Vector3DBase.h.
References PV3DBase< T, VectorTag, FrameTag >::basicVector(), and PV3DBase< T, VectorTag, FrameTag >::theVector.
00072 { 00073 this->theVector -= v.basicVector(); 00074 return *this; 00075 }
Vector3DBase& Vector3DBase< T, FrameTag >::operator/= | ( | const T & | t | ) | [inline] |
Scaling by a scalar value (division).
Definition at line 88 of file Vector3DBase.h.
References PV3DBase< T, VectorTag, FrameTag >::theVector.
Vector3DBase Vector3DBase< T, FrameTag >::unit | ( | ) | const [inline] |
Unit vector parallel to this.
If mag() is zero, a zero vector is returned.
Definition at line 57 of file Vector3DBase.h.
References Vector3DBase< T, FrameTag >::Vector3DBase().
Referenced by SignedImpactParameter3D::apply(), SignedDecayLength3D::apply(), TruncatedPyramid::axis(), FreeTrajectoryState::canReach(), IPTools::closestApproachToJet(), SignedDecayLength3D::closestApproachToJet(), SignedImpactParameter3D::closestApproachToJet(), AnalyticalCurvilinearJacobian::computeFullJacobian(), AnalyticalCurvilinearJacobian::computeStraightLineJacobian(), ForwardDetLayer::computeSurface(), DTDigitizer::computeTime(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), SignedImpactParameter3D::distanceWithJetAxis(), DTRecSegment4D::DTRecSegment4D(), DTDigitizer::dumpHit(), ConformalMappingFit::findRot(), NavPropagator::findVolume(), TrackDetectorAssociator::getTAMuonChamberMatches(), BasicSingleTrajectoryState::globalDirection(), ThirdHitPredictionFromInvParabola::init(), GflashTrajectory::initializeTrajectory(), JacobianCartesianToCurvilinear::JacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToCartesian::JacobianCurvilinearToCartesian(), JacobianCurvilinearToLocal::JacobianCurvilinearToLocal(), JacobianLocalToCurvilinear::JacobianLocalToCurvilinear(), PerigeeConversions::jacobianPerigee2Curvilinear(), IPTools::jetTrackDistance(), BasicSingleTrajectoryState::localDirection(), TrajectoryManager::makeSinglePSimHit(), GsfMultipleScatteringUpdator::newArguments(), GsfBetheHeitlerUpdator::newArguments(), PathToPlane2Order::operator()(), TransverseBoundPlaneFactory::operator()(), PerpendicularBoundPlaneBuilder::operator()(), PropagationDirectionChooser::operator()(), TrackKinematicStatePropagator::planeCrossing(), MuonSimHitProducer::produce(), CachedTrajectory::propagateForward(), NavPropagator::propagateInVolume(), AnalyticalPropagator::propagateParametersOnCylinder(), NavPropagator::propagateWithPath(), SeedFromNuclearInteraction::rotationMatrix(), SeedGeneratorForCRack::seeds(), IPTools::signedDecayLength3D(), IPTools::signedImpactParameter3D(), IPTools::signedTransverseImpactParameter(), SiPixelGaussianSmearingRecHitConverterAlgorithm::smearHit(), InOutConversionSeedFinder::startSeed(), CosmicMuonUtilities::stepPropagate(), GsfMultipleScatteringUpdator::storeArguments(), GsfBetheHeitlerUpdator::storeArguments(), PFBlockAlgo::testTrackAndECAL(), TkRotation< T >::TkRotation(), ConversionSeedFinder::trackStateFromClusters(), trajectorymeasurementOrder(), and CSCCrossGap::unitVector().
00057 { return Vector3DBase( this->basicVector().unit());}