CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonAlignmentInputDB Class Reference

#include <Alignment/MuonAlignment/interface/MuonAlignmentInputDB.h>

Inheritance diagram for MuonAlignmentInputDB:
MuonAlignmentInputMethod

Public Member Functions

 MuonAlignmentInputDB ()
 
 MuonAlignmentInputDB (std::string dtLabel, std::string cscLabel, std::string gemLabel, std::string idealLabel, bool getAPEs)
 
AlignableMuonnewAlignableMuon (const edm::EventSetup &iSetup) const override
 
 ~MuonAlignmentInputDB () override
 
- Public Member Functions inherited from MuonAlignmentInputMethod
 MuonAlignmentInputMethod ()
 
 MuonAlignmentInputMethod (std::string idealLabel)
 
virtual ~MuonAlignmentInputMethod ()
 

Private Member Functions

 MuonAlignmentInputDB (const MuonAlignmentInputDB &)=delete
 
const MuonAlignmentInputDBoperator= (const MuonAlignmentInputDB &)=delete
 

Private Attributes

std::string idealGeometryLabel
 
std::string m_cscLabel
 
std::string m_dtLabel
 
std::string m_gemLabel
 
bool m_getAPEs
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 29 of file MuonAlignmentInputDB.h.

Constructor & Destructor Documentation

◆ MuonAlignmentInputDB() [1/3]

MuonAlignmentInputDB::MuonAlignmentInputDB ( )

Definition at line 40 of file MuonAlignmentInputDB.cc.

41  : m_dtLabel(""), m_cscLabel(""), m_gemLabel(""), idealGeometryLabel("idealForInputDB"), m_getAPEs(false) {}

◆ MuonAlignmentInputDB() [2/3]

MuonAlignmentInputDB::MuonAlignmentInputDB ( std::string  dtLabel,
std::string  cscLabel,
std::string  gemLabel,
std::string  idealLabel,
bool  getAPEs 
)

Definition at line 43 of file MuonAlignmentInputDB.cc.

45  : m_dtLabel(dtLabel),
47  m_gemLabel(gemLabel),
48  idealGeometryLabel(idealLabel),
49  m_getAPEs(getAPEs) {}

◆ ~MuonAlignmentInputDB()

MuonAlignmentInputDB::~MuonAlignmentInputDB ( )
override

Definition at line 56 of file MuonAlignmentInputDB.cc.

56 {}

◆ MuonAlignmentInputDB() [3/3]

MuonAlignmentInputDB::MuonAlignmentInputDB ( const MuonAlignmentInputDB )
privatedelete

Member Function Documentation

◆ newAlignableMuon()

AlignableMuon * MuonAlignmentInputDB::newAlignableMuon ( const edm::EventSetup iSetup) const
overridevirtual

Reimplemented from MuonAlignmentInputMethod.

Definition at line 74 of file MuonAlignmentInputDB.cc.

