CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignableDTChamber.cc
Go to the documentation of this file.
1 
10 
12  : AlignableDet(geomDet, false)
13 {
14  // even though we overload alignableObjectId(), it's dangerous to
15  // have two different claims about the structure type
17 
18  // The unique thing about DT chambers is that they are Dets that contain Dets (superlayers)
19  // The superlayer Dets contain DetUnits (layers), as usual
20  const std::vector<const GeomDet*>& geomDets = geomDet->components();
21  for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin(); idet != geomDets.end(); ++idet) {
23  }
24 
25  // DO NOT let the chamber position become an average of the layers
26  this->theSurface = geomDet->surface();
27 }
28 
30 std::ostream& operator<< (std::ostream &os, const AlignableDTChamber & r) {
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 }
A muon DT Chamber( an AlignableDet )
int i
Definition: DBlmapReader.cc:9
T perp() const
Definition: PV3DBase.h:66
AlignableDTChamber(const GeomDet *geomDet)
Constructor.
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
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
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:58
virtual std::vector< const GeomDet * > components() const =0
Returns direct components, if any.
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
virtual const BoundPlane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
AlignableSurface theSurface
Definition: Alignable.h:216
virtual void addComponent(Alignable *component)