|
|
Go to the documentation of this file.
4 #include "CLHEP/Vector/RotationInterfaces.h"
28 <<
" has no components, use AlignableDetUnit.\n";
30 const std::vector<const GeomDet*>& geomDets = geomDet->
components();
31 for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin(); idet != geomDets.end(); ++idet) {
35 <<
"[AlignableDet] component not GeomDetUnit, call with addComponents==false"
36 <<
" and build hierarchy yourself.\n";
58 if (updateComponents) {
61 <<
" has no components, use AlignableDetUnit.\n";
64 for (
const auto& idet : geomDets) {
65 auto unit = dynamic_cast<const GeomDetUnit*>(idet);
67 throw cms::Exception(
"BadHierarchy") <<
"[AlignableDet] component not GeomDetUnit, call with "
68 <<
"updateComponents==false and build hierarchy yourself.\n";
74 return c->id() ==
unit->geographicalId().rawId();
78 auto aliDetUnit = dynamic_cast<AlignableDetUnit*>(*
comp);
80 aliDetUnit->update(
unit);
82 throw cms::Exception(
"LogicError") <<
"[AlignableDet::update] cast to 'AlignableDetUnit*' failed "
83 <<
"while it should not\n";
87 <<
"[AlignableDet::update] GeomDet with DetId " <<
unit->geographicalId().rawId()
88 <<
" not found in current geometry.\n";
141 CLHEP::HepRotation clhepRotation(
153 delete compAlignments;
164 CLHEP::HepSymMatrix clhepSymMatrix(6, 0);
168 m_alignmentErrors->
m_alignError.push_back(transformError);
175 delete compAlignmentErrs;
177 return m_alignmentErrors;
Alignments * alignments() const override
Return alignment data.
void addAlignmentPositionErrorFromRotation(const RotationType &rot, bool propagateDown) override
const Alignables & components() const override
Return vector of direct components.
AlignmentPositionError * theAlignmentPositionError
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
Set the AlignmentPositionError and, if (propagateDown), to all components.
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
void addAlignmentPositionErrorFromRotation(const RotationType &rotation, bool propagateDown) override
const Plane & surface() const
The nominal surface of the GeomDet.
const GlobalErrorExtended & globalError() const
CompConstraintType compConstraintType_
void addComponent(Alignable *component) final
void update(align::ID, StructureType aType, const RotationType &rot=RotationType())
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Alignments * alignments() const override
Return vector of alignment data.
void update(const GeomDet *geomDet, bool updateComponents=true)
DetId geographicalId() const
The label of this GeomDet.
AlignableDet(const GeomDet *geomDet, bool addComponents=true)
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
const DetId & geomDetId() const
AlignableSurface theSurface
const BasicVectorType & basicVector() const
Basic3DVector unit() const
~AlignableDet() override
Destructor.
constexpr uint32_t rawId() const
get the raw id
void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
const AlgebraicSymMatrix66 & matrix() const
std::vector< AlignTransform > m_align
std::vector< AlignTransformErrorExtended > m_alignError
const PositionType & globalPosition() const
Return the global position of the object.
void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
align::LocalVector LocalVector
void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
const RotationType & globalRotation() const
Return the global orientation of the object.