CMS 3D CMS Logo

AlignableCSCChamber.cc
Go to the documentation of this file.
1 
9 
12  // DO NOT let the chamber position become an average of the layers
13  // FIXME: is this redundant?
14  theSurface = geomDet->surface();
16 }
17 
18 void AlignableCSCChamber::update(const GeomDet* geomDet) {
19  AlignableDet::update(geomDet);
20  // DO NOT let the chamber position become an average of the layers
21  // FIXME: is this redundant?
22  theSurface = geomDet->surface();
23 }
24 
26 std::ostream& operator<<(std::ostream& os, const AlignableCSCChamber& r) {
27  const auto& theDets = r.components();
28 
29  os << " This CSCChamber contains " << theDets.size() << " units" << std::endl;
30  os << " position = " << r.globalPosition() << std::endl;
31  os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << ","
32  << r.globalPosition().z();
33  os << "), orientation:" << std::endl << r.globalRotation() << std::endl;
34 
35  os << " total displacement and rotation: " << r.displacement() << std::endl;
36  os << r.rotation() << std::endl;
37 
38  for (const auto& idet : theDets) {
39  const auto& comp = idet->components();
40 
41  for (unsigned int i = 0; i < comp.size(); ++i) {
42  os << " Det position, phi, r: " << comp[i]->globalPosition() << " , " << comp[i]->globalPosition().phi()
43  << " , " << comp[i]->globalPosition().perp() << std::endl;
44  os << " local position, phi, r: " << r.surface().toLocal(comp[i]->globalPosition()) << " , "
45  << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
46  << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
47  }
48  }
49 
50  return os;
51 }
const Alignables & components() const override
Return vector of direct components.
void update(const GeomDet *geomDet)
Updater.
T perp() const
Definition: PV3DBase.h:69
AlignableCSCChamber(const GeomDet *geomDet)
Constructor.
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:141
friend std::ostream & operator<<(std::ostream &, const AlignableCSCChamber &)
Printout the DetUnits in the CSC chamber.
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:138
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
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
CompConstraintType compConstraintType_
Definition: Alignable.h:246
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:135
AlignableSurface theSurface
Definition: Alignable.h:237
A muon CSC Chamber( an AlignableDet )