File indexing completed on 2023-03-17 10:39:38
0001
0002
0003
0004
0005
0006
0007
0008 #include "Alignment/MuonAlignment/interface/AlignableDTChamber.h"
0009 #include "Alignment/MuonAlignment/interface/AlignableDTSuperLayer.h"
0010
0011 AlignableDTChamber::AlignableDTChamber(const GeomDet* geomDet) : AlignableDet(geomDet, false) {
0012
0013
0014 theStructureType = align::AlignableDTChamber;
0015
0016
0017
0018 const std::vector<const GeomDet*>& geomDets = geomDet->components();
0019 for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin(); idet != geomDets.end(); ++idet) {
0020 addComponent(new AlignableDTSuperLayer(*idet));
0021 }
0022
0023
0024 this->theSurface = geomDet->surface();
0025 }
0026
0027
0028 std::ostream& operator<<(std::ostream& os, const AlignableDTChamber& r) {
0029 const auto& theDets = r.components();
0030
0031 os << " This DTChamber contains " << theDets.size() << " units" << std::endl;
0032 os << " position = " << r.globalPosition() << std::endl;
0033 os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << ","
0034 << r.globalPosition().z();
0035 os << "), orientation:" << std::endl << r.globalRotation() << std::endl;
0036
0037 os << " total displacement and rotation: " << r.displacement() << std::endl;
0038 os << r.rotation() << std::endl;
0039
0040 for (const auto& idet : theDets) {
0041 const auto& comp = idet->components();
0042
0043 for (unsigned int i = 0; i < comp.size(); ++i) {
0044 os << " Det position, phi, r: " << comp[i]->globalPosition() << " , " << comp[i]->globalPosition().phi()
0045 << " , " << comp[i]->globalPosition().perp() << std::endl;
0046 os << " local position, phi, r: " << r.surface().toLocal(comp[i]->globalPosition()) << " , "
0047 << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
0048 << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
0049 }
0050 }
0051
0052 return os;
0053 }