CMS 3D CMS Logo

AlignableDTChamber.cc
Go to the documentation of this file.
1 
10 
12  // even though we overload alignableObjectId(), it's dangerous to
13  // have two different claims about the structure type
15 
16  // The unique thing about DT chambers is that they are Dets that contain Dets (superlayers)
17  // The superlayer Dets contain DetUnits (layers), as usual
18  const std::vector<const GeomDet*>& geomDets = geomDet->components();
19  for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin(); idet != geomDets.end(); ++idet) {
21  }
22 
23  // DO NOT let the chamber position become an average of the layers
24  this->theSurface = geomDet->surface();
25 }
26 
28 std::ostream& operator<<(std::ostream& os, const AlignableDTChamber& r) {
29  const auto& theDets = r.components();
30 
31  os << " This DTChamber contains " << theDets.size() << " units" << std::endl;
32  os << " position = " << r.globalPosition() << std::endl;
33  os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << ","
34  << 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 (const auto& idet : theDets) {
41  const auto& comp = idet->components();
42 
43  for (unsigned int i = 0; i < comp.size(); ++i) {
44  os << " Det position, phi, r: " << comp[i]->globalPosition() << " , " << comp[i]->globalPosition().phi()
45  << " , " << comp[i]->globalPosition().perp() << std::endl;
46  os << " local position, phi, r: " << r.surface().toLocal(comp[i]->globalPosition()) << " , "
47  << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , "
48  << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl;
49  }
50  }
51 
52  return os;
53 }
mps_fire.i
i
Definition: mps_fire.py:428
funct::false
false
Definition: Factorize.h:29
GeomDet
Definition: GeomDet.h:27
GeomDet::components
virtual std::vector< const GeomDet * > components() const
Returns direct components, if any.
Definition: GeomDet.h:73
align::AlignableDTChamber
Definition: StructureType.h:76
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
AlignableDet
Definition: AlignableDet.h:8
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
operator<<
std::ostream & operator<<(std::ostream &os, const AlignableDTChamber &r)
Printout the DetUnits in the DT chamber.
Definition: AlignableDTChamber.cc:28
align::AlignableDTSuperLayer
Definition: StructureType.h:77
AlignableComposite::addComponent
void addComponent(Alignable *component) final
Definition: AlignableComposite.cc:53
AlignableComposite::theStructureType
StructureType theStructureType
Definition: AlignableComposite.h:114
Alignable::theSurface
AlignableSurface theSurface
Definition: Alignable.h:237
alignCSCRings.r
r
Definition: alignCSCRings.py:93
AlignableDTChamber.h
AlignableDTSuperLayer.h
AlignableDTChamber
A muon DT Chamber( an AlignableDet )
Definition: AlignableDTChamber.h:24
AlignableDTChamber::AlignableDTChamber
AlignableDTChamber(const GeomDet *geomDet)
Constructor.
Definition: AlignableDTChamber.cc:11