CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

Alignable Class Reference

#include <Alignable.h>

Inheritance diagram for Alignable:
AlignableBeamSpot AlignableComposite AlignableDetUnit AlignableCSCEndcap AlignableCSCRing AlignableCSCStation AlignableDet AlignableDTBarrel AlignableDTStation AlignableDTWheel AlignableMuon AlignableTracker

List of all members.

Public Types

typedef align::Alignables Alignables
typedef align::GlobalVector GlobalVector
typedef align::LocalVector LocalVector
typedef align::PositionType PositionType
typedef align::RotationType RotationType
typedef align::Scalar Scalar
typedef align::StructureType StructureType

Public Member Functions

virtual void addAlignmentPositionError (const AlignmentPositionError &ape, bool propagateDown)=0
virtual void addAlignmentPositionErrorFromLocalRotation (const RotationType &rotation, bool propagateDown)=0
virtual void addAlignmentPositionErrorFromRotation (const RotationType &rotation, bool propagateDown)=0
virtual void addComponent (Alignable *)=0
virtual void addSurfaceDeformation (const SurfaceDeformation *deformation, bool propagateDown)=0
 Alignable (align::ID, const RotationType &)
 Alignable (align::ID, const AlignableSurface &)
virtual StructureType alignableObjectId () const =0
 Return the alignable type identifier.
virtual AlignmentErrorsalignmentErrors () const =0
 Return vector of alignment errors.
AlignmentParametersalignmentParameters () const
 Get the AlignmentParameters.
virtual Alignmentsalignments () const =0
 Return vector of alignment data.
virtual void cacheTransformation ()
 cache the current position, rotation and other parameters (e.g. surface deformations)
virtual Alignables components () const =0
 Return vector of all direct components.
const AlignablesdeepComponents () const
const GlobalVectordisplacement () const
 Return change of the global position since the creation of the object.
virtual void dump () const =0
 Recursive printout of alignable information.
bool firstCompsWithParams (Alignables &paramComps) const
const DetIdgeomDetId () const
const PositionTypeglobalPosition () const
 Return the global position of the object.
const RotationTypeglobalRotation () const
 Return the global orientation of the object.
align::ID id () const
 Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
Alignablemother () const
 Return pointer to container alignable (if any)
virtual void move (const GlobalVector &displacement)=0
 Movement with respect to the global reference frame.
virtual void recursiveComponents (Alignables &result) const =0
virtual void restoreCachedTransformation ()
 restore the previously cached transformation
virtual void rotateAroundGlobalAxis (const GlobalVector &axis, Scalar radians)
 Rotation around arbitratry global axis.
virtual void rotateAroundGlobalX (Scalar radians)
 Rotation around global x-axis.
virtual void rotateAroundGlobalY (Scalar radians)
 Rotation around global y-axis.
virtual void rotateAroundGlobalZ (Scalar radians)
 Rotation around global z-axis.
virtual void rotateAroundLocalAxis (const LocalVector &axis, Scalar radians)
 Rotation around arbitratry local axis.
virtual void rotateAroundLocalX (Scalar radians)
 Rotation around local x-axis.
virtual void rotateAroundLocalY (Scalar radians)
 Rotation around local y-axis.
virtual void rotateAroundLocalZ (Scalar radians)
 Rotation around local z-axis.
virtual void rotateInGlobalFrame (const RotationType &rotation)=0
virtual void rotateInLocalFrame (const RotationType &rotation)
 Rotation intepreted in the local reference frame.
const RotationTyperotation () const
 Return change of orientation since the creation of the object.
void setAlignmentParameters (AlignmentParameters *dap)
 Set the AlignmentParameters.
virtual void setAlignmentPositionError (const AlignmentPositionError &ape, bool propagateDown)=0
 Set the alignment position error - if (!propagateDown) do not affect daughters.
void setMother (Alignable *mother)
 Assign mother to alignable.
virtual void setSurfaceDeformation (const SurfaceDeformation *deformation, bool propagateDown)=0
 Set the surface deformation parameters - if (!propagateDown) do not affect daughters.
void setSurvey (const SurveyDet *)
 Set survey info.
int size () const
 Return number of direct components.
const AlignableSurfacesurface () const
 Return the Surface (global position and orientation) of the object.
virtual int surfaceDeformationIdPairs (std::vector< std::pair< int, SurfaceDeformation * > > &) const =0
AlignmentSurfaceDeformationssurfaceDeformations () const
 Return surface deformations, sorted by DetId.
