CMS 3D CMS Logo

Public Types | Public Member Functions

Vector3DBase< T, FrameTag > Class Template Reference

#include <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
template<class U >
PreciseFloatType< T, U >::Type dot (const Vector3DBase< U, FrameTag > &v) const
Vector3DBaseoperator*= (const T &t)
 Scaling by a scalar value (multiplication)
template<class U >
Vector3DBaseoperator+= (const Vector3DBase< U, FrameTag > &v)
Vector3DBase operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z())
template<class U >
Vector3DBaseoperator-= (const Vector3DBase< U, FrameTag > &v)
Vector3DBaseoperator/= (const T &t)
 Scaling by a scalar value (division)
bool operator== (const Vector3DBase &rh) const
Vector3DBase unit () const
 Vector3DBase ()
 Vector3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates
template<class U >
 Vector3DBase (const Basic3DVector< U > &v)
 Vector3DBase (const Polar &set)
 construct from polar coordinates
 Vector3DBase (const Cylindrical &set)
 Vector3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
template<class U >
 Vector3DBase (const Vector3DBase< U, FrameTag > &v)

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< Scalar, GlobalTag >::operator-(), and Vector3DBase< Scalar, GlobalTag >::unit().

{}
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.

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.

: 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.

: 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.

: 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.

                                                 : 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.

: 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 119 of file Vector3DBase.h.

Referenced by gen::EvtGenInterface::addToHepMC(), L1MuonPixelTrackFitter::Circle::Circle(), RPCSeedPattern::computePtwithSegment(), RodPlaneBuilderFromDet::computeRotation(), PlaneBuilderForGluedDet::computeRotation(), DTDigitizer::computeTime(), ReferenceTrajectory::construct(), Line::distance(), SignedImpactParameter3D::distanceWithJetAxis(), TransverseImpactPointExtrapolator::doExtrapolation(), RPCSeedPattern::extropolateStep(), Cylinder::fastTangent(), JacobianCartesianToCurvilinear::JacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToCartesian::JacobianCurvilinearToCartesian(), PerigeeConversions::jacobianPerigee2Curvilinear(), PathToPlane2Order::operator()(), TransverseBoundPlaneFactory::operator()(), PerpendicularBoundPlaneBuilder::operator()(), AlCaHOCalibProducer::produce(), MuonSimHitProducer::produce(), NavPropagator::propagateInVolume(), SeedFromNuclearInteraction::rotationMatrix(), RPCSeedPattern::SegmentAlgorithmSpecial(), Cylinder::tangentPlane(), TransverseImpactPointExtrapolator::tipSurface(), TkRotation< align::Scalar >::TkRotation(), and L1MuonPixelTrackFitter::valPhi().

                                                     {
    typedef Vector3DBase< typename PreciseFloatType<T,U>::Type, FrameTag> RT;
    return RT( this->theVector.cross( v.basicVector()));
  }
template<class T, class FrameTag>
template<class U >
PreciseFloatType<T,U>::Type Vector3DBase< T, FrameTag >::dot ( const Vector3DBase< U, FrameTag > &  v) const [inline]
template<class T, class FrameTag>
Vector3DBase& Vector3DBase< T, FrameTag >::operator*= ( const T t) [inline]

Scaling by a scalar value (multiplication)

Definition at line 88 of file Vector3DBase.h.

                                         { 
    this->theVector *= t;
    return *this;
  } 
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 69 of file Vector3DBase.h.

                                                                  {
    this->theVector += v.basicVector();
    return *this;
  } 
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 84 of file Vector3DBase.h.

