31 alignableObjectId_(
nullptr, dtGeometry, cscGeometry) {
44 edm::LogInfo(
"AlignableMuon") <<
"Constructing alignable muon objects DONE";
62 edm::LogInfo(
"Alignment") <<
"@SUB=AlignableMuon::update" 63 <<
"Updating alignable muon objects DONE";
68 LogDebug(
"Position") <<
"Constructing AlignableDTBarrel";
71 std::vector<AlignableDTChamber*> tmpDTChambersInStation;
72 std::vector<AlignableDTStation*> tmpDTStationsInWheel;
75 for (
int iwh = -2; iwh < 3; iwh++) {
77 for (
int ist = 1; ist < 5; ist++) {
80 std::vector<const GeomDet*>
82 for (
const auto& det : pDT->
chambers()) {
87 int wh = chamberId.
wheel();
92 if (iwh == wh && ist == st) {
95 theDTBarrel.back()->wheel(iwh + 2).station(ist - 1).chamber(iChamber).update(det);
101 tmpDTChambersInStation.push_back(tmpDTChamber);
119 tmpDTStationsInWheel.push_back(tmpDTStation);
122 tmpDTChambersInStation.clear();
138 tmpDTStationsInWheel.clear();
158 LogDebug(
"Position") <<
"Constructing AlignableCSCBarrel";
161 std::vector<AlignableCSCStation*> tmpCSCStationsInEndcap;
164 for (
int iec = 1; iec < 3; iec++) {
166 std::vector<AlignableCSCRing*> tmpCSCRingsInStation;
169 for (
int ist = 1; ist < 5; ist++) {
171 std::vector<AlignableCSCChamber*> tmpCSCChambersInRing;
174 for (
int iri = 1; iri < 5; iri++) {
178 for (
const auto& det : vc) {
185 int ri = cscId.
ring();
189 if (iec == ec && ist == st && iri == ri) {
192 theCSCEndcaps[iec - 1]->station(ist - 1).ring(iri - 1).chamber(iChamber).update(det);
197 tmpCSCChambersInRing.push_back(tmpCSCChamber);
209 if (!tmpCSCChambersInRing.empty()) {
217 tmpCSCRingsInStation.push_back(tmpCSCRing);
220 tmpCSCChambersInRing.clear();
237 tmpCSCStationsInEndcap.push_back(tmpCSCStation);
240 tmpCSCRingsInStation.clear();
257 tmpCSCStationsInEndcap.clear();
274 for (align::Alignables::const_iterator chamberIter = chambers.begin(); chamberIter != chambers.end(); ++chamberIter) {
276 for (align::Alignables::const_iterator superlayerIter = superlayers.begin(); superlayerIter != superlayers.end();
279 for (align::Alignables::const_iterator layerIter = layers.begin(); layerIter != layers.end(); ++layerIter) {
280 result.push_back(*layerIter);
293 for (align::Alignables::const_iterator chamberIter = chambers.begin(); chamberIter != chambers.end(); ++chamberIter) {
295 for (align::Alignables::const_iterator superlayerIter = superlayers.begin(); superlayerIter != superlayers.end();
297 result.push_back(*superlayerIter);
337 for (align::Alignables::const_iterator chamberIter = chambers.begin(); chamberIter != chambers.end(); ++chamberIter) {
339 for (align::Alignables::const_iterator layerIter = layers.begin(); layerIter != layers.end(); ++layerIter) {
340 result.push_back(*layerIter);
377 for (
const auto& iter : alignable->
components()) {
378 iter->setMother(alignable);
388 for (align::Alignables::iterator
i = comp.begin();
i != comp.end();
i++) {
389 Alignments* tmpAlignments = (*i)->alignments();
391 delete tmpAlignments;
395 std::sort(m_alignments->
m_align.begin(), m_alignments->
m_align.end());
405 for (align::Alignables::iterator
i = comp.begin();
i != comp.end();
i++) {
410 delete tmpAlignmentErrorsExtended;
416 return m_alignmentErrors;
423 return tmpAlignments;
430 return tmpAlignmentErrorsExtended;
442 return tmpAlignments;
453 back_inserter(tmpAlignmentErrorsExtended->
m_alignError));
456 back_inserter(tmpAlignmentErrorsExtended->
m_alignError));
458 return tmpAlignmentErrorsExtended;
A muon DT Chamber( an AlignableDet )
const std::vector< const DTChamber * > & chambers() const
Return a vector of all Chamber.
AlignmentErrorsExtended * alignmentErrors() const override
Get alignment errors sorted by DetId.
align::Alignables DTLayers()
Methods to return specific of components.
void update(const DTGeometry *, const CSCGeometry *)
align::Alignables CSCChambers()
Alignments * alignments() const override
Get alignments sorted by DetId.
align::Alignables DTBarrel()
align::Alignables CSCStations()
align::Alignables DTStations()
const ChamberContainer & chambers() const
Return a vector of all chambers.
~AlignableMuon() override
Destructor.
virtual const Alignables & components() const =0
Return vector of all direct components.
std::vector< AlignTransform > m_align
std::vector< AlignableCSCEndcap * > theCSCEndcaps
Alignments * dtAlignments()
Get DT alignments sorted by DetId.
align::Alignables CSCEndcaps()
align::Alignables theMuonComponents
align::Alignables DTChambers()
align::Alignables DTWheels()
std::vector< AlignableCSCStation * > theCSCStations
void recursiveSetMothers(Alignable *alignable)
Set mothers recursively.
std::vector< AlignableDTStation * > theDTStations
AlignmentErrorsExtended * cscAlignmentErrorsExtended()
Get CSC alignment errors sorted by DetId.
align::Alignables CSCLayers()
void buildCSCEndcap(const CSCGeometry *, bool update=false)
Build muon end caps.
std::vector< AlignableDTChamber * > theDTChambers
Containers of separate components.
std::vector< AlignableCSCRing * > theCSCRings
std::vector< AlignTransformErrorExtended > m_alignError
align::Alignables DTSuperLayers()
Alignments * cscAlignments()
Get CSC alignments sorted by DetId.
const align::Alignables & components() const final
Return all components.
AlignableMuon(const DTGeometry *, const CSCGeometry *)
Constructor from geometries.
AlignmentErrorsExtended * dtAlignmentErrorsExtended()
Get DT alignment errors sorted by DetId.
std::vector< Alignable * > Alignables
std::vector< const CSCChamber * > ChamberContainer
align::Alignables CSCRings()
void buildDTBarrel(const DTGeometry *, bool update=false)
Build muon barrel.
std::vector< AlignableDTBarrel * > theDTBarrel
std::vector< AlignableDTWheel * > theDTWheels
int station() const
Return the station number.
static char chambers[264][20]
int wheel() const
Return the wheel number.
Constructor of the full muon geometry.
std::vector< AlignableCSCChamber * > theCSCChambers
A muon CSC Chamber( an AlignableDet )