const SurveyDetsurvey () const
 Return survey info.
virtual ~Alignable ()
 Destructor.

Protected Member Functions

void addDisplacement (const GlobalVector &displacement)
void addRotation (const RotationType &rotation)

Protected Attributes

GlobalVector theCachedDisplacement
RotationType theCachedRotation
AlignableSurface theCachedSurface
Alignables theDeepComponents
DetId theDetId
GlobalVector theDisplacement
align::ID theId
RotationType theRotation
AlignableSurface theSurface

Private Member Functions

 Alignable ()
 private default ctr. to enforce usage of the specialised ones

Private Attributes

AlignmentParameterstheAlignmentParameters
AlignabletheMother
const SurveyDettheSurvey

Detailed Description

Abstract base class for alignable entities. Any Alignable object can be moved and rotated. Also an alignment uncertainty can be set.

Date:
2011/09/19 11:42:35
Revision:
1.36

(last update by

Author:
mussgill

)

Definition at line 29 of file Alignable.h.


Member Typedef Documentation

Definition at line 39 of file Alignable.h.

Definition at line 37 of file Alignable.h.

Definition at line 38 of file Alignable.h.

Definition at line 35 of file Alignable.h.

Definition at line 36 of file Alignable.h.

Definition at line 34 of file Alignable.h.

Definition at line 40 of file Alignable.h.


Constructor & Destructor Documentation

Alignable::Alignable ( align::ID  id,
const AlignableSurface surf 
)

Constructor from id and surface, setting also geomDetId (AlignableNavigator relies on the fact that only AlignableDet/DetUnit have geomDetId!)

Definition at line 19 of file Alignable.cc.

                                                            :
  theDetId(id), // FIXME: inconsistent with other ctr., but needed for AlignableNavigator 
  theId(id),    // (finally get rid of one of the IDs!)
  theSurface(surf),
  theCachedSurface(surf),
  theAlignmentParameters(0),
  theMother(0),
  theSurvey(0)
{
}
Alignable::Alignable ( align::ID  id,
const RotationType rot 
)

Constructor for a composite with given rotation. Position is found (later) from average of daughters' positions.

Definition at line 31 of file Alignable.cc.

                                                       :
  theDetId(), // FIXME: inconsistent with other ctr., cf. above
  theId(id),
  theSurface(PositionType(), rot),
  theCachedSurface(PositionType(), rot),
  theAlignmentParameters(0),
  theMother(0),
  theSurvey(0)
{
}
Alignable::~Alignable ( ) [virtual]

Destructor.

Definition at line 43 of file Alignable.cc.

References theAlignmentParameters, and theSurvey.

{
  delete theAlignmentParameters;
  delete theSurvey;
}
Alignable::Alignable ( ) [inline, private]

private default ctr. to enforce usage of the specialised ones

Definition at line 236 of file Alignable.h.

{};

Member Function Documentation

virtual void Alignable::addAlignmentPositionError ( const AlignmentPositionError ape,
bool  propagateDown 
) [pure virtual]
virtual void Alignable::addAlignmentPositionErrorFromLocalRotation ( const RotationType rotation,
bool  propagateDown 
) [pure virtual]

add (or set if not already present) the AlignmentPositionError which would result from a rotation (given in the LOCAL frame of the Alignable) of the alignable object, but if (!propagateDown) do not affect daughters

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

Referenced by AlignableModifier::addAlignmentPositionErrorFromLocalRotation().

virtual void Alignable::addAlignmentPositionErrorFromRotation ( const RotationType rotation,
bool  propagateDown 
) [pure virtual]

add (or set if not already present) the AlignmentPositionError which would result from a rotation (given in the GLOBAL frame of CMS) of the alignable object, but if (!propagateDown) do not affect daughters

Implemented in AlignableBeamSpot, AlignableComposite, AlignableDet, and AlignableDetUnit.

Referenced by AlignableModifier::addAlignmentPositionErrorFromRotation(), and AlignmentParameterStore::setAlignmentPositionError().

virtual void Alignable::addComponent ( Alignable ) [pure virtual]

Add a component to alignable (GF: Should be interface in Composite, but needed in AlignableBuilder::build)

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

Referenced by SurveyInputBase::addComponent(), AlignableBuilder::build(), and PedeSteerer::PedeSteerer().

