Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:21

0001 /** \file
0002  *
0003  *  $Date: 2008/03/26 21:59:30 $
0004  *  $Revision: 1.1 $
0005  *  \author Andre Sznajder - UERJ(Brazil)
0006  */
0007 
0008 #include "Alignment/MuonAlignment/interface/AlignableDTSuperLayer.h"
0009 
0010 AlignableDTSuperLayer::AlignableDTSuperLayer(const GeomDet* geomDet) : AlignableDet(geomDet) {
0011   theStructureType = align::AlignableDTSuperLayer;
0012   // DO NOT let the chamber position become an average of the layers
0013   this->theSurface = geomDet->surface();
0014 }
0015 
0016 /// Printout the DetUnits in the CSC chamber
0017 std::ostream& operator<<(std::ostream& os, const AlignableDTSuperLayer& r) {
0018   const auto& theDets = r.components();
0019 
0020   os << "    This DTSuperLayer contains " << theDets.size() << " units" << std::endl;
0021   os << "    position = " << r.globalPosition() << std::endl;
0022   os << "    (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << ","
0023      << r.globalPosition().z();
0024   os << "), orientation:" << std::endl << r.globalRotation() << std::endl;
0025 
0026   os << "    total displacement and rotation: " << r.displacement() << std::endl;
0027   os << r.rotation() << std::endl;
0028 
0029   for (const auto& idet : theDets) {
0030     const auto& comp = idet->components();
0031 
0032     for (unsigned int i = 0; i < comp.size(); ++i) {
0033       os << "     Det position, phi, r: " << comp[i]->globalPosition() << " , " << comp[i]->globalPosition().phi()
0034          << " , " << comp[i]->globalPosition().perp() << std::endl;
0035       os << "     local  position, phi, r: " << r.surface().toLocal(comp[i]->globalPosition()) << " , "
0036          << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
0037          << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
0038     }
0039   }
0040 
0041   return os;
0042 }