#include <AlignableDTWheel.h>
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 () |
void | dump (void) |
Recursive printout of the muon DT wheel structure. | |
AlignableDTStation & | station (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) |
Concrete class for muon DT Wheel alignable.
Misalignment can be de-/reactivated (forwarded to components).
The alignable muon DT wheel.
Definition at line 29 of file AlignableDTWheel.h.
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.
: AlignableComposite(dtStations[0]->id(), align::AlignableDTWheel) { theDTStations.insert( theDTStations.end(), dtStations.begin(), dtStations.end() ); setSurface( computeSurface() ); }
AlignableDTWheel::~AlignableDTWheel | ( | ) |
Clean delete of the vector and its elements.
Definition at line 27 of file AlignableDTWheel.cc.
References theDTStations.
{ for ( std::vector<AlignableDTStation*>::iterator iter = theDTStations.begin(); iter != theDTStations.end(); iter++) delete *iter; }
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 query::result, and theDTStations.
{ std::vector<Alignable*> result; result.insert( result.end(), theDTStations.begin(), theDTStations.end() ); return result; }
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().
{ return RotationType(); }
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().
{ float zz = 0.; for ( std::vector<AlignableDTStation*>::iterator ilayer = theDTStations.begin(); ilayer != theDTStations.end(); ilayer++ ) zz += (*ilayer)->globalPosition().z(); zz /= static_cast<float>(theDTStations.size()); return PositionType( 0.0, 0.0, zz ); }
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().
{ return AlignableSurface( computePosition(), computeOrientation() ); }
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.
{ edm::LogInfo("AlignableDump") << (*this); for ( std::vector<AlignableDTStation*>::iterator iStation = theDTStations.begin(); iStation != theDTStations.end(); iStation++ ) (*iStation)->dump(); }
AlignableDTStation & AlignableDTWheel::station | ( | int | i | ) |
Return Alignable DT Station at given index.
Definition at line 36 of file AlignableDTWheel.cc.
References Exception, i, Alignable::size(), and theDTStations.
{ if (i >= size() ) throw cms::Exception("LogicError") << "Station index (" << i << ") out of range"; return *theDTStations[i]; }
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.
{ os << "This DTWheel contains " << b.theDTStations.size() << " DT stations" << std::endl; os << "(phi, r, z) = (" << b.globalPosition().phi() << "," << b.globalPosition().perp() << "," << b.globalPosition().z(); os << "), orientation:" << std::endl<< b.globalRotation() << std::endl; return os; }
std::vector<AlignableDTStation*> AlignableDTWheel::theDTStations [private] |
Definition at line 65 of file AlignableDTWheel.h.
Referenced by AlignableDTWheel(), components(), computePosition(), dump(), operator<<(), station(), and ~AlignableDTWheel().