void Alignable::addDisplacement ( const GlobalVector displacement) [protected]
void Alignable::addRotation ( const RotationType rotation) [protected]
virtual void Alignable::addSurfaceDeformation ( const SurfaceDeformation deformation,
bool  propagateDown 
) [pure virtual]

Add the surface deformation parameters to the existing ones, if (!propagateDown) do not affect daughters.

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

Referenced by AlignableModifier::addDeformation(), TwoBowedSurfacesAlignmentParameters::apply(), and BowedSurfaceAlignmentParameters::apply().

virtual StructureType Alignable::alignableObjectId ( ) const [pure virtual]

Return the alignable type identifier.

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

Referenced by AlignmentParameterBuilder::add(), SurveyMisalignmentInput::addSurveyInfo(), TrackerGeometryCompare::addSurveyInfo(), SurveyInputTrackerFromDB::addSurveyInfo(), AlignmentProducer::addSurveyInfo_(), MuonAlignmentInputSurveyDB::addSurveyInfo_(), MomentumDependentPedeLabeler::alignableLabel(), PedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabelFromParamAndInstance(), MomentumDependentPedeLabeler::alignableLabelFromParamAndInstance(), AlignmentParameterStore::applyAlignableAbsolutePositions(), AlignmentParameterStore::applyAlignableRelativePositions(), TrackerSystematicMisalignments::applySystematicMisalignment(), AlignmentMonitorGeneric::book(), TrackerOfflineValidation::bookDirHists(), TrackerOfflineValidation::bookHists(), TrackerOfflineValidation::bookSummaryHists(), TrackerOfflineValidation::collateSummaryHists(), TrackerGeometryCompare::compareGeometries(), align::createPoints(), AlignmentParameterSelector::detUnitDeselected(), align::diffAlignables(), TrackerGeometryCompare::diffCommonTrackerSystem(), HIPAlignmentAlgorithm::fillRoot(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), MuonAlignmentInputXML::getCSCnode(), MuonAlignmentInputXML::getDTnode(), SurveyDBUploader::getSurveyInfo(), PedeSteerer::hierarchyConstraint(), KalmanAlignmentUserVariables::KalmanAlignmentUserVariables(), MomentumDependentPedeLabeler::parameterLabel(), RunRangeDependentPedeLabeler::parameterLabel(), AlignableDataIORoot::readAbsRaw(), HIPUserVariablesIORoot::readOne(), AlignmentParametersIORoot::readOne(), MillePedeVariablesIORoot::readOne(), AlignableDataIORoot::readRelRaw(), AlignableNavigator::recursiveGetId(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), SurveyResidual::SurveyResidual(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), AlignmentParametersIORoot::writeOne(), HIPUserVariablesIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

virtual AlignmentErrors* Alignable::alignmentErrors ( ) const [pure virtual]
AlignmentParameters* Alignable::alignmentParameters ( ) const [inline]

Get the AlignmentParameters.

Definition at line 57 of file Alignable.h.

References theAlignmentParameters.

