CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
AlignableGEMChamber.cc
Go to the documentation of this file.
1 /* AlignableGEMChamber
2  * \author Hyunyong Kim - TAMU
3  */
5 
8  theSurface = geomDet->surface();
9 }
10 
11 void AlignableGEMChamber::update(const GeomDet* geomDet) {
12  AlignableDet::update(geomDet);
13  theSurface = geomDet->surface();
14 }
15 
16 std::ostream& operator<<(std::ostream& os, const AlignableGEMChamber& r) {
17  const auto& theDets = r.components();
18 
19  os << " This GEMChamber contains " << theDets.size() << " units" << std::endl;
20  os << " position = " << r.globalPosition() << std::endl;
21  os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << ","
22  << r.globalPosition().z();
23  os << "), orientation:" << std::endl << r.globalRotation() << std::endl;
24 
25  os << " total displacement and rotation: " << r.displacement() << std::endl;
26  os << r.rotation() << std::endl;
27 
28  for (const auto& idet : theDets) {
29  const auto& comp = idet->components();
30 
31  for (unsigned int i = 0; i < comp.size(); ++i) {
32  os << " Det position, phi, r: " << comp[i]->globalPosition() << " , " << comp[i]->globalPosition().phi()
33  << " , " << comp[i]->globalPosition().perp() << std::endl;
34  os << " local position, phi, r: " << r.surface().toLocal(comp[i]->globalPosition()) << " , "
35  << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
36  << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
37  }
38  }
39 
40  return os;
41 }
void update(const GeomDet *geomDet)
T perp() const
Definition: PV3DBase.h:69
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:141
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
const Alignables & components() const override
Return vector of direct components.
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:138
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition: Alignable.h:144
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:61
AlignableGEMChamber(const GeomDet *geomDet)
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
Definition: Alignable.h:132
void update(const GeomDet *geomDet, bool updateComponents=true)
Definition: AlignableDet.cc:50
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:135
AlignableSurface theSurface
Definition: Alignable.h:237