CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
GloballyPositioned< T > Class Template Reference

#include <GloballyPositioned.h>

Classes

class  ToLocal
 

Public Types

typedef Point3DBase< T, GlobalTagGlobalPoint
 
typedef Vector3DBase< T, GlobalTagGlobalVector
 
typedef Point3DBase< T, LocalTagLocalPoint
 
typedef Vector3DBase< T, LocalTagLocalVector
 
typedef Point3DBase< T, GlobalTagPositionType
 
typedef TkRotation< TRotationType
 
typedef T Scalar
 

Public Member Functions

T eta () const
 
 GloballyPositioned ()
 
 GloballyPositioned (const PositionType &pos, const RotationType &rot)
 
void move (const GlobalVector &displacement)
 
T phi () const
 
const PositionTypeposition () const
 
void rotate (const RotationType &rotation)
 
const RotationTyperotation () const
 
GlobalPoint toGlobal (const LocalPoint &lp) const
 
template<class U >
Point3DBase< U, GlobalTagtoGlobal (const Point3DBase< U, LocalTag > &lp) const
 
GlobalVector toGlobal (const LocalVector &lv) const
 
template<class U >
Vector3DBase< U, GlobalTagtoGlobal (const Vector3DBase< U, LocalTag > &lv) const
 
LocalPoint toLocal (const GlobalPoint &gp) const
 
template<class U >
Point3DBase< U, LocalTagtoLocal (const Point3DBase< U, GlobalTag > &gp) const
 
LocalVector toLocal (const GlobalVector &gv) const
 
template<class U >
Vector3DBase< U, LocalTagtoLocal (const Vector3DBase< U, GlobalTag > &gv) const
 
virtual ~GloballyPositioned ()
 

Static Public Member Functions

static T iniEta ()
 
static T iniPhi ()
 

Private Member Functions

void setCache ()
 

Private Attributes

T theEta
 
T thePhi
 
PositionType thePos
 
RotationType theRot
 

Detailed Description

template<class T>
class GloballyPositioned< T >

Base class for surfaces and volumes positioned in global 3D space. This class defines a cartesian reference frame, called in the following the local frame. It provides position, orientation, and frame transformations for points and vectors.

Definition at line 18 of file GloballyPositioned.h.

Member Typedef Documentation

template<class T>
typedef Point3DBase<T,GlobalTag> GloballyPositioned< T >::GlobalPoint

Definition at line 24 of file GloballyPositioned.h.

template<class T>
typedef Vector3DBase<T,GlobalTag> GloballyPositioned< T >::GlobalVector

Definition at line 26 of file GloballyPositioned.h.

template<class T>
typedef Point3DBase<T,LocalTag> GloballyPositioned< T >::LocalPoint

Definition at line 25 of file GloballyPositioned.h.

template<class T>
typedef Vector3DBase<T,LocalTag> GloballyPositioned< T >::LocalVector

Definition at line 27 of file GloballyPositioned.h.

template<class T>
typedef Point3DBase<T,GlobalTag> GloballyPositioned< T >::PositionType

Definition at line 22 of file GloballyPositioned.h.

template<class T>
typedef TkRotation<T> GloballyPositioned< T >::RotationType

Definition at line 23 of file GloballyPositioned.h.

template<class T>
typedef T GloballyPositioned< T >::Scalar

Definition at line 21 of file GloballyPositioned.h.

Constructor & Destructor Documentation

template<class T>
GloballyPositioned< T >::GloballyPositioned ( )
inline

Definition at line 36 of file GloballyPositioned.h.

template<class T>
GloballyPositioned< T >::GloballyPositioned ( const PositionType pos,
const RotationType rot 
)
inline
template<class T>
virtual GloballyPositioned< T >::~GloballyPositioned ( )
inlinevirtual

Definition at line 40 of file GloballyPositioned.h.

40 {}

Member Function Documentation

template<class T>
T GloballyPositioned< T >::eta ( ) const
inline
template<class T>
static T GloballyPositioned< T >::iniEta ( )
inlinestatic

Definition at line 32 of file GloballyPositioned.h.

32  {
33  return 999.9978;
34  }
template<class T>
static T GloballyPositioned< T >::iniPhi ( )
inlinestatic

Definition at line 29 of file GloballyPositioned.h.

29  {
30  return 999.9978;
31  }
template<class T>
void GloballyPositioned< T >::move ( const GlobalVector displacement)
inline
template<class T>
T GloballyPositioned< T >::phi ( ) const
inline
template<class T>
const PositionType& GloballyPositioned< T >::position ( ) const
inline

