ATLAS Offline Software
LArCoverageAlg.h
Go to the documentation of this file.
1 
2 /*
3  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 */
5 
12 #ifndef LARMONITORING_LARCOVERAGEALG_H
13 #define LARMONITORING_LARCOVERAGEALG_H
14 
17 
18 
25 
33 
34 
35 class LArEM_ID;
37 
38 
40 {
41  public:
42  LArCoverageAlg( const std::string& name, ISvcLocator* pSvcLocator );
43 
45  virtual ~LArCoverageAlg();
46 
48  virtual StatusCode initialize() override;
49 
51  virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
52 
53 
54 
55  private:
56 
57  class LArChanHelp {
58  public:
59  LArChanHelp(int chan=-1,int ft_slot=-100,int sampling=-1,double eta=-100,double phi=-100): m_channelNumber(chan), m_channelFtSlot(ft_slot), m_channelSampling(sampling), m_channelEta(eta), m_channelPhi(phi) {};
61 
62  void setChanPhi(double phi){m_channelPhi=phi;};
63  int getChNumber() const { return m_channelNumber; };
64  int getChFtSlot() const { return m_channelFtSlot; };
65  int getChSampling() const { return m_channelSampling; };
66  double getChEta() const { return m_channelEta; };
67  double getChPhi() const { return m_channelPhi; };
68 
69  private:
73  double m_channelEta;
74  double m_channelPhi;
75  };
76 
82 
83 
85  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
86 
88  SG::ReadCondHandleKey<CaloNoise> m_noiseCDOKey{this,"CaloNoiseKey","electronicNoise","SG Key of CaloNoise data object"};
89 
91  Gaudi::Property<std::vector<std::string> > m_problemsToMask{this,"ProblemsToMask",{}, "Bad-Channel categories to mask"};
93 
94  SG::ReadHandleKey<LArRawChannelContainer> m_rawChannelsKey{this, "LArRawChannelKey", "LArRawChannels", "SG Key of raw channels"};
95  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
96  SG::ReadCondHandleKey<LArBadFebCont> m_BFKey{this, "MFKey", "LArBadFeb", "SG missing FEBs key"};
97  SG::ReadCondHandleKey<CaloDetDescrManager> m_caloMgrKey{this, "CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };
98 
99 
101  int DBflag(HWIdentifier,const LArBadChannelCont*) const;
102 
104  Gaudi::Property<EventContext::ContextEvt_t> m_nevents {this,"Nevents",50};
105  Gaudi::Property<int> m_Nchannels {this,"Nchannels",128};
106  Gaudi::Property<int> m_Nsample {this,"Nsample",4};
107  Gaudi::Property<int> m_NftEMB {this,"NftEMB",32};
108  Gaudi::Property<int> m_NslotEMB {this,"NslotEMB",14};
109  Gaudi::Property<int> m_NftEMEC {this,"NftEMEC",25};
110  Gaudi::Property<int> m_NslotEMEC {this,"NslotEMEC",15};
111  Gaudi::Property<int> m_NftHEC {this,"NftHEC",25};
112  Gaudi::Property<int> m_NslotHEC {this,"NslotHEC",15};
113  Gaudi::Property<int> m_NftFCAL {this,"NftFCAL",25};
114  Gaudi::Property<int> m_NslotFCAL {this,"NslotFCAL",15};
115  Gaudi::Property<int> m_NphiBinsEMB1 {this,"NphiBinsEMB1",256};
116  Gaudi::Property<int> m_NphiBinsEMEC2 {this,"NphiBinsEMEC2",256};
117  Gaudi::Property<std::vector<int> > m_NphiBinsHEC {this,"NphiBinsHEC",{64,64,64,64}};
118 
119 
120  Gaudi::Property<std::string> m_CaloNoiseToolGroupName {this,"CaloNoiseToolGroupName","CaloNoise"};
121  Gaudi::Property<std::string> m_BadChannelsGroupName {this,"BadChannelsGroupName","BadChannels"};
122  Gaudi::Property<std::string> m_CoverageHWGroupName {this,"CoverageHWGroupName","CoverageHW"};
123  Gaudi::Property< std::vector<std::string> > m_CoverageBarrelPartitions {this, "CoverageBarrelPartitions", {"EMBA","EMBC"}};
124  Gaudi::Property< std::vector<std::string> > m_CoverageEndcapPartitions {this, "CoverageEndcapPartitions", {"EMECA","EMECC","HECA","HECC","FCalA","FCalC"}};
125  Gaudi::Property< std::vector<std::string> > m_Sides {this, "Sides", {"A","C"}};
126  Gaudi::Property< std::vector<int> > m_availableErrorCodes {this, "AvailableErrorCodes", {0, 1, 2, 3, 4}};
127  std::vector<std::pair<int, std::string>> m_availableErrorCodesPairs;
128 
129 
130 
132  std::vector<int> m_CaloNoiseGroupArrEM;
133  std::vector<int> m_CaloNoiseGroupArrHEC;
134  std::vector<int> m_CaloNoiseGroupArrFCAL;
135 
136  std::map<std::string,int> m_CoverageToolArrayEMBA;
137  std::map<std::string,int> m_CoverageToolArrayEMECA;
138  std::map<std::string,int> m_CoverageToolArrayHECA;
139  std::map<std::string,int> m_CoverageToolArrayFCalA;
140  std::map<std::string,int> m_CoverageToolArrayEMBC;
141  std::map<std::string,int> m_CoverageToolArrayEMECC;
142  std::map<std::string,int> m_CoverageToolArrayHECC;
143  std::map<std::string,int> m_CoverageToolArrayFCalC;
144 
145  std::map<std::string,int> m_BadChannelToolArrayBarrel;
146  std::map<std::string,int> m_BadChannelToolArrayEndcap;
147 
148 
150  const std::array<CaloGain::CaloGain,CaloCell_Base_ID::NSUBCALO> m_highestGain{
151  CaloGain::LARHIGHGAIN, //LAREM
152  CaloGain::LARMEDIUMGAIN, //LARHEC
153  CaloGain::LARHIGHGAIN, //LARFCAL
154  CaloGain::TILEHIGHHIGH, //TILE
155  CaloGain::LARHIGHGAIN //LARMINIFCAL
156  };
157 };
158 
159 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
LArCoverageAlg::LArChanHelp::m_channelSampling
int m_channelSampling
Definition: LArCoverageAlg.h:72
LArCoverageAlg::m_nevents
Gaudi::Property< EventContext::ContextEvt_t > m_nevents
Properties.
Definition: LArCoverageAlg.h:104
LArCoverageAlg::m_NftEMB
Gaudi::Property< int > m_NftEMB
Definition: LArCoverageAlg.h:107
LArCoverageAlg::m_BadChannelToolArrayBarrel
std::map< std::string, int > m_BadChannelToolArrayBarrel
Definition: LArCoverageAlg.h:145
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
LArCoverageAlg::m_NftHEC
Gaudi::Property< int > m_NftHEC
Definition: LArCoverageAlg.h:111
LArCoverageAlg::LArChanHelp::m_channelEta
double m_channelEta
Definition: LArCoverageAlg.h:73
LArCoverageAlg::m_NftFCAL
Gaudi::Property< int > m_NftFCAL
Definition: LArCoverageAlg.h:113
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
LArCoverageAlg::m_BadChannelsGroupName
Gaudi::Property< std::string > m_BadChannelsGroupName
Definition: LArCoverageAlg.h:121
LArBadXCont
Conditions-Data class holding LAr Bad Channel or Bad Feb information.
Definition: LArBadChannelCont.h:28
LArCoverageAlg::LArChanHelp::getChPhi
double getChPhi() const
Definition: LArCoverageAlg.h:67
LArCoverageAlg::m_CaloNoiseToolGroupName
Gaudi::Property< std::string > m_CaloNoiseToolGroupName
Definition: LArCoverageAlg.h:120
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
LArCoverageAlg
Definition: LArCoverageAlg.py:1
LArCoverageAlg::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArCoverageAlg.h:95
LArCoverageAlg::LArChanHelp::getChNumber
int getChNumber() const
Definition: LArCoverageAlg.h:63
LArCoverageAlg::m_LArEM_IDHelper
const LArEM_ID * m_LArEM_IDHelper
Definition: LArCoverageAlg.h:78
LArCoverageAlg::m_rawChannelsKey
SG::ReadHandleKey< LArRawChannelContainer > m_rawChannelsKey
Definition: LArCoverageAlg.h:94
LArHEC_ID
Helper class for LArHEC offline identifiers.
Definition: LArHEC_ID.h:85
LArCoverageAlg::LArChanHelp
Definition: LArCoverageAlg.h:57
LArCoverageAlg::m_CoverageToolArrayEMECA
std::map< std::string, int > m_CoverageToolArrayEMECA
Definition: LArCoverageAlg.h:137
LArCoverageAlg::LArChanHelp::m_channelNumber
int m_channelNumber
Definition: LArCoverageAlg.h:67
LArCoverageAlg::m_CoverageToolArrayEMECC
std::map< std::string, int > m_CoverageToolArrayEMECC
Definition: LArCoverageAlg.h:141
SG::ReadHandleKey< LArRawChannelContainer >
LArCoverageAlg::m_problemsToMask
Gaudi::Property< std::vector< std::string > > m_problemsToMask
Handle to bad-channel tools.
Definition: LArCoverageAlg.h:91
HWIdentifier
Definition: HWIdentifier.h:13
LArCoverageAlg::LArCoverageAlg
LArCoverageAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: LArCoverageAlg.cxx:40
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
LArCoverageAlg::m_NphiBinsHEC
Gaudi::Property< std::vector< int > > m_NphiBinsHEC
Definition: LArCoverageAlg.h:117
LArCoverageAlg::m_NphiBinsEMB1
Gaudi::Property< int > m_NphiBinsEMB1
Definition: LArCoverageAlg.h:115
LArCoverageAlg::m_CoverageHWGroupName
Gaudi::Property< std::string > m_CoverageHWGroupName
Definition: LArCoverageAlg.h:122
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
LArCoverageAlg::LArChanHelp::getChEta
double getChEta() const
Definition: LArCoverageAlg.h:66
CaloGain::TILEHIGHHIGH
@ TILEHIGHHIGH
Definition: CaloGain.h:15
LArCoverageAlg::m_caloMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Definition: LArCoverageAlg.h:97
LArCoverageAlg::m_CaloNoiseGroupArrHEC
std::vector< int > m_CaloNoiseGroupArrHEC
Definition: LArCoverageAlg.h:133
LArCoverageAlg::m_availableErrorCodes
Gaudi::Property< std::vector< int > > m_availableErrorCodes
Definition: LArCoverageAlg.h:126
LArCoverageAlg::m_CoverageToolArrayEMBC
std::map< std::string, int > m_CoverageToolArrayEMBC
Definition: LArCoverageAlg.h:140
LArBadChannelCont.h
LArCoverageAlg::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Handle to LArOnOffIdMapping (former LArCablingService)
Definition: LArCoverageAlg.h:85
LArOnOffIdMapping.h
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
LArCoverageAlg::m_LArHEC_IDHelper
const LArHEC_ID * m_LArHEC_IDHelper
Definition: LArCoverageAlg.h:80
LArCoverageAlg::LArChanHelp::~LArChanHelp
~LArChanHelp()
Definition: LArCoverageAlg.h:60
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
LArCoverageAlg::m_CoverageBarrelPartitions
Gaudi::Property< std::vector< std::string > > m_CoverageBarrelPartitions
Definition: LArCoverageAlg.h:123
LArCoverageAlg::m_CaloNoiseGroupArrFCAL
std::vector< int > m_CaloNoiseGroupArrFCAL
Definition: LArCoverageAlg.h:134
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArCoverageAlg::m_CoverageToolArrayEMBA
std::map< std::string, int > m_CoverageToolArrayEMBA
Definition: LArCoverageAlg.h:136
AthMonitorAlgorithm.h
LArCoverageAlg::m_Nsample
Gaudi::Property< int > m_Nsample
Definition: LArCoverageAlg.h:106
LArCoverageAlg::LArChanHelp::m_channelPhi
double m_channelPhi
Definition: LArCoverageAlg.h:74
LArCoverageAlg::m_NftEMEC
Gaudi::Property< int > m_NftEMEC
Definition: LArCoverageAlg.h:109
LArCoverageAlg::m_BadChannelToolArrayEndcap
std::map< std::string, int > m_BadChannelToolArrayEndcap
Definition: LArCoverageAlg.h:146
LArCoverageAlg::DBflag
int DBflag(HWIdentifier, const LArBadChannelCont *) const
To retrieve bad channel DB keywords
Definition: LArCoverageAlg.cxx:413
LArCoverageAlg::m_noiseCDOKey
SG::ReadCondHandleKey< CaloNoise > m_noiseCDOKey
Key for CaloNoise.
Definition: LArCoverageAlg.h:88
LArCoverageAlg::m_availableErrorCodesPairs
std::vector< std::pair< int, std::string > > m_availableErrorCodesPairs
Definition: LArCoverageAlg.h:127
LArCoverageAlg::m_BFKey
SG::ReadCondHandleKey< LArBadFebCont > m_BFKey
Definition: LArCoverageAlg.h:96
CaloPhiRange.h
CaloPhiRange class declaration.
LArCoverageAlg::m_NphiBinsEMEC2
Gaudi::Property< int > m_NphiBinsEMEC2
Definition: LArCoverageAlg.h:116
LArCoverageAlg::LArChanHelp::LArChanHelp
LArChanHelp(int chan=-1, int ft_slot=-100, int sampling=-1, double eta=-100, double phi=-100)
Definition: LArCoverageAlg.h:59
LArCoverageAlg::m_Nchannels
Gaudi::Property< int > m_Nchannels
Definition: LArCoverageAlg.h:105
LArCoverageAlg::LArChanHelp::getChFtSlot
int getChFtSlot() const
Definition: LArCoverageAlg.h:64
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
ReadCondHandleKey.h
LArCoverageAlg::LArChanHelp::getChSampling
int getChSampling() const
Definition: LArCoverageAlg.h:65
LArCoverageAlg::m_NslotEMEC
Gaudi::Property< int > m_NslotEMEC
Definition: LArCoverageAlg.h:110
LArCoverageAlg::m_NslotHEC
Gaudi::Property< int > m_NslotHEC
Definition: LArCoverageAlg.h:112
HWIdentifier.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
CaloNoise.h
LArCoverageAlg::m_Sides
Gaudi::Property< std::vector< std::string > > m_Sides
Definition: LArCoverageAlg.h:125
LArCoverageAlg::m_caloIdMgr
const CaloIdManager * m_caloIdMgr
Definition: LArCoverageAlg.h:81
LArCoverageAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
Called each event.
Definition: LArCoverageAlg.cxx:128
LArOnlineID
Definition: LArOnlineID.h:20
CaloGain::LARHIGHGAIN
@ LARHIGHGAIN
Definition: CaloGain.h:18
SG::ReadCondHandleKey< LArOnOffIdMapping >
LArCoverageAlg::m_LArOnlineIDHelper
const LArOnlineID * m_LArOnlineIDHelper
Definition: LArCoverageAlg.h:77
LArCoverageAlg::~LArCoverageAlg
virtual ~LArCoverageAlg()
Default destructor.
Definition: LArCoverageAlg.cxx:52
CaloGain::LARMEDIUMGAIN
@ LARMEDIUMGAIN
Definition: CaloGain.h:18
LArCoverageAlg::m_CoverageToolArrayFCalC
std::map< std::string, int > m_CoverageToolArrayFCalC
Definition: LArCoverageAlg.h:143
LArCoverageAlg::m_CoverageToolArrayFCalA
std::map< std::string, int > m_CoverageToolArrayFCalA
Definition: LArCoverageAlg.h:139
LArCoverageAlg::m_NslotFCAL
Gaudi::Property< int > m_NslotFCAL
Definition: LArCoverageAlg.h:114
LArCoverageAlg::m_LArFCAL_IDHelper
const LArFCAL_ID * m_LArFCAL_IDHelper
Definition: LArCoverageAlg.h:79
CaloIdManager.h
LArEM_ID
Helper class for LArEM offline identifiers.
Definition: LArEM_ID.h:118
LArCoverageAlg::m_CoverageToolArrayHECA
std::map< std::string, int > m_CoverageToolArrayHECA
Definition: LArCoverageAlg.h:138
LArCoverageAlg::LArChanHelp::setChanPhi
void setChanPhi(double phi)
Definition: LArCoverageAlg.h:62
LArCoverageAlg::m_highestGain
const std::array< CaloGain::CaloGain, CaloCell_Base_ID::NSUBCALO > m_highestGain
for CaloNoise
Definition: LArCoverageAlg.h:150
LArCoverageAlg::m_CoverageEndcapPartitions
Gaudi::Property< std::vector< std::string > > m_CoverageEndcapPartitions
Definition: LArCoverageAlg.h:124
CaloGain.h
LArFCAL_ID
Helper class for LArFCAL offline identifiers.
Definition: LArFCAL_ID.h:60
LArCoverageAlg::m_NslotEMB
Gaudi::Property< int > m_NslotEMB
Definition: LArCoverageAlg.h:108
LArBadChannelMask.h
LArCoverageAlg::LArChanHelp::m_channelFtSlot
int m_channelFtSlot
Definition: LArCoverageAlg.h:71
LArCoverageAlg::m_bcMask
LArBadChannelMask m_bcMask
Definition: LArCoverageAlg.h:92
LArRawChannelContainer.h
LArCoverageAlg::m_CaloNoiseGroupArrEM
std::vector< int > m_CaloNoiseGroupArrEM
for tools array
Definition: LArCoverageAlg.h:132
LArOnlineID.h
LArCoverageAlg::m_CoverageToolArrayHECC
std::map< std::string, int > m_CoverageToolArrayHECC
Definition: LArCoverageAlg.h:142
LArBadChannelMask
Definition: LArBadChannelMask.h:18
LArCoverageAlg::initialize
virtual StatusCode initialize() override
Overwrite dummy method from AlgTool.
Definition: LArCoverageAlg.cxx:57