6#ifndef LARSTRIPSCROSSTALKCORRECTOR_H
7#define LARSTRIPSCROSSTALKCORRECTOR_H
33 void print(MsgStream& stream,
const LArOnlineID* onlId, MSG::Level lvl=MSG::INFO);
64 virtual StatusCode
initialize()
override final;
65 virtual StatusCode
execute()
override final;
66 virtual StatusCode
finalize()
override final;
76 Gaudi::Property<std::vector<std::string> >
m_dontUseForCorr{
this,
"DontUseForXtalkCorr",{},
"Types of bad channel should not be taken into accout for xtalk correction of their neighbor"};
80 Gaudi::Property<std::vector<std::string> >
m_dontCorr{
this,
"NoXtalkCorr",{},
"Types of bad channel should be ignored and not x-talk corrected"};
89 static constexpr auto m_MAXeta=std::to_array<unsigned>({448,208});
90 static constexpr auto m_MINeta=std::to_array<unsigned>({1,0});
94 Gaudi::Property<std::vector<std::string> >
m_keylist{
this,
"KeyList",{},
"List of input keys ('HIGH','MEDIUM','LOW')"};
95 Gaudi::Property<unsigned int>
m_ADCsatur {
this,
"ADCsaturation",0,
"Cutoff value to ignore saturated digits"};
96 Gaudi::Property<float>
m_acceptableDifference{
this,
"AcceptableDifference",20,
"For sanity check: By how much the corrected value may differ from the original one (in %)"};
108 std::array<std::vector < std::vector < const LArAccumulatedCalibDigit* > >,2>
m_stripsLookUp;
127 StatusCode initKnownMissingFebs();
132 void correctSamples(std::vector<double>& dest,
const neighbour_t& neighbor)
const;
139 const size_t nSamples=std::min(dest.size(),nb.dig->sampleSum().size());
140 const double pedTimesTrig=nb.ped*(double)nb.dig->nTriggers();
141 for (
size_t i=0;i<nSamples;++i) {
142 dest[i]+=nb.weight*(nb.dig->sampleSum()[i]-pedTimesTrig);
149 const int region =
m_emId->region(
id);
150 const int keta =
m_emId->eta(
id);
151 if (abs(
m_emId->barrel_ec(
id))== 1) {
157 else if (abs(
m_emId->barrel_ec(
id))== 2) {
177 const int kphi =
m_emId->phi(
id);
178 const int kside=
m_emId->barrel_ec(
id)>0;
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Data class for calibration ADC samples preprocessed by the DSP.
Helper class for LArEM offline identifiers.
void correctSamples(std::vector< double > &dest, const neighbour_t &neighbor) const
SG::ReadCondHandleKey< ILArPedestal > m_pedKey
std::set< HWIdentifier > m_uncorrectedIds
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
virtual StatusCode finalize() override final
const LArOnlineID * m_onlineHelper
unsigned int m_event_counter
std::array< std::vector< std::bitset< 128 > >, 2 > m_knownMissingFebs
SG::ReadCondHandleKey< LArBadFebCont > m_BFKey
size_t getEtaIndex(const Identifier) const
SG::ReadCondHandleKey< LArBadChannelCont > m_BCKey
Gaudi::Property< std::vector< std::string > > m_dontUseForCorr
Gaudi::Property< float > m_acceptableDifference
XtalkCorrHisto m_differences
uint16_t m_fatalFebErrorPattern
virtual StatusCode execute() override final
const unsigned int m_MAXphi
size_t getPhiIndex(const Identifier) const
std::array< std::vector< std::vector< const LArAccumulatedCalibDigit * > >, 2 > m_stripsLookUp
Gaudi::Property< std::vector< std::string > > m_keylist
static constexpr auto m_MAXeta
LArBadChannelMask m_dontUseForCorrMask
LArBadChannelMask m_dontCorrMask
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
static constexpr auto m_MINeta
Gaudi::Property< std::vector< std::string > > m_dontCorr
Gaudi::Property< unsigned int > m_ADCsatur
void add(const LArAccumulatedCalibDigit *dig, const float reldiff)
std::vector< unsigned > m_diffs
void print(MsgStream &stream, const LArOnlineID *onlId, MSG::Level lvl=MSG::INFO)
std::vector< maxlistitem > m_maxlist
XtalkCorrHisto(const unsigned nBins, const float maxbin)
const LArAccumulatedCalibDigit * dig
maxlistitem(HWIdentifier chidin, int dacin, int delayin, float reldiffin)