7 #include "CLHEP/Vector/RotationInterfaces.h" 17 Alignable(geomDetUnit->geographicalId().
rawId(), geomDetUnit->surface()),
18 theAlignmentPositionError(nullptr),
19 theSurfaceDeformation(nullptr),
20 theCachedSurfaceDeformation(nullptr) {
46 throw cms::Exception(
"Alignment") <<
"@SUB=AlignableDetUnit::update\n" 47 <<
"Trying to update with GeomDetUnit* pointing to 'nullptr'.";
65 throw cms::Exception(
"LogicError") <<
"AlignableDetUnit cannot have components, but try to add one!";
133 edm::LogError(
"Alignment") <<
"@SUB=AlignableDetUnit::addSurfaceDeformation" 134 <<
"Cannot add deformation type " << deformation->
type() <<
" to type " 145 parameters <<
" surface deformation parameters:";
150 parameters <<
" no surface deformation parameters";
154 <<
", orientation:" << std::endl
156 <<
" total displacement and rotation: " << this->
displacement() << std::endl
168 CLHEP::HepRotation clhepRotation(
186 CLHEP::HepSymMatrix clhepSymMatrix(6, 0);
192 m_alignmentErrors->
m_alignError.push_back(transformError);
194 return m_alignmentErrors;
230 delete existingCache->second;
231 existingCache->second =
nullptr;
258 throw cms::Exception(
"Alignment") <<
"@SUB=Alignable::restoreCachedTransformation\n" 259 <<
"Trying to restore cached transformation for a run (" <<
run 260 <<
") that has not been cached.";
align::GlobalPoints toGlobal(const align::LocalPoints &) const
Return in global coord given a set of local points.
const AlgebraicSymMatrix66 & matrix() const
void dump() const override
Printout information about GeomDet.
RotationType theCachedRotation
CLHEP::HepMatrix asHepMatrix(const ROOT::Math::SMatrix< double, N1, N2, typename ROOT::Math::MatRepStd< double, N1, N2 > > &rm)
void update(align::ID, const AlignableSurface &)
AlignmentErrorsExtended * alignmentErrors() const override
Return vector of alignment errors.
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Cache< SurfaceDeformation * > surfaceDeformationsCache_
void move(const GlobalVector &displacement)
Cache< GlobalVector > displacementsCache_
void setSurfaceDeformation(const SurfaceDeformation *deformation, bool) final
Set surface deformation parameters (2nd argument without effect)
Cache< AlignableSurface > surfacesCache_
Log< level::Error, false > LogError
Cache< RotationType > rotationsCache_
align::LocalVector LocalVector
std::vector< AlignTransform > m_align
GlobalVector theDisplacement
SurfaceDeformation * theCachedSurfaceDeformation
static const Alignables emptyComponents_
void update(const GeomDetUnit *geomDetUnit)
const PositionType & globalPosition() const
Return the global position of the object.
~AlignableDetUnit() override
Destructor.
int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation *> > &) const override
Return surface deformations.
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) ...
AlignmentPositionError const * alignmentPositionError() const
Return pointer to alignment errors.
void addComponent(Alignable *) final
No components here => exception!
void setAlignmentPositionError(const AlignmentPositionError &ape, bool) final
Set the AlignmentPositionError (no components => second argument ignored)
DetId geographicalId() const
The label of this GeomDet.
void addAlignmentPositionError(const AlignmentPositionError &ape, bool) final
const BasicVectorType & basicVector() const
Log< level::Info, false > LogInfo
AlignableSurface theCachedSurface
const Plane & surface() const
The nominal surface of the GeomDet.
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
std::vector< AlignTransformErrorExtended > m_alignError
const DetId & geomDetId() const
constexpr uint32_t rawId() const
get the raw id
void addRotation(const RotationType &rotation)
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
GlobalVector theCachedDisplacement
const GlobalErrorExtended & globalError() const
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)
AlignmentPositionError * theAlignmentPositionError
void addSurfaceDeformation(const SurfaceDeformation *deformation, bool) final
Add surface deformation parameters to the existing ones (2nd argument without effect) ...
const RotationType & globalRotation() const
Return the global orientation of the object.
virtual const SurfaceDeformation * surfaceDeformation() const
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.
Alignments * alignments() const override
Return vector of alignment data.
SurfaceDeformation * theSurfaceDeformation
AlignableSurface theSurface
Alignables theDeepComponents
cond::RealTimeType< cond::runnumber >::type RunNumber
void restoreCachedTransformation() override
restore the previously cached transformation
const RotationType & rotation() const
Return change of orientation since the creation of the object.