ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonPhaseII
MuonConditions
MuonAlignmentDataR4
src
MdtAlignmentStore.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include <
MuonAlignmentDataR4/MdtAlignmentStore.h
>
5
#include <
MuonAlignmentData/MdtAsBuiltPar.h
>
6
#include <
MuonAlignmentData/BLinePar.h
>
7
#include "GeoModelKernel/throwExcept.h"
8
9
10
11
MdtAlignmentStore::MdtAlignmentStore
(
const
Muon::IMuonIdHelperSvc
* idHelperSvc):
12
m_idHelperSvc
{idHelperSvc}{
14
m_alignMap
.resize(
m_idHelperSvc
->mdtIdHelper().module_hash_max());
15
}
16
void
MdtAlignmentStore::storeDistortion
(
const
Identifier
& detElId,
const
BLinePar
* bline,
const
MdtAsBuiltPar
* asBuilt) {
17
if
(!bline && !asBuilt)
return
;
18
unsigned
int
idx =
m_idHelperSvc
->moduleHash(detElId);
19
if
(idx >=
m_alignMap
.size()) {
20
THROW_EXCEPTION
(
"Invalid hash for "
<<
m_idHelperSvc
->toString(detElId));
21
}
22
chamberDistortions
& distorts =
m_alignMap
[idx];
23
if
(distorts &&(distorts.
bLine
!= bline || distorts.
asBuilt
!= asBuilt)) {
24
THROW_EXCEPTION
(
"The alignment parameter "
<<
m_idHelperSvc
->toString(detElId)<<
" is already cached "
);
25
}
26
distorts.
bLine
= bline;
27
distorts.
asBuilt
= asBuilt;
28
}
BLinePar.h
MdtAlignmentStore.h
MdtAsBuiltPar.h
BLinePar
Definition
BLinePar.h:14
MdtAlignmentStore::m_alignMap
std::vector< chamberDistortions > m_alignMap
Definition
MdtAlignmentStore.h:48
MdtAlignmentStore::m_idHelperSvc
const Muon::IMuonIdHelperSvc * m_idHelperSvc
Definition
MdtAlignmentStore.h:47
MdtAlignmentStore::MdtAlignmentStore
MdtAlignmentStore(const Muon::IMuonIdHelperSvc *idHelperSvc)
Definition
MdtAlignmentStore.cxx:11
MdtAlignmentStore::storeDistortion
void storeDistortion(const Identifier &detElId, const BLinePar *bline, const MdtAsBuiltPar *asBuilt)
Definition
MdtAlignmentStore.cxx:16
MdtAsBuiltPar
Container classifier the MDT as-built parameters See parameter description in http://atlas-muon-align...
Definition
MdtAsBuiltPar.h:19
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition
IMuonIdHelperSvc.h:27
Identifier
Definition
IdentifierFieldParser.cxx:14
MdtAlignmentStore::chamberDistortions
Helper struct to store the pointer to the Mdt distrotion parameters, namely the As-built and the BLin...
Definition
MdtAlignmentStore.h:32
MdtAlignmentStore::chamberDistortions::asBuilt
const MdtAsBuiltPar * asBuilt
Definition
MdtAlignmentStore.h:34
MdtAlignmentStore::chamberDistortions::bLine
const BLinePar * bLine
Definition
MdtAlignmentStore.h:33
THROW_EXCEPTION
#define THROW_EXCEPTION(MESSAGE)
Definition
throwExcept.h:10
Generated on
for ATLAS Offline Software by
1.17.0