Referenced by AlignmentParameterStore::acquireRelativeParameters(), MillePedeAlignmentAlgorithm::addHitCount(), AlignmentParameterStore::alignableFromAlignableDet(), CSCAlignmentCorrections::applyAlignment(), AlignmentParameterStore::applyParameters(), PedeSteerer::buildNoHierarchyCollection(), HIPAlignmentAlgorithm::calcParameters(), PedeReader::checkAliParams(), HIPAlignmentAlgorithm::collector(), PedeSteerer::defineCoordinates(), CompositeAlignmentParameters::derivativesLegacy(), AlignmentCorrelationsStore::fillCorrelationsTable(), AlignmentExtendedCorrelationsStore::fillCorrelationsTable(), HIPAlignmentAlgorithm::fillRoot(), KalmanAlignmentUserVariables::fixAlignable(), PedeSteerer::fixParameter(), CurrentAlignmentKFUpdator::getHigherLevelParameters(), MillePedeAlignmentAlgorithm::globalDerivativesHierarchy(), AlignmentParameterStore::hierarchyConstraints(), KalmanAlignmentUserVariables::histogramParameters(), ParametersToParametersDerivatives::init2BowedRigid(), ParametersToParametersDerivatives::ParametersToParametersDerivatives(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), CSCChamberFitter::radiusCorrection(), AlignmentParametersIORoot::readOne(), AlignmentParameterStore::resetParameters(), MuonMillepedeAlgorithm::run(), PedeSteerer::selectCoordinateAlis(), AlignmentParameterStore::selectParameters(), SurveyAlignment::shiftSensors(), AlignmentProducer::simpleMisalignment_(), MuonMillepedeAlgorithm::terminate(), HIPAlignmentAlgorithm::terminate(), KalmanAlignmentUserVariables::unfixAlignable(), KalmanAlignmentUserVariables::update(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), AlignmentParametersIORoot::writeOne(), HIPUserVariablesIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignmentParametersIO::writeOneOrigRigidBody(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

virtual Alignments* Alignable::alignments ( ) const [pure virtual]
void Alignable::cacheTransformation ( ) [virtual]

cache the current position, rotation and other parameters (e.g. surface deformations)

Reimplemented in AlignableDetUnit.

Definition at line 244 of file Alignable.cc.

References theCachedDisplacement, theCachedRotation, theCachedSurface, theDisplacement, theRotation, and theSurface.

virtual Alignables Alignable::components ( ) const [pure virtual]
const Alignables& Alignable::deepComponents ( ) const [inline]

Return the list of lowest daughters (non-composites) of Alignable. Contain itself if Alignable is a unit.

Definition at line 71 of file Alignable.h.

References theDeepComponents.

Referenced by AlignableComposite::addComponent(), AlignmentStats::endJob(), and SurveyResidual::findSisters().

{ return theDeepComponents; }
const GlobalVector& Alignable::displacement ( ) const [inline]
virtual void Alignable::dump ( ) const [pure virtual]
bool Alignable::firstCompsWithParams ( Alignables paramComps) const

Steps down hierarchy until components with AlignmentParameters are found and adds them to argument. True either if no such components are found or if all branches of components end with such components (i.e. 'consistent').

Definition at line 50 of file Alignable.cc.

References components(), and first.

Referenced by AlignmentParameters::hierarchyLevel().

{
  bool isConsistent = true;
  bool hasAliComp = false; // whether there are any (grand-) daughters with parameters
  bool first = true;
  const Alignables comps(this->components());
  for (Alignables::const_iterator iComp = comps.begin(), iCompEnd = comps.end();
       iComp != iCompEnd; ++iComp) {
    if ((*iComp)->alignmentParameters()) { // component has parameters itself
      paramComps.push_back(*iComp);
      if (!first && !hasAliComp) isConsistent = false;
      hasAliComp = true;
    } else {
      const unsigned int nCompBefore = paramComps.size();
      if (!(*iComp)->firstCompsWithParams(paramComps)) {
        isConsistent = false; // problem down in hierarchy
      }
      if (paramComps.size() != nCompBefore) {
        if (!first && !hasAliComp) isConsistent = false;
        hasAliComp = true;
      } else if (hasAliComp) { // no components with params, but previous component did have comps.
        isConsistent = false;
      }
    }
    first = false;
  }

  return isConsistent;
}
const DetId& Alignable::geomDetId ( ) const [inline]
const PositionType& Alignable::globalPosition ( ) const [inline]

Return the global position of the object.

Definition at line 129 of file Alignable.h.

References GloballyPositioned< T >::position(), and surface().

Referenced by AlignableComposite::addAlignmentPositionErrorFromRotation(), AlignableComposite::addComponent(), SimpleMetricsUpdator::additionalSelectionCriterion(), AlignableBeamSpot::alignments(), AlignableDet::alignments(), AlignableDetUnit::alignments(), AlignmentParameterStore::applyAlignableAbsolutePositions(), TrackerSystematicMisalignments::applySystematicMisalignment(), SurveyResidual::calculate(), AlignableSiStripDet::consistifyAlignments(), align::diffAlignables(), TrackerGeometryCompare::diffCommonTrackerSystem(), MuonAlignmentInputXML::do_setposition(), AlignableComposite::dump(), AlignableBeamSpot::dump(), AlignableDetUnit::dump(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), MuonResiduals6DOFrphiFitter::fit(), PedeSteerer::fixParameter(), FrameToFrameDerivative::frameToFrameDerivative(), PedeSteerer::hierarchyConstraint(), KalmanAlignmentUserVariables::histogramParameters(), ParametersToParametersDerivatives::init2BowedRigid(), MuonScenarioBuilder::moveChamberInSector(), operator<<(), AlignmentParameterSelector::outsideGeometricalRanges(), PedeSteerer::PedeSteerer(), MuonAlignment::recursiveCopySurveyToAlignment(), AlignableComposite::rotateInGlobalFrame(), MuonAlignmentInputXML::set_one_position(), TrackerGeometryCompare::setCommonTrackerSystem(), AlignableDataIO::writeOrgPos(), and TwoBowedSurfacesAlignmentParameters::ySplitFromAlignable().

{ return surface().position(); }
const RotationType& Alignable::globalRotation ( ) const [inline]
align::ID Alignable::id ( ) const [inline]

Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).

