CMS 3D CMS Logo

Vector3DBase< T, FrameTag > Class Template Reference

#include <DataFormats/GeometryVector/interface/Vector3DBase.h>

Inheritance diagram for Vector3DBase< T, FrameTag >:

PV3DBase< T, VectorTag, FrameTag >

List of all members.

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.
Vector3DBaseoperator *= (const T &t)
 Scaling by a scalar value (multiplication).
template<class U>
Vector3DBaseoperator+= (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>
Vector3DBaseoperator-= (const Vector3DBase< U, FrameTag > &v)
 Decrement by another Vector of possibly different precision, defined in the same reference frame.
Vector3DBaseoperator/= (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.


Detailed Description

template<class T, class FrameTag>
class Vector3DBase< T, FrameTag >

Definition at line 9 of file Vector3DBase.h.


Member Typedef Documentation

template<class T, class FrameTag>
typedef PV3DBase<T, VectorTag, FrameTag> Vector3DBase< T, FrameTag >::BaseClass

Definition at line 12 of file Vector3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::BasicVectorType Vector3DBase< T, FrameTag >::BasicVectorType

Reimplemented from PV3DBase< T, VectorTag, FrameTag >.

Definition at line 17 of file Vector3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Cylindrical Vector3DBase< T, FrameTag >::Cylindrical

Reimplemented from PV3DBase< T, VectorTag, FrameTag >.

Definition at line 14 of file Vector3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Polar Vector3DBase< T, FrameTag >::Polar

Reimplemented from PV3DBase< T, VectorTag, FrameTag >.

Definition at line 16 of file Vector3DBase.h.

template<class T, class FrameTag>
typedef BaseClass::Spherical Vector3DBase< T, FrameTag >::Spherical

Reimplemented from PV3DBase< T, VectorTag, FrameTag >.

Definition at line 15 of file Vector3DBase.h.

template<class T, class FrameTag>
typedef Vector3DBase< T, FrameTag> Vector3DBase< T, FrameTag >::VectorType

Definition at line 13 of file Vector3DBase.h.


Constructor & Destructor Documentation

template<class T, class FrameTag>
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().

00023 {}

template<class T, class FrameTag>
template<class U>
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()) {}

template<class T, class FrameTag>
Vector3DBase< T, FrameTag >::Vector3DBase ( const T &  x,
const T &  y,
const T &  z 
) [inline]

construct from cartesian coordinates

Definition at line 32 of file Vector3DBase.h.

00032 : BaseClass(x, y, z) {}

template<class T, class FrameTag>
Vector3DBase< T, FrameTag >::Vector3DBase ( const Cylindrical set  )  [inline, explicit]

Construct from cylindrical coordinates.

Definition at line 36 of file Vector3DBase.h.

00036 : BaseClass( set) {}

template<class T, class FrameTag>
Vector3DBase< T, FrameTag >::Vector3DBase ( const Polar set  )  [inline, explicit]

construct from polar coordinates

Definition at line 39 of file Vector3DBase.h.

00039 : BaseClass( set) {}

template<class T, class FrameTag>
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.

00045                                                  : BaseClass(th,ph,r) {}

template<class T, class FrameTag>
template<class U>
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) {}


Member Function Documentation

template<class T, class FrameTag>
template<class U>
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   }

template<class T, class FrameTag>
template<class U>
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   }

template<class T, class FrameTag>
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.

00082                                          { 
00083     this->theVector *= t;
00084     return *this;
00085   } 

template<class T, class FrameTag>
template<class U>
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   } 

template<class T, class FrameTag>
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());}

template<class T, class FrameTag>
template<class U>
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   } 

template<class T, class FrameTag>
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.

00088                                          { 
00089     this->theVector /= t;
00090     return *this;
00091   } 

template<class T, class FrameTag>
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());}


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:34:58 2009 for CMSSW by  doxygen 1.5.4