#include <AlignableCSCEndcap.h>
Public Member Functions | |
AlignableCSCEndcap (const std::vector< AlignableCSCStation * > cscStations) | |
The constructor simply copies the vector of stations and computes the surface from them. | |
AlignmentErrors * | alignmentErrors () const |
Return vector of alignment errors. | |
Alignments * | alignments () const |
Return alignment data. | |
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 End Cap structure. | |
AlignableCSCStation & | station (int i) |
Return AlignableCSCEndcap station at given index. | |
~AlignableCSCEndcap () | |
Clean delete of the vector and its elements. | |
Private Attributes | |
std::vector < AlignableCSCStation * > | theCSCStations |
Friends | |
std::ostream & | operator<< (std::ostream &, const AlignableCSCEndcap &) |
Printout muon End Cap information (not recursive) |
Concrete class for muon CSC Endcap alignable.
Misalignment can be de-/reactivated (forwarded to components).
Definition at line 30 of file AlignableCSCEndcap.h.
AlignableCSCEndcap::AlignableCSCEndcap | ( | const std::vector< AlignableCSCStation * > | cscStations | ) |
The constructor simply copies the vector of stations and computes the surface from them.
Definition at line 17 of file AlignableCSCEndcap.cc.
References computeSurface(), AlignableComposite::setSurface(), and theCSCStations.
: AlignableComposite(cscStations[0]->id(), align::AlignableCSCEndcap) { theCSCStations.insert( theCSCStations.end(), cscStations.begin(), cscStations.end() ); setSurface( computeSurface() ); }
AlignableCSCEndcap::~AlignableCSCEndcap | ( | ) |
Clean delete of the vector and its elements.
Definition at line 29 of file AlignableCSCEndcap.cc.
References theCSCStations.
{ for ( std::vector<AlignableCSCStation*>::iterator iter = theCSCStations.begin(); iter != theCSCStations.end(); iter++) delete *iter; }
AlignmentErrors * AlignableCSCEndcap::alignmentErrors | ( | void | ) | const [virtual] |
Return vector of alignment errors.
Reimplemented from AlignableComposite.
Definition at line 133 of file AlignableCSCEndcap.cc.
References components(), filterCSVwithJSON::copy, i, AlignmentErrors::m_alignError, and python::multivaluedict::sort().
{ std::vector<Alignable*> comp = this->components(); AlignmentErrors* m_alignmentErrors = new AlignmentErrors(); // Add components recursively for ( std::vector<Alignable*>::iterator i=comp.begin(); i!=comp.end(); i++ ) { AlignmentErrors* tmpAlignmentErrors = (*i)->alignmentErrors(); std::copy( tmpAlignmentErrors->m_alignError.begin(), tmpAlignmentErrors->m_alignError.end(), std::back_inserter(m_alignmentErrors->m_alignError) ); delete tmpAlignmentErrors; } std::sort( m_alignmentErrors->m_alignError.begin(), m_alignmentErrors->m_alignError.end(), lessAlignmentDetId<AlignTransformError>() ); return m_alignmentErrors; }
Alignments * AlignableCSCEndcap::alignments | ( | void | ) | const [virtual] |
Return alignment data.
Reimplemented from AlignableComposite.
Definition at line 110 of file AlignableCSCEndcap.cc.
References components(), filterCSVwithJSON::copy, i, Alignments::m_align, and python::multivaluedict::sort().
{ std::vector<Alignable*> comp = this->components(); Alignments* m_alignments = new Alignments(); // Add components recursively for ( std::vector<Alignable*>::iterator i=comp.begin(); i!=comp.end(); i++ ) { Alignments* tmpAlignments = (*i)->alignments(); std::copy( tmpAlignments->m_align.begin(), tmpAlignments->m_align.end(), std::back_inserter(m_alignments->m_align) ); delete tmpAlignments; } std::sort( m_alignments->m_align.begin(), m_alignments->m_align.end(), lessAlignmentDetId<AlignTransform>() ); return m_alignments; }
virtual std::vector<Alignable*> AlignableCSCEndcap::components | ( | ) | const [inline, virtual] |
Return vector of direct components.
Reimplemented from AlignableComposite.
Definition at line 39 of file AlignableCSCEndcap.h.
References query::result, and theCSCStations.
Referenced by alignmentErrors(), and alignments().
{ std::vector<Alignable*> result; result.insert( result.end(), theCSCStations.begin(), theCSCStations.end() ); return result; }
AlignableCSCEndcap::RotationType AlignableCSCEndcap::computeOrientation | ( | ) |
Just initialize to default given by default constructor of a RotationType.
Definition at line 78 of file AlignableCSCEndcap.cc.
Referenced by computeSurface().
{ return RotationType(); }
AlignableCSCEndcap::PositionType AlignableCSCEndcap::computePosition | ( | ) |
Compute average z position from all components (x and y forced to 0)
Definition at line 61 of file AlignableCSCEndcap.cc.
References theCSCStations, and PV3DBase< T, PVType, FrameType >::z().
Referenced by computeSurface().
{ float zz = 0.; for ( std::vector<AlignableCSCStation*>::iterator ilayer = theCSCStations.begin(); ilayer != theCSCStations.end(); ilayer++ ) zz += (*ilayer)->globalPosition().z(); zz /= static_cast<float>(theCSCStations.size()); return PositionType( 0.0, 0.0, zz ); }
AlignableSurface AlignableCSCEndcap::computeSurface | ( | ) |
Returns surface corresponding to current position and orientation, as given by average on all components
Definition at line 51 of file AlignableCSCEndcap.cc.
References computeOrientation(), and computePosition().
Referenced by AlignableCSCEndcap().
{ return AlignableSurface( computePosition(), computeOrientation() ); }
void AlignableCSCEndcap::dump | ( | void | ) |
Recursive printout of the muon End Cap structure.
Recursive printout of whole Half Barrel structure.
Definition at line 98 of file AlignableCSCEndcap.cc.
References theCSCStations.
{ edm::LogInfo("AlignableDump") << (*this); for ( std::vector<AlignableCSCStation*>::iterator iLayer = theCSCStations.begin(); iLayer != theCSCStations.end(); iLayer++ ) (*iLayer)->dump(); }
AlignableCSCStation & AlignableCSCEndcap::station | ( | int | i | ) |
Return AlignableCSCEndcap station at given index.
Definition at line 38 of file AlignableCSCEndcap.cc.
References Exception, i, Alignable::size(), and theCSCStations.
{ if (i >= size() ) throw cms::Exception("LogicError") << "Station index (" << i << ") out of range"; return *theCSCStations[i]; }
std::ostream& operator<< | ( | std::ostream & | os, |
const AlignableCSCEndcap & | b | ||
) | [friend] |
Printout muon End Cap information (not recursive)
Definition at line 85 of file AlignableCSCEndcap.cc.
{ os << "This EndCap contains " << b.theCSCStations.size() << " CSC 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<AlignableCSCStation*> AlignableCSCEndcap::theCSCStations [private] |
Definition at line 73 of file AlignableCSCEndcap.h.
Referenced by AlignableCSCEndcap(), components(), computePosition(), dump(), operator<<(), station(), and ~AlignableCSCEndcap().