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