CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Alignable Class Referenceabstract

#include <Alignable.h>

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

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

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

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.

19  :
20  theDetId(id), // FIXME: inconsistent with other ctr., but needed for AlignableNavigator
21  theId(id), // (finally get rid of one of the IDs!)
22  theSurface(surf),
23  theCachedSurface(surf),
25  theMother(0),
26  theSurvey(0)
27 {
28 }
DetId theDetId
Definition: Alignable.h:217
Alignable * theMother
Definition: Alignable.h:240
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:236
AlignableSurface theCachedSurface
Definition: Alignable.h:227
align::ID theId
Definition: Alignable.h:220
const SurveyDet * theSurvey
Definition: Alignable.h:242
AlignableSurface theSurface
Definition: Alignable.h:222
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.

31  :
32  theDetId(), // FIXME: inconsistent with other ctr., cf. above
33  theId(id),
37  theMother(0),
38  theSurvey(0)
39 {
40 }
DetId theDetId
Definition: Alignable.h:217
Alignable * theMother
Definition: Alignable.h:240
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:236
AlignableSurface theCachedSurface
Definition: Alignable.h:227
align::PositionType PositionType
Definition: Alignable.h:35
align::ID theId
Definition: Alignable.h:220
const SurveyDet * theSurvey
Definition: Alignable.h:242
AlignableSurface theSurface
Definition: Alignable.h:222
Alignable::~Alignable ( )
virtual

Destructor.

Definition at line 43 of file Alignable.cc.

References theAlignmentParameters, and theSurvey.

44 {
46  delete theSurvey;
47 }
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:236
const SurveyDet * theSurvey
Definition: Alignable.h:242
Alignable::Alignable ( )
inlineprivate

private default ctr. to enforce usage of the specialised ones

Definition at line 236 of file Alignable.h.

236 {};

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 AlignableComposite, AlignableBeamSpot, 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 AlignableComposite, AlignableBeamSpot, AlignableDetUnit, and AlignableDet.

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 AlignableComposite, AlignableBeamSpot, and AlignableDetUnit.

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

void Alignable::addDisplacement ( const GlobalVector displacement)
protected

Definition at line 200 of file Alignable.cc.

References displacement(), and theDisplacement.

Referenced by AlignableSiStripDet::consistifyAlignments(), AlignableDetUnit::move(), AlignableBeamSpot::move(), and AlignableComposite::move().

201 {
202 
204 
205 }
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:135
GlobalVector theDisplacement
Definition: Alignable.h:224
void Alignable::addRotation ( const RotationType rotation)
protected

Definition at line 208 of file Alignable.cc.

References rotation(), and theRotation.

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

209 {
210 
212 
213 }
RotationType theRotation
Definition: Alignable.h:225
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:138
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(), BowedSurfaceAlignmentParameters::apply(), and TwoBowedSurfacesAlignmentParameters::apply().

virtual StructureType Alignable::alignableObjectId ( ) const
pure virtual

Return the alignable type identifier.

Implemented in AlignableComposite, AlignableBeamSpot, and AlignableDetUnit.

Referenced by AlignmentParameterBuilder::add(), SurveyInputTrackerFromDB::addSurveyInfo(), SurveyMisalignmentInput::addSurveyInfo(), TrackerGeometryCompare::addSurveyInfo(), MuonAlignmentInputSurveyDB::addSurveyInfo_(), AlignmentProducer::addSurveyInfo_(), MomentumDependentPedeLabeler::alignableLabel(), PedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabel(), MomentumDependentPedeLabeler::alignableLabelFromParamAndInstance(), RunRangeDependentPedeLabeler::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(), AlignmentParametersIORoot::readOne(), HIPUserVariablesIORoot::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::getAlignmentParameters(), 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().

57 { return theAlignmentParameters; }
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:236
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.

245 {
249 }
RotationType theCachedRotation
Definition: Alignable.h:229
RotationType theRotation
Definition: Alignable.h:225
GlobalVector theDisplacement
Definition: Alignable.h:224
AlignableSurface theCachedSurface
Definition: Alignable.h:227
GlobalVector theCachedDisplacement
Definition: Alignable.h:228
AlignableSurface theSurface
Definition: Alignable.h:222
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(), TrackerGeometryCompare::createROOTGeometry(), AlignmentStats::endJob(), and SurveyResidual::findSisters().

