ATLAS Offline Software
Loading...
Searching...
No Matches
HGTDAlignDBTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef HGTDALIGNGENTOOLS_HGTDALIGNDBTOOL_H
6#define HGTDALIGNGENTOOLS_HGTDALIGNDBTOOL_H
7
8// HGTDAlignDBTool.h
9// AlgTool for creating and managing HGTD alignment payloads.
10// Unlike the legacy Inner Detector alignment framework, HGTD alignment
11// constants are represented directly at the detector-module level.
12// Each HGTD detector element has one AlignableTransform entry.
13// The tool provides utilities to
14// • create an empty alignment payload
15// • modify module transforms
16// • retrieve module transforms
17// • print payload contents
18// • stream payloads to POOL/SQLite
19// • register payloads in the Conditions Database
20// Fatima Bendebba, started 2026
21
22#include <string>
25#include "GaudiKernel/ToolHandle.h"
30
31class Identifier;
34class HGTD_ID;
35
37 : public AthAlgTool,
38 virtual public IHGTDAlignDBTool
39{
40
41public:
42
43 HGTDAlignDBTool(const std::string& type,
44 const std::string& name,
45 const IInterface* parent);
46
47 virtual ~HGTDAlignDBTool() = default;
48
49 StatusCode initialize() override;
50 StatusCode createDB() override;
51
52 bool setTrans(const Identifier&,
53 unsigned int level,
54 const Amg::Transform3D&) const override;
55
56 bool setTrans(const Identifier&,
57 unsigned int level,
58 const Amg::Vector3D&,
59 double alpha,
60 double beta,
61 double gamma) const override;
62
63 bool tweakTrans(const Identifier&,
64 unsigned int level,
65 const Amg::Transform3D&) const override;
66
67 bool tweakTrans(const Identifier&,
68 unsigned int level,
69 const Amg::Vector3D&,
70 double alpha,
71 double beta,
72 double gamma) const override;
73
75 unsigned int level) const override;
76
77 StatusCode outputObjs() override;
78
79 StatusCode fillDB(const std::string& tag,
80 unsigned int run1,
81 unsigned int event1,
82 unsigned int run2,
83 unsigned int event2) const override;
84
85 void printDB() const override;
86
87 void sortTrans() const override;
88
89private:
90
92 std::string moduleTag(const Identifier& id) const;
93
96
98 const AlignableTransform* cgetTransPtr(const Identifier& id) const;
99
102
104 const HGTD_ID* m_hgtdId{nullptr};
105
107 ToolHandle<IAthenaOutputStreamTool> m_condStream{
108 this,
109 "CondStream",
110 "AthenaOutputStreamTool/AthenaOutputStreamTool"
111 };
112
114 Gaudi::Property<std::string> m_dbRoot{
115 this,
116 "DBRoot",
117 "/HGTD/Align",
118 "Root folder for HGTD alignment conditions"
119 };
120
122 Gaudi::Property<std::string> m_detManagerName{
123 this,
124 "DetectorManager",
125 "HGTD",
126 "HGTD detector manager name"
127 };
128
129};
130
131#endif
Interface to an output stream tool.
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Gaudi::Property< std::string > m_dbRoot
Alignment folder.
ToolHandle< IAthenaOutputStreamTool > m_condStream
Output stream.
Gaudi::Property< std::string > m_detManagerName
Detector manager name.
const HGTD_ID * m_hgtdId
HGTD Identifier helper.
const AlignableTransform * cgetTransPtr(const Identifier &id) const
Retrieve read-only AlignableTransform.
const HGTD_DetectorManager * m_detManager
HGTD detector manager.
std::string moduleTag(const Identifier &id) const
Build the AlignableTransform tag corresponding to one HGTD module.
virtual ~HGTDAlignDBTool()=default
AlignableTransform * getTransPtr(const Identifier &id) const
Retrieve writable AlignableTransform.
HGTDAlignDBTool(const std::string &type, const std::string &name, const IInterface *parent)
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
virtual bool setTrans(const Identifier &, unsigned int level, const Amg::Transform3D &) const =0
Replace the transform of one module.
virtual StatusCode createDB()=0
Create an empty alignment payload.
virtual StatusCode fillDB(const std::string &tag, unsigned int run1, unsigned int event1, unsigned int run2, unsigned int event2) const =0
Register payload in the Conditions DB.
virtual void printDB() const =0
Print payload.
virtual StatusCode outputObjs()=0
Stream payload to POOL.
virtual bool tweakTrans(const Identifier &, unsigned int level, const Amg::Transform3D &) const =0
Apply an incremental transform.
virtual Amg::Transform3D getTrans(const Identifier &, unsigned int level) const =0
Retrieve transform.
virtual void sortTrans() const =0
Sort AlignableTransform entries.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
void initialize()