ATLAS Offline Software
Loading...
Searching...
No Matches
NswCalibDbTimeChargeData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUONCONDDATA_NSWCALIBDBTIMECHARGEDATA_H
6#define MUONCONDDATA_NSWCALIBDBTIMECHARGEDATA_H
7
8
9
10// Athena includes
14#include "MuonCondData/Defs.h"
15#include "Identifier/Identifier.h"
17
18// STL includes
19#include <vector>
20#include <map>
21#include <iosfwd>
22
23
24
26
27public:
28 enum class CalibDataType{
31 };
32
35 float slope{0.};
36 float intercept{0.};
37 //float slopeError{0.}; // keep for later
38 //float interceptError{0.};
39 };
40
43
44 // setting functions
47
48 // retrieval functions
49
51 std::vector<Identifier> getChannelIds(const CalibDataType type, const std::string& tech, const std::string& side) const;
54 const CalibConstants* getCalibForChannel(const CalibDataType type, const Identifier& channelId) const;
57
58private:
59
60 int identToModuleIdx(const Identifier& chan_id) const;
61 // ID helpers
64 const size_t m_nMmElements{m_idHelperSvc->hasMM() ?
65 4* (m_idHelperSvc->mmIdHelper().detectorElement_hash_max() + 1) : 0};
66
67 const size_t m_nStgcElements{m_idHelperSvc->hasSTGC() ?
68 3*4 *(m_idHelperSvc->stgcIdHelper().detectorElement_hash_max() +1): 0};
69
70 // containers
71 struct CalibModule {
72 std::vector<std::unique_ptr<CalibConstants>> channels{};
74 };
75
76 using ChannelCalibMap = std::vector<CalibModule>;
79
80 using ZeroCalibMap = std::map<CalibDataType, CalibConstants>;
81 std::map<MuonCond::CalibTechType, ZeroCalibMap> m_zero{};
82
83};
84
85std::ostream& operator<<(std::ostream& ostr, const NswCalibDbTimeChargeData::CalibConstants& obj);
86
87CLASS_DEF( NswCalibDbTimeChargeData , 120842040 , 1 )
89
90#endif
Hold mappings of ranges to condition objects.
Provide an interface for finding inheritance information at run time.
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::ostream & operator<<(std::ostream &ostr, const NswCalibDbTimeChargeData::CalibConstants &obj)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
Hold mapping of ranges to condition objects.
Definition CondCont.h:889
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
const CalibConstants * getCalibForChannel(const CalibDataType type, const Identifier &channelId) const
Retrieves the calibration constant for a particular readout channel.
const Muon::IMuonIdHelperSvc * m_idHelperSvc
int identToModuleIdx(const Identifier &chan_id) const
void setZero(CalibDataType type, MuonCond::CalibTechType tech, CalibConstants constants)
void setData(CalibDataType type, const Identifier &chnlId, CalibConstants constants)
~NswCalibDbTimeChargeData()=default
NswCalibDbTimeChargeData(const Muon::IMuonIdHelperSvc *idHelperSvc)
const size_t m_nMmElements
Segmentation of the elements is per NSW gasGap. Each wedge has 4 gasgaps.
const CalibConstants * getZeroCalibChannel(const CalibDataType type, const MuonCond::CalibTechType tech) const
Returns the dummy calibration constant for the given technology type.
std::vector< Identifier > getChannelIds(const CalibDataType type, const std::string &tech, const std::string &side) const
std::vector< CalibModule > ChannelCalibMap
std::map< CalibDataType, CalibConstants > ZeroCalibMap
std::map< MuonCond::CalibTechType, ZeroCalibMap > m_zero
const size_t m_nStgcElements
Additionally reserve space for the 3 channel types.
Helper struct to cache all calibration constants in a common place of the memory.
std::vector< std::unique_ptr< CalibConstants > > channels