ATLAS Offline Software
ActsMuonAlignCondAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONCONDALGR4_ACTSMUONALIGNCONDALG_H
5 #define MUONCONDALGR4_ACTSMUONALIGNCONDALG_H
6 
10 
15 
19 
20 #include <map>
21 #include <set>
22 #include <unordered_map>
23 /* The ActsMuonAlignCondAlg takes the ALineContainer and translates this into the
24  * a GeoAlignmentStore. The store is filled with the AlignableTransforms of the ReadoutGeometry
25  * which are connected with the A-line transformations of the ALineContainer.
26  **/
28 public:
29  ActsMuonAlignCondAlg(const std::string& name, ISvcLocator* pSvcLocator);
30  virtual ~ActsMuonAlignCondAlg() = default;
31  virtual StatusCode initialize() override;
32  virtual StatusCode execute(const EventContext& ctx) const override;
33  virtual bool isReEntrant() const override { return false; }
34 
35 private:
38  Identifier alignmentId(const MuonGMR4::MuonReadoutElement* reElement) const;
39 
41  using deltaMap = std::unordered_map<const GeoAlignableTransform*, std::shared_ptr<const Amg::Transform3D>>;
43  using alignTechMap = std::map<ActsTrk::DetectorType, std::set<const GeoAlignableTransform*>>;
46  StatusCode loadDeltas(const EventContext& ctx,
47  deltaMap& alignDeltas,
48  alignTechMap& techTransforms) const;
51  StatusCode loadMdtDeformPars(const EventContext& ctx,
53 
54  StatusCode loadMmDeformPars(const EventContext& ctx,
56 
57  StatusCode loadStgcDeformPars(const EventContext& ctx,
59 
62  StatusCode declareDependencies(const EventContext& ctx,
63  ActsTrk::DetectorType detType,
65 
66  std::vector<ActsTrk::DetectorType> m_techs{};
67 
68  SG::ReadCondHandleKey<ALineContainer> m_readKeyALines{this, "ReadKeyALines", "ALineContainer",
69  "Key of the ALine container created from the DB"};
70 
71  SG::ReadCondHandleKey<BLineContainer> m_readKeyBLines{this, "ReadKeyBLines", "BLineContainer",
72  "Key of the BLine container created from the DB"};
73 
74  SG::ReadCondHandleKey<MdtAsBuiltContainer> m_readMdtAsBuiltKey{this, "ReadMdtAsBuiltKey", "MdtAsBuiltContainer",
75  "Key of output muon alignment MDT/AsBuilt condition data"};
76  SG::ReadCondHandleKey<NswAsBuiltDbData> m_readNswAsBuiltKey{this, "ReadNswAsBuiltKey", "NswAsBuiltDbData",
77  "Key of NswAsBuiltDbData object containing conditions data for NSW as-built params!"};
78  SG::ReadCondHandleKey<NswPassivationDbData> m_readNswPassivKey {this, "dMmPassivationKey", "NswPassivationDbData",
79  "Key of NswPassivationDbData object containing passivation data for MMs"};
80 
82  "Keys of the alignment technologies"};
83  Gaudi::Property<std::string> m_keyToken{this, "CondKeyToken","ActsAlignContainer",
84  "Common name token of all written alignment objects (e.g.) MdtActsAlignContainer"};
85  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
86 
88 
89  Gaudi::Property<bool> m_applyMmPassivation{this, "applyMmPassivation", false};
90 
91  Gaudi::Property<bool> m_applyNswAsBuilt{this, "applyNswAsBuilt", false,
92  "Toggles the application of the Nsw as-built parameters"};
93 
94  Gaudi::Property<bool> m_applyMdtAsBuilt{this, "applyMdtAsBuilt", false,
95  "Toggles the application of the Mdt as-built parameters"};
97  Gaudi::Property<bool> m_applyALines{this, "applyALines", true};
99  Gaudi::Property<bool> m_applyBLines{this, "applyBLines", false};
101  Gaudi::Property<bool> m_fillAlignStoreCache{this, "FillAlignCache", false};
103  Gaudi::Property<bool> m_fillGeoAlignStore{this, "FillGeoAlignStore", true};
104 
105 };
106 
107 
108 #endif
ActsMuonAlignCondAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: ActsMuonAlignCondAlg.cxx:239
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:69
ActsMuonAlignCondAlg::m_fillGeoAlignStore
Gaudi::Property< bool > m_fillGeoAlignStore
Flag toggling whether the GeoAlignmentStore shall be filled.
Definition: ActsMuonAlignCondAlg.h:103
ActsMuonAlignCondAlg::loadDeltas
StatusCode loadDeltas(const EventContext &ctx, deltaMap &alignDeltas, alignTechMap &techTransforms) const
Loads the ALineContainer from the conditions store and fills the deltaMap with the A-Line delta trans...
Definition: ActsMuonAlignCondAlg.cxx:79
MuonGMR4::MuonDetectorManager
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonDetectorManager.h:61
ActsTrk::DetectorType
DetectorType
Simple enum to Identify the Type of the ACTS sub detector.
Definition: GeometryDefs.h:17
ActsMuonAlignCondAlg::declareDependencies
StatusCode declareDependencies(const EventContext &ctx, ActsTrk::DetectorType detType, SG::WriteCondHandle< ActsTrk::DetectorAlignStore > &writeHandle) const
Loads the corresponding ReadCondHandles from the Conditions store and adds their IOVs to the dependen...
Definition: ActsMuonAlignCondAlg.cxx:209
ActsTrk::DetectorAlignStore
Definition: DetectorAlignStore.h:20
ActsMuonAlignCondAlg::isReEntrant
virtual bool isReEntrant() const override
Definition: ActsMuonAlignCondAlg.h:33
MuonGMR4::MuonReadoutElement
The MuonReadoutElement is an abstract class representing the geometry representing the muon detector.
Definition: MuonPhaseII/MuonDetDescr/MuonReadoutGeometryR4/MuonReadoutGeometryR4/MuonReadoutElement.h:38
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
ActsMuonAlignCondAlg::m_applyBLines
Gaudi::Property< bool > m_applyBLines
Apply the chamber deformation model (Mdts + Nsw)
Definition: ActsMuonAlignCondAlg.h:99
sTgcAlignmentStore.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
ActsMuonAlignCondAlg::m_fillAlignStoreCache
Gaudi::Property< bool > m_fillAlignStoreCache
Flag toggling whether the alignment store shall be filled with the transforms or not.
Definition: ActsMuonAlignCondAlg.h:101
ActsMuonAlignCondAlg::alignmentId
Identifier alignmentId(const MuonGMR4::MuonReadoutElement *reElement) const
Returns the Identifier serving as key to find the alignment parameters connected with the readout ele...
Definition: ActsMuonAlignCondAlg.cxx:62
CorrContainer.h
ActsMuonAlignCondAlg::m_readNswAsBuiltKey
SG::ReadCondHandleKey< NswAsBuiltDbData > m_readNswAsBuiltKey
Definition: ActsMuonAlignCondAlg.h:76
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
MdtAlignmentStore.h
WriteCondHandle.h
ActsMuonAlignCondAlg::m_readMdtAsBuiltKey
SG::ReadCondHandleKey< MdtAsBuiltContainer > m_readMdtAsBuiltKey
Definition: ActsMuonAlignCondAlg.h:74
ActsMuonAlignCondAlg::m_detMgr
const MuonGMR4::MuonDetectorManager * m_detMgr
Definition: ActsMuonAlignCondAlg.h:87
MuonDetectorManager.h
ActsMuonAlignCondAlg::m_writeKeys
SG::WriteCondHandleKeyArray< ActsTrk::DetectorAlignStore > m_writeKeys
Definition: ActsMuonAlignCondAlg.h:81
ActsMuonAlignCondAlg::m_readNswPassivKey
SG::ReadCondHandleKey< NswPassivationDbData > m_readNswPassivKey
Definition: ActsMuonAlignCondAlg.h:78
ActsMuonAlignCondAlg::deltaMap
std::unordered_map< const GeoAlignableTransform *, std::shared_ptr< const Amg::Transform3D > > deltaMap
Association map of the GeoAlignableTransforms with the rigid alignment transformations.
Definition: ActsMuonAlignCondAlg.h:41
ActsMuonAlignCondAlg::m_applyMmPassivation
Gaudi::Property< bool > m_applyMmPassivation
Definition: ActsMuonAlignCondAlg.h:89
ActsMuonAlignCondAlg::m_applyNswAsBuilt
Gaudi::Property< bool > m_applyNswAsBuilt
Definition: ActsMuonAlignCondAlg.h:91
ActsMuonAlignCondAlg::m_techs
std::vector< ActsTrk::DetectorType > m_techs
Definition: ActsMuonAlignCondAlg.h:66
CondHandleKeyArray.h
ActsMuonAlignCondAlg::alignTechMap
std::map< ActsTrk::DetectorType, std::set< const GeoAlignableTransform * > > alignTechMap
Association map of the GeoAlignable transforms with the detector technologies.
Definition: ActsMuonAlignCondAlg.h:43
AthReentrantAlgorithm.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
DetectorAlignStore.h
ActsMuonAlignCondAlg::initialize
virtual StatusCode initialize() override
Definition: ActsMuonAlignCondAlg.cxx:26
ActsMuonAlignCondAlg::~ActsMuonAlignCondAlg
virtual ~ActsMuonAlignCondAlg()=default
SG::ReadCondHandleKey< ALineContainer >
ActsMuonAlignCondAlg::loadStgcDeformPars
StatusCode loadStgcDeformPars(const EventContext &ctx, ActsTrk::DetectorAlignStore &store) const
Definition: ActsMuonAlignCondAlg.cxx:183
ActsMuonAlignCondAlg
Definition: ActsMuonAlignCondAlg.h:27
ActsMuonAlignCondAlg::ActsMuonAlignCondAlg
ActsMuonAlignCondAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: ActsMuonAlignCondAlg.cxx:23
ActsMuonAlignCondAlg::loadMdtDeformPars
StatusCode loadMdtDeformPars(const EventContext &ctx, ActsTrk::DetectorAlignStore &store) const
Loads the BLine container and the Mdt-as built parameters from the Conditions store and stores them i...
Definition: ActsMuonAlignCondAlg.cxx:119
ActsMuonAlignCondAlg::m_readKeyBLines
SG::ReadCondHandleKey< BLineContainer > m_readKeyBLines
Definition: ActsMuonAlignCondAlg.h:71
MmAlignmentStore.h
ActsMuonAlignCondAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: ActsMuonAlignCondAlg.h:85
ActsMuonAlignCondAlg::loadMmDeformPars
StatusCode loadMmDeformPars(const EventContext &ctx, ActsTrk::DetectorAlignStore &store) const
Definition: ActsMuonAlignCondAlg.cxx:155
ActsMuonAlignCondAlg::m_keyToken
Gaudi::Property< std::string > m_keyToken
Definition: ActsMuonAlignCondAlg.h:83
ActsMuonAlignCondAlg::m_applyALines
Gaudi::Property< bool > m_applyALines
Apply translations and rotations to align the Muon stations.
Definition: ActsMuonAlignCondAlg.h:97
SG::WriteCondHandle
Definition: WriteCondHandle.h:26
ActsMuonAlignCondAlg::m_readKeyALines
SG::ReadCondHandleKey< ALineContainer > m_readKeyALines
Definition: ActsMuonAlignCondAlg.h:68
IMuonIdHelperSvc.h
ActsMuonAlignCondAlg::m_applyMdtAsBuilt
Gaudi::Property< bool > m_applyMdtAsBuilt
Definition: ActsMuonAlignCondAlg.h:94
ServiceHandle< Muon::IMuonIdHelperSvc >