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) {
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();
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(
142 CLHEP::HepRep3x3(rot.
xx(), rot.
xy(), rot.
xz(), rot.
yx(), rot.
yy(), rot.
yz(), rot.
zx(), rot.
zy(), rot.
zz()));
148 m_alignments->
m_align.push_back(transform);
153 delete compAlignments;
164 CLHEP::HepSymMatrix clhepSymMatrix(6, 0);
168 m_alignmentErrors->
m_alignError.push_back(transformError);
175 delete compAlignmentErrs;
177 return m_alignmentErrors;
void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
void addAlignmentPositionErrorFromRotation(const RotationType &rotation, bool propagateDown) override
const edm::EventSetup & c
Alignments * alignments() const override
Return vector of alignment data.
AlignmentPositionError * theAlignmentPositionError
constexpr uint32_t rawId() const
get the raw id
const Alignables & components() const override
Return vector of direct components.
const RotationType & globalRotation() const
Return the global orientation of the object.
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
align::LocalVector LocalVector
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< AlignTransform > m_align
void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
const GlobalErrorExtended & globalError() const
void update(const GeomDetUnit *geomDetUnit)
~AlignableDet() override
Destructor.
Alignments * alignments() const override
Return alignment data.
DetId geographicalId() const
The label of this GeomDet.
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
void addAlignmentPositionErrorFromRotation(const RotationType &rot, bool propagateDown) override
const AlgebraicSymMatrix66 & matrix() const
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
std::vector< AlignTransformErrorExtended > m_alignError
AlignableDet(const GeomDet *geomDet, bool addComponents=true)
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
void update(const GeomDet *geomDet, bool updateComponents=true)
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
void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
Set the AlignmentPositionError and, if (propagateDown), to all components.
void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown) override
const BasicVectorType & basicVector() const
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
const DetId & geomDetId() const
void addComponent(Alignable *component) final
AlignableSurface theSurface
Basic3DVector unit() const