{ 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 78 of file Vector3DBase.h.

                                                                  {
    this->theVector -= v.basicVector();
    return *this;
  } 
template<class T, class FrameTag>
Vector3DBase& Vector3DBase< T, FrameTag >::operator/= ( const T t) [inline]

Scaling by a scalar value (division)

Definition at line 94 of file Vector3DBase.h.

                                         { 
    this->theVector /= t;
    return *this;
  } 
template<class T, class FrameTag>
bool Vector3DBase< T, FrameTag >::operator== ( const Vector3DBase< T, FrameTag > &  rh) const [inline]

Definition at line 60 of file Vector3DBase.h.

                                                 {
    return this->basicVector()==rh.basicVector();
  }
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.

Referenced by gen::EvtGenInterface::addToHepMC(), SignedImpactParameter3D::apply(), SignedTransverseImpactParameter::apply(), SignedDecayLength3D::apply(), FWCSCSegmentProxyBuilder::build(), FWDTSegmentProxyBuilder::build(), FreeTrajectoryState::canReach(), SignedDecayLength3D::closestApproachToJet(), SignedImpactParameter3D::closestApproachToJet(), AnalyticalCurvilinearJacobian::computeFullJacobian(), AnalyticalCurvilinearJacobian::computeStraightLineJacobian(), ForwardDetLayer::computeSurface(), DTDigitizer::computeTime(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), RPCSeedPattern::createSeed(), GlobalTrajectoryParameters::direction(), SignedImpactParameter3D::distanceWithJetAxis(), DTRecSegment4D::DTRecSegment4D(), DTDigitizer::dumpHit(), TrajectoryExtrapolatorToLine::extrapolate(), RPCSeedPattern::extropolateStep(), DTHitQualityUtils::findMuSimSegmentDirAndPos(), ConformalMappingFit::findRot(), NavPropagator::findVolume(), getDistInPlane(), getDistInPlaneSimple(), getDistInPlaneTrackDir(), spr::getDistInPlaneTrackDir(), TrackDetectorAssociator::getTAMuonChamberMatches(), BasicTrajectoryState::globalDirection(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), SeedFromConsecutiveHitsCreator::initialKinematic(), SeedForPhotonConversion1Leg::initialKinematic(), JacobianCartesianToCurvilinear::JacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), JacobianCurvilinearToCartesian::JacobianCurvilinearToCartesian(), PerigeeConversions::jacobianPerigee2Curvilinear(), BasicTrajectoryState::localDirection(), TruncatedPyramid::makeAxis(), TrajectoryManager::makeSinglePSimHit(), TracksClusteringFromDisplacedSeed::nearTracks(), GsfMultipleScatteringUpdator::newArguments(), GsfBetheHeitlerUpdator::newArguments(), ConversionHitChecker::nHitsBeforeVtx(), PathToPlane2Order::operator()(), TransverseBoundPlaneFactory::operator()(), PropagationDirectionChooser::operator()(), PerpendicularBoundPlaneBuilder::operator()(), TrackKinematicStatePropagator::planeCrossing(), PlotUtils::printHelix(), InclusiveVertexFinder::produce(), MuonSimHitProducer::produce(), Geant4ePropagator::propagate(), CachedTrajectory::propagateForward(), NavPropagator::propagateInVolume(), AnalyticalPropagator::propagateParametersOnCylinder(), NavPropagator::propagateWithPath(), CosmicRegionalSeedGenerator::regions(), SeedFromNuclearInteraction::rotationMatrix(), SeedGeneratorForCRack::seeds(), RPCSeedPattern::SegmentAlgorithmSpecial(), SiPixelGaussianSmearingRecHitConverterAlgorithm::smearHit(), CosmicMuonUtilities::stepPropagate(), GsfMultipleScatteringUpdator::storeArguments(), GsfBetheHeitlerUpdator::storeArguments(), ThirdHitPredictionFromInvLine::ThirdHitPredictionFromInvLine(), TkRotation< align::Scalar >::TkRotation(), ConversionSeedFinder::trackStateFromClusters(), trajectorymeasurementOrder(), Vector3DBase< Scalar, GlobalTag >::unit(), and CSCCrossGap::unitVector().

{ return Vector3DBase( this->basicVector().unit());}