CMS 3D CMS Logo

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

Constructor of the full muon geometry. More...

#include <AlignableMuon.h>

Inheritance diagram for AlignableMuon:
AlignableComposite Alignable

Public Member Functions

 AlignableMuon (const DTGeometry *, const CSCGeometry *)
 Constructor from geometries. More...
 
const align::Alignablescomponents () const final
 Return all components. More...
 
AlignmentErrorsExtendedcscAlignmentErrorsExtended ()
 Get CSC alignment errors sorted by DetId. More...
 
AlignmentscscAlignments ()
 Get CSC alignments sorted by DetId. More...
 
align::Alignables CSCChambers ()
 
align::Alignables CSCEndcaps ()
 
align::Alignables CSCLayers ()
 
align::Alignables CSCRings ()
 
align::Alignables CSCStations ()
 
AlignmentErrorsExtendeddtAlignmentErrorsExtended ()
 Get DT alignment errors sorted by DetId. More...
 
AlignmentsdtAlignments ()
 Get DT alignments sorted by DetId. More...
 
align::Alignables DTBarrel ()
 
align::Alignables DTChambers ()
 
align::Alignables DTLayers ()
 Methods to return specific of components. More...
 
align::Alignables DTStations ()
 
align::Alignables DTSuperLayers ()
 
align::Alignables DTWheels ()
 
virtual Alignablemother ()
 Alignable tracker has no mother. More...
 
const AlignableObjectIdobjectIdProvider () const
 Return muon alignable object ID provider derived from the muon system geometry. More...
 
void update (const DTGeometry *, const CSCGeometry *)
 
 ~AlignableMuon () override
 Destructor. More...
 
- Public Member Functions inherited from AlignableComposite
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...
 
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())
 
 ~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 recursiveComponents (Alignables &result) const =0
 
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...
 

Private Member Functions

AlignmentErrorsExtendedalignmentErrors () const override
 Get alignment errors sorted by DetId. More...
 
Alignmentsalignments () const override
 Get alignments sorted by DetId. More...
 
void buildCSCEndcap (const CSCGeometry *, bool update=false)
 Build muon end caps. More...
 
void buildDTBarrel (const DTGeometry *, bool update=false)
 Build muon barrel. More...
 
RotationType computeOrientation ()
 Get the global orientation (no rotation by default) More...
 
PositionType computePosition ()
 Get the position (centered at 0 by default) More...
 
AlignableSurface computeSurface ()
 Get the Surface. More...
 
void recursiveSetMothers (Alignable *alignable)
 Set mothers recursively. More...
 

Private Attributes

const AlignableObjectId alignableObjectId_
 alignable object ID provider More...
 
std::vector< AlignableCSCChamber * > theCSCChambers
 
std::vector< AlignableCSCEndcap * > theCSCEndcaps
 
std::vector< AlignableCSCRing * > theCSCRings
 
std::vector< AlignableCSCStation * > theCSCStations
 
std::vector< AlignableDTBarrel * > theDTBarrel
 
std::vector< AlignableDTChamber * > theDTChambers
 Containers of separate components. More...
 
std::vector< AlignableDTStation * > theDTStations
 
std::vector< AlignableDTWheel * > theDTWheels
 
align::Alignables theMuonComponents
 

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 >
 
- Protected Member Functions inherited from AlignableComposite
 AlignableComposite (const GeomDet *geomDet)
 Constructor from GeomDet, only for use in AlignableDet. More...
 
void setSurface (const AlignableSurface &s)
 
void update (const GeomDet *geomDet)
 
template<class T >
void update (T)=delete
 
- Protected Member Functions inherited from Alignable
void addDisplacement (const GlobalVector &displacement)
 
void addRotation (const RotationType &rotation)
 
virtual void updateMother (const GlobalVector &shift)
 
- Protected Attributes inherited from AlignableComposite
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
 

Detailed Description

Constructor of the full muon geometry.

The alignable muon.

Date
2008/04/25 21:23:15
Revision
1.21
Author
Andre Sznajder - UERJ(Brazil)

Definition at line 37 of file AlignableMuon.h.

Constructor & Destructor Documentation

AlignableMuon::AlignableMuon ( const DTGeometry dtGeometry,
const CSCGeometry cscGeometry 
)

