CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
AlignableComposite Class Reference

#include <AlignableComposite.h>

Inheritance diagram for AlignableComposite:
Alignable AlignableCSCEndcap AlignableCSCRing AlignableCSCStation AlignableDet AlignableDTBarrel AlignableDTStation AlignableDTWheel AlignableGEMEndcap AlignableGEMRing AlignableGEMStation AlignableMuon AlignableTracker

Public Member Functions

void addAlignmentPositionError (const AlignmentPositionError &ape, bool propagateDown) override
 
void addAlignmentPositionErrorFromLocalRotation (const RotationType &rotation, bool propagateDown) override
 
void addAlignmentPositionErrorFromRotation (const RotationType &rotation, bool propagateDown) override
 
void addComponent (Alignable *component) final
 
void addSurfaceDeformation (const SurfaceDeformation *deformation, bool propagateDown) override
 
 AlignableComposite (align::ID id, StructureType aType, const RotationType &rot=RotationType())
 
StructureType alignableObjectId () const override
 Return the alignable type identifier. More...
 
AlignmentErrorsExtendedalignmentErrors () const override
 Return vector of alignment errors. More...
 
Alignmentsalignments () const override
 Return alignment data. More...
 
const Alignablescomponents () const override
 Return vector of direct components. More...
 
void dump () const override
 Recursive printout of alignable structure. More...
 
void move (const GlobalVector &displacement) override
 Move with respect to the global reference frame. More...
 
virtual void moveComponentLocal (const int i, const LocalVector &localDisplacement)
 Move a single component with respect to the local reference frame. More...
 
virtual void moveComponentsLocal (const LocalVector &localDisplacement)
 Move with respect to the local reference frame. More...
 
void recursiveComponents (Alignables &result) const override
 Provide all components, subcomponents etc. (cf. description in base class) More...
 
void rotateInGlobalFrame (const RotationType &rotation) override
 Rotation interpreted in global reference frame. More...
 
void setAlignmentPositionError (const AlignmentPositionError &ape, bool propagateDown) override
 
void setSurfaceDeformation (const SurfaceDeformation *deformation, bool propagateDown) override
 Set the surface deformation parameters - if (!propagateDown) do not affect daughters. More...
 
int surfaceDeformationIdPairs (std::vector< std::pair< int, SurfaceDeformation * > > &) const override
 Return surface deformations. More...
 
void update (align::ID, StructureType aType, const RotationType &rot=RotationType())
 
template<class T >
void update (T)=delete
 
 ~AlignableComposite () override
 deleting its components More...
 
- Public Member Functions inherited from Alignable
 Alignable (align::ID, const AlignableSurface &)
 
 Alignable (align::ID, const RotationType &)
 
AlignmentParametersalignmentParameters () const
 Get the AlignmentParameters. More...
 
virtual void cacheTransformation ()
 cache the current position, rotation and other parameters (e.g. surface deformations), also for possible components More...
 
virtual void cacheTransformation (const align::RunNumber &)
 
virtual CompConstraintType compConstraintType () const
 Return the alignable type of contraints wrt. its components. More...
 
const AlignablesdeepComponents () const
 
const GlobalVectordisplacement () const
 Return change of the global position since the creation of the object. More...
 
bool firstCompsWithParams (Alignables &paramComps) const
 
const DetIdgeomDetId () const
 
const PositionTypeglobalPosition () const
 Return the global position of the object. More...
 
const RotationTypeglobalRotation () const
 Return the global orientation of the object. More...
 
align::ID id () const
 Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit). More...
 
bool lastCompsWithParams (Alignables &paramComps) const
 
Alignablemother () const
 Return pointer to container alignable (if any) More...
 
virtual void recenterSurface ()
 Recenter surface object without moving possible components. More...
 
virtual void restoreCachedTransformation ()
 restore the previously cached transformation, also for possible components More...
 
virtual void restoreCachedTransformation (const align::RunNumber &)
 
