#include <AlignableCSCStation.h>
Public Member Functions | |
AlignableCSCStation (const std::vector< AlignableCSCRing * > cscRings) | |
The constructor simply copies the vector of CSC Rings 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 CSC Station structure. | |
AlignableCSCRing & | ring (int i) |
Return Alignable CSC Ring at given index. | |
~AlignableCSCStation () | |
Clean delete of the vector and its elements. | |
Private Attributes | |
std::vector< AlignableCSCRing * > | theCSCRings |
Friends | |
std::ostream & | operator<< (std::ostream &, const AlignableCSCStation &) |
Printout muon CSC Station information (not recursive) |
Concrete class for muon CSC Station alignable.
Misalignment can be de-/reactivated (forwarded to components).
The alignable muon CSC station.
Definition at line 30 of file AlignableCSCStation.h.
AlignableCSCStation::AlignableCSCStation | ( | const std::vector< AlignableCSCRing * > | cscRings | ) |
The constructor simply copies the vector of CSC Rings and computes the surface from them.
Definition at line 15 of file AlignableCSCStation.cc.
References computeSurface(), AlignableComposite::setSurface(), and theCSCRings.
: AlignableComposite(cscRings[0]->id(), align::AlignableCSCStation) { theCSCRings.insert( theCSCRings.end(), cscRings.begin(), cscRings.end() ); setSurface( computeSurface() ); }
AlignableCSCStation::~AlignableCSCStation | ( | ) |
Clean delete of the vector and its elements.
Definition at line 27 of file AlignableCSCStation.cc.
References theCSCRings.
{ for ( std::vector<AlignableCSCRing*>::iterator iter = theCSCRings.begin(); iter != theCSCRings.end(); iter++) delete *iter; }
virtual std::vector<Alignable*> AlignableCSCStation::components | ( | ) | const [inline, virtual] |
Return vector of direct components.
Reimplemented from AlignableComposite.
Definition at line 39 of file AlignableCSCStation.h.
References query::result, and theCSCRings.
{ std::vector<Alignable*> result; result.insert( result.end(), theCSCRings.begin(), theCSCRings.end() ); return result; }
AlignableCSCStation::RotationType AlignableCSCStation::computeOrientation | ( | ) |
Just initialize to default given by default constructor of a RotationType.
Definition at line 76 of file AlignableCSCStation.cc.
Referenced by computeSurface().
{ return RotationType(); }
AlignableCSCStation::PositionType AlignableCSCStation::computePosition | ( | ) |
Compute average z position from all components (x and y forced to 0)
Definition at line 59 of file AlignableCSCStation.cc.
References theCSCRings, and PV3DBase< T, PVType, FrameType >::z().
Referenced by computeSurface().
{ float zz = 0.; for ( std::vector<AlignableCSCRing*>::iterator ilayer = theCSCRings.begin(); ilayer != theCSCRings.end(); ilayer++ ) zz += (*ilayer)->globalPosition().z(); zz /= static_cast<float>(theCSCRings.size()); return PositionType( 0.0, 0.0, zz ); }
AlignableSurface AlignableCSCStation::computeSurface | ( | ) |
Returns surface corresponding to current position and orientation, as given by average on all components
Definition at line 49 of file AlignableCSCStation.cc.
References computeOrientation(), and computePosition().
Referenced by AlignableCSCStation().
{ return AlignableSurface( computePosition(), computeOrientation() ); }
void AlignableCSCStation::dump | ( | void | ) |
Recursive printout of the muon CSC Station structure.
Recursive printout of whole CSC Station structure.
Definition at line 106 of file AlignableCSCStation.cc.
References theCSCRings.
{ edm::LogInfo("AlignableDump") << (*this); for ( std::vector<AlignableCSCRing*>::iterator iRing = theCSCRings.begin(); iRing != theCSCRings.end(); iRing++ ) edm::LogInfo("AlignableDump") << (**iRing); }
AlignableCSCRing & AlignableCSCStation::ring | ( | int | i | ) |
Return Alignable CSC Ring at given index.
Definition at line 36 of file AlignableCSCStation.cc.
References Exception, i, Alignable::size(), and theCSCRings.
{ if (i >= size() ) throw cms::Exception("LogicError") << "CSC Ring index (" << i << ") out of range"; return *theCSCRings[i]; }
std::ostream& operator<< | ( | std::ostream & | os, |
const AlignableCSCStation & | b | ||
) | [friend] |
Printout muon CSC Station information (not recursive)
Definition at line 93 of file AlignableCSCStation.cc.
{ os << "This CSC Station contains " << b.theCSCRings.size() << " CSC rings" << 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<AlignableCSCRing*> AlignableCSCStation::theCSCRings [private] |
Definition at line 69 of file AlignableCSCStation.h.
Referenced by AlignableCSCStation(), components(), computePosition(), dump(), operator<<(), ring(), and ~AlignableCSCStation().