ATLAS Offline Software
Loading...
Searching...
No Matches
LArBadChannel.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LArBadChannel_H
6#define LArBadChannel_H
7
8template <class T> class TLArBadChanBitPackingBase;
9
11 public:
12 typedef unsigned int PosType;
13 typedef unsigned int BitWord;
14
15
48
77
78
79 explicit LArBadChannel( BitWord rawStatus=0, bool isSC=false) : m_word(rawStatus), m_isSC(isSC) {}
80
82 bool statusBad(PosType pb) const {
83 BitWord mask = 1u << pb;
84 return ((m_word & mask) != 0);
85 }
86
88 bool statusOK( PosType pb) const {return !statusBad(pb);}
89
91 bool good() const {return m_word == 0;}
92
93
94 //Cases used only for supercells
95 bool maskedOSUM() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::maskedOSUMBit); else return false;}
96 bool deformedTail() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::DeformedTailBit); else return false;}
97 bool deformedPulse() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::DeformedPulseBit); else return false;}
98 bool nonLinearRamp() const{ if (m_isSC) return statusBad( LArBadChannelSCEnum::NonLinearRampBit); else return false;}
99 bool ADCJump() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::ADCJumpBit); else return false;}
100 bool SCAProblem() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::SCAProblemBit); else return false;}
101 bool offOFCs() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::OffOFCsBit); else return false;}
102 bool offAmplitude() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::OffAmplitudeBit); else return false;}
103 bool offScale() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::OffScaleBit); else return false;}
104 bool lowLightFibre() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::lowLightFibreBit); else return false;}
106 bool pedestalJump() const {if (m_isSC) return statusBad( LArBadChannelSCEnum::pedestalJumpBit); else return false;}
107
108
109 //Common cases (regular and supercell)
113 bool almostDead() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::almostDeadBit);}
114 bool shortProblem() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::shortBit);}
115 bool unstable() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::unstableBit);}
116 bool distorted() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::distortedBit);}
117 bool lowNoiseHG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::lowNoiseHGBit);}
118 bool highNoiseHG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::highNoiseHGBit);}
119 bool unstableNoiseHG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::unstableNoiseHGBit);}
120 bool lowNoiseMG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::lowNoiseMGBit);}
121 bool highNoiseMG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::highNoiseMGBit);}
122 bool unstableNoiseMG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::unstableNoiseMGBit);}
123 bool lowNoiseLG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::lowNoiseLGBit);}
124 bool highNoiseLG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::highNoiseLGBit);}
125 bool unstableNoiseLG() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::unstableNoiseLGBit);}
126 bool missingFEB() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::missingFEBBit);}
130 bool deadSCACell() const {if(m_isSC) return false; else return statusBad( LArBadChannelEnum::deadSCACellBit);}
131 bool badFirstSample() const {if(m_isSC) return false; else return statusBad( LArBadChannelEnum::badFirstSampleBit);}
134 bool badAutoCorr() const { if(m_isSC) return false; else return statusBad( LArBadChannelEnum::badAutoCorrBit);}
135
136 bool reallyNoisy() const {return (highNoiseHG() || highNoiseMG() || highNoiseLG() ||
138 bool noisy() const {return (reallyNoisy() || lowNoiseHG() || lowNoiseMG() || lowNoiseLG());}
139
140 bool operator!=(BitWord other) {return m_word != other;}
141 bool operator!=(LArBadChannel other) {return m_word != other.packedData();}
142 bool operator==(BitWord other) {return m_word == other;}
143 bool operator==(LArBadChannel other) {return m_word == other.packedData();}
144
145 LArBadChannel& operator|=(LArBadChannel other) {m_word|=other.m_word; return *this;}
146
147 BitWord packedData() const {return m_word;}
148
149 bool isSC() const {return m_isSC;}
150 void setSC() {m_isSC=true;}
151
152 private:
153
154
157 bool m_isSC;
158
160 friend class TLArBadChanBitPackingBase<LArBadChannel::LArBadChannelEnum>;
161};
162
163
164#endif
bool shortProblem() const
unsigned int BitWord
bool lowNoiseHG() const
bool deadReadout() const
LArBadChannel(BitWord rawStatus=0, bool isSC=false)
bool offAmplitude() const
bool highNoiseHG() const
bool operator==(LArBadChannel other)
bool badAutoCorr() const
BitWord packedData() const
bool badFirstSample() const
bool problematicForUnknownReason() const
bool unstableNoiseMG() const
bool unstable() const
bool transmissionErrorFibre() const
bool lowLightFibre() const
bool deformedPulse() const
bool highNoiseMG() const
bool offOFCs() const
bool unstableNoiseHG() const
bool noisy() const
bool isSC() const
bool lowNoiseLG() const
bool offScale() const
bool almostDead() const
bool deadSCACell() const
bool missingFEB() const
BitWord & packedDataRef()
unsigned int PosType
bool reallyNoisy() const
bool highNoiseLG() const
bool ADCJump() const
bool operator!=(LArBadChannel other)
bool statusBad(PosType pb) const
Returns true if corresponding status bit its set.
bool peculiarCalibrationLine() const
bool pedestalJump() const
bool operator!=(BitWord other)
bool unstableNoiseLG() const
bool deadCalib() const
bool statusOK(PosType pb) const
Returns true if there is no problem in corresponding status bit.
bool nonLinearRamp() const
bool deformedTail() const
bool sporadicBurstNoise() const
LArBadChannel & operator|=(LArBadChannel other)
bool SCAProblem() const
bool unflaggedByLADIeS() const
bool deadPhys() const
bool operator==(BitWord other)
bool maskedOSUM() const
bool reflaggedByLADIeS() const
bool good() const
Returns true if no problems at all (all bits at zero)
bool distorted() const
bool lowNoiseMG() const