virtual void rotateAroundGlobalAxis (const GlobalVector &axis, Scalar radians)
 Rotation around arbitratry global axis. More...
 
virtual void rotateAroundGlobalX (Scalar radians)
 Rotation around global x-axis. More...
 
virtual void rotateAroundGlobalY (Scalar radians)
 Rotation around global y-axis. More...
 
virtual void rotateAroundGlobalZ (Scalar radians)
 Rotation around global z-axis. More...
 
virtual void rotateAroundLocalAxis (const LocalVector &axis, Scalar radians)
 Rotation around arbitratry local axis. More...
 
virtual void rotateAroundLocalX (Scalar radians)
 Rotation around local x-axis. More...
 
virtual void rotateAroundLocalY (Scalar radians)
 Rotation around local y-axis. More...
 
virtual void rotateAroundLocalZ (Scalar radians)
 Rotation around local z-axis. More...
 
virtual void rotateInLocalFrame (const RotationType &rotation)
 Rotation intepreted in the local reference frame. More...
 
const RotationTyperotation () const
 Return change of orientation since the creation of the object. More...
 
void setAlignmentParameters (AlignmentParameters *dap)
 Set the AlignmentParameters. More...
 
void setMother (Alignable *mother)
 Assign mother to alignable. More...
 
void setSurvey (const SurveyDet *)
 Set survey info. More...
 
int size () const
 Return number of direct components. More...
 
const AlignableSurfacesurface () const
 Return the Surface (global position and orientation) of the object. More...
 
AlignmentSurfaceDeformationssurfaceDeformations () const
 Return surface deformations, sorted by DetId. More...
 
const SurveyDetsurvey () const
 Return survey info. More...
 
void update (align::ID, const AlignableSurface &)
 
virtual ~Alignable ()
 Destructor. More...
 

Protected Member Functions

 AlignableComposite (const GeomDet *geomDet)
 Constructor from GeomDet, only for use in AlignableDet. More...
 
void setSurface (const AlignableSurface &s)
 
void update (const GeomDet *geomDet)
 
- Protected Member Functions inherited from Alignable
void addDisplacement (const GlobalVector &displacement)
 
void addRotation (const RotationType &rotation)
 
virtual void updateMother (const GlobalVector &shift)
 

Protected Attributes

StructureType theStructureType
 
- Protected Attributes inherited from Alignable
CompConstraintType compConstraintType_ {CompConstraintType::NONE}
 
Cache< GlobalVectordisplacementsCache_
 
Cache< RotationTyperotationsCache_
 
Cache< AlignableSurfacesurfacesCache_
 
GlobalVector theCachedDisplacement
 
RotationType theCachedRotation
 
AlignableSurface theCachedSurface
 
Alignables theDeepComponents
 
DetId theDetId
 
GlobalVector theDisplacement
 
align::ID theId
 
RotationType theRotation
 
AlignableSurface theSurface
 

Private Member Functions

 AlignableComposite ()
 default constructor hidden More...
 

Private Attributes

Alignables theComponents
 

Additional Inherited Members

- Public Types inherited from Alignable
typedef align::Alignables Alignables
 
enum  CompConstraintType { CompConstraintType::NONE, CompConstraintType::POSITION, CompConstraintType::POSITION_Z }
 
typedef align::GlobalVector GlobalVector
 
typedef align::LocalVector LocalVector
 
typedef align::PositionType PositionType
 
typedef align::RotationType RotationType
 
typedef align::Scalar Scalar
 
typedef align::StructureType StructureType
 
- Protected Types inherited from Alignable
template<class T >
using Cache = std::map< align::RunNumber, T >
 

Detailed Description

Definition at line 25 of file AlignableComposite.h.

Constructor & Destructor Documentation

◆ AlignableComposite() [1/3]

AlignableComposite::AlignableComposite ( align::ID  id,
StructureType  aType,
const RotationType rot = RotationType() 
)