74  {
75  edm::ESHandle<DTGeometry> dtGeometry;
76  edm::ESHandle<CSCGeometry> cscGeometry;
78  iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, dtGeometry);
79  iSetup.get<MuonGeometryRecord>().get(idealGeometryLabel, cscGeometry);
81 
82  edm::ESHandle<Alignments> dtAlignments;
83  edm::ESHandle<AlignmentErrorsExtended> dtAlignmentErrorsExtended;
84  edm::ESHandle<Alignments> cscAlignments;
85  edm::ESHandle<AlignmentErrorsExtended> cscAlignmentErrorsExtended;
86  edm::ESHandle<Alignments> gemAlignments;
87  edm::ESHandle<AlignmentErrorsExtended> gemAlignmentErrorsExtended;
88  edm::ESHandle<Alignments> globalPositionRcd;
89 
90  iSetup.get<DTAlignmentRcd>().get(m_dtLabel, dtAlignments);
91  iSetup.get<CSCAlignmentRcd>().get(m_cscLabel, cscAlignments);
92  iSetup.get<GEMAlignmentRcd>().get(m_gemLabel, gemAlignments);
93  iSetup.get<GlobalPositionRcd>().get(globalPositionRcd);
94 
95  if (m_getAPEs) {
96  iSetup.get<DTAlignmentErrorExtendedRcd>().get(m_dtLabel, dtAlignmentErrorsExtended);
97  iSetup.get<CSCAlignmentErrorExtendedRcd>().get(m_cscLabel, cscAlignmentErrorsExtended);
98  iSetup.get<GEMAlignmentErrorExtendedRcd>().get(m_gemLabel, gemAlignmentErrorsExtended);
99 
100  GeometryAligner aligner;
101  aligner.applyAlignments<DTGeometry>(&(*dtGeometry),
102  &(*dtAlignments),
103  &(*dtAlignmentErrorsExtended),
104  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
105  aligner.applyAlignments<CSCGeometry>(&(*cscGeometry),
106  &(*cscAlignments),
107  &(*cscAlignmentErrorsExtended),
108  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
109  aligner.applyAlignments<GEMGeometry>(&(*gemGeometry),
110  &(*gemAlignments),
111  &(*gemAlignmentErrorsExtended),
112  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
113 
114  } else {
115  AlignmentErrorsExtended dtAlignmentErrorsExtended2, cscAlignmentErrorsExtended2, gemAlignmentErrorsExtended2;
116 
117  for (std::vector<AlignTransform>::const_iterator i = dtAlignments->m_align.begin();
118  i != dtAlignments->m_align.end();
119  ++i) {
120  CLHEP::HepSymMatrix empty_matrix(3, 0);
121  AlignTransformErrorExtended empty_error(empty_matrix, i->rawId());
122  dtAlignmentErrorsExtended2.m_alignError.push_back(empty_error);
123  }
124  for (std::vector<AlignTransform>::const_iterator i = cscAlignments->m_align.begin();
125  i != cscAlignments->m_align.end();
126  ++i) {
127  CLHEP::HepSymMatrix empty_matrix(3, 0);
128  AlignTransformErrorExtended empty_error(empty_matrix, i->rawId());
129  cscAlignmentErrorsExtended2.m_alignError.push_back(empty_error);
130  }
131  for (std::vector<AlignTransform>::const_iterator i = gemAlignments->m_align.begin();
132  i != gemAlignments->m_align.end();
133  ++i) {
134  CLHEP::HepSymMatrix empty_matrix(3, 0);
135  AlignTransformErrorExtended empty_error(empty_matrix, i->rawId());
136  gemAlignmentErrorsExtended2.m_alignError.push_back(empty_error);
137  }
138 
139  GeometryAligner aligner;
140  aligner.applyAlignments<DTGeometry>(&(*dtGeometry),
141  &(*dtAlignments),
142  &(dtAlignmentErrorsExtended2),
143  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
144  aligner.applyAlignments<CSCGeometry>(&(*cscGeometry),
145  &(*cscAlignments),
146  &(cscAlignmentErrorsExtended2),
147  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
148  aligner.applyAlignments<GEMGeometry>(&(*gemGeometry),
149  &(*gemAlignments),
150  &(gemAlignmentErrorsExtended2),
151  align::DetectorGlobalPosition(*globalPositionRcd, DetId(DetId::Muon)));
152  }
153 
154  return new AlignableMuon(&(*dtGeometry), &(*cscGeometry), &(*gemGeometry));
155 }

References align::AlignableMuon, GeometryAligner::applyAlignments(), align::DetectorGlobalPosition(), gemGeometry_cff::gemGeometry, edm::EventSetup::get(), get, mps_fire::i, idealGeometryLabel, Alignments::m_align, AlignmentErrorsExtended::m_alignError, m_cscLabel, m_dtLabel, m_gemLabel, m_getAPEs, and DetId::Muon.

◆ operator=()

const MuonAlignmentInputDB& MuonAlignmentInputDB::operator= ( const MuonAlignmentInputDB )
privatedelete

Member Data Documentation

◆ idealGeometryLabel

std::string MuonAlignmentInputDB::idealGeometryLabel
private

Definition at line 51 of file MuonAlignmentInputDB.h.

Referenced by newAlignableMuon().

◆ m_cscLabel

std::string MuonAlignmentInputDB::m_cscLabel
private

Definition at line 51 of file MuonAlignmentInputDB.h.

Referenced by newAlignableMuon().

◆ m_dtLabel

std::string MuonAlignmentInputDB::m_dtLabel
private

Definition at line 51 of file MuonAlignmentInputDB.h.

Referenced by newAlignableMuon().

◆ m_gemLabel

std::string MuonAlignmentInputDB::m_gemLabel
private

Definition at line 51 of file MuonAlignmentInputDB.h.

Referenced by newAlignableMuon().

◆ m_getAPEs

bool MuonAlignmentInputDB::m_getAPEs
private

Definition at line 52 of file MuonAlignmentInputDB.h.

Referenced by newAlignableMuon().

DTGeometry
Definition: DTGeometry.h:28
MuonAlignmentInputDB::m_cscLabel
std::string m_cscLabel
Definition: MuonAlignmentInputDB.h:51
GEMAlignmentErrorExtendedRcd
Definition: GEMAlignmentErrorExtendedRcd.h:6
mps_fire.i
i
Definition: mps_fire.py:428
MuonAlignmentInputDB::m_getAPEs
bool m_getAPEs
Definition: MuonAlignmentInputDB.h:52
convertSQLitetoXML_cfg.cscLabel
cscLabel
Definition: convertSQLitetoXML_cfg.py:68
GEMAlignmentRcd
Definition: GEMAlignmentRcd.h:6
GeometryAligner::applyAlignments
void applyAlignments(const C *geometry, const Alignments *alignments, const AlignmentErrorsExtended *alignmentErrors, const AlignTransform &globalCoordinates)
Definition: GeometryAligner.h:52
GlobalPositionRcd
Definition: GlobalPositionRcd.h:6
MuonAlignmentInputDB::m_gemLabel
std::string m_gemLabel
Definition: MuonAlignmentInputDB.h:51
CSCGeometry
Definition: CSCGeometry.h:24
align::AlignableMuon
Definition: StructureType.h:90
DetId
Definition: DetId.h:17
MuonAlignmentInputDB::idealGeometryLabel
std::string idealGeometryLabel
Definition: MuonAlignmentInputDB.h:51
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
convertSQLitetoXML_cfg.getAPEs
getAPEs
Definition: convertSQLitetoXML_cfg.py:71
DTAlignmentRcd
Definition: DTAlignmentRcd.h:6
convertSQLitetoXML_cfg.dtLabel
dtLabel
Definition: convertSQLitetoXML_cfg.py:67
edm::ESHandle< DTGeometry >
DTAlignmentErrorExtendedRcd
Definition: DTAlignmentErrorExtendedRcd.h:6
CSCAlignmentErrorExtendedRcd
Definition: CSCAlignmentErrorExtendedRcd.h:6
align::DetectorGlobalPosition
const AlignTransform & DetectorGlobalPosition(const Alignments &allGlobals, const DetId &id)
Definition: DetectorGlobalPosition.cc:10
get
#define get
AlignmentErrorsExtended
Definition: AlignmentErrorsExtended.h:10
MuonAlignmentInputDB::m_dtLabel
std::string m_dtLabel
Definition: MuonAlignmentInputDB.h:51
AlignTransformErrorExtended
Definition: AlignTransformErrorExtended.h:13
gemGeometry_cff.gemGeometry
gemGeometry
Definition: gemGeometry_cff.py:5
AlignmentErrorsExtended::m_alignError
std::vector< AlignTransformErrorExtended > m_alignError
Definition: AlignmentErrorsExtended.h:19
GEMGeometry
Definition: GEMGeometry.h:24
DetId::Muon
Definition: DetId.h:26
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
CSCAlignmentRcd
Definition: CSCAlignmentRcd.h:6
GeometryAligner
Class to update a given geometry with a set of alignments.
Definition: GeometryAligner.h:33