ATLAS Offline Software
Loading...
Searching...
No Matches
NswCalibDbTimeChargeData.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 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{
32 };
33
36 float slope{0.};
37 float intercept{0.};
38 //float slopeError{0.}; // keep for later
39 //float interceptError{0.};
40 };
41
44
45 // setting functions
48
49 // retrieval functions
50
52 std::vector<Identifier> getChannelIds(const CalibDataType type, const std::string& tech, const std::string& side) const;
55 const CalibConstants* getCalibForChannel(const CalibDataType type, const Identifier& channelId) const;
58
59private:
60
61 int identToModuleIdx(const Identifier& chan_id) const;
62 // ID helpers
65 const size_t m_nMmElements{m_idHelperSvc->hasMM() ?
66 4* (m_idHelperSvc->mmIdHelper().detectorElement_hash_max() + 1) : 0};
67
68 const size_t m_nStgcElements{m_idHelperSvc->hasSTGC() ?
69 3*4 *(m_idHelperSvc->stgcIdHelper().detectorElement_hash_max() +1): 0};
70
71 // containers
72 struct CalibModule {
73 std::vector<std::unique_ptr<CalibConstants>> channels{};
75 };
76
77 using ChannelCalibMap = std::vector<CalibModule>;
80
83
84};
85
86std::ostream& operator<<(std::ostream& ostr, const NswCalibDbTimeChargeData::CalibConstants& obj);
87
90
91#endif
Hold mappings of ranges to condition objects.
#define CONDCONT_DEF(...)
Definition CondCont.h:1413
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.
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::array< ZeroCalibMap, Muon::MuonStationIndex::toInt(MuonCond::CalibTechType::nTypes)> m_zero
std::array< CalibConstants, Muon::MuonStationIndex::toInt(CalibDataType::nTypes)> ZeroCalibMap
const size_t m_nStgcElements
Additionally reserve space for the 3 channel types.
constexpr int toInt(const EnumType enumVal)
Helper struct to cache all calibration constants in a common place of the memory.
std::vector< std::unique_ptr< CalibConstants > > channels