ATLAS Offline Software
LArBadChannelHunter.h
Go to the documentation of this file.
1 //Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 
16 #ifndef LARBADCHANNELHUNTER_H
17 #define LARBADCHANNELHUNTER_H
18 
19 #include <vector>
20 #include <string>
21 
23 #include "GaudiKernel/ToolHandle.h"
30 
31 class LArOnlineID;
32 class CaloCell_ID;
33 
35 
36 public:
40  LArBadChannelHunter (const std::string& name, ISvcLocator* pSvcLocator);
41 
46 
50  virtual StatusCode initialize() override;
51 
56  virtual StatusCode execute() override {return StatusCode::SUCCESS;}
57 
61  virtual StatusCode stop ATLAS_NOT_THREAD_SAFE () override;
62 
63  //void findFailedPatterns();
64 
65 private:
66 
69 
70  SG::ReadCondHandleKey<LArOnOffIdMapping> m_cablingKey{this,"CablingKey","LArOnOffIdMap","SG Key of LArOnOffIdMapping object"};
71  SG::ReadCondHandleKey<LArBadChannelCont> m_BCKey{this, "BadChanKey", "LArBadChannel", "SG bad channels key"};
72  SG::ReadCondHandleKey<LArCalibLineMapping> m_CLKey{this, "CalibLineKey", "LArCalibLineMap", "SG calib line key"};
73 
74  std::string m_pedKey, m_caliWaveKey;
75  std::string m_avgTypeProp;
76  std::string m_outFileName;
77  std::string m_cutType;
78  bool m_undoCorr;
80  float m_recalcPer;
81 
82  //Thresholds:
85 
91  enum AvgType {
92  FEB,
93  PHI
94  };
95 
97 
98 
99  const std::string channelDescription(const HWIdentifier& chid, const LArOnOffIdMapping *cabling, const unsigned gain=99) const;
100 
101  unsigned getSymId(const HWIdentifier, const LArOnOffIdMapping *cabling) const;
102 
103  class Average {
104  public:
117 
118  std::vector<float> m_vmedTmax[CaloGain::LARNGAIN];
119  std::vector<float> m_vmedWid[CaloGain::LARNGAIN];
120  std::vector<float> m_vmedAmpl[CaloGain::LARNGAIN];
121  std::vector<float> m_vmedPedRMS[CaloGain::LARNGAIN];
126  Average();
127  void finish(float);
128  };
129 
130  class CellData {
131  public:
133  float m_ampl;
134  float m_wid;
135  float m_tmax;
136  float m_pedRMS[3];
137  CellData() : m_ampl(-1.) {
138  m_wid =-1.;
139  m_tmax =-1.;
140  m_pedRMS[0]=-1.;
141  m_pedRMS[1]=-1.;
142  m_pedRMS[2]=-1.;
143  }
144  };
145 };
146 
147 
148 
149 #endif
150 
LArBadChannelHunter::Average::m_vmedAmpl
std::vector< float > m_vmedAmpl[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:120
LArBadChannelHunter::PHI
@ PHI
Definition: LArBadChannelHunter.h:93
LArBadChannelHunter::Average::m_medTmax
float m_medTmax[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:122
LArBadChannelHunter::Average
Definition: LArBadChannelHunter.h:103
LArBadChannelHunter::execute
virtual StatusCode execute() override
Standard execute method This method has to be emtpy since all the job is done in finalize.
Definition: LArBadChannelHunter.h:56
LArBadChannelHunter::Average::m_vmedPedRMS
std::vector< float > m_vmedPedRMS[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:121
LArBadChannelHunter::Average::finish
void finish(float)
Definition: LArBadChannelHunter.cxx:515
LArBadChannelHunter::Average::m_avAmpl
float m_avAmpl[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:108
LArBadChannelHunter::LArBadChannelHunter
LArBadChannelHunter(const std::string &name, ISvcLocator *pSvcLocator)
Regular algorithm constructor.
Definition: LArBadChannelHunter.cxx:19
LArBadChannelHunter::Average::m_avTmaxSD
float m_avTmaxSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:115
LArBadChannelHunter::CellData::m_wid
float m_wid
Definition: LArBadChannelHunter.h:134
LArBadChannelHunter::Average::m_avWid
float m_avWid[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:111
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
ReadCellNoiseFromCool.cabling
cabling
Definition: ReadCellNoiseFromCool.py:154
LArBadChannelHunter::m_highNoiseTh
float m_highNoiseTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:84
LArBadChannelHunter::CellData::m_ampl
float m_ampl
Definition: LArBadChannelHunter.h:133
LArBadChannelHunter::m_caloId
const CaloCell_ID * m_caloId
Definition: LArBadChannelHunter.h:68
LArBadChannelHunter::m_outFileName
std::string m_outFileName
Definition: LArBadChannelHunter.h:76
LArBadChannelHunter::m_amplTh
float m_amplTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:86
LArBadChannelHunter::m_cablingKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
Definition: LArBadChannelHunter.h:70
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
LArBadChannelHunter::m_outOnlyNew
bool m_outOnlyNew
Definition: LArBadChannelHunter.h:79
HWIdentifier
Definition: HWIdentifier.h:13
CaloGain::LARNGAIN
@ LARNGAIN
Definition: CaloGain.h:19
LArBadChannelHunter::m_CLKey
SG::ReadCondHandleKey< LArCalibLineMapping > m_CLKey
Definition: LArBadChannelHunter.h:72
LArBadChannelHunter::AvgType
AvgType
Definition: LArBadChannelHunter.h:91
LArBadChannelHunter::~LArBadChannelHunter
~LArBadChannelHunter()
Destructor.
Definition: LArBadChannelHunter.h:45
LArBadChannelHunter::m_avgType
AvgType m_avgType
Definition: LArBadChannelHunter.h:96
LArBadChannelHunter::m_recalcPer
float m_recalcPer
Definition: LArBadChannelHunter.h:80
AthAlgorithm.h
LArBadChannelHunter::m_cutType
std::string m_cutType
Definition: LArBadChannelHunter.h:77
LArBadChannelCont.h
LArBadChannelHunter::m_onlineId
const LArOnlineID * m_onlineId
Definition: LArBadChannelHunter.h:67
LArBadChannelHunter::m_tmaxampTh
float m_tmaxampTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:90
LArBadChannelHunter::FEB
@ FEB
Definition: LArBadChannelHunter.h:92
LArBadChannelHunter::Average::Average
Average()
Definition: LArBadChannelHunter.cxx:489
LArBadChannelHunter::CellData
Definition: LArBadChannelHunter.h:130
LArOnOffIdMapping.h
LArBadChannelHunter::Average::m_avPedRMSSD
float m_avPedRMSSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:106
LArBadChannelHunter::m_BCKey
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Definition: LArBadChannelHunter.h:71
LArBadChannelHunter::Average::m_nPed
unsigned m_nPed[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:107
LArBadChannelHunter::CellData::m_tmax
float m_tmax
Definition: LArBadChannelHunter.h:135
LArBadChannelHunter::m_undoCorr
bool m_undoCorr
Definition: LArBadChannelHunter.h:78
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArBadChannelHunter
Definition: LArBadChannelHunter.h:34
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
LArBadChannelHunter::Average::m_nAmpls
unsigned m_nAmpls[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:110
LArBadChannelHunter::ATLAS_NOT_THREAD_SAFE
virtual StatusCode stop ATLAS_NOT_THREAD_SAFE() override
Standard stop method.
AthAlgorithm
Definition: AthAlgorithm.h:47
LArBadChannelHunter::Average::m_medAmpl
float m_medAmpl[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:124
ReadCondHandleKey.h
LArBadChannelHunter::CellData::CellData
CellData()
Definition: LArBadChannelHunter.h:137
LArBadChannelHunter::m_caliWaveKey
std::string m_caliWaveKey
Definition: LArBadChannelHunter.h:74
LArBadChannelHunter::Average::m_vmedTmax
std::vector< float > m_vmedTmax[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:118
LArBadChannelHunter::Average::m_avWidSD
float m_avWidSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:112
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
LArBadChannelHunter::initialize
virtual StatusCode initialize() override
Standard initialization method.
Definition: LArBadChannelHunter.cxx:92
LArBadChannelHunter::CellData::m_chid
HWIdentifier m_chid
Definition: LArBadChannelHunter.h:132
LArOnlineID
Definition: LArOnlineID.h:20
SG::ReadCondHandleKey< LArOnOffIdMapping >
LArBadChannelHunter::getSymId
unsigned getSymId(const HWIdentifier, const LArOnOffIdMapping *cabling) const
Definition: LArBadChannelHunter.cxx:651
LArBadChannelHunter::Average::m_medPedRMS
float m_medPedRMS[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:125
LArBadChannelHunter::m_avgTypeProp
std::string m_avgTypeProp
Definition: LArBadChannelHunter.h:75
LArBadChannelHunter::Average::m_avAmplSD
float m_avAmplSD[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:109
LArBadChannelHunter::Average::m_avPedRMS
float m_avPedRMS[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:105
LArBadChannelHunter::m_pedKey
std::string m_pedKey
Definition: LArBadChannelHunter.h:74
LArBadChannelHunter::Average::m_nTmaxs
unsigned m_nTmaxs[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:116
LArBadChannelHunter::CellData::m_pedRMS
float m_pedRMS[3]
Definition: LArBadChannelHunter.h:136
LArBadChannelHunter::channelDescription
const std::string channelDescription(const HWIdentifier &chid, const LArOnOffIdMapping *cabling, const unsigned gain=99) const
Definition: LArBadChannelHunter.cxx:438
LArBadChannelHunter::Average::m_nWids
unsigned m_nWids[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:113
LArBadChannelHunter::m_widTh
float m_widTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:87
LArBadChannelHunter::m_distwidTh
float m_distwidTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:88
LArBadChannelHunter::Average::m_vmedWid
std::vector< float > m_vmedWid[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:119
LArBadChannelHunter::Average::m_avTmax
float m_avTmax[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:114
LArBadChannelHunter::Average::m_medWid
float m_medWid[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:123
checker_macros.h
Define macros for attributes used to control the static checker.
CaloGain.h
LArCalibLineMapping.h
LArBadChannelHunter::m_lowNoiseTh
float m_lowNoiseTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:83
LArBadChannelHunter::m_distampTh
float m_distampTh[CaloGain::LARNGAIN]
Definition: LArBadChannelHunter.h:89
LArOnOffIdMapping
Definition: LArOnOffIdMapping.h:20