71 { return theDeepComponents; }
Alignables theDeepComponents
Definition: Alignable.h:231
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().

51 {
52  bool isConsistent = true;
53  bool hasAliComp = false; // whether there are any (grand-) daughters with parameters
54  bool first = true;
55  const Alignables comps(this->components());
56  for (Alignables::const_iterator iComp = comps.begin(), iCompEnd = comps.end();
57  iComp != iCompEnd; ++iComp) {
58  if ((*iComp)->alignmentParameters()) { // component has parameters itself
59  paramComps.push_back(*iComp);
60  if (!first && !hasAliComp) isConsistent = false;
61  hasAliComp = true;
62  } else {
63  const unsigned int nCompBefore = paramComps.size();
64  if (!(*iComp)->firstCompsWithParams(paramComps)) {
65  isConsistent = false; // problem down in hierarchy
66  }
67  if (paramComps.size() != nCompBefore) {
68  if (!first && !hasAliComp) isConsistent = false;
69  hasAliComp = true;
70  } else if (hasAliComp) { // no components with params, but previous component did have comps.
71  isConsistent = false;
72  }
73  }
74  first = false;
75  }
76 
77  return isConsistent;
78 }
virtual Alignables components() const =0
Return vector of all direct components.
bool first
Definition: L1TdeRCT.cc:94
align::Alignables Alignables
Definition: Alignable.h:39
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(), AlignableDet::alignments(), AlignableDetUnit::alignments(), AlignableBeamSpot::alignments(), AlignmentParameterStore::applyAlignableAbsolutePositions(), TrackerSystematicMisalignments::applySystematicMisalignment(), SurveyResidual::calculate(), AlignableSiStripDet::consistifyAlignments(), align::diffAlignables(), TrackerGeometryCompare::diffCommonTrackerSystem(), MuonAlignmentInputXML::do_setposition(), AlignableDetUnit::dump(), AlignableBeamSpot::dump(), AlignableComposite::dump(), MillePedeMonitor::fillFrameToFrame(), 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().

129 { return surface().position(); }
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
const PositionType & position() const
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 SurveyInputTrackerFromDB::addSurveyInfo(), SurveyMisalignmentInput::addSurveyInfo(), AlignmentProducer::addSurveyInfo_(), MomentumDependentPedeLabeler::alignableLabel(), PedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabel(), MomentumDependentPedeLabeler::alignableLabelFromParamAndInstance(), RunRangeDependentPedeLabeler::alignableLabelFromParamAndInstance(), AlignmentParameterStore::applyAlignableAbsolutePositions(), AlignmentParameterStore::applyAlignableRelativePositions(), AlignmentMonitorSurvey::book(), AlignmentMonitorGeneric::book(), TrackerOfflineValidation::bookHists(), TrackerOfflineValidation::bookSummaryHists(), AlignableBuilder::build(), MuonGeometryArrange::checkChosen(), TrackerGeometryCompare::compareGeometries(), align::createPoints(), align::diffAlignables(), HIPAlignmentAlgorithm::fillRoot(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), PedeSteerer::fixParameter(), SurveyDBUploader::getSurveyInfo(), KalmanAlignmentUserVariables::KalmanAlignmentUserVariables(), AlignmentParameterSelector::layerDeselected(), KalmanAlignmentAlgorithm::operator()(), AlignmentParameterSelector::outsideDetIdRanges(), MomentumDependentPedeLabeler::parameterLabel(), RunRangeDependentPedeLabeler::parameterLabel(), PedeSteerer::PedeSteerer(), AlignableDataIORoot::readAbsRaw(), AlignmentParametersIORoot::readOne(), HIPUserVariablesIORoot::readOne(), MillePedeVariablesIORoot::readOne(), AlignableDataIORoot::readRelRaw(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), HIPAlignmentAlgorithm::terminate(), AlignmentParameterStore::typeAndLayer(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), AlignmentParametersIORoot::writeOne(), HIPUserVariablesIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

180 { return theId; }
align::ID theId
Definition: Alignable.h:220
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 AlignableComposite, AlignableBeamSpot, and AlignableDetUnit.

void Alignable::restoreCachedTransformation ( )
virtual

restore the previously cached transformation, also for possible components

Reimplemented in AlignableDetUnit.

Definition at line 251 of file Alignable.cc.

