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