ATLAS Offline Software
NswCalibDbTimeChargeData.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONCONDDATA_NSWCALIBDBTIMECHARGEDATA_H
6 #define MUONCONDDATA_NSWCALIBDBTIMECHARGEDATA_H
7 
8 // STL includes
9 #include <vector>
10 
11 // Athena includes
12 #include "AthenaKernel/CondCont.h"
13 #include "AthenaKernel/BaseInfo.h"
16 #include "MuonCondData/Defs.h"
17 
18 
20 
21 public:
22  enum class CalibDataType{
23  TDO,
24  PDO
25  };
29  float slope{0.};
30  float intercept{0.};
31  //float slopeError{0.}; // keep for later
32  //float interceptError{0.};
33  };
34 
37 
38  // setting functions
41 
42  // retrieval functions
43 
45  std::vector<Identifier> getChannelIds(const CalibDataType type, const std::string& tech, const std::string& side) const;
51 
52 private:
53 
54  int identToModuleIdx(const Identifier& chan_id) const;
55  // ID helpers
58  const size_t m_nMmElements{m_idHelperSvc->hasMM() ?
63 
64  // containers
65  struct CalibModule {
66  std::vector<std::unique_ptr<CalibConstants>> channels{};
68  };
69 
70  using ChannelCalibMap = std::vector<CalibModule>;
73 
74  using ZeroCalibMap = std::map<CalibDataType, CalibConstants>;
75  std::map<MuonCond::CalibTechType, ZeroCalibMap> m_zero{};
76 
77 };
78 
79 std::ostream& operator<<(std::ostream& ostr, const NswCalibDbTimeChargeData::CalibConstants& obj);
80 
81 CLASS_DEF( NswCalibDbTimeChargeData , 120842040 , 1 )
83 
84 #endif
NswCalibDbTimeChargeData::setData
void setData(CalibDataType type, const Identifier &chnlId, CalibConstants constants)
Definition: NswCalibDbTimeChargeData.cxx:41
Muon::IMuonIdHelperSvc::stgcIdHelper
virtual const sTgcIdHelper & stgcIdHelper() const =0
access to TgcIdHelper
NswCalibDbTimeChargeData::CalibConstants
Helper struct to cache all calibration constants in a common place of the memory.
Definition: NswCalibDbTimeChargeData.h:28
CondCont.h
Hold mappings of ranges to condition objects.
NswCalibDbTimeChargeData::CalibDataType::PDO
@ PDO
NswCalibDbTimeChargeData::m_nMmElements
const size_t m_nMmElements
Segmentation of the elements is per NSW gasGap. Each wedge has 4 gasgaps.
Definition: NswCalibDbTimeChargeData.h:58
MuonIdHelper::detectorElement_hash_max
size_type detectorElement_hash_max() const
Definition: MuonIdHelper.h:186
NswCalibDbTimeChargeData::CalibDataType
CalibDataType
Definition: NswCalibDbTimeChargeData.h:22
Muon::IMuonIdHelperSvc::mmIdHelper
virtual const MmIdHelper & mmIdHelper() const =0
access to CscIdHelper
NswCalibDbTimeChargeData::m_nStgcElements
const size_t m_nStgcElements
Additionally reserve space for the 3 channel types.
Definition: NswCalibDbTimeChargeData.h:61
TRT::Hit::side
@ side
Definition: HitInfo.h:83
NswCalibDbTimeChargeData::setZero
void setZero(CalibDataType type, MuonCond::CalibTechType tech, CalibConstants constants)
Definition: NswCalibDbTimeChargeData.cxx:75
NswCalibDbTimeChargeData::getZeroCalibChannel
const CalibConstants * getZeroCalibChannel(const CalibDataType type, const MuonCond::CalibTechType tech) const
Returns the dummy calibration constant for the given technology type.
Definition: NswCalibDbTimeChargeData.cxx:135
NswCalibDbTimeChargeData::m_tdo_data
ChannelCalibMap m_tdo_data
Definition: NswCalibDbTimeChargeData.h:72
BaseInfo.h
Provide an interface for finding inheritance information at run time.
NswCalibDbTimeChargeData::CalibModule::channels
std::vector< std::unique_ptr< CalibConstants > > channels
Definition: NswCalibDbTimeChargeData.h:66
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
NswCalibDbTimeChargeData::CalibDataType::TDO
@ TDO
NswCalibDbTimeChargeData::NswCalibDbTimeChargeData
NswCalibDbTimeChargeData(const Muon::IMuonIdHelperSvc *idHelperSvc)
Definition: NswCalibDbTimeChargeData.cxx:17
CaloCondBlobAlgs_fillNoiseFromASCII.channelId
channelId
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:122
NswCalibDbTimeChargeData::CalibConstants::slope
float slope
Definition: NswCalibDbTimeChargeData.h:29
Defs.h
NswCalibDbTimeChargeData::m_zero
std::map< MuonCond::CalibTechType, ZeroCalibMap > m_zero
Definition: NswCalibDbTimeChargeData.h:75
NswCalibDbTimeChargeData::ChannelCalibMap
std::vector< CalibModule > ChannelCalibMap
Definition: NswCalibDbTimeChargeData.h:70
NswCalibDbTimeChargeData::m_idHelperSvc
const Muon::IMuonIdHelperSvc * m_idHelperSvc
Definition: NswCalibDbTimeChargeData.h:56
NswCalibDbTimeChargeData::getChannelIds
std::vector< Identifier > getChannelIds(const CalibDataType type, const std::string &tech, const std::string &side) const
Definition: NswCalibDbTimeChargeData.cxx:86
Muon::IMuonIdHelperSvc::hasMM
virtual bool hasMM() const =0
returns whether the Mircomegas identifiers are loaded
CondCont
Hold mapping of ranges to condition objects.
Definition: CondCont.h:811
constants
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:1
NswCalibDbTimeChargeData::m_pdo_data
ChannelCalibMap m_pdo_data
Definition: NswCalibDbTimeChargeData.h:71
MuonCond::CalibTechType
CalibTechType
Definition: MuonSpectrometer/MuonConditions/MuonCondGeneral/MuonCondData/MuonCondData/Defs.h:37
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
AthMessaging.h
NswCalibDbTimeChargeData::ZeroCalibMap
std::map< CalibDataType, CalibConstants > ZeroCalibMap
Definition: NswCalibDbTimeChargeData.h:74
Muon::IMuonIdHelperSvc
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
Definition: IMuonIdHelperSvc.h:27
operator<<
std::ostream & operator<<(std::ostream &ostr, const NswCalibDbTimeChargeData::CalibConstants &obj)
Definition: NswCalibDbTimeChargeData.cxx:10
NswCalibDbTimeChargeData::CalibModule::layer_id
Identifier layer_id
Definition: NswCalibDbTimeChargeData.h:67
NswCalibDbTimeChargeData
Definition: NswCalibDbTimeChargeData.h:19
NswCalibDbTimeChargeData::CalibModule
Definition: NswCalibDbTimeChargeData.h:65
NswCalibDbTimeChargeData::identToModuleIdx
int identToModuleIdx(const Identifier &chan_id) const
Definition: NswCalibDbTimeChargeData.cxx:24
python.PyAthena.obj
obj
Definition: PyAthena.py:132
NswCalibDbTimeChargeData::~NswCalibDbTimeChargeData
~NswCalibDbTimeChargeData()=default
NswCalibDbTimeChargeData::getCalibForChannel
const CalibConstants * getCalibForChannel(const CalibDataType type, const Identifier &channelId) const
Retrieves the calibration constant for a particular readout channel.
Definition: NswCalibDbTimeChargeData.cxx:121
NswCalibDbTimeChargeData::CalibConstants::intercept
float intercept
Definition: NswCalibDbTimeChargeData.h:30
IMuonIdHelperSvc.h
Muon::IMuonIdHelperSvc::hasSTGC
virtual bool hasSTGC() const =0
returns whether the sTGC identifiers are loaded
Identifier
Definition: IdentifierFieldParser.cxx:14