File indexing completed on 2024-04-06 11:56:40
0001
0002
0003
0004
0005
0006
0007
0008 #include "Alignment/MuonAlignment/interface/AlignableCSCChamber.h"
0009
0010 AlignableCSCChamber::AlignableCSCChamber(const GeomDet* geomDet) : AlignableDet(geomDet) {
0011 theStructureType = align::AlignableCSCChamber;
0012
0013
0014 theSurface = geomDet->surface();
0015 compConstraintType_ = Alignable::CompConstraintType::NONE;
0016 }
0017
0018 void AlignableCSCChamber::update(const GeomDet* geomDet) {
0019 AlignableDet::update(geomDet);
0020
0021
0022 theSurface = geomDet->surface();
0023 }
0024
0025
0026 std::ostream& operator<<(std::ostream& os, const AlignableCSCChamber& r) {
0027 const auto& theDets = r.components();
0028
0029 os << " This CSCChamber contains " << theDets.size() << " units" << std::endl;
0030 os << " position = " << r.globalPosition() << std::endl;
0031 os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << ","
0032 << r.globalPosition().z();
0033 os << "), orientation:" << std::endl << r.globalRotation() << std::endl;
0034
0035 os << " total displacement and rotation: " << r.displacement() << std::endl;
0036 os << r.rotation() << std::endl;
0037
0038 for (const auto& idet : theDets) {
0039 const auto& comp = idet->components();
0040
0041 for (unsigned int i = 0; i < comp.size(); ++i) {
0042 os << " Det position, phi, r: " << comp[i]->globalPosition() << " , " << comp[i]->globalPosition().phi()
0043 << " , " << comp[i]->globalPosition().perp() << std::endl;
0044 os << " local position, phi, r: " << r.surface().toLocal(comp[i]->globalPosition()) << " , "
0045 << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
0046 << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
0047 }
0048 }
0049
0050 return os;
0051 }