#include <Alignment/MuonAlignment/interface/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 () |
Returns surface corresponding to current position and orientation, as given by average on all components. | |
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). |
The alignable muon CSC station.
Misalignment can be de-/reactivated (forwarded to components).
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.
00016 : AlignableComposite(cscRings[0]->id(), align::AlignableCSCStation) 00017 { 00018 00019 theCSCRings.insert( theCSCRings.end(), cscRings.begin(), cscRings.end() ); 00020 00021 setSurface( computeSurface() ); 00022 00023 }
AlignableCSCStation::~AlignableCSCStation | ( | ) |
Clean delete of the vector and its elements.
Definition at line 27 of file AlignableCSCStation.cc.
References iter, and theCSCRings.
00028 { 00029 for ( std::vector<AlignableCSCRing*>::iterator iter = theCSCRings.begin(); 00030 iter != theCSCRings.end(); iter++) 00031 delete *iter; 00032 00033 }
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 HLT_VtxMuL3::result, and theCSCRings.
00040 { 00041 00042 std::vector<Alignable*> result; 00043 result.insert( result.end(), theCSCRings.begin(), theCSCRings.end() ); 00044 return result; 00045 00046 }
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().
00077 { 00078 return RotationType(); 00079 }
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().
00060 { 00061 00062 float zz = 0.; 00063 00064 for ( std::vector<AlignableCSCRing*>::iterator ilayer = theCSCRings.begin(); 00065 ilayer != theCSCRings.end(); ilayer++ ) 00066 zz += (*ilayer)->globalPosition().z(); 00067 00068 zz /= static_cast<float>(theCSCRings.size()); 00069 00070 return PositionType( 0.0, 0.0, zz ); 00071 00072 }
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().
00050 { 00051 00052 return AlignableSurface( computePosition(), computeOrientation() ); 00053 00054 }
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.
00107 { 00108 00109 edm::LogInfo("AlignableDump") << (*this); 00110 for ( std::vector<AlignableCSCRing*>::iterator iRing = theCSCRings.begin(); 00111 iRing != theCSCRings.end(); iRing++ ) 00112 edm::LogInfo("AlignableDump") << (**iRing); 00113 00114 }
AlignableCSCRing & AlignableCSCStation::ring | ( | int | i | ) |
Return Alignable CSC Ring at given index.
Definition at line 36 of file AlignableCSCStation.cc.
References Exception, Alignable::size(), and theCSCRings.
00037 { 00038 00039 if (i >= size() ) 00040 throw cms::Exception("LogicError") << "CSC Ring index (" << i << ") out of range"; 00041 00042 return *theCSCRings[i]; 00043 00044 }
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.
00094 { 00095 00096 os << "This CSC Station contains " << b.theCSCRings.size() << " CSC rings" << std::endl; 00097 os << "(phi, r, z) = (" << b.globalPosition().phi() << "," 00098 << b.globalPosition().perp() << "," << b.globalPosition().z(); 00099 os << "), orientation:" << std::endl<< b.globalRotation() << std::endl; 00100 return os; 00101 00102 }
std::vector<AlignableCSCRing*> AlignableCSCStation::theCSCRings [private] |
Definition at line 69 of file AlignableCSCStation.h.
Referenced by AlignableCSCStation(), components(), computePosition(), dump(), operator<<(), ring(), and ~AlignableCSCStation().