CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Types | 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
 
enum  CompConstraintType { CompConstraintType::NONE, CompConstraintType::POSITION, CompConstraintType::POSITION_Z }
 
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 AlignmentErrorsExtendedalignmentErrors () 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), also for possible components More...
 
virtual void cacheTransformation (const align::RunNumber &)
 
virtual CompConstraintType compConstraintType () const
 Return the alignable type of contraints wrt. its components. More...
 
virtual const Alignablescomponents () 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...
 
bool lastCompsWithParams (Alignables &paramComps) const
 
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 recenterSurface ()
 Recenter surface object without moving possible components. More...
 
virtual void recursiveComponents (Alignables &result) const =0
 
virtual void restoreCachedTransformation ()
 restore the previously cached transformation, also for possible components More...
 
virtual void restoreCachedTransformation (const align::RunNumber &)
 
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...
 
void update (align::ID, const AlignableSurface &)
 
virtual ~Alignable ()
 Destructor. More...
 

Protected Types

template<class T >
using Cache = std::map< align::RunNumber, T >
 

Protected Member Functions

void addDisplacement (const GlobalVector &displacement)
 
void addRotation (const RotationType &rotation)
 
virtual void updateMother (const GlobalVector &shift)
 

Protected Attributes

CompConstraintType compConstraintType_ {CompConstraintType::NONE}
 
Cache< GlobalVectordisplacementsCache_
 
Cache< RotationTyperotationsCache_
 
Cache< AlignableSurfacesurfacesCache_
 
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.

Definition at line 27 of file Alignable.h.

Member Typedef Documentation

Definition at line 37 of file Alignable.h.

template<class T >
using Alignable::Cache = std::map<align::RunNumber, T>
protected

Definition at line 235 of file Alignable.h.

Definition at line 35 of file Alignable.h.

Definition at line 36 of file Alignable.h.

Definition at line 33 of file Alignable.h.

Definition at line 34 of file Alignable.h.

Definition at line 32 of file Alignable.h.

Definition at line 38 of file Alignable.h.

Member Enumeration Documentation

Enumerator
NONE 
POSITION 
POSITION_Z 

Definition at line 40 of file Alignable.h.

40 { NONE, POSITION, POSITION_Z };

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),
24  theAlignmentParameters(nullptr),
25  theMother(nullptr),
26  theSurvey(nullptr)
27 {
28 }
DetId theDetId
Definition: Alignable.h:241
Alignable * theMother
Definition: Alignable.h:271
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:267
AlignableSurface theCachedSurface
Definition: Alignable.h:251
align::ID theId
Definition: Alignable.h:244
const SurveyDet * theSurvey
Definition: Alignable.h:273
AlignableSurface theSurface
Definition: Alignable.h:246
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),
36  theAlignmentParameters(nullptr),
37  theMother(nullptr),
38  theSurvey(nullptr)
39 {
40 }
DetId theDetId
Definition: Alignable.h:241
Alignable * theMother
Definition: Alignable.h:271
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:267
AlignableSurface theCachedSurface
Definition: Alignable.h:251
align::PositionType PositionType
Definition: Alignable.h:33
align::ID theId
Definition: Alignable.h:244
const SurveyDet * theSurvey
Definition: Alignable.h:273
AlignableSurface theSurface
Definition: Alignable.h:246
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:267
const SurveyDet * theSurvey
Definition: Alignable.h:273
Alignable::Alignable ( )
inlineprivate

private default ctr. to enforce usage of the specialised ones

Definition at line 267 of file Alignable.h.

267 {};

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(), and rotation().

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(), rotation(), 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(), alignmentParameters(), and PedeSteerer::PedeSteerer().

void Alignable::addDisplacement ( const GlobalVector displacement)
protected

Definition at line 247 of file Alignable.cc.

References displacement(), and theDisplacement.

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

248 {
249 
251 
252 }
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:144
GlobalVector theDisplacement
Definition: Alignable.h:248
void Alignable::addRotation ( const RotationType rotation)
protected

