CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes

GloballyPositioned< T > Class Template Reference

#include <GloballyPositioned.h>

List of all members.

Classes

class  ToLocal

Public Types

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

Static Public Member Functions

static T iniEta ()
static T iniPhi ()

Private Member Functions

void resetCache ()
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

Reimplemented in MagVolume.

Definition at line 24 of file GloballyPositioned.h.

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

Reimplemented in MagVolume.

Definition at line 26 of file GloballyPositioned.h.

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

Reimplemented in MagVolume.

Definition at line 25 of file GloballyPositioned.h.

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

Reimplemented in MagVolume.

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

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]

Definition at line 37 of file GloballyPositioned.h.

template<class T>
virtual GloballyPositioned< T >::~GloballyPositioned ( ) [inline, virtual]

Definition at line 40 of file GloballyPositioned.h.

{}

Member Function Documentation

template<class T>
T GloballyPositioned< T >::eta ( ) const [inline]

Definition at line 50 of file GloballyPositioned.h.

Referenced by TrajectoryFactoryBase::sameSurface().

                { 
    if (theEta==iniEta()) theEta = thePos.eta();
    return theEta;
  }
template<class T>
static T GloballyPositioned< T >::iniEta ( ) [inline, static]
template<class T>
static T GloballyPositioned< T >::iniPhi ( ) [inline, static]
template<class T>
void GloballyPositioned< T >::move ( const GlobalVector displacement) [inline]

Move the position of the frame in the global frame. Useful e.g. for alignment.

Definition at line 154 of file GloballyPositioned.h.

Referenced by AlignableComposite::addComponent(), AlignableBeamSpot::initialize(), AlignableDetUnit::move(), AlignableComposite::move(), AlignableBeamSpot::move(), and PedeSteerer::PedeSteerer().

                                               {
    thePos += displacement;
    resetCache();
  }
template<class T>
T GloballyPositioned< T >::phi ( ) const [inline]

Definition at line 46 of file GloballyPositioned.h.

Referenced by TrajectoryFactoryBase::sameSurface().

                {
    if (thePhi==iniPhi()) thePhi = thePos.barePhi();
    return thePhi;
  }
template<class T>
const PositionType& GloballyPositioned< T >::position ( ) const [inline]

Definition at line 42 of file GloballyPositioned.h.

Referenced by cms::SiPixelDigitizer::accumulatePixelHits(), SiStripDigitizer::accumulateStripHits(), SiStripCalibLorentzAngle::algoBeginJob(), TestHits::analyze(), SiPixelErrorEstimation::analyze(), MuonGeometrySVGTemplate::analyze(), TestTrackHits::analyze(), GlobalTrackerMuonAlignment::analyzeTrackTrack(), GlobalTrackerMuonAlignment::analyzeTrackTrajectory(), GeomDetLess::barrelForwardLess(), MagGeoBuilderFromDDD::buildInterpolator(), MagGeoBuilderFromDDD::buildMagVolumes(), RodPlaneBuilderFromDet::computeRotation(), AlignableSiStripDet::consistifyAlignments(), ThreePlaneCrossing::crossing(), SiStripBackplaneCalibration::derivatives(), SiStripLorentzAngleCalibration::derivatives(), SiPixelLorentzAngleCalibration::derivatives(), DTDigiSyncTOFCorr::digitizerOffset(), shallow::drift(), SiPixelDigitizerAlgorithm::drift(), PixelCPEBase::driftDirection(), SiHitDigitizer::DriftDirection(), StripCPE::driftDirection(), SiPixelDigitizerAlgorithm::DriftDirection(), fastProp(), HIPAlignmentAlgorithm::fillRoot(), FWRecoGeometryESProducer::fillShapeAndPlacement(), DTTimingExtractor::fillTiming(), ClusterShapeHitFilter::getDrift(), Alignable::globalPosition(), SeedFromProtoTrack::init(), CSCStripElectronicsSim::initParameters(), GeomDetLess::insideOutLess(), StripCPEfromTemplate::localParameters(), MagGeoBuilderFromDDD::volumeHandle::maxPhi(), MagGeoBuilderFromDDD::volumeHandle::maxZ(), MagGeoBuilderFromDDD::volumeHandle::minZ(), GlobalTrackerMuonAlignment::misalignMuonL(), DTTTrigSyncTOFCorr::offset(), DTTTrigSyncFromDB::offset(), CylinderBuilderFromDet::operator()(), PixelCPEBase::param(), StraightLinePlaneCrossing::pathLength(), SurveyDet::position(), GeomDet::position(), QuadrupletSeedMerger::printHit(), GlobalMuonToMuonProducer::printTrackRecHits(), ShallowTrackClustersProducer::produce(), CachedTrajectory::propagate(), CSCPairResidualsConstraint::radius(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), TrajectoryFactoryBase::sameSurface(), MagGeoBuilderFromDDD::volumeHandle::setSurface(), PixelCPEBase::setTheDet(), CSCPairResidualsConstraint::setZplane(), TrackClusterSplitter::splitCluster(), FrameChanger::toFrame(), GloballyPositioned< align::Scalar >::toGlobal(), GloballyPositioned< align::Scalar >::toLocal(), LaserDQM::trackerStatistics(), FrameChanger::transformPlane(), and AlignableDataIO::writeAbsPos().

