23 theCachedSurface(surf),
24 theAlignmentParameters(0),
36 theAlignmentParameters(0),
52 bool isConsistent =
true;
53 bool hasAliComp =
false;
56 for (Alignables::const_iterator iComp = comps.begin(), iCompEnd = comps.end();
57 iComp != iCompEnd; ++iComp) {
58 if ((*iComp)->alignmentParameters()) {
59 paramComps.push_back(*iComp);
60 if (!first && !hasAliComp) isConsistent =
false;
63 const unsigned int nCompBefore = paramComps.size();
64 if (!(*iComp)->firstCompsWithParams(paramComps)) {
67 if (paramComps.size() != nCompBefore) {
68 if (!first && !hasAliComp) isConsistent =
false;
70 }
else if (hasAliComp) {
219 typedef std::pair<int,SurfaceDeformation*> IdSurfaceDeformationPtrPair;
221 std::vector<IdSurfaceDeformationPtrPair>
result;
229 for ( std::vector<IdSurfaceDeformationPtrPair>::const_iterator iPair = result.begin();
230 iPair != result.end();
235 allSurfaceDeformations->
add((*iPair).first,
236 (*iPair).second->type(),
237 (*iPair).second->parameters());
240 return allSurfaceDeformations;
261 for (
auto it = comps.begin(); it != comps.end(); ++it) {
262 (*it)->restoreCachedTransformation();
RotationType theCachedRotation
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
virtual void rotateAroundLocalAxis(const LocalVector &axis, Scalar radians)
Rotation around arbitratry local axis.
Alignable()
private default ctr. to enforce usage of the specialised ones
Sin< T >::type sin(const T &t)
const SurveyDet * survey() const
Return survey info.
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
virtual void rotateAroundGlobalAxis(const GlobalVector &axis, Scalar radians)
Rotation around arbitratry global axis.
virtual Alignables components() const =0
Return vector of all direct components.
GlobalVector theDisplacement
virtual void rotateAroundGlobalZ(Scalar radians)
Rotation around global z-axis.
const RotationType & rotation() const
Return change of orientation since the creation of the object.
AlignmentParameters * theAlignmentParameters
virtual int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const =0
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
Cos< T >::type cos(const T &t)
bool firstCompsWithParams(Alignables ¶mComps) const
AlignmentSurfaceDeformations * surfaceDeformations() const
Return surface deformations, sorted by DetId.
virtual void restoreCachedTransformation()
restore the previously cached transformation, also for possible components
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
AlignableSurface theCachedSurface
virtual void rotateAroundGlobalX(Scalar radians)
Rotation around global x-axis.
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
void setSurvey(const SurveyDet *)
Set survey info.
void addRotation(const RotationType &rotation)
align::RotationType RotationType
GlobalVector theCachedDisplacement
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
virtual void rotateAroundGlobalY(Scalar radians)
Rotation around global y-axis.
void addDisplacement(const GlobalVector &displacement)
virtual void cacheTransformation()
cache the current position, rotation and other parameters (e.g. surface deformations) ...
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
const BasicVectorType & basicVector() const
virtual ~Alignable()
Destructor.
const SurveyDet * theSurvey
align::Alignables Alignables
AlignableSurface theSurface