CMS 3D CMS Logo

Functions

CMSSW_4_4_3_patch1/src/Alignment/MuonAlignment/src/AlignableCSCChamber.cc File Reference

#include "Alignment/MuonAlignment/interface/AlignableCSCChamber.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const AlignableCSCChamber &r)
 Printout the DetUnits in the CSC chamber.

Detailed Description

Date:
2009/03/01 21:21:22
Revision:
1.12
Author:
Andre Sznajder - UERJ(Brazil)

Definition in file AlignableCSCChamber.cc.


Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const AlignableCSCChamber r 
)

Printout the DetUnits in the CSC chamber.

Definition at line 18 of file AlignableCSCChamber.cc.

References AlignableComposite::components(), Alignable::displacement(), Alignable::globalPosition(), Alignable::globalRotation(), i, Alignable::rotation(), Alignable::surface(), and AlignableSurface::toLocal().

                                                                       {
   std::vector<Alignable*> theDets = r.components();

   os << "    This CSCChamber contains " << theDets.size() << " units" << std::endl ;
   os << "    position = " << r.globalPosition() << std::endl;
   os << "    (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << "," << r.globalPosition().z();
   os << "), orientation:" << std::endl<< r.globalRotation() << std::endl;
   
   os << "    total displacement and rotation: " << r.displacement() << std::endl;
   os << r.rotation() << std::endl;
 
   for (std::vector<Alignable*>::const_iterator idet = theDets.begin();  idet != theDets.end();  ++idet) {
      const align::Alignables& comp = (*idet)->components();

      for (unsigned int i = 0; i < comp.size(); ++i) {
         os << "     Det position, phi, r: " 
            << comp[i]->globalPosition() << " , "
            << comp[i]->globalPosition().phi() << " , "
            << comp[i]->globalPosition().perp() << std::endl; 
         os << "     local  position, phi, r: " 
            << r.surface().toLocal(comp[i]->globalPosition())        << " , "
            << r.surface().toLocal(comp[i]->globalPosition()).phi()  << " , "
            << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl; 
      }
   }

   return os;
}