4 #include "CLHEP/Vector/RotationInterfaces.h" 17 theAlignmentPositionError(
nullptr)
30 throw cms::Exception(
"BadHierarchy") <<
"[AlignableDet] GeomDet with DetId " 32 <<
" has no components, use AlignableDetUnit.\n";
34 const std::vector<const GeomDet*>& geomDets = geomDet->
components();
35 for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin();
36 idet != geomDets.end(); ++idet) {
40 <<
"[AlignableDet] component not GeomDetUnit, call with addComponents==false" 41 <<
" and build hierarchy yourself.\n";
71 if (updateComponents) {
74 <<
"[AlignableDet] GeomDet with DetId " 76 <<
" has no components, use AlignableDetUnit.\n";
79 for (
const auto& idet: geomDets) {
83 <<
"[AlignableDet] component not GeomDetUnit, call with " 84 <<
"updateComponents==false and build hierarchy yourself.\n";
91 [&
unit](
const auto&
c) {
92 return c->id() ==
unit->geographicalId().rawId(); });
100 <<
"[AlignableDet::update] cast to 'AlignableDetUnit*' failed " 101 <<
"while it should not\n";
105 <<
"[AlignableDet::update] GeomDet with DetId " 106 <<
unit->geographicalId().rawId()
107 <<
" not found in current geometry.\n";
173 CLHEP::HepRotation clhepRotation( CLHEP::HepRep3x3( rot.
xx(), rot.
xy(), rot.
xz(),
174 rot.
yx(), rot.
yy(), rot.
yz(),
175 rot.
zx(), rot.
zy(), rot.
zz() ) );
181 m_alignments->
m_align.push_back( transform );
186 std::back_inserter(m_alignments->
m_align));
187 delete compAlignments;
201 CLHEP::HepSymMatrix clhepSymMatrix(6,0);
205 m_alignmentErrors->
m_alignError.push_back( transformError );
211 delete compAlignmentErrs;
214 return m_alignmentErrors;
const Alignables & components() const override
Return vector of direct components.
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
AlignmentPositionError * theAlignmentPositionError
const RotationType & globalRotation() const
Return the global orientation of the object.
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
const GlobalErrorExtended & globalError() const
void update(const GeomDetUnit *geomDetUnit)
uint32_t rawId() const
get the raw id
~AlignableDet() override
Destructor.
Alignments * alignments() const override
Return alignment data.
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
DetId geographicalId() const
The label of this GeomDet.
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.
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
std::vector< AlignTransformErrorExtended > m_alignError
Alignments * alignments() const override
Return vector of alignment data.
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)
CompConstraintType compConstraintType_
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
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