Constructor for a composite with given rotation. Position can be found from average of daughters' positions later, using addComponent(Alignable*).

Definition at line 21 of file AlignableComposite.cc.

References Alignable::compConstraintType_, and Alignable::POSITION.

◆ ~AlignableComposite()

AlignableComposite::~AlignableComposite ( )
override

deleting its components

Definition at line 27 of file AlignableComposite.cc.

27  {
28  for (unsigned int i = 0; i < theComponents.size(); ++i)
29  delete theComponents[i];
30 }

References mps_fire::i, and theComponents.

◆ AlignableComposite() [2/3]

AlignableComposite::AlignableComposite ( const GeomDet geomDet)
explicitprotected

Constructor from GeomDet, only for use in AlignableDet.

Definition at line 15 of file AlignableComposite.cc.

References Alignable::compConstraintType_, and Alignable::POSITION.

◆ AlignableComposite() [3/3]

AlignableComposite::AlignableComposite ( )
inlineprivate

default constructor hidden

Definition at line 118 of file AlignableComposite.h.

118 : Alignable(0, RotationType()){};

Member Function Documentation

◆ addAlignmentPositionError()

void AlignableComposite::addAlignmentPositionError ( const AlignmentPositionError ape,
bool  propagateDown 
)
overridevirtual

Add the AlignmentPositionError (if this Alignable is a Det) and, if (propagateDown), add to all the components of the composite

Implements Alignable.

Reimplemented in AlignableDet.

Definition at line 160 of file AlignableComposite.cc.

160  {
161  // Since no geomDet is attached, alignable composites do not have an APE
162  // The APE is, therefore, just propagated down
163  if (!propagateDown)
164  return;
165 
166  for (const auto& i : this->components()) {
167  i->addAlignmentPositionError(ape, propagateDown);
168  }
169 }

References components(), and mps_fire::i.

Referenced by AlignableDet::addAlignmentPositionError().

◆ addAlignmentPositionErrorFromLocalRotation()

void AlignableComposite::addAlignmentPositionErrorFromLocalRotation ( const RotationType rot,
bool  propagateDown 
)
overridevirtual

Add the AlignmentPositionError resulting from local rotation (if this Alignable is a Det) and, if (propagateDown), add to all the components of the composite

Adds the AlignmentPositionError (in x,y,z coordinates) that would result on the various components from a possible Rotation of a composite the rotation matrix is in interpreted in LOCAL coordinates of the composite

Implements Alignable.

Definition at line 203 of file AlignableComposite.cc.

203  {
204  // if (!propagateDown) return; // No! Cannot yet jump out since
205  // addAlignmentPositionErrorFromRotation(..) below might be overwritten in derived
206  // classes to do something on 'this' (and in fact does so in AlignableDet).
207 
209  this->addAlignmentPositionErrorFromRotation(globalRot, propagateDown);
210 }

References addAlignmentPositionErrorFromRotation(), Alignable::globalRotation(), TkRotation< T >::multiplyInverse(), and makeMuonMisalignmentScenario::rot.

◆ addAlignmentPositionErrorFromRotation()

void AlignableComposite::addAlignmentPositionErrorFromRotation ( const RotationType rotation,
bool  propagateDown 
)
overridevirtual

Add the AlignmentPositionError resulting from global rotation (if this Alignable is a Det) and, if (propagateDown), add to all the components of the composite

Adds the AlignmentPositionError (in x,y,z coordinates) that would result on the various components from a possible Rotation of a composite the rotation matrix is in interpreted in GLOBAL coordinates

Implements Alignable.

Reimplemented in AlignableDet.

Definition at line 175 of file AlignableComposite.cc.

