CMS 3D CMS Logo

AlignableDTWheel Class Reference

Concrete class for muon DT Wheel alignable. More...

#include <Alignment/MuonAlignment/interface/AlignableDTWheel.h>

Inheritance diagram for AlignableDTWheel:

AlignableComposite Alignable

List of all members.

Public Member Functions

 AlignableDTWheel (const std::vector< AlignableDTStation * > dtStations)
 The constructor simply copies the vector of stations and computes the surface from them.
virtual std::vector< Alignable * > components () const
 Return vector of direct components.
RotationType computeOrientation ()
 Just initialize to default given by default constructor of a RotationType.
PositionType computePosition ()
 Compute average z position from all components (x and y forced to 0).
AlignableSurface computeSurface ()
 Returns surface corresponding to current position and orientation, as given by average on all components.
void dump (void)
 Recursive printout of the muon DT wheel structure.
AlignableDTStationstation (int i)
 Return Alignable DT Station at given index.
 ~AlignableDTWheel ()
 Clean delete of the vector and its elements.

Private Attributes

std::vector< AlignableDTStation * > theDTStations

Friends

std::ostream & operator<< (std::ostream &, const AlignableDTWheel &)
 Printout muon DT wheel information (not recursive).


Detailed Description

Concrete class for muon DT Wheel alignable.

The alignable muon DT wheel.

Misalignment can be de-/reactivated (forwarded to components).

Date
2008/04/15 16:05:53
Revision
1.10
Author:
Andre Sznajder - UERJ(Brazil)

Definition at line 29 of file AlignableDTWheel.h.


Constructor & Destructor Documentation

AlignableDTWheel::AlignableDTWheel ( const std::vector< AlignableDTStation * >  dtStations  ) 

The constructor simply copies the vector of stations and computes the surface from them.

Definition at line 15 of file AlignableDTWheel.cc.

References computeSurface(), AlignableComposite::setSurface(), and theDTStations.

00016    : AlignableComposite(dtStations[0]->id(), align::AlignableDTWheel)
00017 {
00018 
00019   theDTStations.insert( theDTStations.end(), dtStations.begin(), dtStations.end() );
00020 
00021   setSurface( computeSurface() );
00022    
00023 }

AlignableDTWheel::~AlignableDTWheel (  ) 

Clean delete of the vector and its elements.

Definition at line 27 of file AlignableDTWheel.cc.

References iter, and theDTStations.

00028 {
00029   for ( std::vector<AlignableDTStation*>::iterator iter = theDTStations.begin(); 
00030         iter != theDTStations.end(); iter++)
00031     delete *iter;
00032 
00033 }


Member Function Documentation

virtual std::vector<Alignable*> AlignableDTWheel::components (  )  const [inline, virtual]

Return vector of direct components.

Reimplemented from AlignableComposite.

Definition at line 38 of file AlignableDTWheel.h.

References HLT_VtxMuL3::result, and theDTStations.

00039   {
00040 
00041         std::vector<Alignable*> result;
00042         result.insert( result.end(), theDTStations.begin(), theDTStations.end() );
00043         return result;
00044 
00045   }

AlignableDTWheel::RotationType AlignableDTWheel::computeOrientation (  ) 

Just initialize to default given by default constructor of a RotationType.

Definition at line 76 of file AlignableDTWheel.cc.

Referenced by computeSurface().

00077 {
00078   return RotationType();
00079 }

AlignableDTWheel::PositionType AlignableDTWheel::computePosition (  ) 

Compute average z position from all components (x and y forced to 0).

Definition at line 59 of file AlignableDTWheel.cc.

References theDTStations, and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeSurface().

00060 {
00061 
00062   float zz = 0.;
00063 
00064   for ( std::vector<AlignableDTStation*>::iterator ilayer = theDTStations.begin();
00065                 ilayer != theDTStations.end(); ilayer++ )
00066     zz += (*ilayer)->globalPosition().z();
00067 
00068   zz /= static_cast<float>(theDTStations.size());
00069 
00070   return PositionType( 0.0, 0.0, zz );
00071 
00072 }

AlignableSurface AlignableDTWheel::computeSurface (  ) 

Returns surface corresponding to current position and orientation, as given by average on all components.

Definition at line 49 of file AlignableDTWheel.cc.

References computeOrientation(), and computePosition().

Referenced by AlignableDTWheel().

00050 {
00051 
00052   return AlignableSurface( computePosition(), computeOrientation() );
00053 
00054 }

void AlignableDTWheel::dump ( void   ) 

Recursive printout of the muon DT wheel structure.

Recursive printout of whole DT Wheel structure.

Definition at line 96 of file AlignableDTWheel.cc.

References theDTStations.

00097 {
00098 
00099   edm::LogInfo("AlignableDump") << (*this);
00100   for ( std::vector<AlignableDTStation*>::iterator iStation = theDTStations.begin();
00101                 iStation != theDTStations.end(); iStation++ )
00102         (*iStation)->dump();
00103 
00104 }

AlignableDTStation & AlignableDTWheel::station ( int  i  ) 

Return Alignable DT Station at given index.

Definition at line 36 of file AlignableDTWheel.cc.

References Exception, Alignable::size(), and theDTStations.

00037 {
00038   
00039   if (i >= size() ) 
00040         throw cms::Exception("LogicError") << "Station index (" << i << ") out of range";
00041 
00042   return *theDTStations[i];
00043   
00044 }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AlignableDTWheel b 
) [friend]

Printout muon DT wheel information (not recursive).

Definition at line 83 of file AlignableDTWheel.cc.

00084 {
00085 
00086   os << "This DTWheel contains " << b.theDTStations.size() << " DT stations" << std::endl;
00087   os << "(phi, r, z) =  (" << b.globalPosition().phi() << "," 
00088      << b.globalPosition().perp() << "," << b.globalPosition().z();
00089   os << "),  orientation:" << std::endl<< b.globalRotation() << std::endl;
00090   return os;
00091 
00092 }


Member Data Documentation

std::vector<AlignableDTStation*> AlignableDTWheel::theDTStations [private]

Definition at line 65 of file AlignableDTWheel.h.

Referenced by AlignableDTWheel(), components(), computePosition(), dump(), operator<<(), station(), and ~AlignableDTWheel().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:14:18 2009 for CMSSW by  doxygen 1.5.4