![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
This tool subtracts common-mode noise from all TileRawChannels in one container.
More...
#include <TileRawChannelNoiseFilter.h>
This tool subtracts common-mode noise from all TileRawChannels in one container.
Definition at line 39 of file TileRawChannelNoiseFilter.h.
◆ TileRawChannelNoiseFilter()
TileRawChannelNoiseFilter::TileRawChannelNoiseFilter |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TileRawChannelNoiseFilter()
virtual TileRawChannelNoiseFilter::~TileRawChannelNoiseFilter |
( |
| ) |
|
|
inlinevirtual |
◆ finalize()
StatusCode TileRawChannelNoiseFilter::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode TileRawChannelNoiseFilter::initialize |
( |
| ) |
|
|
overridevirtual |
◆ process()
process the coherent noise subtruction algorithm and correct TileRawChannel amplitudes
Definition at line 79 of file TileRawChannelNoiseFilter.cxx.
84 std::string
units[8] = {
"ADC counts",
"pC",
"CspC",
"MeV",
85 "online ADC counts",
"online pC",
"online CspC",
"online MeV" };
91 ATH_MSG_ERROR(
"Due to non-linear CIS constants noise filter is possible only with ADC counts ");
92 ATH_MSG_ERROR(
"Please, disable CIS calibration in optimal filter " );
94 return StatusCode::FAILURE;
122 bool ebNsp = !ebspD4 && eb;
125 static const int maxChannelDrawer = 48;
126 static const int maxChannel = 12;
127 static const int maxMOB = 4;
129 float calib[maxChannelDrawer];
130 float commonmode[maxMOB];
131 int nemptychan[maxMOB];
132 int ngoodchan[maxMOB];
133 int chanmap[maxChannelDrawer];
135 memset(commonmode, 0,
sizeof(commonmode));
136 memset(nemptychan, 0,
sizeof(nemptychan));
137 memset(ngoodchan, 0,
sizeof(ngoodchan));
138 memset(chanmap, 0,
sizeof(chanmap));
150 int mob =
chan / maxChannel;
154 float ped=rch->pedestal();
156 || badChannels->getAdcStatus(adc_id).isBad()
162 ( ebspC10 && (
chan==4 ||
chan==5)) ||
167 if (chanmap[
chan] < 2 && usechan) ++ngoodchan[mob];
171 float amp = rch->amplitude();
173 calib[
chan] = emScale->undoOnlineChannelCalibration(drawerIdx,
chan,
gain, 1.0, rChUnit);
182 float noise_sigma = 1.5;
191 noise_sigma = sampleNoise->getHfn(drawerIdx,
chan,
gain);
194 float significance = 999.999;
195 if ((noise_sigma != 0.0)
199 significance = fabs(amp / noise_sigma);
207 <<
" noise " << noise_sigma
208 <<
" significance " << significance );
212 commonmode[mob] += amp;
220 <<
" channel is not used" );
228 for (
int k = 0;
k < maxMOB;
k++) {
232 if (nchmin < 2) nchmin = 2;
235 if (nemptychan[
k] >= nchmin) {
236 commonmode[
k] /= nemptychan[
k];
240 <<
" drawer " << std::setw(2) <<
drawer
241 <<
" mb " <<
k <<
" mean " << commonmode[
k]
242 <<
" taken from " << nemptychan[
k] <<
" channels"
243 <<
" nchgood " << ngoodchan[
k]
244 <<
" nchmin " << nchmin );
248 if (commonmode[
k] != 0.0) {
250 <<
" drawer " << std::setw(2) <<
drawer
252 <<
" mean is zero instead of " << commonmode[
k] <<
" / " << nemptychan[
k]
253 <<
" nchgood " << ngoodchan[
k]
254 <<
" nchmin " << nchmin
258 <<
ros <<
" drawer " << std::setw(2) <<
drawer
260 <<
" mean is zero - nothing to correct"
261 <<
" nchgood " << ngoodchan[
k]
262 <<
" nchmin " << nchmin
270 if (ncorr == 0)
continue;
281 int mob =
chan/maxChannel;
283 rch->setAmplitude (rch->amplitude() - commonmode[mob] /
calib[
chan]);
285 rch->setAmplitude (rch->amplitude() - commonmode[mob]);
286 rch->setPedestal (rch->pedestal() + commonmode[mob]);
291 return StatusCode::SUCCESS;
◆ m_ADCmaskValueMinusEps
float TileRawChannelNoiseFilter::m_ADCmaskValueMinusEps |
|
private |
◆ m_badChannelsKey
◆ m_DQstatusKey
◆ m_emScaleKey
◆ m_infoName
std::string TileRawChannelNoiseFilter::m_infoName |
|
private |
◆ m_maxNoiseSigma
float TileRawChannelNoiseFilter::m_maxNoiseSigma |
|
private |
◆ m_minimumNumberOfTruncatedChannels
float TileRawChannelNoiseFilter::m_minimumNumberOfTruncatedChannels |
|
private |
◆ m_sampleNoiseKey
◆ m_tileHWID
◆ m_tileInfo
◆ m_truncationThresholdOnAbsEinSigma
float TileRawChannelNoiseFilter::m_truncationThresholdOnAbsEinSigma |
|
private |
◆ m_useGapCells
bool TileRawChannelNoiseFilter::m_useGapCells |
|
private |
◆ m_useTwoGaussNoise
bool TileRawChannelNoiseFilter::m_useTwoGaussNoise |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
float m_ADCmaskValueMinusEps
indicates channels which were masked in background dataset
float m_minimumNumberOfTruncatedChannels
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
const TileInfo * m_tileInfo
#define ATH_MSG_VERBOSE(x)
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
int ADCmaskValue() const
Returns the overlay magic number that indicates channels which were masked in background dataset.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Class that holds Data Quality fragment information and provides functions to extract the data quality...
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
#define CHECK(...)
Evaluate an expression and check for errors.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
bool isAdcDQgood(int partition, int drawer, int ch, int gain) const
returns status of single ADC returns False if there are any errors
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
HWIdentifier drawer_id(int frag) const
ROS HWIdentifer.
Collection * indexFindPtr(IdentifierHash hash)
Look up a (non-const) collection via hash.
float m_truncationThresholdOnAbsEinSigma
StatusCode initialize(bool used=true)
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
const TileHWID * m_tileHWID
Pointer to TileHWID.
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...