|
|
Go to the documentation of this file.
23 theCachedSurface(surf),
24 theAlignmentParameters(nullptr),
34 theAlignmentParameters(nullptr),
48 <<
"Current alignable ID does not match ID of the update.";
63 bool isConsistent =
true;
64 bool hasAliComp =
false;
67 for (
const auto& iComp : comps) {
68 if (iComp->alignmentParameters()) {
69 paramComps.push_back(iComp);
70 if (!
first && !hasAliComp)
74 const unsigned int nCompBefore = paramComps.size();
75 if (!(iComp->firstCompsWithParams(paramComps))) {
78 if (paramComps.size() != nCompBefore) {
79 if (!
first && !hasAliComp)
82 }
else if (hasAliComp) {
94 bool isConsistent =
true;
95 bool hasAliComp =
false;
98 for (
const auto& iComp : comps) {
99 const auto nCompsBefore = paramComps.size();
100 isConsistent = iComp->lastCompsWithParams(paramComps);
101 if (paramComps.size() == nCompsBefore) {
102 if (iComp->alignmentParameters()) {
103 paramComps.push_back(iComp);
104 if (!
first && !hasAliComp)
105 isConsistent =
false;
110 isConsistent =
false;
112 if (!
first && !hasAliComp)
113 isConsistent =
false;
197 typedef std::pair<int, SurfaceDeformation*> IdSurfaceDeformationPtrPair;
199 std::vector<IdSurfaceDeformationPtrPair>
result;
205 for (std::vector<IdSurfaceDeformationPtrPair>::const_iterator iPair =
result.begin(); iPair !=
result.end();
209 allSurfaceDeformations->add((*iPair).first, (*iPair).second->type(), (*iPair).second->parameters());
212 return allSurfaceDeformations;
223 it->cacheTransformation();
234 it->cacheTransformation(
run);
245 it->restoreCachedTransformation();
250 throw cms::Exception(
"Alignment") <<
"@SUB=Alignable::restoreCachedTransformation\n"
251 <<
"Trying to restore cached transformation for a run (" <<
run
252 <<
") that has not been cached.";
261 it->restoreCachedTransformation();
278 const auto motherShift =
shift * static_cast<Scalar>(thisComps) / motherComps;
GlobalVector theDisplacement
bool firstCompsWithParams(Alignables ¶mComps) const
align::Alignables Alignables
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
AlignableSurface theCachedSurface
virtual void rotateInGlobalFrame(const RotationType &rotation)=0
cond::RealTimeType< cond::runnumber >::type RunNumber
virtual void rotateAroundGlobalX(Scalar radians)
Rotation around global x-axis.
virtual int surfaceDeformationIdPairs(std::vector< std::pair< int, SurfaceDeformation * > > &) const =0
virtual void restoreCachedTransformation()
restore the previously cached transformation, also for possible components
virtual void rotateAroundLocalAxis(const LocalVector &axis, Scalar radians)
Rotation around arbitratry local axis.
Alignable()
private default ctr. to enforce usage of the specialised ones
align::GlobalVector GlobalVector
virtual void rotateAroundGlobalZ(Scalar radians)
Rotation around global z-axis.
AlignmentSurfaceDeformations * surfaceDeformations() const
Return surface deformations, sorted by DetId.
Sin< T >::type sin(const T &t)
Cache< AlignableSurface > surfacesCache_
void setSurvey(const SurveyDet *)
Set survey info.
Cos< T >::type cos(const T &t)
void update(align::ID, const AlignableSurface &)
virtual ~Alignable()
Destructor.
void addRotation(const RotationType &rotation)
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
bool lastCompsWithParams(Alignables ¶mComps) const
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
virtual void rotateAroundGlobalY(Scalar radians)
Rotation around global y-axis.
const SurveyDet * theSurvey
AlignmentParameters * theAlignmentParameters
Cache< GlobalVector > displacementsCache_
virtual void updateMother(const GlobalVector &shift)
const RotationType & rotation() const
Return change of orientation since the creation of the object.
virtual void rotateAroundGlobalAxis(const GlobalVector &axis, Scalar radians)
Rotation around arbitratry global axis.
align::RotationType RotationType
virtual void rotateAroundLocalZ(Scalar radians)
Rotation around local z-axis.
virtual void rotateInLocalFrame(const RotationType &rotation)
Rotation intepreted in the local reference frame.
void move(const GlobalVector &displacement)
AlignableSurface theSurface
RotationType theCachedRotation
virtual void rotateAroundLocalX(Scalar radians)
Rotation around local x-axis.
const BasicVectorType & basicVector() const
const PositionType & position() const
static unsigned const int shift
Cache< RotationType > rotationsCache_
const Alignables & deepComponents() const
virtual void rotateAroundLocalY(Scalar radians)
Rotation around local y-axis.
GlobalVector theCachedDisplacement
void addDisplacement(const GlobalVector &displacement)
virtual void cacheTransformation()
cache the current position, rotation and other parameters (e.g. surface deformations),...
const PositionType & globalPosition() const
Return the global position of the object.
virtual const Alignables & components() const =0
Return vector of all direct components.
const SurveyDet * survey() const
Return survey info.
virtual void recenterSurface()
Recenter surface object without moving possible components.
virtual CompConstraintType compConstraintType() const
Return the alignable type of contraints wrt. its components.