ATLAS Offline Software
Loading...
Searching...
No Matches
NswCalibDbAlg.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 MUONCONDALG_NSWCALIBDBALG_H
6#define MUONCONDALG_NSWCALIBDBALG_H
7
8// Athena includes
12
13// Muon includes
18#include "MuonCondData/Defs.h"
19
20
21// Forward declarations
23class TTree;
24
25namespace Muon {
27
28public:
29
30 using AthCondAlgorithm::AthCondAlgorithm;
31 virtual ~NswCalibDbAlg() = default;
32 virtual StatusCode initialize() override;
33 virtual StatusCode execute (const EventContext&) const override;
34
35
36private:
37
42
46
47 StatusCode processTdoPdoData(const EventContext& ctx) const;
48 StatusCode processThrData(const EventContext& ctx) const;
49 StatusCode processNSWT0Data(const EventContext& ctx) const;
50
54
55 template <typename Key_t,
56 typename... KeyArgs_t>
57 StatusCode declareDependency(const EventContext& ctx,
58 SG::WriteCondHandle<Key_t>& writeHandle,
59 const readKey_t& readKey,
60 KeyArgs_t&... otherKeys) const;
61
62 StatusCode loadTimeChargeData(const EventContext& ctx,
63 const readKey_t& readKey,
64 const TimeChargeTech tech,
65 const TimeChargeType type,
66 NswCalibDbTimeChargeData& writeCdo) const;
67
68 StatusCode loadThresholdData(const EventContext& ctx,
69 const readKey_t& readKey,
70 const ThresholdTech tech,
71 NswCalibDbThresholdData& writeCdo) const;
72
74 StatusCode loadT0ToTree(const EventContext& ctx,
75 const readKey_t& readKey,
76 std::unique_ptr<TTree>& tree) const;
77 StatusCode loadT0Data(std::unique_ptr<TTree>&& tree,
78 NswT0Data& writeCdo,
79 const T0Tech tech) const;
80
81 bool buildChannelId(Identifier& channelId,
82 unsigned elinkId,
83 unsigned vmm,
84 unsigned channel) const;
85
86 Gaudi::Property<bool> m_isData {this, "isData" , true, "Processing data"};
87 Gaudi::Property<bool> m_processThresholds{this, "processThresholds", false, "Process threshold data"};
88
89 ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
90
91 writeKeyTdoPdo_t m_writeKey_tdopdo{this, "WriteKey_TdoPdo", "NswCalibDbTimeChargeData", "Key of output calibration data (TDOs and PDOs)" };
92 writeKeyThr_t m_writeKey_thr {this, "WriteKey_Thr" , "NswCalibDbThresholdData" , "Key of output calibration data (VMM thresholds)"};
93 writeKeyMmT0_t m_writeKey_nswT0 {this, "WriteKey_NswT0" , "NswT0Data" , "Key of output calibration data (NSW T0s)"};
94
95 readKey_t m_readKey_mm_sidea_tdo {this, "ReadKey_MM_SIDEA_TDO" , "/MDT/MM/TIME/SIDEA" , "Key of input MM condition data for side A data TDO"};
96 readKey_t m_readKey_mm_sidec_tdo {this, "ReadKey_MM_SIDEC_TDO" , "/MDT/MM/TIME/SIDEC" , "Key of input MM condition data for side C data TDO"};
97 readKey_t m_readKey_mm_sidea_pdo {this, "ReadKey_MM_SIDEA_PDO" , "/MDT/MM/CHARGE/SIDEA" , "Key of input MM condition data for side A data PDO"};
98 readKey_t m_readKey_mm_sidec_pdo {this, "ReadKey_MM_SIDEC_PDO" , "/MDT/MM/CHARGE/SIDEC" , "Key of input MM condition data for side C data PDO"};
99 readKey_t m_readKey_mm_sidea_thr {this, "ReadKey_MM_SIDEA_THR" , "/MDT/MM/THR/SIDEA" , "Key of input MM condition data for side A data THR"};
100 readKey_t m_readKey_mm_sidec_thr {this, "ReadKey_MM_SIDEC_THR" , "/MDT/MM/THR/SIDEC" , "Key of input MM condition data for side C data THR"};
101 readKey_t m_readKey_stgc_sidea_tdo{this, "ReadKey_STGC_SIDEA_TDO", "/TGC/NSW/TIME/SIDEA" , "Key of input sTGC condition data for side A data TDO"};
102 readKey_t m_readKey_stgc_sidec_tdo{this, "ReadKey_STGC_SIDEC_TDO", "/TGC/NSW/TIME/SIDEC" , "Key of input sTGC condition data for side C data TDO"};
103 readKey_t m_readKey_stgc_sidea_pdo{this, "ReadKey_STGC_SIDEA_PDO", "/TGC/NSW/CHARGE/SIDEA", "Key of input sTGC condition data for side A data PDO"};
104 readKey_t m_readKey_stgc_sidec_pdo{this, "ReadKey_STGC_SIDEC_PDO", "/TGC/NSW/CHARGE/SIDEC", "Key of input sTGC condition data for side C data PDO"};
105 readKey_t m_readKey_stgc_sidea_thr{this, "ReadKey_STGC_SIDEA_THR", "/TGC/NSW/THR/SIDEA" , "Key of input sTGC condition data for side A data THR"};
106 readKey_t m_readKey_stgc_sidec_thr{this, "ReadKey_STGC_SIDEC_THR", "/TGC/NSW/THR/SIDEC" , "Key of input sTGC condition data for side C data THR"};
107
108 Gaudi::Property<bool> m_loadMmT0Data {this, "loadMmT0Data", false, "Enable loading the sTgc T0Data"};
109 Gaudi::Property<bool> m_loadsTgcT0Data {this, "loadsTgcT0Data", false, "Enable loading the sTgcT0Data"};
110 readKey_t m_readKey_mm_t0{this, "ReadKey_MM_T0", "" , "Key of input MM condition data for side A data T0"};
111 readKey_t m_readKey_stgc_t0{this, "ReadKey_STGC_T0", "" , "Key of input sTGC condition data for side C data T0"};
112 Gaudi::Property<std::string> m_mmT0FilePath{this, "MmT0FileName", "", "Path to a file containing the MM T0 data, this will override the data from the conditions db"};
113 Gaudi::Property<std::string> m_stgcT0FilePath{this, "sTgcT0FileName", "", "Path to a file containing the sTGC T0 data, this will override the data from the conditions db"};
114
115};
116}
117
118#endif
Base class for conditions algorithms.
Base class for conditions algorithms.
This class is a collection of AttributeLists where each one is associated with a channel number.
Gaudi::Property< bool > m_isData
Gaudi::Property< std::string > m_stgcT0FilePath
StatusCode loadT0Data(std::unique_ptr< TTree > &&tree, NswT0Data &writeCdo, const T0Tech tech) const
NswCalibDbThresholdData::ThrsldTechType ThresholdTech
readKey_t m_readKey_mm_sidea_pdo
Gaudi::Property< bool > m_loadsTgcT0Data
SG::WriteCondHandle< NswCalibDbTimeChargeData > writeHandleTdoPdo_t
readKey_t m_readKey_mm_sidec_tdo
SG::WriteCondHandleKey< NswCalibDbThresholdData > writeKeyThr_t
StatusCode loadT0ToTree(const EventContext &ctx, const readKey_t &readKey, std::unique_ptr< TTree > &tree) const
StatusCode processNSWT0Data(const EventContext &ctx) const
bool buildChannelId(Identifier &channelId, unsigned elinkId, unsigned vmm, unsigned channel) const
readKey_t m_readKey_mm_sidea_tdo
Gaudi::Property< bool > m_processThresholds
readKey_t m_readKey_mm_sidec_pdo
readKey_t m_readKey_stgc_sidec_thr
virtual ~NswCalibDbAlg()=default
Gaudi::Property< bool > m_loadMmT0Data
StatusCode loadThresholdData(const EventContext &ctx, const readKey_t &readKey, const ThresholdTech tech, NswCalibDbThresholdData &writeCdo) const
readKey_t m_readKey_stgc_sidea_pdo
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
NswCalibDbTimeChargeData::CalibDataType TimeChargeType
StatusCode processTdoPdoData(const EventContext &ctx) const
virtual StatusCode initialize() override
MuonCond::CalibTechType TimeChargeTech
SG::WriteCondHandleKey< NswT0Data > writeKeyMmT0_t
readKey_t m_readKey_stgc_t0
MuonCond::CalibTechType T0Tech
readKey_t m_readKey_stgc_sidec_tdo
Gaudi::Property< std::string > m_mmT0FilePath
readKey_t m_readKey_stgc_sidec_pdo
SG::WriteCondHandleKey< NswCalibDbTimeChargeData > writeKeyTdoPdo_t
writeKeyMmT0_t m_writeKey_nswT0
SG::WriteCondHandle< NswCalibDbThresholdData > writeHandleThr_t
virtual StatusCode execute(const EventContext &) const override
SG::ReadCondHandleKey< CondAttrListCollection > readKey_t
readKey_t m_readKey_stgc_sidea_tdo
readKey_t m_readKey_mm_sidec_thr
writeKeyThr_t m_writeKey_thr
readKey_t m_readKey_mm_sidea_thr
SG::WriteCondHandle< NswT0Data > writeHandleT0_t
readKey_t m_readKey_stgc_sidea_thr
StatusCode declareDependency(const EventContext &ctx, SG::WriteCondHandle< Key_t > &writeHandle, const readKey_t &readKey, KeyArgs_t &... otherKeys) const
writeKeyTdoPdo_t m_writeKey_tdopdo
StatusCode processThrData(const EventContext &ctx) const
StatusCode loadTimeChargeData(const EventContext &ctx, const readKey_t &readKey, const TimeChargeTech tech, const TimeChargeType type, NswCalibDbTimeChargeData &writeCdo) const
Conditions data to model a channel dependent energy deposit threshold such that the electronics retur...
MuonCond::CalibTechType ThrsldTechType
Conditions data object to calibrate the timeoff set of each individual channel in the NSW.
Definition NswT0Data.h:26
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
TChain * tree