Constructor from geometries.

Definition at line 31 of file AlignableMuon.cc.

References buildCSCEndcap(), buildDTBarrel(), components(), recursiveSetMothers(), and Alignable::theId.

32  : AlignableComposite(0, align::AlignableMuon), // cannot yet set id, use 0
33  alignableObjectId_(nullptr, dtGeometry, cscGeometry)
34 {
35 
36  // Build the muon barrel
37  buildDTBarrel( dtGeometry );
38 
39  // Build the muon end caps
40  buildCSCEndcap( cscGeometry );
41 
42  // Set links to mothers recursively
43  recursiveSetMothers( this );
44 
45  // now can set id as for all composites: id of first component
46  theId = this->components()[0]->id();
47 
48  edm::LogInfo("AlignableMuon") << "Constructing alignable muon objects DONE";
49 
50 
51 }
AlignableComposite()
default constructor hidden
const AlignableObjectId alignableObjectId_
alignable object ID provider
void recursiveSetMothers(Alignable *alignable)
Set mothers recursively.
void buildCSCEndcap(const CSCGeometry *, bool update=false)
Build muon end caps.
const align::Alignables & components() const final
Return all components.
Definition: AlignableMuon.h:53
void buildDTBarrel(const DTGeometry *, bool update=false)
Build muon barrel.
align::ID theId
Definition: Alignable.h:244
AlignableMuon::~AlignableMuon ( )
override

Destructor.

Definition at line 54 of file AlignableMuon.cc.

References theMuonComponents.

55 {
56 
57  for ( align::Alignables::iterator iter=theMuonComponents.begin();
58  iter != theMuonComponents.end(); iter++){
59  delete *iter;
60  }
61 
62 
63 }
align::Alignables theMuonComponents

Member Function Documentation

AlignmentErrorsExtended * AlignableMuon::alignmentErrors ( void  ) const
overrideprivatevirtual

Get alignment errors sorted by DetId.

Reimplemented from AlignableComposite.

Definition at line 457 of file AlignableMuon.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, components(), popcon2dropbox::copy(), mps_fire::i, and AlignmentErrorsExtended::m_alignError.

Referenced by objectIdProvider().