175  {
176  if (!propagateDown)
177  return;
178 
179  PositionType myPosition = this->globalPosition();
180 
181  for (const auto& i : this->components()) {
182  // It is just similar to to the "movement" that results to the components
183  // when the composite is rotated.
184  // Local Position given in coordinates of the GLOBAL Frame
185  const GlobalVector localPositionVector = i->globalPosition() - myPosition;
186  const GlobalVector::BasicVectorType& lpvgf = localPositionVector.basicVector();
187 
188  // rotate with GLOBAL rotation matrix and subtract => moveVector in global coordinates
189  // apparently... you have to use the inverse of the rotation here
190  // (rotate the VECTOR rather than the frame)
191  GlobalVector moveVector(rotation.multiplyInverse(lpvgf) - lpvgf);
192 
193  AlignmentPositionError ape(moveVector.x(), moveVector.y(), moveVector.z());
194  i->addAlignmentPositionError(ape, propagateDown);
195  i->addAlignmentPositionErrorFromRotation(rotation, propagateDown);
196  }
197 }

References PV3DBase< T, PVType, FrameType >::basicVector(), components(), Alignable::globalPosition(), mps_fire::i, TkRotation< T >::multiplyInverse(), and Alignable::rotation().

Referenced by addAlignmentPositionErrorFromLocalRotation(), and AlignableDet::addAlignmentPositionErrorFromRotation().

◆ addComponent()

void AlignableComposite::addComponent ( Alignable component)
finalvirtual

Add a component and set its mother to this alignable. (Note: The component will be adopted, e.g. later deleted.) Also find average position of this composite from its modules' positions.

Implements Alignable.

Definition at line 53 of file AlignableComposite.cc.

53  {
54  const auto& newComps = ali->deepComponents();
55 
56  theDeepComponents.insert(theDeepComponents.end(), newComps.begin(), newComps.end());
57 
58  Scalar k = static_cast<Scalar>(newComps.size()) / theDeepComponents.size();
59 
60  theSurface.move((ali->globalPosition() - globalPosition()) * k);
61 
62  ali->setMother(this);
63  theComponents.push_back(ali);
64 }

References Alignable::deepComponents(), Alignable::globalPosition(), dqmdumpme::k, GloballyPositioned< T >::move(), Alignable::setMother(), theComponents, Alignable::theDeepComponents, and Alignable::theSurface.

Referenced by AlignableCSCEndcap::AlignableCSCEndcap(), AlignableCSCRing::AlignableCSCRing(), AlignableCSCStation::AlignableCSCStation(), AlignableDet::AlignableDet(), AlignableDTBarrel::AlignableDTBarrel(), AlignableDTChamber::AlignableDTChamber(), AlignableDTStation::AlignableDTStation(), AlignableDTWheel::AlignableDTWheel(), AlignableGEMEndcap::AlignableGEMEndcap(), AlignableGEMRing::AlignableGEMRing(), AlignableGEMStation::AlignableGEMStation(), AlignableGEMSuperChamber::AlignableGEMSuperChamber(), AlignableTrackerBuilder::buildPixelDetector(), and AlignableTrackerBuilder::buildStripDetector().

◆ addSurfaceDeformation()

void AlignableComposite::addSurfaceDeformation ( const SurfaceDeformation deformation,
bool  propagateDown 
)
overridevirtual

Add the surface deformation parameters to the existing ones, if (!propagateDown) do not affect daughters.

Implements Alignable.

Definition at line 225 of file AlignableComposite.cc.

225  {
226  // Only DetUnits have surface deformations.
227  // The parameters are, therefore, just propagated down.
228  if (!propagateDown)
229  return;
230 
231  for (const auto& i : this->components()) {
232  i->addSurfaceDeformation(deformation, propagateDown);
233  }
234 }

References components(), and mps_fire::i.

◆ alignableObjectId()

StructureType AlignableComposite::alignableObjectId ( ) const
inlineoverridevirtual

Return the alignable type identifier.

Implements Alignable.

Definition at line 86 of file AlignableComposite.h.

86 { return theStructureType; }

References theStructureType.

Referenced by dump(), and recursiveComponents().