Definition at line 180 of file Alignable.h.

References theId.

Referenced by SurveyMisalignmentInput::addSurveyInfo(), SurveyInputTrackerFromDB::addSurveyInfo(), AlignmentProducer::addSurveyInfo_(), MomentumDependentPedeLabeler::alignableLabel(), PedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabelFromParamAndInstance(), MomentumDependentPedeLabeler::alignableLabelFromParamAndInstance(), AlignmentParameterStore::applyAlignableAbsolutePositions(), AlignmentParameterStore::applyAlignableRelativePositions(), AlignmentMonitorGeneric::book(), AlignmentMonitorSurvey::book(), TrackerOfflineValidation::bookHists(), TrackerOfflineValidation::bookSummaryHists(), AlignableBuilder::build(), MuonGeometryArrange::checkChosen(), TrackerGeometryCompare::compareGeometries(), align::createPoints(), align::diffAlignables(), HIPAlignmentAlgorithm::fillRoot(), TrackerGeometryCompare::fillTree(), MuonGeometryArrange::fillTree(), PedeSteerer::fixParameter(), SurveyDBUploader::getSurveyInfo(), KalmanAlignmentUserVariables::KalmanAlignmentUserVariables(), AlignmentParameterSelector::layerDeselected(), KalmanAlignmentAlgorithm::operator()(), AlignmentParameterSelector::outsideDetIdRanges(), MomentumDependentPedeLabeler::parameterLabel(), RunRangeDependentPedeLabeler::parameterLabel(), PedeSteerer::PedeSteerer(), AlignableDataIORoot::readAbsRaw(), HIPUserVariablesIORoot::readOne(), MillePedeVariablesIORoot::readOne(), AlignmentParametersIORoot::readOne(), AlignableDataIORoot::readRelRaw(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), HIPAlignmentAlgorithm::terminate(), AlignmentParameterStore::typeAndLayer(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), HIPUserVariablesIORoot::writeOne(), AlignmentParametersIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

{ return theId; } 
Alignable* Alignable::mother ( ) const [inline]
virtual void Alignable::move ( const GlobalVector displacement) [pure virtual]
virtual void Alignable::recursiveComponents ( Alignables result) const [pure virtual]

Provide all components, subcomponents, subsub... etc. of Alignable down to AlignableDetUnit, except for 'single childs' like e.g. AlignableDetUnits of AlignableDets representing single sided SiStrip modules. (for performance reason by adding to argument)

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

void Alignable::restoreCachedTransformation ( ) [virtual]

restore the previously cached transformation

Reimplemented in AlignableDetUnit.

Definition at line 251 of file Alignable.cc.

References theCachedDisplacement, theCachedRotation, theCachedSurface, theDisplacement, theRotation, and theSurface.

void Alignable::rotateAroundGlobalAxis ( const GlobalVector axis,
Scalar  radians 
) [virtual]

Rotation around arbitratry global axis.

Definition at line 104 of file Alignable.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), and rotateInGlobalFrame().

Referenced by MuonAlignmentInputXML::do_rotateglobalaxis().

void Alignable::rotateAroundGlobalX ( Scalar  radians) [virtual]

Rotation around global x-axis.

Definition at line 122 of file Alignable.cc.

References funct::cos(), makeMuonMisalignmentScenario::rot, rotateInGlobalFrame(), and funct::sin().

Referenced by MuonAlignment::moveAlignableGlobalCoord(), and AlignableModifier::rotateAlignable().

{

  RotationType rot( 1.,  0.,            0.,
                    0.,  std::cos(radians),  std::sin(radians),
                    0., -std::sin(radians),  std::cos(radians) );

  rotateInGlobalFrame(rot);

}
void Alignable::rotateAroundGlobalY ( Scalar  radians) [virtual]