458 {
459 
461  AlignmentErrorsExtended* m_alignmentErrors = new AlignmentErrorsExtended();
462 
463  // Add components recursively
464  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
465  {
466  AlignmentErrorsExtended* tmpAlignmentErrorsExtended = (*i)->alignmentErrors();
467  std::copy( tmpAlignmentErrorsExtended->m_alignError.begin(), tmpAlignmentErrorsExtended->m_alignError.end(),
468  std::back_inserter(m_alignmentErrors->m_alignError) );
469  delete tmpAlignmentErrorsExtended;
470  }
471 
472  std::sort( m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end(),
474 
475  return m_alignmentErrors;
476 
477 }
def copy(args, dbName)
std::vector< AlignTransformErrorExtended > m_alignError
const align::Alignables & components() const final
Return all components.
Definition: AlignableMuon.h:53
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
Alignments * AlignableMuon::alignments ( void  ) const
overrideprivatevirtual

Get alignments sorted by DetId.

Reimplemented from AlignableComposite.

Definition at line 436 of file AlignableMuon.cc.

References AlCaHLTBitMon_QueryRunRegistry::comp, components(), popcon2dropbox::copy(), mps_fire::i, and Alignments::m_align.

Referenced by objectIdProvider().

437 {
438 
440  Alignments* m_alignments = new Alignments();
441  // Add components recursively
442  for ( align::Alignables::iterator i=comp.begin(); i!=comp.end(); i++ )
443  {
444  Alignments* tmpAlignments = (*i)->alignments();
445  std::copy( tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(),
446  std::back_inserter(m_alignments->m_align) );
447  delete tmpAlignments;
448  }
449 
450  std::sort( m_alignments->m_align.begin(), m_alignments->m_align.end(),
452 
453  return m_alignments;
454 
455 }
def copy(args, dbName)
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
const align::Alignables & components() const final
Return all components.
Definition: AlignableMuon.h:53
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
void AlignableMuon::buildCSCEndcap ( const CSCGeometry pCSC,
bool  update = false 
)
private

Build muon end caps.

Definition at line 182 of file AlignableMuon.cc.

References align::AlignableCSCChamber, align::AlignableCSCEndcap, align::AlignableCSCRing, align::AlignableCSCStation, CSCGeometry::chambers(), RecoEcal_EventContent_cff::ec, CSCDetId::endcap(), LogDebug, CSCDetId::ring(), CSCDetId::station(), theCSCChambers, theCSCEndcaps, theCSCRings, theCSCStations, and theMuonComponents.

Referenced by AlignableMuon(), objectIdProvider(), and update().

183 {
184 
185  LogDebug("Position") << "Constructing AlignableCSCBarrel";
186 
187  // Temporary container for stations in a given endcap
188  std::vector<AlignableCSCStation*> tmpCSCStationsInEndcap;
189 
190  // Loop over endcaps ( 1..2 )
191  for( int iec = 1 ; iec < 3 ; iec++ ){
192 
193  // Temporary container for rings in a given station
194  std::vector<AlignableCSCRing*> tmpCSCRingsInStation;
195 
196  // Loop over stations ( 1..4 )
197  for( int ist = 1 ; ist < 5 ; ist++ ){
198 
199  // Temporary container for chambers in a given ring
200  std::vector<AlignableCSCChamber*> tmpCSCChambersInRing;
201 
202  // Loop over rings ( 1..4 )
203  for ( int iri = 1; iri < 5; iri++ ){
204 
205  // Loop over geom CSC Chambers
206  int iChamber{0};
207  const CSCGeometry::ChamberContainer& vc = pCSC->chambers();
208  for(const auto& det: vc){
209 
210  // Get the CSCDet ID
211  CSCDetId cscId = det->id();
212 
213  // Get chamber, station, ring, layer and endcap labels of the CSC chamber
214  int ec = cscId.endcap();
215  int st = cscId.station();
216  int ri = cscId.ring();
217  //int ch = cscId.chamber();
218 
219  // Select the chambers in a given endcap, station, and ring
220  if ( iec == ec && ist == st && iri == ri ) {
221 
222  if (update) {
223  // Update the alignable CSC chamber
224  theCSCEndcaps[iec-1]->station(ist-1).ring(iri-1).chamber(iChamber).update(det);
225  } else {
226  AlignableCSCChamber* tmpCSCChamber = new AlignableCSCChamber(det);
227 
228  // Store the alignable CSC chambers
229  tmpCSCChambersInRing.push_back(tmpCSCChamber);
230  }
231 
232  ++iChamber;
233  // End If chamber selection
234  }
235 
236  // End loop over geom CSC chambers
237  }
238 
239  if (!update) {
240  // Not all stations have 4 rings: only add the rings that exist (have chambers associated with them)
241  if (!tmpCSCChambersInRing.empty()) {
242 
243  // Store the alignable CSC chambers
244  theCSCChambers.insert(theCSCChambers.end(),
245  tmpCSCChambersInRing.begin(),
246  tmpCSCChambersInRing.end());
247 
248  // Create the alignable CSC ring with chambers in a given ring
249  AlignableCSCRing* tmpCSCRing = new AlignableCSCRing(tmpCSCChambersInRing);
250 
251  // Store the CSC rings in a given station
252  tmpCSCRingsInStation.push_back(tmpCSCRing);
253 
254  // Clear the temporary vector of chambers in ring
255  tmpCSCChambersInRing.clear();
256 
257  // End if this ring exists
258  }
259  }
260 
261  // End loop over rings
262  }
263 
264  if (!update) {
265  // Create the alignable CSC station with rings in a given station
266  AlignableCSCStation* tmpCSCStation = new AlignableCSCStation(tmpCSCRingsInStation);
267 
268  // Store the alignable CSC rings
269  theCSCRings.insert(theCSCRings.end(), tmpCSCRingsInStation.begin(),
270  tmpCSCRingsInStation.end());
271 
272  // Store the CSC stations in a given endcap
273  tmpCSCStationsInEndcap.push_back(tmpCSCStation);
274 
275  // Clear the temporary vector of rings in station
276  tmpCSCRingsInStation.clear();
277  }
278 
279  // End loop over stations
280  }
281 
282  if (!update) {
283  // Create the alignable CSC endcap
284  AlignableCSCEndcap* tmpEndcap = new AlignableCSCEndcap(tmpCSCStationsInEndcap);
285 
286  // Store the alignable CSC stations
287  theCSCStations.insert(theCSCStations.end(), tmpCSCStationsInEndcap.begin(),
288  tmpCSCStationsInEndcap.end());
289 
290  // Store the alignable CSC endcaps
291  theCSCEndcaps.push_back(tmpEndcap);
292 
293  // Clear the temporary vector of stations in endcap
294  tmpCSCStationsInEndcap.clear();
295  }
296 
297  // End loop over endcaps
298  }
299 
300  if (!update) {
301  // Store the encaps in the muon components
302  theMuonComponents.insert(theMuonComponents.end(), theCSCEndcaps.begin(),
303  theCSCEndcaps.end());
304  }
305 }
#define LogDebug(id)
void update(const DTGeometry *, const CSCGeometry *)
const ChamberContainer & chambers() const
Return a vector of all chambers.
Definition: CSCGeometry.cc:106
std::vector< AlignableCSCEndcap * > theCSCEndcaps
int endcap() const
Definition: CSCDetId.h:93
align::Alignables theMuonComponents
std::vector< AlignableCSCStation * > theCSCStations
int ring() const
Definition: CSCDetId.h:75
std::vector< AlignableCSCRing * > theCSCRings
std::vector< const CSCChamber * > ChamberContainer
Definition: CSCGeometry.h:32
int station() const
Definition: CSCDetId.h:86
std::vector< AlignableCSCChamber * > theCSCChambers
A muon CSC Chamber( an AlignableDet )
void AlignableMuon::buildDTBarrel ( const DTGeometry pDT,
bool  update = false 
)
private

Build muon barrel.

Definition at line 82 of file AlignableMuon.cc.

References align::AlignableDTBarrel, align::AlignableDTChamber, align::AlignableDTStation, align::AlignableDTWheel, DTGeometry::chambers(), LogDebug, DTChamberId::station(), theDTBarrel, theDTChambers, theDTStations, theDTWheels, theMuonComponents, and DTChamberId::wheel().

Referenced by AlignableMuon(), objectIdProvider(), and update().

83 {
84 
85  LogDebug("Position") << "Constructing AlignableDTBarrel";
86 
87  // Temporary container for chambers in a given station and stations in a given wheel
88  std::vector<AlignableDTChamber*> tmpDTChambersInStation;
89  std::vector<AlignableDTStation*> tmpDTStationsInWheel;
90 
91 
92  // Loop over wheels ( -2..2 )
93  for( int iwh = -2 ; iwh < 3 ; iwh++ ){
94 
95  // Loop over stations ( 1..4 )
96  for( int ist = 1 ; ist < 5 ; ist++ ){
97 
98  // Loop over geom DT Chambers
99  int iChamber{0};
100  std::vector<const GeomDet*> theSLs; // FIXME: What is this vector meant to be for? Probably redundant since super layers are handled inside of the AlignableDTChamber.
101  for(const auto& det: pDT->chambers()){
102  // Get the chamber ID
103  DTChamberId chamberId = det->id();
104 
105  // Get wheel,station and sector of the chamber
106  int wh = chamberId.wheel();
107  int st = chamberId.station();
108  //int se = chamberId.sector();
109 
110  // Select the chambers in a given wheel in a given station
111  if ( iwh == wh && ist == st ){
112 
113  if (update) {
114  // Update the alignable DT chamber
115  theDTBarrel.back()->wheel(iwh+2).station(ist-1).chamber(iChamber).update(det);
116  } else {
117  // Create the alignable DT chamber
118  AlignableDTChamber* tmpDTChamber = new AlignableDTChamber(det);
119 
120  // Store the DT chambers in a given DT Station and Wheel
121  tmpDTChambersInStation.push_back( tmpDTChamber );
122  }
123 
124  ++iChamber;
125  // End chamber selection
126  }
127 
128  // End loop over chambers
129  }
130 
131  if (!update) {
132  // Store the DT chambers
133  theDTChambers.insert(theDTChambers.end(), tmpDTChambersInStation.begin(),
134  tmpDTChambersInStation.end());
135 
136  // Create the alignable DT station with chambers in a given station and wheel
137  AlignableDTStation* tmpDTStation = new AlignableDTStation(tmpDTChambersInStation);
138 
139  // Store the DT stations in a given wheel
140  tmpDTStationsInWheel.push_back(tmpDTStation);
141 
142  // Clear the temporary vector of chambers in a station
143  tmpDTChambersInStation.clear();
144  }
145  // End loop over stations
146  }
147 
148  if (!update) {
149  // Store The DT stations
150  theDTStations.insert(theDTStations.end(),tmpDTStationsInWheel.begin(),
151  tmpDTStationsInWheel.end());
152 
153  // Create the alignable DT wheel
154  AlignableDTWheel* tmpWheel = new AlignableDTWheel(tmpDTStationsInWheel);
155 
156 
157  // Store the DT wheels
158  theDTWheels.push_back(tmpWheel);
159 
160  // Clear temporary vector of stations in a wheel
161  tmpDTStationsInWheel.clear();
162  }
163 
164  // End loop over wheels
165  }
166 
167  if (!update) {
168  // Create the alignable Muon Barrel
169  AlignableDTBarrel* tmpDTBarrel = new AlignableDTBarrel(theDTWheels);
170 
171  // Store the barrel
172  theDTBarrel.push_back(tmpDTBarrel);
173 
174  // Store the barrel in the muon
175  theMuonComponents.push_back(tmpDTBarrel);
176  }
177 }
#define LogDebug(id)
A muon DT Chamber( an AlignableDet )
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
Definition: DTGeometry.cc:84
void update(const DTGeometry *, const CSCGeometry *)
align::Alignables theMuonComponents
std::vector< AlignableDTStation * > theDTStations
std::vector< AlignableDTChamber * > theDTChambers
Containers of separate components.
std::vector< AlignableDTBarrel * > theDTBarrel
std::vector< AlignableDTWheel * > theDTWheels
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
const align::Alignables& AlignableMuon::components ( ) const
inlinefinalvirtual

Return all components.

Reimplemented from AlignableComposite.

Definition at line 53 of file AlignableMuon.h.

References theMuonComponents.

Referenced by AlignableMuon(), alignmentErrors(), and alignments().

53 { return theMuonComponents; }
align::Alignables theMuonComponents
RotationType AlignableMuon::computeOrientation ( )
private

Get the global orientation (no rotation by default)

Referenced by objectIdProvider().

PositionType AlignableMuon::computePosition ( )
private

Get the position (centered at 0 by default)

Referenced by objectIdProvider().

AlignableSurface AlignableMuon::computeSurface ( )
private

Get the Surface.

Referenced by objectIdProvider().

AlignmentErrorsExtended * AlignableMuon::cscAlignmentErrorsExtended ( void  )

Get CSC alignment errors sorted by DetId.

Definition at line 512 of file AlignableMuon.cc.

References popcon2dropbox::copy(), CSCEndcaps(), and AlignmentErrorsExtended::m_alignError.

Referenced by AlignmentProducerBase::applyAlignmentsToGeometry(), MuonAlignment::copyAlignmentToSurvey(), mother(), MisalignedMuonESProducer::produce(), MuonAlignment::saveCSCtoDB(), MuonAlignmentOutputXML::write(), and AlignmentProducerBase::writeForRunRange().

513 {
514 
515  // Retrieve muon endcaps alignment errors
516  AlignmentErrorsExtended* cscEndCap1Errors = this->CSCEndcaps().front()->alignmentErrors();
517  AlignmentErrorsExtended* cscEndCap2Errors = this->CSCEndcaps().back()->alignmentErrors();
518  AlignmentErrorsExtended* tmpAlignmentErrorsExtended = new AlignmentErrorsExtended();
519 
520  std::copy(cscEndCap1Errors->m_alignError.begin(), cscEndCap1Errors->m_alignError.end(), back_inserter(tmpAlignmentErrorsExtended->m_alignError) );
521  std::copy(cscEndCap2Errors->m_alignError.begin(), cscEndCap2Errors->m_alignError.end(), back_inserter(tmpAlignmentErrorsExtended->m_alignError) );
522 
523  return tmpAlignmentErrorsExtended;
524 
525 }
def copy(args, dbName)
align::Alignables CSCEndcaps()
std::vector< AlignTransformErrorExtended > m_alignError
Alignments * AlignableMuon::cscAlignments ( void  )

Get CSC alignments sorted by DetId.

Definition at line 497 of file AlignableMuon.cc.

References popcon2dropbox::copy(), CSCEndcaps(), and Alignments::m_align.

Referenced by AlignmentProducerBase::applyAlignmentsToGeometry(), mother(), MisalignedMuonESProducer::produce(), MuonAlignment::saveCSCtoDB(), and AlignmentProducerBase::writeForRunRange().

498 {
499 
500  // Retrieve muon endcaps alignments
501  Alignments* cscEndCap1 = this->CSCEndcaps().front()->alignments();
502  Alignments* cscEndCap2 = this->CSCEndcaps().back()->alignments();
503  Alignments* tmpAlignments = new Alignments();
504 
505  std::copy( cscEndCap1->m_align.begin(), cscEndCap1->m_align.end(), back_inserter( tmpAlignments->m_align ) );
506  std::copy( cscEndCap2->m_align.begin(), cscEndCap2->m_align.end(), back_inserter( tmpAlignments->m_align ) );
507 
508  return tmpAlignments;
509 
510 }
def copy(args, dbName)
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
align::Alignables CSCEndcaps()
align::Alignables AlignableMuon::CSCChambers ( )

Definition at line 393 of file AlignableMuon.cc.

References popcon2dropbox::copy(), mps_fire::result, and theCSCChambers.

Referenced by AlignmentParameterSelector::addSelection(), CSCLayers(), MuonAlignmentFromReference::initialize(), mother(), and MuonScenarioBuilder::moveCSCSectors().

394 {
396  copy( theCSCChambers.begin(), theCSCChambers.end(), back_inserter(result) );
397  return result;
398 }
def copy(args, dbName)
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
std::vector< AlignableCSCChamber * > theCSCChambers
align::Alignables AlignableMuon::CSCEndcaps ( )
align::Alignables AlignableMuon::CSCLayers ( )

Definition at line 377 of file AlignableMuon.cc.

References chambers, CSCChambers(), LayerTriplets::layers(), and mps_fire::result.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

378 {
380 
382  for (align::Alignables::const_iterator chamberIter = chambers.begin(); chamberIter != chambers.end(); ++chamberIter) {
383  align::Alignables layers = (*chamberIter)->components();
384  for (align::Alignables::const_iterator layerIter = layers.begin(); layerIter != layers.end(); ++layerIter) {
385  result.push_back(*layerIter);
386  }
387  }
388 
389  return result;
390 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
align::Alignables CSCChambers()
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
align::Alignables AlignableMuon::CSCRings ( )

Definition at line 401 of file AlignableMuon.cc.

References popcon2dropbox::copy(), mps_fire::result, and theCSCRings.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

402 {
404  copy( theCSCRings.begin(), theCSCRings.end(), back_inserter(result) );
405  return result;
406 }
def copy(args, dbName)
std::vector< AlignableCSCRing * > theCSCRings
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
align::Alignables AlignableMuon::CSCStations ( )

Definition at line 409 of file AlignableMuon.cc.

References popcon2dropbox::copy(), mps_fire::result, and theCSCStations.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

410 {
412  copy( theCSCStations.begin(), theCSCStations.end(), back_inserter(result) );
413  return result;
414 }
def copy(args, dbName)
std::vector< AlignableCSCStation * > theCSCStations
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
AlignmentErrorsExtended * AlignableMuon::dtAlignmentErrorsExtended ( void  )

Get DT alignment errors sorted by DetId.

Definition at line 488 of file AlignableMuon.cc.

References DTBarrel().

Referenced by AlignmentProducerBase::applyAlignmentsToGeometry(), MuonAlignment::copyAlignmentToSurvey(), mother(), MisalignedMuonESProducer::produce(), MuonAlignment::saveDTtoDB(), MuonAlignmentOutputXML::write(), and AlignmentProducerBase::writeForRunRange().

489 {
490  // Retrieve muon barrel alignment errors
491  AlignmentErrorsExtended* tmpAlignmentErrorsExtended = this->DTBarrel().front()->alignmentErrors();
492 
493  return tmpAlignmentErrorsExtended;
494 
495 }
align::Alignables DTBarrel()
Alignments * AlignableMuon::dtAlignments ( void  )

Get DT alignments sorted by DetId.

Definition at line 479 of file AlignableMuon.cc.

References DTBarrel().

Referenced by AlignmentProducerBase::applyAlignmentsToGeometry(), mother(), MisalignedMuonESProducer::produce(), MuonAlignment::saveDTtoDB(), and AlignmentProducerBase::writeForRunRange().

480 {
481  // Retrieve muon barrel alignments
482  Alignments* tmpAlignments = this->DTBarrel().front()->alignments();
483 
484  return tmpAlignments;
485 
486 }
align::Alignables DTBarrel()
align::Alignables AlignableMuon::DTBarrel ( )
align::Alignables AlignableMuon::DTChambers ( )

Definition at line 344 of file AlignableMuon.cc.

References popcon2dropbox::copy(), mps_fire::result, and theDTChambers.

Referenced by AlignmentParameterSelector::addSelection(), DTLayers(), DTSuperLayers(), MuonAlignmentFromReference::initialize(), mother(), and MuonScenarioBuilder::moveDTSectors().

345 {
347  copy( theDTChambers.begin(), theDTChambers.end(), back_inserter(result) );
348  return result;
349 }
def copy(args, dbName)
std::vector< AlignableDTChamber * > theDTChambers
Containers of separate components.
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
align::Alignables AlignableMuon::DTLayers ( )

Methods to return specific of components.

Definition at line 309 of file AlignableMuon.cc.

References chambers, DTChambers(), LayerTriplets::layers(), and mps_fire::result.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

310 {
312 
314  for (align::Alignables::const_iterator chamberIter = chambers.begin(); chamberIter != chambers.end(); ++chamberIter) {
315  align::Alignables superlayers = (*chamberIter)->components();
316  for (align::Alignables::const_iterator superlayerIter = superlayers.begin(); superlayerIter != superlayers.end(); ++superlayerIter) {
317  align::Alignables layers = (*superlayerIter)->components();
318  for (align::Alignables::const_iterator layerIter = layers.begin(); layerIter != layers.end(); ++layerIter) {
319  result.push_back(*layerIter);
320  }
321  }
322  }
323 
324  return result;
325 }
std::vector< LayerSetAndLayers > layers(const SeedingLayerSetsHits &sets)
Definition: LayerTriplets.cc:4
align::Alignables DTChambers()
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
align::Alignables AlignableMuon::DTStations ( )

Definition at line 352 of file AlignableMuon.cc.

References popcon2dropbox::copy(), mps_fire::result, and theDTStations.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

353 {
355  copy( theDTStations.begin(), theDTStations.end(), back_inserter(result) );
356  return result;
357 }
def copy(args, dbName)
std::vector< AlignableDTStation * > theDTStations
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
align::Alignables AlignableMuon::DTSuperLayers ( )

Definition at line 328 of file AlignableMuon.cc.

References chambers, DTChambers(), and mps_fire::result.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

329 {
331 
333  for (align::Alignables::const_iterator chamberIter = chambers.begin(); chamberIter != chambers.end(); ++chamberIter) {
334  align::Alignables superlayers = (*chamberIter)->components();
335  for (align::Alignables::const_iterator superlayerIter = superlayers.begin(); superlayerIter != superlayers.end(); ++superlayerIter) {
336  result.push_back(*superlayerIter);
337  }
338  }
339 
340  return result;
341 }
align::Alignables DTChambers()
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
align::Alignables AlignableMuon::DTWheels ( )

Definition at line 361 of file AlignableMuon.cc.

References popcon2dropbox::copy(), mps_fire::result, and theDTWheels.

Referenced by AlignmentParameterSelector::addSelection(), and mother().

362 {
364  copy( theDTWheels.begin(), theDTWheels.end(), back_inserter(result) );
365  return result;
366 }
def copy(args, dbName)
std::vector< Alignable * > Alignables
Definition: Utilities.h:32
std::vector< AlignableDTWheel * > theDTWheels
virtual Alignable* AlignableMuon::mother ( )
inlinevirtual
const AlignableObjectId& AlignableMuon::objectIdProvider ( ) const
inline

Return muon alignable object ID provider derived from the muon system geometry.

Definition at line 85 of file AlignableMuon.h.

References alignableObjectId_, alignmentErrors(), alignments(), buildCSCEndcap(), buildDTBarrel(), computeOrientation(), computePosition(), computeSurface(), and recursiveSetMothers().

Referenced by AlignableObjectId::commonObjectIdProvider(), MuonAlignmentInputXML::newAlignableMuon(), and MuonAlignmentOutputXML::write().

85 { return alignableObjectId_; }
const AlignableObjectId alignableObjectId_
alignable object ID provider
void AlignableMuon::recursiveSetMothers ( Alignable alignable)
private

Set mothers recursively.

Definition at line 426 of file AlignableMuon.cc.

References Alignable::components().

Referenced by AlignableMuon(), and objectIdProvider().

427 {
428  for (const auto& iter: alignable->components()) {
429  iter->setMother(alignable);
430  recursiveSetMothers(iter);
431  }
432 }
virtual const Alignables & components() const =0
Return vector of all direct components.
void recursiveSetMothers(Alignable *alignable)
Set mothers recursively.
void AlignableMuon::update ( const DTGeometry dtGeometry,
const CSCGeometry cscGeometry 
)

Updater using DTGeometry and CSCGeometry. The given geometries have to match the current ones.

Definition at line 67 of file AlignableMuon.cc.

References buildCSCEndcap(), and buildDTBarrel().

Referenced by progressbar.ProgressBar::__next__(), MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), AlignmentProducerBase::createAlignables(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), dqm-mbProfile.Profile::finish(), progressbar.ProgressBar::finish(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

69 {
70  // update the muon barrel
71  buildDTBarrel(dtGeometry, /* update = */ true);
72 
73  // update the muon end caps
74  buildCSCEndcap(cscGeometry, /* update = */ true);
75 
76  edm::LogInfo("Alignment")
77  << "@SUB=AlignableMuon::update" << "Updating alignable muon objects DONE";
78 }
void buildCSCEndcap(const CSCGeometry *, bool update=false)
Build muon end caps.
void buildDTBarrel(const DTGeometry *, bool update=false)
Build muon barrel.

Member Data Documentation

const AlignableObjectId AlignableMuon::alignableObjectId_
private

alignable object ID provider

Definition at line 118 of file AlignableMuon.h.

Referenced by objectIdProvider().

std::vector<AlignableCSCChamber*> AlignableMuon::theCSCChambers
private

Definition at line 126 of file AlignableMuon.h.

Referenced by buildCSCEndcap(), and CSCChambers().

std::vector<AlignableCSCEndcap*> AlignableMuon::theCSCEndcaps
private

Definition at line 129 of file AlignableMuon.h.

Referenced by buildCSCEndcap(), and CSCEndcaps().

std::vector<AlignableCSCRing*> AlignableMuon::theCSCRings
private

Definition at line 128 of file AlignableMuon.h.

Referenced by buildCSCEndcap(), and CSCRings().

std::vector<AlignableCSCStation*> AlignableMuon::theCSCStations
private

Definition at line 127 of file AlignableMuon.h.

Referenced by buildCSCEndcap(), and CSCStations().

std::vector<AlignableDTBarrel*> AlignableMuon::theDTBarrel
private

Definition at line 124 of file AlignableMuon.h.

Referenced by buildDTBarrel(), and DTBarrel().

std::vector<AlignableDTChamber*> AlignableMuon::theDTChambers
private

Containers of separate components.

Definition at line 121 of file AlignableMuon.h.

Referenced by buildDTBarrel(), and DTChambers().

std::vector<AlignableDTStation*> AlignableMuon::theDTStations
private

Definition at line 122 of file AlignableMuon.h.

Referenced by buildDTBarrel(), and DTStations().

std::vector<AlignableDTWheel*> AlignableMuon::theDTWheels
private

Definition at line 123 of file AlignableMuon.h.

Referenced by buildDTBarrel(), and DTWheels().

align::Alignables AlignableMuon::theMuonComponents
private

Definition at line 131 of file AlignableMuon.h.

Referenced by buildCSCEndcap(), buildDTBarrel(), components(), and ~AlignableMuon().