CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
AlignableDTChamber.cc File Reference
#include "Alignment/MuonAlignment/interface/AlignableDTChamber.h"
#include "Alignment/MuonAlignment/interface/AlignableDTSuperLayer.h"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const AlignableDTChamber &r)
 Printout the DetUnits in the DT chamber. More...
 

Detailed Description

Date:
2008/03/26 21:59:25
Revision:
1.10
Author
Andre Sznajder - UERJ(Brazil)

Definition in file AlignableDTChamber.cc.

Function Documentation

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

Printout the DetUnits in the DT chamber.

Definition at line 30 of file AlignableDTChamber.cc.

References AlignableComposite::components(), Alignable::displacement(), Alignable::globalPosition(), Alignable::globalRotation(), i, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), Alignable::rotation(), Alignable::surface(), AlignableSurface::toLocal(), and PV3DBase< T, PVType, FrameType >::z().

30  {
31  std::vector<Alignable*> theDets = r.components();
32 
33  os << " This DTChamber contains " << theDets.size() << " units" << std::endl ;
34  os << " position = " << r.globalPosition() << std::endl;
35  os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << "," << r.globalPosition().z();
36  os << "), orientation:" << std::endl<< r.globalRotation() << std::endl;
37 
38  os << " total displacement and rotation: " << r.displacement() << std::endl;
39  os << r.rotation() << std::endl;
40 
41  for (std::vector<Alignable*>::const_iterator idet = theDets.begin(); idet != theDets.end(); ++idet) {
42  const align::Alignables& comp = (*idet)->components();
43 
44  for (unsigned int i = 0; i < comp.size(); ++i) {
45  os << " Det position, phi, r: "
46  << comp[i]->globalPosition() << " , "
47  << comp[i]->globalPosition().phi() << " , "
48  << comp[i]->globalPosition().perp() << std::endl;
49  os << " local position, phi, r: "
50  << r.surface().toLocal(comp[i]->globalPosition()) << " , "
51  << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
52  << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
53  }
54  }
55 
56  return os;
57 }
int i
Definition: DBlmapReader.cc:9
T perp() const
Definition: PV3DBase.h:66
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:135
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:132
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:138
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
T z() const
Definition: PV3DBase.h:58
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
std::vector< Alignable * > Alignables
Definition: Utilities.h:28
virtual Alignables components() const
Return vector of direct components.
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:129