CMS 3D CMS Logo

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