17 Alignable( geomDet->geographicalId().rawId(), geomDet->surface() ),
44 <<
"@SUB=AlignableComposite::update\n" 45 <<
"Trying to update with GeomDet* pointing to 'nullptr'.";
58 <<
"@SUB=AlignableComposite::update\n" 59 <<
"Current alignable type does not match type of the update.";
90 result.push_back(iter);
91 iter->recursiveComponents(result);
100 for (
const auto&
i: this->
components())
i->move(displacement);
113 this->
move( this->
surface().toGlobal(localDisplacement) );
123 <<
"AlignableComposite index (" << i <<
") out of range";
126 comp[
i]->move( this->
surface().toGlobal( localDisplacement ) );
143 for (
const auto&
i:
comp)
161 const GlobalVector localPositionVector =
i->globalPosition() - myPosition;
172 i->rotateInGlobalFrame(rotation);
190 if (!propagateDown)
return;
193 i->setAlignmentPositionError(ape, propagateDown);
206 if (!propagateDown)
return;
209 i->addAlignmentPositionError(ape, propagateDown);
221 if (!propagateDown)
return;
229 const GlobalVector localPositionVector =
i->globalPosition()-myPosition;
238 i->addAlignmentPositionError( ape, propagateDown );
239 i->addAlignmentPositionErrorFromRotation( rotation, propagateDown );
266 if (!propagateDown)
return;
269 i->setSurfaceDeformation(deformation, propagateDown);
279 if (!propagateDown)
return;
282 i->addSurfaceDeformation(deformation, propagateDown);
297 <<
" has " <<
comp.size() <<
" components" << std::endl
298 <<
" position = " << this->
globalPosition() <<
", orientation:" << std::endl
302 for (
const auto&
i:
comp)
i->dump();
316 std::unique_ptr<Alignments> tmpAlignments{
i->alignments()};
317 std::copy(tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(),
318 std::back_inserter(m_alignments->
m_align));
334 std::unique_ptr<AlignmentErrorsExtended> tmpAlignmentErrorsExtended{
i->alignmentErrors()};
335 std::copy(tmpAlignmentErrorsExtended->m_alignError.begin(), tmpAlignmentErrorsExtended->m_alignError.end(),
339 return m_alignmentErrors;
350 count +=
i->surfaceDeformationIdPairs(
result);
const Alignables & components() const override
Return vector of direct components.
void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
void addAlignmentPositionErrorFromRotation(const RotationType &rotation, bool propagateDown) override
void update(align::ID, const AlignableSurface &)
void setSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown) override
Set the surface deformation parameters - if (!propagateDown) do not affect daughters.
void rotateInGlobalFrame(const RotationType &rotation) override
Rotation interpreted in global reference frame.
AlignableComposite()
default constructor hidden
int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const override
Return surface deformations.
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
StructureType alignableObjectId() const override
Return the alignable type identifier.
void move(const GlobalVector &displacement)
const RotationType & globalRotation() const
Return the global orientation of the object.
void move(const GlobalVector &displacement) override
Move with respect to the global reference frame.
void addAlignmentPositionErrorFromLocalRotation(const RotationType &rotation, bool propagateDown) override
void recursiveComponents(Alignables &result) const override
Provide all components, subcomponents etc. (cf. description in base class)
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< AlignTransform > m_align
void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
uint32_t rawId() const
get the raw id
virtual void moveComponentsLocal(const LocalVector &localDisplacement)
Move with respect to the local reference frame.
const RotationType & rotation() const
Return change of orientation since the creation of the object.
StructureType theStructureType
Alignments * alignments() const override
Return alignment data.
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
DetId geographicalId() const
The label of this GeomDet.
virtual void moveComponentLocal(const int i, const LocalVector &localDisplacement)
Move a single component with respect to the local reference frame.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
void setMother(Alignable *mother)
Assign mother to alignable.
void addSurfaceDeformation(const SurfaceDeformation *deformation, bool propagateDown) override
const Alignables & deepComponents() const
std::vector< AlignTransformErrorExtended > m_alignError
void addRotation(const RotationType &rotation)
void addDisplacement(const GlobalVector &displacement)
~AlignableComposite() override
deleting its components
void rotate(const RotationType &rotation)
CompConstraintType compConstraintType_
const PositionType & globalPosition() const
Return the global position of the object.
void update(align::ID, StructureType aType, const RotationType &rot=RotationType())
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
const BasicVectorType & basicVector() const
align::Alignables Alignables
void addComponent(Alignable *component) final
AlignableSurface theSurface
int size() const
Return number of direct components.
Alignables theDeepComponents
void dump() const override
Recursive printout of alignable structure.