Definition at line 255 of file Alignable.cc.

References rotation(), and theRotation.

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

256 {
257 
259 
260 }
RotationType theRotation
Definition: Alignable.h:249
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:147
virtual void Alignable::addSurfaceDeformation ( const SurfaceDeformation deformation,
bool  propagateDown 
)
pure virtual
virtual StructureType Alignable::alignableObjectId ( ) const
pure virtual

Return the alignable type identifier.

Implemented in AlignableComposite, AlignableDetUnit, and AlignableBeamSpot.

Referenced by AlignmentParameterBuilder::add(), SurveyInputTrackerFromDB::addSurveyInfo(), SurveyMisalignmentInput::addSurveyInfo(), TrackerGeometryCompare::addSurveyInfo(), AlignmentProducerBase::addSurveyInfo(), MuonAlignmentInputSurveyDB::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(), PedeReader::checkAliParams(), PedeSteererWeakModeConstraints::checkMother(), PedeSteererWeakModeConstraints::checkSelectionShiftParameter(), TrackerGeometryCompare::compareGeometries(), PedeSteererWeakModeConstraints::constructConstraints(), align::createPoints(), AlignmentParameterSelector::detUnitDeselected(), align::diffAlignables(), TrackerGeometryCompare::diffCommonTrackerSystem(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), HIPAlignmentAlgorithm::findAlignableSpecs(), MuonAlignmentInputXML::getCSCnode(), MuonAlignmentInputXML::getDTnode(), PedeSteererWeakModeConstraints::getFile(), MillePedeFileReader::getHLS(), SurveyDBUploader::getSurveyInfo(), PedeSteerer::hierarchyConstraint(), HIPAlignableSpecificParameters::objId(), MomentumDependentPedeLabeler::parameterLabel(), RunRangeDependentPedeLabeler::parameterLabel(), TrackerOfflineValidation::prepareSummaryHists(), AlignableDataIORoot::readAbsRaw(), AlignmentParametersIORoot::readOne(), HIPUserVariablesIORoot::readOne(), MillePedeVariablesIORoot::readOne(), AlignableDataIORoot::readRelRaw(), AlignableNavigator::recursiveGetId(), rotation(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), SurveyResidual::SurveyResidual(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), AlignmentParametersIORoot::writeOne(), HIPUserVariablesIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

virtual AlignmentErrorsExtended* Alignable::alignmentErrors ( ) const
pure virtual
AlignmentParameters* Alignable::alignmentParameters ( ) const
inline

Get the AlignmentParameters.

Definition at line 61 of file Alignable.h.

References addComponent(), components(), and theAlignmentParameters.

