15 Alignable( geomDet->geographicalId().rawId(), geomDet->surface() ),
42 <<
"@SUB=AlignableComposite::update\n" 43 <<
"Trying to update with GeomDet* pointing to 'nullptr'.";
56 <<
"@SUB=AlignableComposite::update\n" 57 <<
"Current alignable type does not match type of the update.";
84 && components.size() <= 1) {
87 for (Alignables::const_iterator iter = components.begin();
88 iter != components.end(); ++iter) {
89 result.push_back(*iter);
90 (*iter)->recursiveComponents(result);
100 for ( Alignables::iterator
i=comp.begin();
i!=comp.end(); ++
i )
101 (**i).move( displacement);
114 this->
move( this->
surface().toGlobal(localDisplacement) );
124 <<
"AlignableComposite index (" << i <<
") out of range";
127 comp[
i]->move( this->
surface().toGlobal( localDisplacement ) );
144 for ( Alignables::iterator
i=comp.begin();
i!=comp.end(); ++
i )
162 const GlobalVector localPositionVector = (**i).globalPosition() - myPosition;
172 (**i).move( moveVector );
173 (**i).rotateInGlobalFrame( rotation );
191 if (!propagateDown)
return;
194 for (Alignables::const_iterator
i = comp.begin();
i != comp.end(); ++
i) {
195 (*i)->setAlignmentPositionError(ape, propagateDown);
208 if (!propagateDown)
return;
211 for (Alignables::const_iterator
i = comp.begin();
i != comp.end(); ++
i) {
212 (*i)->addAlignmentPositionError(ape, propagateDown);
226 if (!propagateDown)
return;
231 for ( Alignables::const_iterator
i=comp.begin();
i!=comp.end(); ++
i )
237 const GlobalVector localPositionVector = (**i).globalPosition()-myPosition;
246 (*i)->addAlignmentPositionError( ape, propagateDown );
247 (*i)->addAlignmentPositionErrorFromRotation( rotation, propagateDown );
276 if (!propagateDown)
return;
279 for (Alignables::const_iterator
i = comp.begin();
i != comp.end(); ++
i) {
280 (*i)->setSurfaceDeformation(deformation, propagateDown);
290 if (!propagateDown)
return;
293 for (Alignables::const_iterator
i = comp.begin();
i != comp.end(); ++
i) {
294 (*i)->addSurfaceDeformation(deformation, propagateDown);
309 <<
" has " << comp.size() <<
" components" << std::endl
310 <<
" position = " << this->
globalPosition() <<
", orientation:" << std::endl
314 for ( Alignables::iterator
i=comp.begin();
i!=comp.end(); ++
i )
331 for ( Alignables::iterator
i=comp.begin();
i!=comp.end(); ++
i )
333 Alignments* tmpAlignments = (*i)->alignments();
335 std::back_inserter(m_alignments->
m_align) );
336 delete tmpAlignments;
355 for ( Alignables::iterator
i=comp.begin();
i!=comp.end(); ++
i )
360 delete tmpAlignmentErrorsExtended;
364 return m_alignmentErrors;
378 for ( Alignables::iterator
i=comp.begin();
i!=comp.end(); ++
i) {
379 count += (*i)->surfaceDeformationIdPairs(
result);
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
void addComponent(Alignable *component) 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.
Alignables components() const override
Return vector of direct components.
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
AlignableSurface theSurface
int size() const
Return number of direct components.
Alignables theDeepComponents
void dump() const override
Recursive printout of alignable structure.