ATLAS Offline Software
Loading...
Searching...
No Matches
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}
12 m_cachedFracClusterSize1.insert(std::make_pair(chamberId, fcs));
13}
15 m_cachedFracClusterSize2.insert(std::make_pair(chamberId, fcs));
16}
17void 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}
24 m_cachedMeanClusterSize.insert(std::make_pair(chamberId, mcs));
25}
26void RpcCondDbData::setProjectedTrack(Identifier chamberId, int projectedTracks){
27 m_cachedProjectedTracks.insert(std::make_pair(chamberId, projectedTracks));
28}
29// setStripTime
30void 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 -------
36std::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}
40std::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}
44std::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}
48std::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}
52std::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}
56std::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}
60std::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}
64std::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}
std::unordered_map< Identifier, int > m_cachedProjectedTracks
Used in digitization for efficiency / mean cluster evaluation.
void setEfficiency(Identifier, double)
void setFracDeadStrip(Identifier, double)
std::unordered_map< Identifier, double > m_cachedFracClusterSize1
Used for cluster size evaluation.
void setFracClusterSize1(Identifier, double)
std::unordered_map< Identifier, double > m_cachedEfficiency
Used to describe the panel Efficiency.
std::optional< double > getFracClusterSize2(const Identifier &) const
void setProjectedTrack(Identifier, int)
std::unordered_map< Identifier, double > m_cachedStripTime
Used in Rdo -> Prd conversion.
std::unordered_map< Identifier, double > m_cachedGapEfficiency
Used to describe the gap efficiency.
std::unordered_map< Identifier, double > m_cachedFracDeadStrip
Used in digitization for efficiency calculation.
std::unordered_map< Identifier, double > m_cachedFracClusterSize2
Used for cluster size evaluation.
std::optional< int > getProjectedTrack(const Identifier &) const
std::optional< double > getFracDeadStrip(const Identifier &) const
void setGapEfficiency(Identifier, double)
void setMeanClusterSize(Identifier, double)
std::unordered_map< Identifier, double > m_cachedMeanClusterSize
Used for cluster size evaluation.
void setFracClusterSize2(Identifier, double)
std::optional< double > getStripTime(const Identifier &) const
std::optional< double > getFracClusterSize1(const Identifier &) const
void setStripTime(Identifier, const std::vector< double > &)
std::optional< double > getGapEfficiency(const Identifier &) const
std::optional< double > getEfficiency(const Identifier &) const
std::optional< double > getMeanClusterSize(const Identifier &) const
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="")