#include <Alignment/MuonAlignment/interface/AlignableDTChamber.h>
Public Member Functions | |
AlignableDTChamber (const GeomDet *geomDet) | |
Constructor. | |
Friends | |
std::ostream & | operator<< (std::ostream &, const AlignableDTChamber &) |
Printout the DetUnits in the DT chamber. |
The alignable muon DT chamber.
Definition at line 25 of file AlignableDTChamber.h.
AlignableDTChamber::AlignableDTChamber | ( | const GeomDet * | geomDet | ) |
Constructor.
Definition at line 11 of file AlignableDTChamber.cc.
References AlignableComposite::addComponent(), align::AlignableDTChamber, align::AlignableDTSuperLayer, GeomDet::components(), GeomDet::surface(), AlignableComposite::theStructureType, and Alignable::theSurface.
00012 : AlignableDet(geomDet, false) 00013 { 00014 // even though we overload alignableObjectId(), it's dangerous to 00015 // have two different claims about the structure type 00016 theStructureType = align::AlignableDTChamber; 00017 00018 // The unique thing about DT chambers is that they are Dets that contain Dets (superlayers) 00019 // The superlayer Dets contain DetUnits (layers), as usual 00020 const std::vector<const GeomDet*>& geomDets = geomDet->components(); 00021 for (std::vector<const GeomDet*>::const_iterator idet = geomDets.begin(); idet != geomDets.end(); ++idet) { 00022 addComponent(new AlignableDTSuperLayer(*idet)); 00023 } 00024 00025 // DO NOT let the chamber position become an average of the layers 00026 this->theSurface = geomDet->surface(); 00027 }
std::ostream& operator<< | ( | std::ostream & | os, | |
const AlignableDTChamber & | r | |||
) | [friend] |
Printout the DetUnits in the DT chamber.
Definition at line 30 of file AlignableDTChamber.cc.
00030 { 00031 std::vector<Alignable*> theDets = r.components(); 00032 00033 os << " This DTChamber contains " << theDets.size() << " units" << std::endl ; 00034 os << " position = " << r.globalPosition() << std::endl; 00035 os << " (phi, r, z)= (" << r.globalPosition().phi() << "," << r.globalPosition().perp() << "," << r.globalPosition().z(); 00036 os << "), orientation:" << std::endl<< r.globalRotation() << std::endl; 00037 00038 os << " total displacement and rotation: " << r.displacement() << std::endl; 00039 os << r.rotation() << std::endl; 00040 00041 for (std::vector<Alignable*>::const_iterator idet = theDets.begin(); idet != theDets.end(); ++idet) { 00042 const align::Alignables& comp = (*idet)->components(); 00043 00044 for (unsigned int i = 0; i < comp.size(); ++i) { 00045 os << " Det position, phi, r: " 00046 << comp[i]->globalPosition() << " , " 00047 << comp[i]->globalPosition().phi() << " , " 00048 << comp[i]->globalPosition().perp() << std::endl; 00049 os << " local position, phi, r: " 00050 << r.surface().toLocal(comp[i]->globalPosition()) << " , " 00051 << r.surface().toLocal(comp[i]->globalPosition()).phi() << " , " 00052 << r.surface().toLocal(comp[i]->globalPosition()).perp() << std::endl; 00053 } 00054 } 00055 00056 return os; 00057 }