◆ alignmentErrors()

AlignmentErrorsExtended * AlignableComposite::alignmentErrors ( void  ) const
overridevirtual

Return vector of alignment errors.

Implements Alignable.

Reimplemented in AlignableMuon, AlignableTracker, AlignableCSCEndcap, AlignableDTBarrel, AlignableDet, and AlignableGEMEndcap.

Definition at line 269 of file AlignableComposite.cc.

269  {
270  // Recursively call alignmentsErrors, until we get to an AlignableDetUnit
271 
272  AlignmentErrorsExtended* m_alignmentErrors = new AlignmentErrorsExtended();
273 
274  // Add components recursively
275  for (const auto& i : this->components()) {
276  std::unique_ptr<AlignmentErrorsExtended> tmpAlignmentErrorsExtended{i->alignmentErrors()};
277  std::copy(tmpAlignmentErrorsExtended->m_alignError.begin(),
278  tmpAlignmentErrorsExtended->m_alignError.end(),
279  std::back_inserter(m_alignmentErrors->m_alignError));
280  }
281 
282  return m_alignmentErrors;
283 }

References components(), filterCSVwithJSON::copy, mps_fire::i, and AlignmentErrorsExtended::m_alignError.

Referenced by AlignableDet::alignmentErrors().

◆ alignments()

Alignments * AlignableComposite::alignments ( void  ) const
overridevirtual

Return alignment data.

Implements Alignable.

Reimplemented in AlignableMuon, AlignableTracker, AlignableCSCEndcap, AlignableDTBarrel, AlignableDet, AlignableGEMEndcap, and AlignableSiStripDet.

Definition at line 254 of file AlignableComposite.cc.

254  {
255  // Recursively call alignments, until we get to an AlignableDetUnit
256 
257  Alignments* m_alignments = new Alignments();
258 
259  // Add components recursively
260  for (const auto& i : this->components()) {
261  std::unique_ptr<Alignments> tmpAlignments{i->alignments()};
262  std::copy(tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(), std::back_inserter(m_alignments->m_align));
263  }
264 
265  return m_alignments;
266 }

References components(), filterCSVwithJSON::copy, mps_fire::i, and Alignments::m_align.

Referenced by AlignableDet::alignments().

◆ components()

const Alignables& AlignableComposite::components ( ) const
inlineoverridevirtual

◆ dump()

void AlignableComposite::dump ( void  ) const
overridevirtual

Recursive printout of alignable structure.

Implements Alignable.

Reimplemented in AlignableCSCRing, AlignableCSCStation, AlignableCSCEndcap, AlignableDTBarrel, AlignableDTStation, AlignableDTWheel, AlignableGEMStation, AlignableGEMEndcap, and AlignableGEMRing.

Definition at line 237 of file AlignableComposite.cc.

237  {
238  // A simple printout method. Could be specialized in the implementation classes.
239 
240  const auto& comp = this->components();
241 
242  // Dump this
243  edm::LogInfo("AlignableDump") << " Alignable of type " << this->alignableObjectId() << " has " << comp.size()
244  << " components" << std::endl
245  << " position = " << this->globalPosition() << ", orientation:" << std::endl
246  << this->globalRotation();
247 
248  // Dump components
249  for (const auto& i : comp)
250  i->dump();
251 }

References alignableObjectId(), AlCaHLTBitMon_QueryRunRegistry::comp, components(), Alignable::globalPosition(), Alignable::globalRotation(), and mps_fire::i.

◆ move()

void AlignableComposite::move ( const GlobalVector displacement)
overridevirtual

Move with respect to the global reference frame.

Implements Alignable.

Definition at line 80 of file AlignableComposite.cc.

80  {
81  // Move components
82  for (const auto& i : this->components())
83  i->move(displacement);
84 
85  // Move surface
86  this->addDisplacement(displacement);
88 }

