CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions
Vector3DBase< T, FrameTag > Class Template Reference

#include <Vector3DBase.h>

Inheritance diagram for Vector3DBase< T, FrameTag >:
PV3DBase< T, VectorTag, FrameTag >

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 Types inherited from PV3DBase< T, VectorTag, FrameTag >
typedef Basic3DVector< TBasicVectorType
 
typedef BasicVectorType::Cylindrical Cylindrical
 
typedef BasicVectorType::MathVector MathVector
 
typedef BasicVectorType::Polar Polar
 
typedef T ScalarType
 
typedef BasicVectorType::Spherical Spherical
 

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) More...
 
template<class U >
Vector3DBaseoperator+= (const Vector3DBase< U, FrameTag > &v)
 
Vector3DBase operator- () const
 Unary minus, returns a vector with components (-x(),-y(),-z()) More...
 
template<class U >
Vector3DBaseoperator-= (const Vector3DBase< U, FrameTag > &v)
 
Vector3DBaseoperator/= (const T &t)
 Scaling by a scalar value (division) More...
 
bool operator== (const Vector3DBase &rh) const
 
Vector3DBase unit () const
 
 Vector3DBase ()
 
template<class U >
 Vector3DBase (const Basic3DVector< U > &v)
 
 Vector3DBase (const Cylindrical &set)
 
 Vector3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
 
 Vector3DBase (const Polar &set)
 construct from polar coordinates More...
 
 Vector3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
template<class U >
 Vector3DBase (const Vector3DBase< U, FrameTag > &v)
 
- Public Member Functions inherited from PV3DBase< T, VectorTag, FrameTag >
T barePhi () const
 
T bareTheta () const
 
const BasicVectorTypebasicVector () const
 
T eta () const
 
T mag () const
 
T mag2 () const
 
MathVectormathVector ()
 
MathVector const & mathVector () const
 
T perp () const
 
T perp2 () const
 
Geom::Phi< Tphi () const
 
 PV3DBase ()
 
 PV3DBase (const Basic3DVector< U > &v)
 
 PV3DBase (const Cylindrical &set)
 
 PV3DBase (const Geom::Theta< T > &th, const Geom::Phi< T > &ph, const T &r)
 
 PV3DBase (const Polar &set)
 construct from polar coordinates More...
 
 PV3DBase (const T &x, const T &y, const T &z)
 construct from cartesian coordinates More...
 
Geom::Theta< Ttheta () const
 
T transverse () const
 
T x () const
 
T y () const
 
T z () const
 

Additional Inherited Members

- Protected Attributes inherited from PV3DBase< T, VectorTag, FrameTag >
BasicVectorType theVector
 

Detailed Description

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

Definition at line 8 of file Vector3DBase.h.

Member Typedef Documentation

◆ BaseClass

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

Definition at line 10 of file Vector3DBase.h.

◆ BasicVectorType

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

Definition at line 15 of file Vector3DBase.h.

◆ Cylindrical

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

Definition at line 12 of file Vector3DBase.h.

◆ Polar

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

Definition at line 14 of file Vector3DBase.h.

◆ Spherical

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

Definition at line 13 of file Vector3DBase.h.

◆ VectorType

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

Definition at line 11 of file Vector3DBase.h.

Constructor & Destructor Documentation

◆ Vector3DBase() [1/7]

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

21 {}

Referenced by Vector3DBase< Scalar, GlobalTag >::operator-(), and Vector3DBase< Scalar, GlobalTag >::unit().

◆ Vector3DBase() [2/7]

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

27 : BaseClass(v.basicVector()) {}

◆ Vector3DBase() [3/7]

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

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

◆ Vector3DBase() [4/7]

template<class T, class FrameTag>
Vector3DBase< T, FrameTag >::Vector3DBase ( const Cylindrical set)
inlineexplicit

Construct from cylindrical coordinates.

Definition at line 34 of file Vector3DBase.h.

34 : BaseClass(set) {}

◆ Vector3DBase() [5/7]

template<class T, class FrameTag>
Vector3DBase< T, FrameTag >::Vector3DBase ( const Polar set)
inlineexplicit

construct from polar coordinates

Definition at line 37 of file Vector3DBase.h.

37 : BaseClass(set) {}

◆ Vector3DBase() [6/7]

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

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

◆ Vector3DBase() [7/7]

template<class T, class FrameTag>
template<class U >
Vector3DBase< T, FrameTag >::Vector3DBase ( const Basic3DVector< U > &  v)
inlineexplicit

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

49 : BaseClass(v) {}

Member Function Documentation

◆ cross()

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

◆ dot()

template<class T, class FrameTag>
template<class U >
PreciseFloatType<T, U>::Type Vector3DBase< T, FrameTag >::dot ( const Vector3DBase< U, FrameTag > &  v) const
inline

◆ operator*=()

template<class T, class FrameTag>
Vector3DBase& Vector3DBase< T, FrameTag >::operator*= ( const T t)
inline

Scaling by a scalar value (multiplication)

Definition at line 81 of file Vector3DBase.h.

81  {
82  this->theVector *= t;
83  return *this;
84  }

◆ operator+=()

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.

63  {
64  this->theVector += v.basicVector();
65  return *this;
66  }

◆ operator-()

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.

