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:72
AlignableDTChamber(const GeomDet *geomDet)
Constructor.
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition: Alignable.h:140
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const RotationType & globalRotation() const
Return the global orientation of the object.
Definition: Alignable.h:137
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
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:143
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:131
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
Definition: GeomDet.h:88
std::vector< Alignable * > Alignables
Definition: Utilities.h:30
virtual Alignables components() const
Return vector of direct components.
const PositionType & globalPosition() const
Return the global position of the object.
Definition: Alignable.h:134
volatile std::atomic< bool > shutdown_flag false
AlignableSurface theSurface
Definition: Alignable.h:227
virtual void addComponent(Alignable *component)