Rotation around global y-axis.

Definition at line 148 of file Alignable.cc.

References funct::cos(), makeMuonMisalignmentScenario::rot, rotateInGlobalFrame(), and funct::sin().

Referenced by MuonAlignment::moveAlignableGlobalCoord(), and AlignableModifier::rotateAlignable().

{

  RotationType rot( std::cos(radians),  0., -std::sin(radians), 
                    0.,            1.,  0.,
                    std::sin(radians),  0.,  std::cos(radians) );

  rotateInGlobalFrame(rot);
  
}
void Alignable::rotateAroundGlobalZ ( Scalar  radians) [virtual]
void Alignable::rotateAroundLocalAxis ( const LocalVector axis,
Scalar  radians 
) [virtual]

Rotation around arbitratry local axis.

Definition at line 113 of file Alignable.cc.

References PV3DBase< T, PVType, FrameType >::basicVector(), and rotateInLocalFrame().

Referenced by MuonAlignmentInputXML::do_rotatelocal().

void Alignable::rotateAroundLocalX ( Scalar  radians) [virtual]
void Alignable::rotateAroundLocalY ( Scalar  radians) [virtual]

Rotation around local y-axis.

Definition at line 161 of file Alignable.cc.

References funct::cos(), makeMuonMisalignmentScenario::rot, rotateInLocalFrame(), and funct::sin().

Referenced by MuonAlignment::moveAlignableLocalCoord(), AlignableModifier::rotateAlignableLocal(), and CreateSurveyRcds::setGeometry().

{

  RotationType rot( std::cos(radians),  0., -std::sin(radians), 
                    0.,            1.,  0.,
                    std::sin(radians),  0.,  std::cos(radians) );
  
  rotateInLocalFrame(rot);

}
void Alignable::rotateAroundLocalZ ( Scalar  radians) [virtual]
virtual void Alignable::rotateInGlobalFrame ( const RotationType rotation) [pure virtual]
void Alignable::rotateInLocalFrame ( const RotationType rotation) [virtual]

Rotation intepreted in the local reference frame.

Definition at line 91 of file Alignable.cc.

References rotateInGlobalFrame(), and surface().

Referenced by SurveyInputTrackerFromDB::addSurveyInfo(), KalmanAlignmentAlgorithm::applyAlignmentParameters(), rotateAroundLocalAxis(), rotateAroundLocalX(), rotateAroundLocalY(), rotateAroundLocalZ(), and AlignmentProducer::simpleMisalignment_().

{

  // This is done by simply transforming the rotation from
  // the local system O to the global one  O^-1 * Rot * O
  // and then applying the global rotation  O * Rot

  rotateInGlobalFrame( surface().toGlobal(rotation) );

}
const RotationType& Alignable::rotation ( ) const [inline]
void Alignable::setAlignmentParameters ( AlignmentParameters dap)
virtual void Alignable::setAlignmentPositionError ( const AlignmentPositionError ape,
bool  propagateDown 
) [pure virtual]
void Alignable::setMother ( Alignable mother) [inline]

Assign mother to alignable.

Definition at line 88 of file Alignable.h.

References mother(), and theMother.

Referenced by AlignableComposite::addComponent().

virtual void Alignable::setSurfaceDeformation ( const SurfaceDeformation deformation,
bool  propagateDown 
) [pure virtual]

Set the surface deformation parameters - if (!propagateDown) do not affect daughters.

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

void Alignable::setSurvey ( const SurveyDet survey)
int Alignable::size ( ) const [inline]
const AlignableSurface& Alignable::surface ( ) const [inline]

Return the Surface (global position and orientation) of the object.

Definition at line 126 of file Alignable.h.

References theSurface.

