ATLAS Offline Software
RpcCondDbData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 // --- writing identifiers -------
9  m_cachedEfficiency.insert(std::make_pair(chamberId, efficiency));
10 }
11 void RpcCondDbData::setFracClusterSize1(Identifier chamberId, double fcs){
12  m_cachedFracClusterSize1.insert(std::make_pair(chamberId, fcs));
13 }
14 void RpcCondDbData::setFracClusterSize2(Identifier chamberId, double fcs){
15  m_cachedFracClusterSize2.insert(std::make_pair(chamberId, fcs));
16 }
17 void RpcCondDbData::setFracDeadStrip(Identifier chamberId, double fds){
18  m_cachedFracDeadStrip.insert(std::make_pair(chamberId, fds));
19 }
21  m_cachedGapEfficiency.insert(std::make_pair(chamberId, efficiency));
22 }
23 void RpcCondDbData::setMeanClusterSize(Identifier chamberId, double mcs){
24  m_cachedMeanClusterSize.insert(std::make_pair(chamberId, mcs));
25 }
26 void RpcCondDbData::setProjectedTrack(Identifier chamberId, int projectedTracks){
27  m_cachedProjectedTracks.insert(std::make_pair(chamberId, projectedTracks));
28 }
29 // setStripTime
30 void RpcCondDbData::setStripTime(Identifier stripId, const std::vector<double>& time){
31  if(m_cachedStripTime.count(stripId)) return;
32  m_cachedStripTime[stripId] = time[0];
33 }
34 
35 // --- reading identifiers -------
36 std::optional<double> RpcCondDbData::getEfficiency(const Identifier & Id) const {
37  auto itr = m_cachedEfficiency.find(Id);
38  return itr==m_cachedEfficiency.end() ? std::nullopt : std::make_optional<double>(itr->second);
39 }
40 std::optional<double> RpcCondDbData::getFracClusterSize1(const Identifier & Id) const{
41  auto itr = m_cachedFracClusterSize1.find(Id);
42  return itr==m_cachedFracClusterSize1.end() ? std::nullopt : std::make_optional<double>(itr->second);
43 }
44 std::optional<double> RpcCondDbData::getFracClusterSize2(const Identifier & Id) const{
45  auto itr = m_cachedFracClusterSize2.find(Id);
46  return itr ==m_cachedFracClusterSize2.end() ? std::nullopt : std::make_optional<double>(itr->second);
47 }
48 std::optional<double> RpcCondDbData::getFracDeadStrip(const Identifier & Id) const {
49  auto itr = m_cachedFracDeadStrip.find(Id);
50  return itr == m_cachedFracDeadStrip.end() ? std::nullopt : std::make_optional<double>(itr->second);
51 }
52 std::optional<double> RpcCondDbData::getGapEfficiency(const Identifier & Id) const {
53  auto itr = m_cachedGapEfficiency.find(Id);
54  return itr == m_cachedGapEfficiency.end() ? std::nullopt : std::make_optional<double>(itr->second);
55 }
56 std::optional<double> RpcCondDbData::getMeanClusterSize(const Identifier & Id) const {
57  auto itr = m_cachedMeanClusterSize.find(Id);
58  return itr==m_cachedMeanClusterSize.end() ? std::nullopt : std::make_optional<double>(itr->second);
59 }
60 std::optional<int> RpcCondDbData::getProjectedTrack(const Identifier & Id) const{
61  auto itr = m_cachedProjectedTracks.find(Id);
62  return itr ==m_cachedProjectedTracks.end() ? std::nullopt : std::make_optional<int>(itr->second);
63 }
64 std::optional<double> RpcCondDbData::getStripTime(const Identifier & Id) const {
65  auto itr = m_cachedStripTime.find(Id);
66  return itr == m_cachedStripTime.find(Id) ? std::nullopt : std::make_optional<double>(itr->second);
67 }
RpcCondDbData::getFracDeadStrip
std::optional< double > getFracDeadStrip(const Identifier &) const
Definition: RpcCondDbData.cxx:48
RpcCondDbData.h
RpcCondDbData::setGapEfficiency
void setGapEfficiency(Identifier, double)
Definition: RpcCondDbData.cxx:20
RpcCondDbData::getProjectedTrack
std::optional< int > getProjectedTrack(const Identifier &) const
Definition: RpcCondDbData.cxx:60
RpcCondDbData::m_cachedGapEfficiency
std::unordered_map< Identifier, double > m_cachedGapEfficiency
Used to describe the gap efficiency.
Definition: RpcCondDbData.h:62
RpcCondDbData::m_cachedFracClusterSize1
std::unordered_map< Identifier, double > m_cachedFracClusterSize1
Used for cluster size evaluation.
Definition: RpcCondDbData.h:56
RpcCondDbData::getStripTime
std::optional< double > getStripTime(const Identifier &) const
Definition: RpcCondDbData.cxx:64
RpcCondDbData::m_cachedMeanClusterSize
std::unordered_map< Identifier, double > m_cachedMeanClusterSize
Used for cluster size evaluation.
Definition: RpcCondDbData.h:64
RpcCondDbData::m_cachedFracDeadStrip
std::unordered_map< Identifier, double > m_cachedFracDeadStrip
Used in digitization for efficiency calculation.
Definition: RpcCondDbData.h:60
RpcCondDbData::setFracClusterSize1
void setFracClusterSize1(Identifier, double)
Definition: RpcCondDbData.cxx:11
RpcCondDbData::getEfficiency
std::optional< double > getEfficiency(const Identifier &) const
Definition: RpcCondDbData.cxx:36
efficiency
void efficiency(std::vector< double > &bins, std::vector< double > &values, const std::vector< std::string > &files, const std::string &histname, const std::string &tplotname, const std::string &label="")
Definition: dependence.cxx:128
RpcCondDbData::m_cachedProjectedTracks
std::unordered_map< Identifier, int > m_cachedProjectedTracks
Used in digitization for efficiency / mean cluster evaluation.
Definition: RpcCondDbData.h:66
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
RpcCondDbData::getFracClusterSize1
std::optional< double > getFracClusterSize1(const Identifier &) const
Definition: RpcCondDbData.cxx:40
RpcCondDbData::setFracClusterSize2
void setFracClusterSize2(Identifier, double)
Definition: RpcCondDbData.cxx:14
RpcCondDbData::m_cachedStripTime
std::unordered_map< Identifier, double > m_cachedStripTime
Used in Rdo -> Prd conversion.
Definition: RpcCondDbData.h:68
RpcCondDbData::m_cachedFracClusterSize2
std::unordered_map< Identifier, double > m_cachedFracClusterSize2
Used for cluster size evaluation.
Definition: RpcCondDbData.h:58
RpcCondDbData::setMeanClusterSize
void setMeanClusterSize(Identifier, double)
Definition: RpcCondDbData.cxx:23
RpcCondDbData::getFracClusterSize2
std::optional< double > getFracClusterSize2(const Identifier &) const
Definition: RpcCondDbData.cxx:44
RpcCondDbData::getGapEfficiency
std::optional< double > getGapEfficiency(const Identifier &) const
Definition: RpcCondDbData.cxx:52
RpcCondDbData::setStripTime
void setStripTime(Identifier, const std::vector< double > &)
Definition: RpcCondDbData.cxx:30
RpcCondDbData::setEfficiency
void setEfficiency(Identifier, double)
Definition: RpcCondDbData.cxx:8
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
RpcCondDbData::setFracDeadStrip
void setFracDeadStrip(Identifier, double)
Definition: RpcCondDbData.cxx:17
RpcCondDbData::getMeanClusterSize
std::optional< double > getMeanClusterSize(const Identifier &) const
Definition: RpcCondDbData.cxx:56
RpcCondDbData::m_cachedEfficiency
std::unordered_map< Identifier, double > m_cachedEfficiency
Used to describe the panel Efficiency.
Definition: RpcCondDbData.h:54
RpcCondDbData::setProjectedTrack
void setProjectedTrack(Identifier, int)
Definition: RpcCondDbData.cxx:26