Definition at line 42 of file GloballyPositioned.h.

Referenced by cms::Phase2TrackerDigitizer::accumulatePixelHits(), SiStripCalibLorentzAngle::algoBeginJob(), MuonGeometrySVGTemplate::analyze(), TestHits::analyze(), TestTrackHits::analyze(), SiPixelErrorEstimation::analyze(), GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), MagGeoBuilderFromDDD::buildInterpolator(), MagGeoBuilderFromDDD::buildMagVolumes(), GroupedDAFHitCollector::buildMultiRecHits(), MuRodBarrelLayer::compatibleDets(), MuDetRing::compatibleDets(), MuDetRod::compatibleDets(), TIBRing::computeCrossings(), TIBRing::computeHelicity(), TIBLayer::computeIndexes(), Phase1PixelBlade::computeRadiusRanges(), AlignableSiStripDet::consistifyAlignments(), fastsim::TrackerSimHitProducer::createHitOnDetector(), BeamHaloPropagator::crossingTk(), SiStripLorentzAngleCalibration::derivatives(), SiPixelLorentzAngleCalibration::derivatives(), SiStripBackplaneCalibration::derivatives(), DTDigiSyncTOFCorr::digitizerOffset(), shallow::drift(), Phase2TrackerDigitizerAlgorithm::drift(), StripCPE::driftDirection(), Phase2StripCPE::driftDirection(), SiHitDigitizer::DriftDirection(), Phase2TrackerDigitizerAlgorithm::DriftDirection(), PixelCPEBase::driftDirection(), SiPixelDigitizerAlgorithm::DriftDirection(), EtaPhiMeasurementEstimator::estimate(), fastProp(), ApeEstimator::fillHitVariables(), FWRecoGeometryESProducer::fillShapeAndPlacement(), DTTimingExtractor::fillTiming(), CSCEfficiency::filter(), KFTrajectoryFitter::fitOne(), ClusterShapeHitFilter::getDrift(), Alignable::globalPosition(), SeedFromProtoTrack::init(), CSCStripElectronicsSim::initParameters(), SmartPropagator::insideTkVol(), SteppingHelixPropagator::isYokeVolume(), OutInConversionSeedFinder::makeEstimator(), TSGForRoadSearch::makeSeeds_3(), MagGeoBuilderFromDDD::volumeHandle::maxPhi(), MagGeoBuilderFromDDD::volumeHandle::maxZ(), MagGeoBuilderFromDDD::volumeHandle::minZ(), GlobalTrackerMuonAlignment::misalignMuonL(), DTTTrigSyncFromDB::offset(), DTTTrigSyncTOFCorr::offset(), ForwardDiskSectorBuilderFromWedges::operator()(), ForwardDiskSectorBuilderFromDet::operator()(), MuonDetLayerComp::operator()(), CylinderBuilderFromDet::operator()(), HelixArbitraryPlaneCrossing::pathLength(), HelixForwardPlaneCrossing::pathLength(), StraightLinePlaneCrossing::pathLength(), PixelForwardLayer::PixelForwardLayer(), PixelForwardLayerPhase1::PixelForwardLayerPhase1(), GeometricSearchDet::position(), SurveyDet::position(), GeomDet::position(), MuonNavigationPrinter::printLayer(), MuonNavigationPrinter::printLayers(), GlobalMuonToMuonProducer::printTrackRecHits(), ShallowTrackClustersProducer::produce(), CachedTrajectory::propagate(), SteppingHelixPropagator::propagate(), RKPropagatorInS::propagateParametersOnCylinder(), AnalyticalPropagator::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), CSCPairResidualsConstraint::radius(), MagGeoBuilderFromDDD::volumeHandle::referencePlane(), SteppingHelixPropagator::refToMagVolume(), KFBasedPixelFitter::run(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), TrajectoryFactoryBase::sameSurface(), MagGeoBuilderFromDDD::volumeHandle::setSurface(), CSCPairResidualsConstraint::setZplane(), HIPAlignmentAlgorithm::terminate(), FrameChanger::toFrame(), GloballyPositioned< align::Scalar >::toGlobal(), GloballyPositioned< align::Scalar >::toLocal(), LaserDQM::trackerStatistics(), FrameChanger::transformPlane(), Geant4ePropagator::transformToG4SurfaceTarget(), SiTrackerMultiRecHitUpdator::update(), Alignable::update(), AlignableDataIO::writeAbsPos(), and FWTGeoRecoGeometryESProducer::~FWTGeoRecoGeometryESProducer().

