7 #include "CLHEP/Vector/RotationInterfaces.h" 16 Alignable(geomDetUnit->geographicalId().rawId(), geomDetUnit->surface()),
17 theAlignmentPositionError(
nullptr),
19 theCachedSurfaceDeformation(
nullptr)
49 <<
"@SUB=AlignableDetUnit::update\n" 50 <<
"Trying to update with GeomDetUnit* pointing to 'nullptr'.";
70 <<
"AlignableDetUnit cannot have components, but try to add one!";
169 edm::LogError(
"Alignment") <<
"@SUB=AlignableDetUnit::addSurfaceDeformation" 170 <<
"Cannot add deformation type " << deformation->
type()
172 <<
", so erase deformation information.";
183 parameters <<
" surface deformation parameters:";
185 parameters <<
" " << param;
188 parameters <<
" no surface deformation parameters";
193 <<
", orientation:" << std::endl << this->
globalRotation() << std::endl
194 <<
" total displacement and rotation: " << this->
displacement() << std::endl
208 CLHEP::HepRotation clhepRotation( CLHEP::HepRep3x3( rot.
xx(), rot.
xy(), rot.
xz(),
209 rot.
yx(), rot.
yy(), rot.
yz(),
210 rot.
zx(), rot.
zy(), rot.
zz() ) );
216 m_alignments->
m_align.push_back( transform );
231 CLHEP::HepSymMatrix clhepSymMatrix(6,0);
237 m_alignmentErrors->
m_alignError.push_back( transformError );
239 return m_alignmentErrors;
280 delete existingCache->second;
281 existingCache->second =
nullptr;
311 <<
"@SUB=Alignable::restoreCachedTransformation\n" 312 <<
"Trying to restore cached transformation for a run (" << run
313 <<
") that has not been cached.";
RotationType theCachedRotation
void dump() const override
Printout information about GeomDet.
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
void update(align::ID, const AlignableSurface &)
int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const override
Return surface deformations.
Cache< SurfaceDeformation * > surfaceDeformationsCache_
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
constexpr uint32_t rawId() const
get the raw id
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
void move(const GlobalVector &displacement)
const RotationType & globalRotation() const
Return the global orientation of the object.
Cache< GlobalVector > displacementsCache_
void setSurfaceDeformation(const SurfaceDeformation *deformation, bool) final
Set surface deformation parameters (2nd argument without effect)
Cache< AlignableSurface > surfacesCache_
Cache< RotationType > rotationsCache_
align::LocalVector LocalVector
const Plane & surface() const
The nominal surface of the GeomDet.
std::vector< AlignTransform > m_align
GlobalVector theDisplacement
SurfaceDeformation * theCachedSurfaceDeformation
static const Alignables emptyComponents_
const GlobalErrorExtended & globalError() const
void update(const GeomDetUnit *geomDetUnit)
Alignments * alignments() const override
Return vector of alignment data.
const RotationType & rotation() const
Return change of orientation since the creation of the object.
~AlignableDetUnit() override
Destructor.
AlignableDetUnit(const GeomDetUnit *geomDetUnit)
Constructor from GeomDetUnit - must not be NULL pointer!
void cacheTransformation() override
cache the current position, rotation and other parameters (e.g. surface deformations) ...
DetId geographicalId() const
The label of this GeomDet.
void addComponent(Alignable *) final
No components here => exception!
void setAlignmentPositionError(const AlignmentPositionError &ape, bool) final
Set the AlignmentPositionError (no components => second argument ignored)
void addAlignmentPositionError(const AlignmentPositionError &ape, bool) final
const AlgebraicSymMatrix66 & matrix() const
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
AlignableSurface theCachedSurface
std::vector< AlignTransformErrorExtended > m_alignError
void addRotation(const RotationType &rotation)
GlobalVector theCachedDisplacement
void addAlignmentPositionErrorFromRotation(const RotationType &rot, bool) final
void addDisplacement(const GlobalVector &displacement)
std::vector< Alignable * > Alignables
void addAlignmentPositionErrorFromLocalRotation(const RotationType &rot, bool) final
void rotate(const RotationType &rotation)
virtual const SurfaceDeformation * surfaceDeformation() const
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
AlignmentPositionError * theAlignmentPositionError
void addSurfaceDeformation(const SurfaceDeformation *deformation, bool) final
Add surface deformation parameters to the existing ones (2nd argument without effect) ...
const PositionType & globalPosition() const
Return the global position of the object.
void move(const GlobalVector &displacement) override
Move with respect to the global reference frame.
void rotateInGlobalFrame(const RotationType &rotation) override
Rotation with respect to the global reference frame.
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
const BasicVectorType & basicVector() const
SurfaceDeformation * theSurfaceDeformation
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
const DetId & geomDetId() const
AlignableSurface theSurface
Alignables theDeepComponents
cond::RealTimeType< cond::runnumber >::type RunNumber
void restoreCachedTransformation() override
restore the previously cached transformation