Referenced by AlignmentParameterStore::acquireRelativeParameters(), MillePedeAlignmentAlgorithm::addHitCount(), AlignmentParameterStore::alignableFromAlignableDet(), CSCAlignmentCorrections::applyAlignment(), AlignmentParameterStore::applyParameters(), HIPAlignmentAlgorithm::calcParameters(), PedeReader::checkAliParams(), PedeSteererWeakModeConstraints::checkSelectionShiftParameter(), PedeSteererWeakModeConstraints::constructConstraints(), PedeSteerer::defineCoordinates(), CompositeAlignmentParameters::derivativesLegacy(), AlignmentCorrelationsStore::fillCorrelationsTable(), AlignmentExtendedCorrelationsStore::fillCorrelationsTable(), PedeSteerer::fixParameter(), PedeSteererWeakModeConstraints::getDoubleSensorPosition(), MillePedeAlignmentAlgorithm::globalDerivativesHierarchy(), AlignmentParameterStore::hierarchyConstraints(), ParametersToParametersDerivatives::init2BowedRigid(), ParametersToParametersDerivatives::ParametersToParametersDerivatives(), HIPAlignmentAlgorithm::processHit1D(), HIPAlignmentAlgorithm::processHit2D(), CSCChamberFitter::radiusCorrection(), AlignmentParametersIORoot::readOne(), AlignmentParameterStore::resetParameters(), MuonMillepedeAlgorithm::run(), AlignmentParameterStore::selectParameters(), SurveyAlignment::shiftSensors(), HIPAlignmentAlgorithm::terminate(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), AlignmentParametersIORoot::writeOne(), HIPUserVariablesIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignmentParametersIO::writeOneOrigRigidBody(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

61 { return theAlignmentParameters; }
AlignmentParameters * theAlignmentParameters
Definition: Alignable.h:267
virtual Alignments* Alignable::alignments ( ) const
pure virtual
void Alignable::cacheTransformation ( )
virtual

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

Reimplemented in AlignableDetUnit.

Definition at line 291 of file Alignable.cc.

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

Referenced by compConstraintType().

292 {
293  // first treat itself
297 
298  // now treat components (a clean design would move that to AlignableComposite...)
299  for (const auto& it: this->components()) it->cacheTransformation();
300 }
RotationType theCachedRotation
Definition: Alignable.h:253
RotationType theRotation
Definition: Alignable.h:249
virtual const Alignables & components() const =0
Return vector of all direct components.
GlobalVector theDisplacement
Definition: Alignable.h:248
AlignableSurface theCachedSurface
Definition: Alignable.h:251
GlobalVector theCachedDisplacement
Definition: Alignable.h:252
AlignableSurface theSurface
Definition: Alignable.h:246
void Alignable::cacheTransformation ( const align::RunNumber run)
virtual

cache for the given run the current position, rotation and other parameters (e.g. surface deformations), also for possible components

Reimplemented in AlignableDetUnit.

Definition at line 302 of file Alignable.cc.

References components(), displacementsCache_, rotationsCache_, findQualityFiles::run, surfacesCache_, theDisplacement, theRotation, and theSurface.

303 {
304  // first treat itself
308 
309  // now treat components (a clean design would move that to AlignableComposite...)
310  for (const auto& it: this->components()) it->cacheTransformation(run);
311 }
RotationType theRotation
Definition: Alignable.h:249
Cache< GlobalVector > displacementsCache_
Definition: Alignable.h:261
Cache< AlignableSurface > surfacesCache_
Definition: Alignable.h:260
virtual const Alignables & components() const =0
Return vector of all direct components.
Cache< RotationType > rotationsCache_
Definition: Alignable.h:262
GlobalVector theDisplacement
Definition: Alignable.h:248
AlignableSurface theSurface
Definition: Alignable.h:246
virtual CompConstraintType Alignable::compConstraintType ( ) const
inlinevirtual

Return the alignable type of contraints wrt. its components.

Definition at line 192 of file Alignable.h.

References alignmentErrors(), alignments(), cacheTransformation(), compConstraintType_, dump(), restoreCachedTransformation(), surfaceDeformationIdPairs(), and surfaceDeformations().

Referenced by updateMother().

192 { return compConstraintType_; }
CompConstraintType compConstraintType_
Definition: Alignable.h:255
virtual const 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 75 of file Alignable.h.

References firstCompsWithParams(), lastCompsWithParams(), recursiveComponents(), mps_fire::result, and theDeepComponents.

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

75 { return theDeepComponents; }
Alignables theDeepComponents
Definition: Alignable.h:257
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 69 of file Alignable.cc.

References components(), and plotBeamSpotDB::first.

Referenced by deepComponents(), and AlignmentParameters::hierarchyLevel().

70 {
71  bool isConsistent = true;
72  bool hasAliComp = false; // whether there are any (grand-) daughters with parameters
73  bool first = true;
74  const auto& comps = this->components();
75  for (const auto& iComp: comps) {
76  if (iComp->alignmentParameters()) { // component has parameters itself
77  paramComps.push_back(iComp);
78  if (!first && !hasAliComp) isConsistent = false;
79  hasAliComp = true;
80  } else {
81  const unsigned int nCompBefore = paramComps.size();
82  if (!(iComp->firstCompsWithParams(paramComps))) {
83  isConsistent = false; // problem down in hierarchy
84  }
85  if (paramComps.size() != nCompBefore) {
86  if (!first && !hasAliComp) isConsistent = false;
87  hasAliComp = true;
88  } else if (hasAliComp) { // no components with params, but previous component did have comps.
89  isConsistent = false;
90  }
91  }
92  first = false;
93  }
94 
95  return isConsistent;
96 }
virtual const Alignables & components() const =0
Return vector of all direct components.
const DetId& Alignable::geomDetId ( ) const
inline
const PositionType& Alignable::globalPosition ( ) const
inline

Return the global position of the object.

Definition at line 138 of file Alignable.h.

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

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

138 { return surface().position(); }
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
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 189 of file Alignable.h.

References theId.

Referenced by SurveyInputTrackerFromDB::addSurveyInfo(), SurveyMisalignmentInput::addSurveyInfo(), AlignmentProducerBase::addSurveyInfo(), MomentumDependentPedeLabeler::alignableLabel(), PedeLabeler::alignableLabel(), RunRangeDependentPedeLabeler::alignableLabel(), MomentumDependentPedeLabeler::alignableLabelFromParamAndInstance(), RunRangeDependentPedeLabeler::alignableLabelFromParamAndInstance(), AlignmentParameterStore::applyAlignableAbsolutePositions(), AlignmentParameterStore::applyAlignableRelativePositions(), AlignmentMonitorSurvey::book(), AlignmentMonitorGeneric::book(), TrackerOfflineValidation::bookHists(), TrackerOfflineValidation::bookSummaryHists(), HIPAlignmentAlgorithm::calcParameters(), MuonGeometryArrange::checkChosen(), PedeSteererWeakModeConstraints::checkMother(), TrackerGeometryCompare::compareGeometries(), align::createPoints(), align::diffAlignables(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), HIPAlignmentAlgorithm::findAlignableSpecs(), PedeSteerer::fixParameter(), PedeSteererWeakModeConstraints::getFile(), MillePedeFileReader::getHLS(), SurveyDBUploader::getSurveyInfo(), HIPAlignableSpecificParameters::id(), AlignmentParameterSelector::layerDeselected(), AlignmentParameterSelector::outsideDetIdRanges(), MomentumDependentPedeLabeler::parameterLabel(), RunRangeDependentPedeLabeler::parameterLabel(), AlignableDataIORoot::readAbsRaw(), AlignmentParametersIORoot::readOne(), HIPUserVariablesIORoot::readOne(), MillePedeVariablesIORoot::readOne(), AlignableDataIORoot::readRelRaw(), HIPAlignmentAlgorithm::run(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), HIPAlignmentAlgorithm::terminate(), AlignmentParameterStore::typeAndLayer(), AlignmentCorrelationsIORoot::write(), AlignableDataIO::writeAbsPos(), AlignmentParametersIORoot::writeOne(), HIPUserVariablesIORoot::writeOne(), MillePedeVariablesIORoot::writeOne(), AlignableDataIO::writeOrgPos(), and AlignableDataIO::writeRelPos().

189 { return theId; }
align::ID theId
Definition: Alignable.h:244
bool Alignable::lastCompsWithParams ( Alignables paramComps) const

Steps down hierarchy to the lowest level of components with AlignmentParameters 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 99 of file Alignable.cc.

References components(), and plotBeamSpotDB::first.

Referenced by deepComponents().

100 {
101  bool isConsistent = true;
102  bool hasAliComp = false;
103  bool first = true;
104  const auto& comps = this->components();
105  for (const auto& iComp: comps) {
106  const auto nCompsBefore = paramComps.size();
107  isConsistent = iComp->lastCompsWithParams(paramComps);
108  if (paramComps.size() == nCompsBefore) {
109  if (iComp->alignmentParameters()) {
110  paramComps.push_back(iComp);
111  if (!first && !hasAliComp) isConsistent = false;
112  hasAliComp = true;
113  }
114  } else {
115  if (hasAliComp) {
116  isConsistent = false;
117  }
118  if (!first && !hasAliComp) isConsistent = false;
119  hasAliComp = true;
120  }
121  first = false;
122  }
123 
124  return isConsistent;
125 }
virtual const Alignables & components() const =0
Return vector of all direct components.
Alignable* Alignable::mother ( ) const
inline
virtual void Alignable::move ( const GlobalVector displacement)
pure virtual
void Alignable::recenterSurface ( )
virtual

Recenter surface object without moving possible components.

Definition at line 375 of file Alignable.cc.

References globalPosition(), GloballyPositioned< T >::move(), theSurface, and PV3DBase< T, PVType, FrameType >::x().

Referenced by PedeSteerer::PedeSteerer(), and survey().

376 {
377  const auto& currentPosition = this->globalPosition();
378  theSurface.move(align::GlobalVector{-currentPosition.x(),
379  -currentPosition.y(),
380  -currentPosition.z()});
381 }
void move(const GlobalVector &displacement)
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:138
T x() const
Definition: PV3DBase.h:62
AlignableSurface theSurface
Definition: Alignable.h:246
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 AlignableDetUnit.

Referenced by deepComponents().

void Alignable::restoreCachedTransformation ( )
virtual

restore the previously cached transformation, also for possible components

Reimplemented in AlignableDetUnit.

Definition at line 313 of file Alignable.cc.

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

Referenced by compConstraintType().

314 {
315  // first treat itself
319 
320  // now treat components (a clean design would move that to AlignableComposite...)
321  for (const auto& it: this->components()) it->restoreCachedTransformation();
322 }
RotationType theCachedRotation
Definition: Alignable.h:253
RotationType theRotation
Definition: Alignable.h:249
virtual const Alignables & components() const =0
Return vector of all direct components.
GlobalVector theDisplacement
Definition: Alignable.h:248
AlignableSurface theCachedSurface
Definition: Alignable.h:251
GlobalVector theCachedDisplacement
Definition: Alignable.h:252
AlignableSurface theSurface
Definition: Alignable.h:246
void Alignable::restoreCachedTransformation ( const align::RunNumber run)
virtual

restore for the given run the previously cached transformation, also for possible components

Reimplemented in AlignableDetUnit.

Definition at line 324 of file Alignable.cc.

References components(), displacementsCache_, Exception, rotationsCache_, findQualityFiles::run, surfacesCache_, theDisplacement, theRotation, and theSurface.

325 {
326  if (surfacesCache_.find(run) == surfacesCache_.end()) {
327  throw cms::Exception("Alignment")
328  << "@SUB=Alignable::restoreCachedTransformation\n"
329  << "Trying to restore cached transformation for a run (" << run
330  << ") that has not been cached.";
331  } else {
332  // first treat itself
336 
337  // now treat components (a clean design would move that to AlignableComposite...)
338  for (const auto& it: this->components()) it->restoreCachedTransformation();
339  }
340 }
RotationType theRotation
Definition: Alignable.h:249
Cache< GlobalVector > displacementsCache_
Definition: Alignable.h:261
Cache< AlignableSurface > surfacesCache_
Definition: Alignable.h:260
virtual const Alignables & components() const =0
Return vector of all direct components.
Cache< RotationType > rotationsCache_
Definition: Alignable.h:262
GlobalVector theDisplacement
Definition: Alignable.h:248
AlignableSurface theSurface
Definition: Alignable.h:246
void Alignable::rotateAroundGlobalAxis ( const GlobalVector axis,
Scalar  radians 
)
virtual

Rotation around arbitratry global axis.

Definition at line 151 of file Alignable.cc.

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

Referenced by MuonAlignmentInputXML::do_rotateglobalaxis(), and setMother().

152 {
153 
154  rotateInGlobalFrame( RotationType(axis.basicVector(),radians) );
155 
156 }
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
align::RotationType RotationType
Definition: Alignable.h:34
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
void Alignable::rotateAroundGlobalX ( Scalar  radians)
virtual

Rotation around global x-axis.

Definition at line 169 of file Alignable.cc.

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

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

170 {
171 
172  RotationType rot( 1., 0., 0.,
173  0., std::cos(radians), std::sin(radians),
174  0., -std::sin(radians), std::cos(radians) );
175 
177 
178 }
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:34
void Alignable::rotateAroundGlobalY ( Scalar  radians)
virtual

Rotation around global y-axis.

Definition at line 195 of file Alignable.cc.

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

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

196 {
197 
198  RotationType rot( std::cos(radians), 0., -std::sin(radians),
199  0., 1., 0.,
200  std::sin(radians), 0., std::cos(radians) );
201 
203 
204 }
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:34
void Alignable::rotateAroundGlobalZ ( Scalar  radians)
virtual

Rotation around global z-axis.

Definition at line 221 of file Alignable.cc.

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

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

222 {
223 
224  RotationType rot( std::cos(radians), std::sin(radians), 0.,
225  -std::sin(radians), std::cos(radians), 0.,
226  0., 0., 1. );
227 
229 
230 }
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:34
void Alignable::rotateAroundLocalAxis ( const LocalVector axis,
Scalar  radians 
)
virtual

Rotation around arbitratry local axis.

Definition at line 160 of file Alignable.cc.

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

Referenced by MuonAlignmentInputXML::do_rotatelocal(), and setMother().

161 {
162 
163  rotateInLocalFrame(RotationType(axis.basicVector(), radians));
164 
165 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:138
align::RotationType RotationType
Definition: Alignable.h:34
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:56
void Alignable::rotateAroundLocalX ( Scalar  radians)
virtual

Rotation around local x-axis.

Definition at line 182 of file Alignable.cc.

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

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

183 {
184 
185  RotationType rot( 1., 0., 0.,
186  0., std::cos(radians), std::sin(radians),
187  0., -std::sin(radians), std::cos(radians) );
188 
190 
191 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:138
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:34
void Alignable::rotateAroundLocalY ( Scalar  radians)
virtual

Rotation around local y-axis.

Definition at line 208 of file Alignable.cc.

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

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

209 {
210 
211  RotationType rot( std::cos(radians), 0., -std::sin(radians),
212  0., 1., 0.,
213  std::sin(radians), 0., std::cos(radians) );
214 
216 
217 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:138
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:34
void Alignable::rotateAroundLocalZ ( Scalar  radians)
virtual

Rotation around local z-axis.

Definition at line 234 of file Alignable.cc.

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

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

235 {
236 
237  RotationType rot( std::cos(radians), std::sin(radians), 0. ,
238  -std::sin(radians), std::cos(radians), 0. ,
239  0., 0., 1. );
240 
242 
243 }
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
Definition: Alignable.cc:138
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:34
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 138 of file Alignable.cc.

References rotateInGlobalFrame(), and surface().

Referenced by SurveyInputTrackerFromDB::addSurveyInfo(), rotateAroundLocalAxis(), rotateAroundLocalX(), rotateAroundLocalY(), rotateAroundLocalZ(), and setMother().

139 {
140 
141  // This is done by simply transforming the rotation from
142  // the local system O to the global one O^-1 * Rot * O
143  // and then applying the global rotation O * Rot
144 
145  rotateInGlobalFrame( surface().toGlobal(rotation) );
146 
147 }
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:147
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:135
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

Set the alignment position error - if (!propagateDown) do not affect daughters.

Implemented in AlignableComposite, AlignableBeamSpot, AlignableDetUnit, and AlignableDet.

Referenced by MuonAlignment::recursiveCopySurveyToAlignment(), rotation(), and AlignmentParameterStore::setAlignmentPositionError().

void Alignable::setMother ( Alignable mother)
inline
virtual void Alignable::setSurfaceDeformation ( const SurfaceDeformation deformation,
bool  propagateDown 
)
pure virtual

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

Implemented in AlignableComposite, AlignableBeamSpot, and AlignableDetUnit.

Referenced by rotation().

void Alignable::setSurvey ( const SurveyDet survey)
int Alignable::size ( ) const
inline

Return number of direct components.

Definition at line 71 of file Alignable.h.

References components().

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

71 { return components().size(); }
virtual const 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 135 of file Alignable.h.

References theSurface.

Referenced by AlignmentParameterStore::acquireRelativeParameters(), AlignableDet::addAlignmentPositionErrorFromRotation(), AlignableDetUnit::addAlignmentPositionErrorFromRotation(), MillePedeAlignmentAlgorithm::addPxbSurvey(), MuonDT2ChamberResidual::addResidual(), MuonCSCChamberResidual::addResidual(), MuonDT13ChamberResidual::addResidual(), SurveyInputTrackerFromDB::addSurveyInfo(), SurveyMisalignmentInput::addSurveyInfo(), TrackerGeometryCompare::addSurveyInfo(), AlignmentProducerBase::addSurveyInfo(), MuonAlignmentInputSurveyDB::addSurveyInfo_(), SurveyInputCSCfromPins::analyze(), MuonGeometrySVGTemplate::analyze(), BeamSpotAlignmentParameters::apply(), RigidBodyAlignmentParameters::apply(), BowedSurfaceAlignmentParameters::apply(), TwoBowedSurfacesAlignmentParameters::apply(), CSCAlignmentCorrections::applyAlignment(), SurveyResidual::calculate(), PedeSteererWeakModeConstraints::constructConstraints(), 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(), SurveyInputCSCfromPins::fillAllRecords(), MuonGeometryArrange::fillTree(), TrackerGeometryCompare::fillTree(), PedeSteererWeakModeConstraints::getDoubleSensorPosition(), MuonChamberResidual::global_stubpos(), MuonChamberResidual::global_trackpos(), BeamSpotAlignmentParameters::globalParameters(), RigidBodyAlignmentParameters::globalParameters(), globalPosition(), globalRotation(), ParametersToParametersDerivatives::init2BowedRigid(), ParametersToParametersDerivatives::initBowedRigid(), AlignableModifier::moveAlignableLocal(), MuonAlignment::moveAlignableLocalCoord(), AlignableComposite::moveComponentLocal(), AlignableComposite::moveComponentsLocal(), operator<<(), MuonResiduals5DOFFitter::plot(), MuonResiduals6DOFrphiFitter::plot(), MuonResiduals6DOFFitter::plot(), AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(), rotateInLocalFrame(), BowedSurfaceAlignmentParameters::rotation(), MuonAlignmentInputXML::set_one_position(), CreateSurveyRcds::setGeometry(), CreateSurveyRcds::setSurveyErrors(), SurveyAlignment::shiftSensors(), HIPAlignmentAlgorithm::terminate(), AlignableDataIO::writeAbsPos(), and AlignableDetUnit::~AlignableDetUnit().

135 { return theSurface; }
AlignableSurface theSurface
Definition: Alignable.h:246
virtual int Alignable::surfaceDeformationIdPairs ( std::vector< std::pair< int, SurfaceDeformation * > > &  ) const
pure virtual
AlignmentSurfaceDeformations * Alignable::surfaceDeformations ( void  ) const

Return surface deformations, sorted by DetId.

Definition at line 263 of file Alignable.cc.

References AlignmentSurfaceDeformations::add(), mps_fire::result, and surfaceDeformationIdPairs().

Referenced by AlignmentProducerBase::applyAlignmentsToGeometry(), compConstraintType(), and AlignmentProducerBase::writeForRunRange().

264 {
265 
266  typedef std::pair<int,SurfaceDeformation*> IdSurfaceDeformationPtrPair;
267 
268  std::vector<IdSurfaceDeformationPtrPair> result;
270  std::sort( result.begin(),
271  result.end(),
273 
274  AlignmentSurfaceDeformations* allSurfaceDeformations = new AlignmentSurfaceDeformations();
275 
276  for ( std::vector<IdSurfaceDeformationPtrPair>::const_iterator iPair = result.begin();
277  iPair != result.end();
278  ++iPair) {
279 
280  // should we check for 'empty' parameters here (all zeros) and skip ?
281  // may be add 'empty' method to SurfaceDeformation
282  allSurfaceDeformations->add((*iPair).first,
283  (*iPair).second->type(),
284  (*iPair).second->parameters());
285  }
286 
287  return allSurfaceDeformations;
288 
289 }
virtual int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const =0
bool add(align::ID rawId, int type, const std::vector< align::Scalar > &parameters)
Add a new item.
const SurveyDet* Alignable::survey ( ) const
inline
void Alignable::update ( align::ID  id,
const AlignableSurface surf 
)

Updater using id and surface. The given id has to match the current id.

Definition at line 50 of file Alignable.cc.

References Exception, GloballyPositioned< T >::position(), edm::shift, theDisplacement, theId, theRotation, theSurface, and updateMother().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), AlignableBeamSpot::reset(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), AlignableDetUnit::update(), AlignableComposite::update(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

51 {
52  if (theId != id) {
53  throw cms::Exception("Alignment")
54  << "@SUB=Alignable::update\n"
55  << "Current alignable ID does not match ID of the update.";
56  }
57  const auto shift = surf.position() - theSurface.position();
58  theSurface = surf;
59 
60  // reset displacement and rotations after update
63 
64  // recalculate containing composite's position
66 }
RotationType theRotation
Definition: Alignable.h:249
GlobalVector theDisplacement
Definition: Alignable.h:248
virtual void updateMother(const GlobalVector &shift)
Definition: Alignable.cc:352
align::RotationType RotationType
Definition: Alignable.h:34
static unsigned int const shift
align::GlobalVector GlobalVector
Definition: Alignable.h:35
align::ID theId
Definition: Alignable.h:244
const PositionType & position() const
AlignableSurface theSurface
Definition: Alignable.h:246
void Alignable::updateMother ( const GlobalVector shift)
protectedvirtual

Definition at line 352 of file Alignable.cc.

References compConstraintType(), deepComponents(), GloballyPositioned< T >::move(), NONE, POSITION, POSITION_Z, theMother, theSurface, and updateMother().

Referenced by update(), and updateMother().

352  {
353 
354  if (!theMother) return;
355 
356  const auto thisComps = this->deepComponents().size();
357  const auto motherComps = theMother->deepComponents().size();
358  const auto motherShift = shift * static_cast<Scalar>(thisComps) / motherComps;
359 
360  switch(theMother->compConstraintType()) {
362  break;
364  theMother->theSurface.move(GlobalVector(0,0, motherShift.z()));
365  theMother->updateMother(GlobalVector(0,0, motherShift.z()));
366  break;
368  theMother->theSurface.move(motherShift);
369  theMother->updateMother(motherShift);
370  break;
371  }
372 }
Alignable * theMother
Definition: Alignable.h:271
void move(const GlobalVector &displacement)
virtual void updateMother(const GlobalVector &shift)
Definition: Alignable.cc:352
const Alignables & deepComponents() const
Definition: Alignable.h:75
virtual CompConstraintType compConstraintType() const
Return the alignable type of contraints wrt. its components.
Definition: Alignable.h:192
align::Scalar Scalar
Definition: Alignable.h:32
align::GlobalVector GlobalVector
Definition: Alignable.h:35
AlignableSurface theSurface
Definition: Alignable.h:246

Member Data Documentation

CompConstraintType Alignable::compConstraintType_ {CompConstraintType::NONE}
protected
Cache<GlobalVector> Alignable::displacementsCache_
protected
Cache<RotationType> Alignable::rotationsCache_
protected
Cache<AlignableSurface> Alignable::surfacesCache_
protected
AlignmentParameters* Alignable::theAlignmentParameters
private

Definition at line 267 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 241 of file Alignable.h.

Referenced by geomDetId().

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

Definition at line 271 of file Alignable.h.

Referenced by mother(), setMother(), and updateMother().

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

Definition at line 273 of file Alignable.h.

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