CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignableDTSuperLayer.cc
Go to the documentation of this file.
1 
9 
11 {
13  // DO NOT let the chamber position become an average of the layers
14  this->theSurface = geomDet->surface();
15 }
16 
18 std::ostream& operator<< (std::ostream &os, const AlignableDTSuperLayer & r) {
19  std::vector<Alignable*> theDets = r.components();
20 
21  os << " This DTSuperLayer contains " << theDets.size() << " units" << std::endl ;
22  os << " position = " << r.globalPosition() << std::endl;
23  os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << "," << r.globalPosition().z();
24  os << "), orientation:" << std::endl<< r.globalRotation() << std::endl;
25 
26  os << " total displacement and rotation: " << r.displacement() << std::endl;
27  os << r.rotation() << std::endl;
28 
29  for (std::vector<Alignable*>::const_iterator idet = theDets.begin(); idet != theDets.end(); ++idet) {
30  const align::Alignables& comp = (*idet)->components();
31 
32  for (unsigned int i = 0; i < comp.size(); ++i) {
33  os << " Det position, phi, r: "
34  << comp[i]->globalPosition() << " , "
35  << comp[i]->globalPosition().phi() << " , "
36  << comp[i]->globalPosition().perp() << std::endl;
37  os << " local position, phi, r: "
38  << r.surface().toLocal(comp[i]->globalPosition()) << " , "
39  << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
40  << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
41  }
42  }
43 
44  return os;
45 }
int i
Definition: DBlmapReader.cc:9
T perp() const
Definition: PV3DBase.h:72
A muon DT SuperLayer ( an AlignableDet )
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:69
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:132
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:40
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:138
StructureType theStructureType
align::RotationType toLocal(const align::RotationType &) const
Return in local frame a rotation given in global frame.
T z() const
Definition: PV3DBase.h:64
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:126
AlignableDTSuperLayer(const GeomDet *geomDet)
Constructor.
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
AlignableSurface theSurface
Definition: Alignable.h:222