{ return thePos;}
template<class T>
void GloballyPositioned< T >::resetCache ( ) [inline, private]
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 162 of file GloballyPositioned.h.

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

template<class T>
const RotationType& GloballyPositioned< T >::rotation ( void  ) const [inline]
template<class T>
void GloballyPositioned< T >::setCache ( ) [inline, private]

Definition at line 183 of file GloballyPositioned.h.

                  {
    if ((thePos.x() == 0.) && (thePos.y() == 0.)) {
      thePhi = theEta = 0.; // avoid FPE
    } else {
      thePhi = thePos.barePhi();
      theEta = thePos.eta();
    }
  }
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 83 of file GloballyPositioned.h.

Referenced by RKLocalFieldProvider::inTesla(), PathToPlane2Order::operator()(), SpecialCylindricalMFGrid::toGridFrame(), TrapezoidalCartesianMFGrid::TrapezoidalCartesianMFGrid(), and GlobalGridWrapper::valueInTesla().

                                                    {
    return GlobalPoint( rotation().multiplyInverse( lp.basicVector()) +
                        position().basicVector());
  }
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 112 of file GloballyPositioned.h.

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 102 of file GloballyPositioned.h.

                                                      {
    return GlobalVector( rotation().multiplyInverse( lv.basicVector()));
  }
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 94 of file GloballyPositioned.h.

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 137 of file GloballyPositioned.h.

                                                     {
    return LocalVector( rotation() * gv.basicVector());
  }
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 129 of file GloballyPositioned.h.

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 147 of file GloballyPositioned.h.

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

Referenced by GCC11_FINAL< T, TOPO >::computeBounds(), PlaneBuilderForGluedDet::computeRectBounds(), BasicTrajectoryState::createLocalParameters(), SiStripLorentzAngleCalibration::derivatives(), SiStripBackplaneCalibration::derivatives(), SiPixelLorentzAngleCalibration::derivatives(), DTTrigGeomUtils::DTTrigGeomUtils(), fastProp(), SpecialCylindricalMFGrid::fromGridFrame(), DTTrigGeom::getGeom(), TrackDetectorAssociator::getTAMuonChamberMatches(), HelixBarrelPlaneCrossing2OrderLocal::HelixBarrelPlaneCrossing2OrderLocal(), RKLocalFieldProvider::inTesla(), DTTrigGeom::localPosition(), SiTrackerGaussianSmearingRecHitConverter::matchHits(), PathToPlane2Order::operator()(), PixelCPEBase::param(), DTDigitizer::produce(), Propagator::propagate(), RectangularCartesianMFGrid::RectangularCartesianMFGrid(), RectangularCylindricalMFGrid::RectangularCylindricalMFGrid(), MagGeoBuilderFromDDD::volumeHandle::sameSurface(), CSCPairResidualsConstraint::setZplane(), SpecialCylindricalMFGrid::SpecialCylindricalMFGrid(), FrameChanger::toFrame(), NavSurface::toLocal(), DTTrigGeom::toLocal(), toLocal(), GeomDet::toLocal(), FrameChanger::transformPlane(), TrapezoidalCartesianMFGrid::TrapezoidalCartesianMFGrid(), TrapezoidalCylindricalMFGrid::TrapezoidalCylindricalMFGrid(), DTTrigGeom::tubePosInCh(), and TrapezoidalCylindricalMFGrid::uncheckedValueInTesla().

                                                   {
    return LocalPoint( rotation() * (gp.basicVector()-position().basicVector()));
  }

Member Data Documentation

template<class T>
T GloballyPositioned< T >::theEta [mutable, private]
template<class T>
T GloballyPositioned< T >::thePhi [mutable, private]
template<class T>
PositionType GloballyPositioned< T >::thePos [private]
template<class T>
RotationType GloballyPositioned< T >::theRot [private]