4 #include "CLHEP/Vector/RotationInterfaces.h" 18 theAlignmentPositionError(0)
31 throw cms::Exception(
"BadHierarchy") <<
"[AlignableDet] GeomDet with DetId " 33 <<
" has no components, use AlignableDetUnit.\n";
35 const std::vector<const GeomDet*>& geomDets = geomDet->
components();
36 for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin();
37 idet != geomDets.end(); ++idet) {
41 <<
"[AlignableDet] component not GeomDetUnit, call with addComponents==false" 42 <<
" and build hierarchy yourself.\n";
72 if (updateComponents) {
75 <<
"[AlignableDet] GeomDet with DetId " 77 <<
" has no components, use AlignableDetUnit.\n";
80 for (
const auto& idet: geomDets) {
84 <<
"[AlignableDet] component not GeomDetUnit, call with " 85 <<
"updateComponents==false and build hierarchy yourself.\n";
92 [&
unit](
const auto&
c) {
93 return c->id() ==
unit->geographicalId().rawId(); });
101 <<
"[AlignableDet::update] cast to 'AlignableDetUnit*' failed " 102 <<
"while it should not\n";
106 <<
"[AlignableDet::update] GeomDet with DetId " 107 <<
unit->geographicalId().rawId()
108 <<
" not found in current geometry.\n";
174 CLHEP::HepRotation clhepRotation( CLHEP::HepRep3x3( rot.
xx(), rot.
xy(), rot.
xz(),
175 rot.
yx(), rot.
yy(), rot.
yz(),
176 rot.
zx(), rot.
zy(), rot.
zz() ) );
182 m_alignments->
m_align.push_back( transform );
187 std::back_inserter(m_alignments->
m_align));
188 delete compAlignments;
202 CLHEP::HepSymMatrix clhepSymMatrix(6,0);
206 m_alignmentErrors->
m_alignError.push_back( transformError );
212 delete compAlignmentErrs;
215 return m_alignmentErrors;
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
AlignmentPositionError * theAlignmentPositionError
virtual void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)
virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)
Set the AlignmentPositionError and, if (propagateDown), to all components.
virtual AlignmentErrorsExtended * alignmentErrors() const
Return vector of alignment errors.
virtual Alignments * alignments() const
Return vector of alignment data.
const RotationType & globalRotation() const
Return the global orientation of the object.
align::LocalVector LocalVector
virtual void setAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< AlignTransform > m_align
const GlobalErrorExtended & globalError() const
void update(const GeomDetUnit *geomDetUnit)
uint32_t rawId() const
get the raw id
virtual void addAlignmentPositionErrorFromRotation(const RotationType &rot, bool propagateDown)
DetId geographicalId() const
The label of this GeomDet.
virtual Alignments * alignments() const
Return alignment data.
const AlgebraicSymMatrix66 & matrix() const
virtual void addAlignmentPositionError(const AlignmentPositionError &ape, bool propagateDown)
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
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)
virtual void addAlignmentPositionErrorFromRotation(const RotationType &rotation, bool propagateDown)
CompConstraintType compConstraintType_
virtual Alignables components() const
Return vector of direct components.
const PositionType & globalPosition() const
Return the global position of the object.
void update(align::ID, StructureType aType, const RotationType &rot=RotationType())
virtual ~AlignableDet()
Destructor.
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
const BasicVectorType & basicVector() const
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
const DetId & geomDetId() const
virtual AlignmentErrorsExtended * alignmentErrors() const
Return vector of alignment errors.
AlignableSurface theSurface
virtual void addComponent(Alignable *component)