References Alignable::addDisplacement(), components(), Alignable::displacement(), mps_fire::i, GloballyPositioned< T >::move(), and Alignable::theSurface.

Referenced by moveComponentsLocal().

◆ moveComponentLocal()

void AlignableComposite::moveComponentLocal ( const int  i,
const LocalVector localDisplacement 
)
virtual

Move a single component with respect to the local reference frame.

Definition at line 96 of file AlignableComposite.cc.

96  {
97  if (i >= size())
98  throw cms::Exception("LogicError") << "AlignableComposite index (" << i << ") out of range";
99 
100  const auto& comp = this->components();
101  comp[i]->move(this->surface().toGlobal(localDisplacement));
102 }

References AlCaHLTBitMon_QueryRunRegistry::comp, components(), Exception, mps_fire::i, Alignable::size(), and Alignable::surface().

◆ moveComponentsLocal()

void AlignableComposite::moveComponentsLocal ( const LocalVector localDisplacement)
virtual

Move with respect to the local reference frame.

Definition at line 91 of file AlignableComposite.cc.

91  {
92  this->move(this->surface().toGlobal(localDisplacement));
93 }

References move(), and Alignable::surface().

◆ recursiveComponents()

void AlignableComposite::recursiveComponents ( Alignables result) const
overridevirtual

Provide all components, subcomponents etc. (cf. description in base class)

Implements Alignable.

Definition at line 67 of file AlignableComposite.cc.

67  {
68  const auto& components = this->components();
69  if (this->alignableObjectId() == align::AlignableDet &&
70  components.size() <= 1) { // Non-glued AlignableDets (still) contain themselves
71  return; // (would be better to implement AlignableDet::recursiveComponents!)
72  }
73  for (const auto& iter : components) {
74  result.push_back(iter); // could use std::copy(..), but here we build a real hierarchy
75  iter->recursiveComponents(result);
76  }
77 }

References align::AlignableDet, alignableObjectId(), components(), and mps_fire::result.

◆ rotateInGlobalFrame()

void AlignableComposite::rotateInGlobalFrame ( const RotationType rotation)
overridevirtual

Rotation interpreted in global reference frame.

Rotation intepreted such, that the orientation of the rotation axis is w.r.t. to the global coordinate system. This, however, does NOT mean the center of the rotation. This is simply taken as the center of the Alignable-object

Implements Alignable.

Definition at line 109 of file AlignableComposite.cc.

109  {
110  const auto& comp = this->components();
111 
112  PositionType myPosition = this->globalPosition();
113 
114  for (const auto& i : comp) {
115  // It is much simpler to calculate the local position given in coordinates
116  // of the GLOBAL frame and then just apply the rotation matrix given in the
117  // GLOBAL frame as well. ONLY this is somewhat tricky... as Teddy's frames
118  // don't like this kind of mixing...
119 
120  // Rotations are defined for "Basic3DVector" types, without any FrameTAG,
121  // because Rotations usually switch between different frames. You get
122  // this by using the method .basicVector()
123 
124  // localPosition = globalPosition (Component) - globalPosition(Composite)
125  // moveVector = rotated localPosition - original localposition
126  // LocalVector localPositionVector = (**i).globalPosition()-myPosition;
127 
128  // Local Position given in coordinates of the GLOBAL Frame
129  const GlobalVector localPositionVector = i->globalPosition() - myPosition;
130  const GlobalVector::BasicVectorType& lpvgf = localPositionVector.basicVector();
131 
132  // rotate with GLOBAL rotation matrix and subtract => moveVector in
133  // global Coordinates
134  // apparently... you have to use the inverse of the rotation here
135  // (rotate the VECTOR rather than the frame)
136  GlobalVector moveVector(rotation.multiplyInverse(lpvgf) - lpvgf);
137 
138  i->move(moveVector);
139  i->rotateInGlobalFrame(rotation);
140  }
141 
142  this->addRotation(rotation);
143 
145 }