Referenced by AlignmentParameterStore::acquireRelativeParameters(), AlignableDetUnit::addAlignmentPositionErrorFromRotation(), AlignableDet::addAlignmentPositionErrorFromRotation(), SurveyMisalignmentInput::addSurveyInfo(), TrackerGeometryCompare::addSurveyInfo(), SurveyInputTrackerFromDB::addSurveyInfo(), AlignmentProducer::addSurveyInfo_(), MuonAlignmentInputSurveyDB::addSurveyInfo_(), SurveyInputCSCfromPins::analyze(), MuonGeometrySVGTemplate::analyze(), BeamSpotAlignmentParameters::apply(), RigidBodyAlignmentParameters::apply(), TwoBowedSurfacesAlignmentParameters::apply(), BowedSurfaceAlignmentParameters::apply(), CSCAlignmentCorrections::applyAlignment(), KalmanAlignmentAlgorithm::applyAlignmentParameters(), SurveyResidual::calculate(), MuonAlignment::copyAlignmentToSurvey(), align::createPoints(), TwoBowedSurfacesAlignmentParameters::derivatives(), BowedSurfaceAlignmentParameters::derivatives(), align::diffAlignables(), RigidBodyAlignmentParameters::displacementFromAlignable(), MuonAlignmentInputXML::do_moveglobal(), MuonAlignmentInputXML::do_movelocal(), MuonAlignmentInputXML::do_rotatebeamline(), MuonAlignmentInputXML::do_rotateglobalaxis(), MuonAlignmentInputXML::do_rotatelocal(), MuonAlignmentInputXML::do_setsurveyerr(), KalmanAlignmentUserVariables::extractTrueParameters(), SurveyInputCSCfromPins::fillAllRecords(), HIPAlignmentAlgorithm::fillRoot(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), RigidBodyAlignmentParameters::globalParameters(), BeamSpotAlignmentParameters::globalParameters(), globalPosition(), globalRotation(), KalmanAlignmentUserVariables::histogramParameters(), ParametersToParametersDerivatives::init2BowedRigid(), ParametersToParametersDerivatives::initBowedRigid(), AlignableModifier::moveAlignableLocal(), MuonAlignment::moveAlignableLocalCoord(), AlignableComposite::moveComponentLocal(), AlignableComposite::moveComponentsLocal(), operator<<(), PedeSteerer::PedeSteerer(), MuonResiduals6DOFrphiFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals5DOFFitter::plot(), rotateInLocalFrame(), BowedSurfaceAlignmentParameters::rotation(), MuonAlignmentInputXML::set_one_position(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), SurveyAlignment::shiftSensors(), AlignmentProducer::simpleMisalignment_(), KalmanAlignmentUserVariables::update(), and AlignableDataIO::writeAbsPos().

{ return theSurface; }
virtual int Alignable::surfaceDeformationIdPairs ( std::vector< std::pair< int, SurfaceDeformation * > > &  ) const [pure virtual]

Return surface deformations as a vector of pairs of raw DetId and pointers to surface deformations

Implemented in AlignableBeamSpot, AlignableComposite, and AlignableDetUnit.

Referenced by surfaceDeformations(), and AlignableDataIO::writeAbsPos().

AlignmentSurfaceDeformations * Alignable::surfaceDeformations ( void  ) const

Return surface deformations, sorted by DetId.

Definition at line 216 of file Alignable.cc.

References AlignmentSurfaceDeformations::add(), query::result, python::multivaluedict::sort(), and surfaceDeformationIdPairs().

Referenced by AlignmentProducer::startingNewLoop(), and AlignmentProducer::writeForRunRange().

{

  typedef std::pair<int,SurfaceDeformation*> IdSurfaceDeformationPtrPair;

  std::vector<IdSurfaceDeformationPtrPair> result;
  surfaceDeformationIdPairs(result);
  std::sort( result.begin(), 
             result.end(), 
             lessIdAlignmentPair<IdSurfaceDeformationPtrPair>() );
  
  AlignmentSurfaceDeformations* allSurfaceDeformations = new AlignmentSurfaceDeformations();
  
  for ( std::vector<IdSurfaceDeformationPtrPair>::const_iterator iPair = result.begin();
        iPair != result.end();
        ++iPair) {
    
    // should we check for 'empty' parameters here (all zeros) and skip ?
    // may be add 'empty' method to SurfaceDeformation
    allSurfaceDeformations->add((*iPair).first,
                                (*iPair).second->type(),
                                (*iPair).second->parameters());
  }
  
  return allSurfaceDeformations;

}
const SurveyDet* Alignable::survey ( ) const [inline]

Member Data Documentation

Definition at line 236 of file Alignable.h.

Referenced by alignmentParameters(), setAlignmentParameters(), and ~Alignable().

Definition at line 217 of file Alignable.h.

Referenced by geomDetId().

Definition at line 240 of file Alignable.h.

Referenced by mother(), and setMother().

const SurveyDet* Alignable::theSurvey [private]

Definition at line 242 of file Alignable.h.

Referenced by setSurvey(), survey(), and ~Alignable().