ATLAS Offline Software
Loading...
Searching...
No Matches
MdtAlignmentStore.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
7#include "GeoModelKernel/throwExcept.h"
8
9
10
12 m_idHelperSvc{idHelperSvc}{
14 m_alignMap.resize(m_idHelperSvc->mdtIdHelper().module_hash_max());
15}
16void 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}
std::vector< chamberDistortions > m_alignMap
const Muon::IMuonIdHelperSvc * m_idHelperSvc
MdtAlignmentStore(const Muon::IMuonIdHelperSvc *idHelperSvc)
void storeDistortion(const Identifier &detElId, const BLinePar *bline, const MdtAsBuiltPar *asBuilt)
Container classifier the MDT as-built parameters See parameter description in http://atlas-muon-align...
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Helper struct to store the pointer to the Mdt distrotion parameters, namely the As-built and the BLin...
#define THROW_EXCEPTION(MESSAGE)
Definition throwExcept.h:10