42 { return thePos;}
template<class T>
void GloballyPositioned< T >::rotate ( const RotationType rotation)
inline

Rotate the frame in the global frame. Useful e.g. for alignment.

Definition at line 168 of file GloballyPositioned.h.

Referenced by AlignableBeamSpot::initialize(), AlignableDetUnit::rotateInGlobalFrame(), AlignableBeamSpot::rotateInGlobalFrame(), and AlignableComposite::rotateInGlobalFrame().

168  {
169  theRot *= rotation;
170  setCache();
171  }
const RotationType & rotation() const
template<class T>
const RotationType& GloballyPositioned< T >::rotation ( void  ) const
inline
template<class T>
void GloballyPositioned< T >::setCache ( )
inlineprivate

Definition at line 189 of file GloballyPositioned.h.

Referenced by GloballyPositioned< align::Scalar >::GloballyPositioned(), GloballyPositioned< align::Scalar >::move(), and GloballyPositioned< align::Scalar >::rotate().

189  {
190  if ((thePos.x() == 0.) & (thePos.y() == 0.)) {
191  thePhi = theEta = 0.; // avoid FPE
192  } else {
193  thePhi = thePos.barePhi();
194  theEta = thePos.eta();
195  }
196  }
T y() const
Definition: PV3DBase.h:63
T barePhi() const
Definition: PV3DBase.h:68
T eta() const
Definition: PV3DBase.h:76
T x() const
Definition: PV3DBase.h:62
template<class T>
GlobalPoint GloballyPositioned< T >::toGlobal ( const LocalPoint lp) const
inline

Transform a local point (i.e. a point with coordinates in the local frame) to the global frame

Definition at line 89 of file GloballyPositioned.h.

Referenced by MagGeoBuilderFromDDD::volumeHandle::buildPhiZSurf(), RKPropagatorInS::globalMomentum(), RKPropagatorInS::globalPosition(), RKLocalFieldProvider::inTesla(), PathToPlane2Order::operator()(), RKPropagatorInS::propagateParametersOnPlane(), MagGeoBuilderFromDDD::volumeHandle::referencePlane(), SpecialCylindricalMFGrid::toGridFrame(), TrapezoidalCartesianMFGrid::TrapezoidalCartesianMFGrid(), and GlobalGridWrapper::valueInTesla().

89  {
90  return GlobalPoint( rotation().multiplyInverse( lp.basicVector()) +
91  position().basicVector());
92  }
Point3DBase< T, GlobalTag > GlobalPoint
const RotationType & rotation() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const PositionType & position() const
template<class T>
template<class U >
Point3DBase< U, GlobalTag> GloballyPositioned< T >::toGlobal ( const Point3DBase< U, LocalTag > &  lp) const
inline

Transform a local point with different float precision from the one of the reference frame, and return a global point with the same precision as the input one.

Definition at line 100 of file GloballyPositioned.h.

100  {
102  position().basicVector());
103  }
const RotationType & rotation() const
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const PositionType & position() const
template<class T>
GlobalVector GloballyPositioned< T >::toGlobal ( const LocalVector lv) const
inline

Transform a local vector (i.e. a vector with coordinates in the local frame) to the global frame

Definition at line 108 of file GloballyPositioned.h.

108  {
109  return GlobalVector( rotation().multiplyInverse( lv.basicVector()));
110  }
Vector3DBase< T, GlobalTag > GlobalVector
const RotationType & rotation() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T>
template<class U >
Vector3DBase< U, GlobalTag> GloballyPositioned< T >::toGlobal ( const Vector3DBase< U, LocalTag > &  lv) const
inline

Transform a local vector with different float precision from the one of the reference frame, and return a global vector with the same precision as the input one.

Definition at line 118 of file GloballyPositioned.h.

118  {
120  }
const RotationType & rotation() const
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T>
LocalPoint GloballyPositioned< T >::toLocal ( const GlobalPoint gp) const
inline

Transform a global point (i.e. a point with coordinates in the global frame) to the local frame

Definition at line 125 of file GloballyPositioned.h.