References components(), theCachedDisplacement, theCachedRotation, theCachedSurface, theDisplacement, theRotation, and theSurface.

252 {
253  // first treat itself
257 
258  // now treat components (a clean design would move that to AlignableComposite...)
259  const Alignables comps(this->components());
260 
261  for (auto it = comps.begin(); it != comps.end(); ++it) {
262  (*it)->restoreCachedTransformation();
263  }
264 
265 }
RotationType theCachedRotation
Definition: Alignable.h:229
RotationType theRotation
Definition: Alignable.h:225
virtual Alignables components() const =0
Return vector of all direct components.
GlobalVector theDisplacement
Definition: Alignable.h:224
AlignableSurface theCachedSurface
Definition: Alignable.h:227
GlobalVector theCachedDisplacement
Definition: Alignable.h:228
align::Alignables Alignables
Definition: Alignable.h:39
AlignableSurface theSurface
Definition: Alignable.h:222
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().

105 {
106 
107  rotateInGlobalFrame( RotationType(axis.basicVector(),radians) );
108 
109 }
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
align::RotationType RotationType
Definition: Alignable.h:36
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
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().

123 {
124 
125  RotationType rot( 1., 0., 0.,
126  0., std::cos(radians), std::sin(radians),
127  0., -std::sin(radians), std::cos(radians) );
128 
130 
131 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
align::RotationType RotationType
Definition: Alignable.h:36
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().

149 {
150 
151  RotationType rot( std::cos(radians), 0., -std::sin(radians),
152  0., 1., 0.,
153  std::sin(radians), 0., std::cos(radians) );
154 
156 
157 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
align::RotationType RotationType
Definition: Alignable.h:36
void Alignable::rotateAroundGlobalZ ( Scalar  radians)
virtual

Rotation around global z-axis.

Definition at line 174 of file Alignable.cc.

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

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

175 {
176 
177  RotationType rot( std::cos(radians), std::sin(radians), 0.,
178  -std::sin(radians), std::cos(radians), 0.,
179  0., 0., 1. );
180 
182 
183 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
align::RotationType RotationType
Definition: Alignable.h:36
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().

114 {
115 
116  rotateInLocalFrame(RotationType(axis.basicVector(), radians));
117 
118 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:91
align::RotationType RotationType
Definition: Alignable.h:36
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
void Alignable::rotateAroundLocalX ( Scalar  radians)
virtual

Rotation around local x-axis.

Definition at line 135 of file Alignable.cc.

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

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

136 {
137 
138  RotationType rot( 1., 0., 0.,
139  0., std::cos(radians), std::sin(radians),
140  0., -std::sin(radians), std::cos(radians) );
141 
143 
144 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:91
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
align::RotationType RotationType
Definition: Alignable.h:36
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().

162 {
163 
164  RotationType rot( std::cos(radians), 0., -std::sin(radians),
165  0., 1., 0.,
166  std::sin(radians), 0., std::cos(radians) );
167 
169 
170 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:91
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
align::RotationType RotationType
Definition: Alignable.h:36
void Alignable::rotateAroundLocalZ ( Scalar  radians)
virtual

Rotation around local z-axis.

Definition at line 187 of file Alignable.cc.

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

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

188 {
189 
190  RotationType rot( std::cos(radians), std::sin(radians), 0. ,
191  -std::sin(radians), std::cos(radians), 0. ,
192  0., 0., 1. );
193 
195 
196 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:91
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
align::RotationType RotationType
Definition: Alignable.h:36
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_().

92 {
93 
94  // This is done by simply transforming the rotation from
95  // the local system O to the global one O^-1 * Rot * O
96  // and then applying the global rotation O * Rot
97 
98  rotateInGlobalFrame( surface().toGlobal(rotation) );
99 
100 }
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:138
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
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().

88 { theMother = mother; }
Alignable * theMother
Definition: Alignable.h:240
Alignable * mother() const
Return pointer to container alignable (if any)
Definition: Alignable.h:85
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

Return number of direct components.

Definition at line 67 of file Alignable.h.

References components().

Referenced by AlignableDTStation::chamber(), AlignableCSCRing::chamber(), AlignableComposite::moveComponentLocal(), AlignableCSCStation::ring(), AlignableDTWheel::station(), AlignableCSCEndcap::station(), and AlignableDTBarrel::wheel().

67 { return components().size(); }
virtual Alignables components() const =0
Return vector of all direct components.
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(), AlignableDet::addAlignmentPositionErrorFromRotation(), AlignableDetUnit::addAlignmentPositionErrorFromRotation(), MillePedeAlignmentAlgorithm::addPxbSurvey(), MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), MuonDT2ChamberResidual::addResidual(), SurveyInputTrackerFromDB::addSurveyInfo(), SurveyMisalignmentInput::addSurveyInfo(), TrackerGeometryCompare::addSurveyInfo(), MuonAlignmentInputSurveyDB::addSurveyInfo_(), AlignmentProducer::addSurveyInfo_(), SurveyInputCSCfromPins::analyze(), MuonGeometrySVGTemplate::analyze(), RigidBodyAlignmentParameters::apply(), BeamSpotAlignmentParameters::apply(), BowedSurfaceAlignmentParameters::apply(), TwoBowedSurfacesAlignmentParameters::apply(), CSCAlignmentCorrections::applyAlignment(), KalmanAlignmentAlgorithm::applyAlignmentParameters(), SurveyResidual::calculate(), MuonAlignment::copyAlignmentToSurvey(), align::createPoints(), BowedSurfaceAlignmentParameters::derivatives(), TwoBowedSurfacesAlignmentParameters::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(), MuonChamberResidual::global_stubpos(), MuonChamberResidual::global_trackpos(), RigidBodyAlignmentParameters::globalParameters(), BeamSpotAlignmentParameters::globalParameters(), globalPosition(), globalRotation(), KalmanAlignmentUserVariables::histogramParameters(), ParametersToParametersDerivatives::init2BowedRigid(), ParametersToParametersDerivatives::initBowedRigid(), AlignableModifier::moveAlignableLocal(), MuonAlignment::moveAlignableLocalCoord(), AlignableComposite::moveComponentLocal(), AlignableComposite::moveComponentsLocal(), operator<<(), PedeSteerer::PedeSteerer(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(), rotateInLocalFrame(), BowedSurfaceAlignmentParameters::rotation(), MuonAlignmentInputXML::set_one_position(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), SurveyAlignment::shiftSensors(), AlignmentProducer::simpleMisalignment_(), KalmanAlignmentUserVariables::update(), and AlignableDataIO::writeAbsPos().

126 { return theSurface; }
AlignableSurface theSurface
Definition: Alignable.h:222
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 AlignableComposite, AlignableBeamSpot, 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().

217 {
218 
219  typedef std::pair<int,SurfaceDeformation*> IdSurfaceDeformationPtrPair;
220 
221  std::vector<IdSurfaceDeformationPtrPair> result;
223  std::sort( result.begin(),
224  result.end(),
226 
227  AlignmentSurfaceDeformations* allSurfaceDeformations = new AlignmentSurfaceDeformations();
228 
229  for ( std::vector<IdSurfaceDeformationPtrPair>::const_iterator iPair = result.begin();
230  iPair != result.end();
231  ++iPair) {
232 
233  // should we check for 'empty' parameters here (all zeros) and skip ?
234  // may be add 'empty' method to SurfaceDeformation
235  allSurfaceDeformations->add((*iPair).first,
236  (*iPair).second->type(),
237  (*iPair).second->parameters());
238  }
239 
240  return allSurfaceDeformations;
241 
242 }
virtual int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const =0
tuple result
Definition: query.py:137
bool add(align::ID rawId, int type, const std::vector< align::Scalar > &parameters)
Add a new item.
const SurveyDet* Alignable::survey ( ) const
inline

Member Data Documentation

AlignmentParameters* Alignable::theAlignmentParameters
private

Definition at line 236 of file Alignable.h.

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

GlobalVector Alignable::theCachedDisplacement
protected
RotationType Alignable::theCachedRotation
protected
AlignableSurface Alignable::theCachedSurface
protected
Alignables Alignable::theDeepComponents
protected
DetId Alignable::theDetId
protected

Definition at line 217 of file Alignable.h.

Referenced by geomDetId().

GlobalVector Alignable::theDisplacement
protected
align::ID Alignable::theId
protected
Alignable* Alignable::theMother
private

Definition at line 240 of file Alignable.h.

Referenced by mother(), and setMother().

RotationType Alignable::theRotation
protected
AlignableSurface Alignable::theSurface
protected
const SurveyDet* Alignable::theSurvey
private

Definition at line 242 of file Alignable.h.

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