78 { return Vector3DBase(-this->basicVector()); }

◆ operator-=()

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.

72  {
73  this->theVector -= v.basicVector();
74  return *this;
75  }

◆ operator/=()

template<class T, class FrameTag>
Vector3DBase& Vector3DBase< T, FrameTag >::operator/= ( const T t)
inline

Scaling by a scalar value (division)

Definition at line 87 of file Vector3DBase.h.

87  {
88  this->theVector /= t;
89  return *this;
90  }

◆ operator==()

template<class T, class FrameTag>
bool Vector3DBase< T, FrameTag >::operator== ( const Vector3DBase< T, FrameTag > &  rh) const
inline

Definition at line 57 of file Vector3DBase.h.

57 { return this->basicVector() == rh.basicVector(); }

◆ unit()

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

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

Referenced by gen::EvtGenInterface::addToHepMC(), SignedImpactParameter3D::apply(), SignedDecayLength3D::apply(), SignedTransverseImpactParameter::apply(), btagbtvdeep::TrackPairInfoBuilder::buildTrackPairInfo(), SignedDecayLength3D::closestApproachToJet(), SignedImpactParameter3D::closestApproachToJet(), ForwardDiskSectorBuilderFromDet::computeBounds(), ForwardRingDiskBuilderFromDet::computeBounds(), AnalyticalCurvilinearJacobian::computeFullJacobian(), AnalyticalCurvilinearJacobian::computeStraightLineJacobian(), ForwardDetLayer::computeSurface(), DTDigitizer::computeTime(), TSCPBuilderNoMaterial::createFTSatTransverseImpactPointCharged(), fastsim::TrackerSimHitProducer::createHitOnDetector(), RPCSeedPattern::createSeed(), GlobalTrajectoryParameters::direction(), CTPPSPixelLocalTrack::directionVector(), SignedImpactParameter3D::distanceWithJetAxis(), DTRecSegment4D::DTRecSegment4D(), TrajectoryExtrapolatorToLine::extrapolate(), RPCSeedPattern::extropolateStep(), ConformalMappingFit::findRot(), DTSegmentUpdator::fit(), trackingTools::ftsFromVertexToPoint(), getDistInPlane(), getDistInPlaneSimple(), spr::getDistInPlaneTrackDir(), getDistInPlaneTrackDir(), TrackDetectorAssociator::getTAMuonChamberMatches(), BasicTrajectoryState::globalDirection(), PixelTemplateSmearerBase::hitsMerge(), SeedFromConsecutiveHitsTripletOnlyCreator::initialKinematic(), SeedForPhotonConversion1Leg::initialKinematic(), SeedFromConsecutiveHitsCreator::initialKinematic(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), jacobianCartesianToCurvilinear(), PerigeeConversions::jacobianCurvilinear2Perigee(), jacobianCurvilinearToCartesian(), PerigeeConversions::jacobianPerigee2Curvilinear(), IPTools::linearizedSignedImpactParameter3D(), BasicTrajectoryState::localDirection(), FlatHexagon::makeAxis(), TruncatedPyramid::makeAxis(), FlatTrd::makeAxis(), TrajectoryManager::makeSinglePSimHit(), OuterDetCompatibility::maximalLocalDisplacement(), TransverseBoundPlaneFactory::operator()(), PropagationDirectionChooser::operator()(), MuonSimHitProducer::produce(), CosmicRegionalSeedGenerator::regions(), SeedGeneratorForCRack::seeds(), RPCSeedPattern::SegmentAlgorithmSpecial(), CosmicMuonUtilities::stepPropagate(), ThirdHitPredictionFromInvLine::ThirdHitPredictionFromInvLine(), TkRotation< align::Scalar >::TkRotation(), ConversionSeedFinder::trackStateFromClusters(), Geant4ePropagator::transformToG4SurfaceTarget(), Vector3DBase< Scalar, GlobalTag >::unit(), and CSCCrossGap::unitVector().

Vector3DBase
Definition: Vector3DBase.h:8
Vector3DBase::Vector3DBase
Vector3DBase()
Definition: Vector3DBase.h:21
PV3DBase< T, VectorTag, FrameTag >::x
T x() const
Definition: PV3DBase.h:59
PV3DBase< T, VectorTag, FrameTag >::theVector
BasicVectorType theVector
Definition: PV3DBase.h:76
findQualityFiles.v
v
Definition: findQualityFiles.py:179
PV3DBase< T, VectorTag, FrameTag >::z
T z() const
Definition: PV3DBase.h:61
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
Basic3DVector::cross
Basic3DVector cross(const Basic3DVector &lh) const
Vector product, or "cross" product, with a vector of same type.
Definition: extBasic3DVector.h:203
Basic3DVector::dot
T dot(const Basic3DVector &rh) const
Scalar product, or "dot" product, with a vector of same type.
Definition: extBasic3DVector.h:189
PV3DBase< T, VectorTag, FrameTag >::y
T y() const
Definition: PV3DBase.h:60
PV3DBase< T, VectorTag, FrameTag >::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
alignCSCRings.r
r
Definition: alignCSCRings.py:93
Vector3DBase::BaseClass
PV3DBase< T, VectorTag, FrameTag > BaseClass
Definition: Vector3DBase.h:10
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644