Referenced by MuonGeometrySanityCheck::analyze(), tkDetUtil::calculatePhiWindow(), TkGluedMeasurementDet::collectRecHits(), RodPlaneBuilderFromDet::computeBounds(), PixelForwardLayer::computeCrossings(), Phase1PixelBlade::computeRadiusRanges(), PlaneBuilderForGluedDet::computeRectBounds(), TOBRod::computeWindowSize(), Phase2OTBarrelRod::computeWindowSize(), Geant4ePropagator::configureAnyPropagation(), GsfConstraintAtVertex::constrainAtPoint(), BasicTrajectoryState::createLocalParameters(), SiStripLorentzAngleCalibration::derivatives(), SiPixelLorentzAngleCalibration::derivatives(), SiStripBackplaneCalibration::derivatives(), DTTrigGeomUtils::DTTrigGeomUtils(), fastProp(), SpecialCylindricalMFGrid::fromGridFrame(), DTTrigGeom::getGeom(), TrackDetectorAssociator::getTAMuonChamberMatches(), HelixBarrelCylinderCrossing::HelixBarrelCylinderCrossing(), RKLocalFieldProvider::inTesla(), SteppingHelixPropagator::loadState(), DTTrigGeom::localPosition(), RKPropagatorInZ::myPropagate(), RKPropagatorInR::myPropagate(), TkClonerImpl::operator()(), PathToPlane2Order::operator()(), PixelBlade::overlap(), Phase1PixelBlade::overlap(), FastTrackerRecHitMatcher::produce(), DTDigitizer::produce(), TkClonerImpl::project(), RKPropagatorInS::propagateParametersOnCylinder(), RKPropagatorInS::propagateParametersOnPlane(), StraightLinePropagator::propagateParametersOnPlane(), RectangularCartesianMFGrid::RectangularCartesianMFGrid(), RectangularCylindricalMFGrid::RectangularCylindricalMFGrid(), RKPropagatorInS::rkMomentum(), RKPropagatorInS::rkPosition(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), CSCPairResidualsConstraint::setZplane(), SpecialCylindricalMFGrid::SpecialCylindricalMFGrid(), Traj2TrackHits::split(), FrameChanger::toFrame(), GeomDet::toLocal(), DTTrigGeom::toLocal(), toLocal(), FrameChanger::transformPlane(), TrapezoidalCartesianMFGrid::TrapezoidalCartesianMFGrid(), TrapezoidalCylindricalMFGrid::TrapezoidalCylindricalMFGrid(), DTTrigGeom::tubePosInCh(), and TrapezoidalCylindricalMFGrid::uncheckedValueInTesla().

125  {
126  return LocalPoint( rotation() * (gp.basicVector()-position().basicVector()));
127  }
Point3DBase< T, LocalTag > LocalPoint
const RotationType & rotation() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const PositionType & position() const
template<class T>
template<class U >
Point3DBase< U, LocalTag> GloballyPositioned< T >::toLocal ( const Point3DBase< U, GlobalTag > &  gp) const
inline

Transform a global point with different float precision from the one of the reference frame, and return a local point with the same precision as the input one.

Definition at line 135 of file GloballyPositioned.h.

135  {
137  (gp.basicVector()-position().basicVector()));
138  }
const RotationType & rotation() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
const PositionType & position() const
template<class T>
LocalVector GloballyPositioned< T >::toLocal ( const GlobalVector gv) const
inline

Transform a global vector (i.e. a vector with coordinates in the global frame) to the local frame

Definition at line 143 of file GloballyPositioned.h.

143  {
144  return LocalVector( rotation() * gv.basicVector());
145  }
Vector3DBase< T, LocalTag > LocalVector
const RotationType & rotation() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
template<class T>
template<class U >
Vector3DBase< U, LocalTag> GloballyPositioned< T >::toLocal ( const Vector3DBase< U, GlobalTag > &  gv) const
inline

Transform a global vector with different float precision from the one of the reference frame, and return a local vector with the same precision as the input one.

Definition at line 153 of file GloballyPositioned.h.

153  {
155  }
const RotationType & rotation() const
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56

Member Data Documentation

template<class T>
T GloballyPositioned< T >::theEta
private
template<class T>
T GloballyPositioned< T >::thePhi
private
template<class T>
PositionType GloballyPositioned< T >::thePos
private

Definition at line 175 of file GloballyPositioned.h.

Referenced by GloballyPositioned< align::Scalar >::position().

template<class T>
RotationType GloballyPositioned< T >::theRot
private

Definition at line 176 of file GloballyPositioned.h.

Referenced by GloballyPositioned< align::Scalar >::rotation().