References Alignable::addRotation(), PV3DBase< T, PVType, FrameType >::basicVector(), AlCaHLTBitMon_QueryRunRegistry::comp, components(), Alignable::globalPosition(), mps_fire::i, TkRotation< T >::multiplyInverse(), GloballyPositioned< T >::rotate(), Alignable::rotation(), and Alignable::theSurface.

◆ setAlignmentPositionError()

void AlignableComposite::setAlignmentPositionError ( const AlignmentPositionError ape,
bool  propagateDown 
)
overridevirtual

Set the AlignmentPositionError (if this Alignable is a Det) and, if (propagateDown), to all the components of the composite

Implements Alignable.

Reimplemented in AlignableDet.

Definition at line 148 of file AlignableComposite.cc.

148  {
149  // Since no geomDet is attached, alignable composites do not have an APE
150  // The APE is, therefore, just propagated down
151  if (!propagateDown)
152  return;
153 
154  for (const auto& i : this->components()) {
155  i->setAlignmentPositionError(ape, propagateDown);
156  }
157 }

References components(), and mps_fire::i.

Referenced by AlignableDet::setAlignmentPositionError().

◆ setSurface()

void AlignableComposite::setSurface ( const AlignableSurface s)
inlineprotected

◆ setSurfaceDeformation()

void AlignableComposite::setSurfaceDeformation ( const SurfaceDeformation deformation,
bool  propagateDown 
)
overridevirtual

Set the surface deformation parameters - if (!propagateDown) do not affect daughters.

Implements Alignable.

Definition at line 213 of file AlignableComposite.cc.

213  {
214  // Only DetUnits have surface deformations.
215  // The parameters are, therefore, just propagated down.
216  if (!propagateDown)
217  return;
218 
219  for (const auto& i : this->components()) {
220  i->setSurfaceDeformation(deformation, propagateDown);
221  }
222 }

References components(), and mps_fire::i.

◆ surfaceDeformationIdPairs()

int AlignableComposite::surfaceDeformationIdPairs ( std::vector< std::pair< int, SurfaceDeformation * > > &  result) const
overridevirtual

Return surface deformations.

Implements Alignable.

Definition at line 286 of file AlignableComposite.cc.

286  {
287  int count = 0;
288 
289  // Add components recursively
290  for (const auto& i : this->components()) {
291  count += i->surfaceDeformationIdPairs(result);
292  }
293 
294  return count;
295 }

References components(), submitPVResolutionJobs::count, mps_fire::i, and mps_fire::result.

◆ update() [1/3]

void AlignableComposite::update ( align::ID  id,
StructureType  aType,
const RotationType rot = RotationType() 
)

Updater for a composite with given rotation. The given id and structure type have to match the current ones.

Definition at line 43 of file AlignableComposite.cc.

43  {
44  if (theStructureType != type) {
45  throw cms::Exception("Alignment") << "@SUB=AlignableComposite::update\n"
46  << "Current alignable type does not match type of the update.";
47  }
48  // composite's position is already updated by components, i.e. it needs to be kept
50 }

References Exception, Alignable::globalPosition(), theStructureType, and Alignable::update().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), MatrixUtil.Steps::overwrite(), and AlignableDet::update().

◆ update() [2/3]

void AlignableComposite::update ( const GeomDet geomDet)
protected

Updater from GeomDet, only for use in AlignableDet The given GeomDetUnit id has to match the current id.

Definition at line 33 of file AlignableComposite.cc.

33  {
34  if (!geomDet) {
35  throw cms::Exception("Alignment") << "@SUB=AlignableComposite::update\n"
36  << "Trying to update with GeomDet* pointing to 'nullptr'.";
37  }
38 
39  Alignable::update(geomDet->geographicalId().rawId(), geomDet->surface());
40 }

References Exception, GeomDet::geographicalId(), DetId::rawId(), GeomDet::surface(), and Alignable::update().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), and MatrixUtil.Steps::overwrite().

