CMS 3D CMS Logo

MuonAlignmentInputDB.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: MuonAlignment
4 // Class : MuonAlignmentInputDB
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Jim Pivarski
10 // Created: Thu Mar 6 17:30:46 CST 2008
11 // $Id: MuonAlignmentInputDB.cc,v 1.4 2009/10/07 20:46:39 pivarski Exp $
12 //
13 
14 // system include files
16 
17 // user include files
29 //
30 // constants, enums and typedefs
31 //
32 
33 //
34 // static data member definitions
35 //
36 
37 //
38 // constructors and destructor
39 //
41  const CSCGeometry* cscGeometry,
42  const GEMGeometry* gemGeometry,
43  const Alignments* dtAlignments,
44  const Alignments* cscAlignments,
45  const Alignments* gemAlignments,
46  const Alignments* globalPositionRcd)
47  : dtGeometry_(dtGeometry),
48  cscGeometry_(cscGeometry),
49  gemGeometry_(gemGeometry),
50  dtAlignments_(dtAlignments),
51  cscAlignments_(cscAlignments),
52  gemAlignments_(gemAlignments),
53  globalPositionRcd_(globalPositionRcd),
54  m_getAPEs(false) {}
56  const CSCGeometry* cscGeometry,
57  const GEMGeometry* gemGeometry,
58  const Alignments* dtAlignments,
59  const Alignments* cscAlignments,
60  const Alignments* gemAlignments,
61  const AlignmentErrorsExtended* dtAlignmentErrorsExtended,
62  const AlignmentErrorsExtended* cscAlignmentErrorsExtended,
63  const AlignmentErrorsExtended* gemAlignmentErrorsExtended,
64  const Alignments* globalPositionRcd)
65  : dtGeometry_(dtGeometry),
66  cscGeometry_(cscGeometry),
67  gemGeometry_(gemGeometry),
68  dtAlignments_(dtAlignments),
69  cscAlignments_(cscAlignments),
70  gemAlignments_(gemAlignments),
71  dtAlignmentErrorsExtended_(dtAlignmentErrorsExtended),
72  cscAlignmentErrorsExtended_(cscAlignmentErrorsExtended),
73  gemAlignmentErrorsExtended_(gemAlignmentErrorsExtended),
74  globalPositionRcd_(globalPositionRcd),
75  m_getAPEs(true) {}
76 
77 // MuonAlignmentInputDB::MuonAlignmentInputDB(const MuonAlignmentInputDB& rhs)
78 // {
79 // // do actual copying here;
80 // }
81 
83 
84 //
85 // assignment operators
86 //
87 // const MuonAlignmentInputDB& MuonAlignmentInputDB::operator=(const MuonAlignmentInputDB& rhs)
88 // {
89 // //An exception safe implementation is
90 // MuonAlignmentInputDB temp(rhs);
91 // swap(rhs);
92 //
93 // return *this;
94 // }
95 
96 //
97 // member functions
98 //
99 
101  if (m_getAPEs) {
102  GeometryAligner aligner;
115 
116  } else {
117  AlignmentErrorsExtended dtAlignmentErrorsExtended2, cscAlignmentErrorsExtended2, gemAlignmentErrorsExtended2;
118 
119  for (std::vector<AlignTransform>::const_iterator i = dtAlignments_->m_align.begin();
120  i != dtAlignments_->m_align.end();
121  ++i) {
122  CLHEP::HepSymMatrix empty_matrix(3, 0);
123  AlignTransformErrorExtended empty_error(empty_matrix, i->rawId());
124  dtAlignmentErrorsExtended2.m_alignError.push_back(empty_error);
125  }
126  for (std::vector<AlignTransform>::const_iterator i = cscAlignments_->m_align.begin();
127  i != cscAlignments_->m_align.end();
128  ++i) {
129  CLHEP::HepSymMatrix empty_matrix(3, 0);
130  AlignTransformErrorExtended empty_error(empty_matrix, i->rawId());
131  cscAlignmentErrorsExtended2.m_alignError.push_back(empty_error);
132  }
133  for (std::vector<AlignTransform>::const_iterator i = gemAlignments_->m_align.begin();
134  i != gemAlignments_->m_align.end();
135  ++i) {
136  CLHEP::HepSymMatrix empty_matrix(3, 0);
137  AlignTransformErrorExtended empty_error(empty_matrix, i->rawId());
138  gemAlignmentErrorsExtended2.m_alignError.push_back(empty_error);
139  }
140 
141  GeometryAligner aligner;
144  &dtAlignmentErrorsExtended2,
148  &cscAlignmentErrorsExtended2,
152  &gemAlignmentErrorsExtended2,
154  }
155 
157 }
158 
159 //
160 // const member functions
161 //
162 
163 //
164 // static member functions
165 //
AlignableMuon * newAlignableMuon() const override
const Alignments * dtAlignments_
Class to update a given geometry with a set of alignments.
const GEMGeometry * gemGeometry_
MuonAlignmentInputDB(const DTGeometry *dtGeometry, const CSCGeometry *cscGeometry, const GEMGeometry *gemGeometry, const Alignments *dtAlignments, const Alignments *cscAlignments, const Alignments *gemAlignments, const Alignments *globalPositionRcd)
const AlignmentErrorsExtended * cscAlignmentErrorsExtended_
const Alignments * cscAlignments_
std::vector< AlignTransform > m_align
Definition: Alignments.h:19
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
const AlignmentErrorsExtended * gemAlignmentErrorsExtended_
const DTGeometry * dtGeometry_
Definition: DetId.h:17
const Alignments * gemAlignments_
const AlignmentErrorsExtended * dtAlignmentErrorsExtended_
std::vector< AlignTransformErrorExtended > m_alignError
const CSCGeometry * cscGeometry_
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
const Alignments * globalPositionRcd_
Constructor of the full muon geometry.
Definition: AlignableMuon.h:38