16 :
Alignable(geomDet->geographicalId().rawId(), geomDet->surface()), theStructureType(align::
AlignableDet) {
22 :
Alignable(id, rot), theStructureType(type) {
35 throw cms::Exception(
"Alignment") <<
"@SUB=AlignableComposite::update\n"
36 <<
"Trying to update with GeomDet* pointing to 'nullptr'.";
45 throw cms::Exception(
"Alignment") <<
"@SUB=AlignableComposite::update\n"
46 <<
"Current alignable type does not match type of the update.";
74 result.push_back(iter);
75 iter->recursiveComponents(result);
83 i->move(displacement);
92 this->
move(this->
surface().toGlobal(localDisplacement));
98 throw cms::Exception(
"LogicError") <<
"AlignableComposite index (" << i <<
") out of range";
101 comp[
i]->move(this->
surface().toGlobal(localDisplacement));
114 for (
const auto&
i :
comp) {
129 const GlobalVector localPositionVector =
i->globalPosition() - myPosition;
139 i->rotateInGlobalFrame(rotation);
155 i->setAlignmentPositionError(ape, propagateDown);
167 i->addAlignmentPositionError(ape, propagateDown);
185 const GlobalVector localPositionVector =
i->globalPosition() - myPosition;
194 i->addAlignmentPositionError(ape, propagateDown);
195 i->addAlignmentPositionErrorFromRotation(rotation, propagateDown);
220 i->setSurfaceDeformation(deformation, propagateDown);
232 i->addSurfaceDeformation(deformation, propagateDown);
244 <<
" components" << std::endl
245 <<
" position = " << this->
globalPosition() <<
", orientation:" << std::endl
249 for (
const auto&
i :
comp)
261 std::unique_ptr<Alignments> tmpAlignments{
i->alignments()};
262 std::copy(tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(), std::back_inserter(m_alignments->
m_align));
276 std::unique_ptr<AlignmentErrorsExtended> tmpAlignmentErrorsExtended{
i->alignmentErrors()};
277 std::copy(tmpAlignmentErrorsExtended->m_alignError.begin(),
278 tmpAlignmentErrorsExtended->m_alignError.end(),
282 return m_alignmentErrors;
291 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.
StructureType alignableObjectId() const override
Return the alignable type identifier.
AlignableComposite()
default constructor hidden
int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const override
Return surface deformations.
constexpr uint32_t rawId() const
get the raw id
const Alignables & components() const override
Return vector of direct components.
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
const Plane & surface() const
The nominal surface of the GeomDet.
void recursiveComponents(Alignables &result) const override
Provide all components, subcomponents etc. (cf. description in base class)
std::vector< AlignTransform > m_align
void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
virtual void moveComponentsLocal(const LocalVector &localDisplacement)
Move with respect to the local reference frame.
StructureType theStructureType
Alignments * alignments() const override
Return alignment data.
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 dump() const override
Recursive printout of alignable structure.
Log< level::Info, false > LogInfo
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)
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