◆ update() [3/3]

template<class T >
void AlignableComposite::update ( T  )
delete

Member Data Documentation

◆ theComponents

Alignables AlignableComposite::theComponents
private

Definition at line 118 of file AlignableComposite.h.

Referenced by addComponent(), components(), and ~AlignableComposite().

◆ theStructureType

StructureType AlignableComposite::theStructureType
protected
Vector3DBase
Definition: Vector3DBase.h:8
AlCaHLTBitMon_QueryRunRegistry.comp
string comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
Alignable::theDeepComponents
Alignables theDeepComponents
Definition: Alignable.h:248
mps_fire.i
i
Definition: mps_fire.py:428
GloballyPositioned::rotate
void rotate(const RotationType &rotation)
Definition: GloballyPositioned.h:136
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
AlignableComposite::components
const Alignables & components() const override
Return vector of direct components.
Definition: AlignableComposite.h:45
Alignable::Alignable
Alignable()
private default ctr. to enforce usage of the specialised ones
Definition: Alignable.h:257
TkRotation::multiplyInverse
Basic3DVector< T > multiplyInverse(const Basic3DVector< T > &v) const
Definition: extTkRotation.h:178
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
AlignableComposite::addAlignmentPositionErrorFromRotation
void addAlignmentPositionErrorFromRotation(const RotationType &rotation, bool propagateDown) override
Definition: AlignableComposite.cc:175
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
alignCSCRings.s
s
Definition: alignCSCRings.py:92
Alignable::PositionType
align::PositionType PositionType
Definition: Alignable.h:30
Alignable::compConstraintType_
CompConstraintType compConstraintType_
Definition: Alignable.h:246
Alignable::update
void update(align::ID, const AlignableSurface &)
Definition: Alignable.cc:45
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
Alignable::addRotation
void addRotation(const RotationType &rotation)
Definition: Alignable.cc:193
Alignable::surface
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
dqmdumpme.k
k
Definition: dqmdumpme.py:60
Alignable::displacement
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:141
Alignable::Scalar
align::Scalar Scalar
Definition: Alignable.h:29
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Alignable::rotation
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:144
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
AlignableComposite::theStructureType
StructureType theStructureType
Definition: AlignableComposite.h:114
Alignable::RotationType
align::RotationType RotationType
Definition: Alignable.h:31
AlignableComposite::alignableObjectId
StructureType alignableObjectId() const override
Return the alignable type identifier.
Definition: AlignableComposite.h:86
GloballyPositioned::move
void move(const GlobalVector &displacement)
Definition: GloballyPositioned.h:128
Alignable::theSurface
AlignableSurface theSurface
Definition: Alignable.h:237
AlignmentErrorsExtended
Definition: AlignmentErrorsExtended.h:10
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
AlignableComposite::move
void move(const GlobalVector &displacement) override
Move with respect to the global reference frame.
Definition: AlignableComposite.cc:80
align::AlignableDet
Definition: StructureType.h:20
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
AlignableSurface
Definition: AlignableSurface.h:20
AlignableComposite::theComponents
Alignables theComponents
Definition: AlignableComposite.h:118
Exception
Definition: hltDiff.cc:245
Alignable::addDisplacement
void addDisplacement(const GlobalVector &displacement)
Definition: Alignable.cc:190
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
Alignments::m_align
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
AlignmentErrorsExtended::m_alignError
std::vector< AlignTransformErrorExtended > m_alignError
Definition: AlignmentErrorsExtended.h:19
mps_fire.result
result
Definition: mps_fire.py:311
Alignable::globalPosition
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:135
AlignmentPositionError
Definition: AlignmentPositionError.h:10
Alignments
Definition: Alignments.h:10
Alignable::CompConstraintType::POSITION
Basic3DVector
Definition: extBasic3DVector.h:30
Alignable::globalRotation
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:138
Alignable::size
int size() const
Return number of direct components.
Definition: Alignable.h:68