|
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 |
|
) |
| |
AlgTool like constructor.
Definition at line 24 of file TileRawChannelNoiseFilter.cxx.
40 declareProperty(
"MaxNoiseSigma",
m_maxNoiseSigma = 5.0,
"Channels with noise more than that value are igonred in calculation of correction");
41 declareProperty(
"TileInfoName",
m_infoName =
"TileInfo");
◆ ~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 80 of file TileRawChannelNoiseFilter.cxx.
85 std::string
units[8] = {
"ADC counts",
"pC",
"CspC",
"MeV",
86 "online ADC counts",
"online pC",
"online CspC",
"online MeV" };
92 ATH_MSG_ERROR(
"Due to non-linear CIS constants noise filter is possible only with ADC counts ");
93 ATH_MSG_ERROR(
"Please, disable CIS calibration in optimal filter " );
95 return StatusCode::FAILURE;
123 bool ebNsp = !ebspD4 && eb;
126 static const int maxChannelDrawer = 48;
127 static const int maxChannel = 12;
128 static const int maxMOB = 4;
130 float calib[maxChannelDrawer];
131 float commonmode[maxMOB];
132 int nemptychan[maxMOB];
133 int ngoodchan[maxMOB];
134 int chanmap[maxChannelDrawer];
136 memset(commonmode, 0,
sizeof(commonmode));
137 memset(nemptychan, 0,
sizeof(nemptychan));
138 memset(ngoodchan, 0,
sizeof(ngoodchan));
139 memset(chanmap, 0,
sizeof(chanmap));
151 int mob =
chan / maxChannel;
155 float ped=rch->pedestal();
157 || badChannels->getAdcStatus(adc_id).isBad()
163 ( ebspC10 && (
chan==4 ||
chan==5)) ||
168 if (chanmap[
chan] < 2 && usechan) ++ngoodchan[mob];
172 float amp = rch->amplitude();
174 calib[
chan] = emScale->undoOnlineChannelCalibration(drawerIdx,
chan,
gain, 1.0, rChUnit);
183 float noise_sigma = 1.5;
192 noise_sigma = sampleNoise->getHfn(drawerIdx,
chan,
gain);
195 float significance = 999.999;
196 if ((noise_sigma != 0.0)
200 significance = fabs(amp / noise_sigma);
208 <<
" noise " << noise_sigma
209 <<
" significance " << significance );
213 commonmode[mob] += amp;
221 <<
" channel is not used" );
229 for (
int k = 0;
k < maxMOB;
k++) {
233 if (nchmin < 2) nchmin = 2;
236 if (nemptychan[
k] >= nchmin) {
237 commonmode[
k] /= nemptychan[
k];
241 <<
" drawer " << std::setw(2) <<
drawer
242 <<
" mb " <<
k <<
" mean " << commonmode[
k]
243 <<
" taken from " << nemptychan[
k] <<
" channels"
244 <<
" nchgood " << ngoodchan[
k]
245 <<
" nchmin " << nchmin );
249 if (commonmode[
k] != 0.0) {
251 <<
" drawer " << std::setw(2) <<
drawer
253 <<
" mean is zero instead of " << commonmode[
k] <<
" / " << nemptychan[
k]
254 <<
" nchgood " << ngoodchan[
k]
255 <<
" nchmin " << nchmin
259 <<
ros <<
" drawer " << std::setw(2) <<
drawer
261 <<
" mean is zero - nothing to correct"
262 <<
" nchgood " << ngoodchan[
k]
263 <<
" nchmin " << nchmin
271 if (ncorr == 0)
continue;
282 int mob =
chan/maxChannel;
284 rch->setAmplitude (rch->amplitude() - commonmode[mob] /
calib[
chan]);
286 rch->setAmplitude (rch->amplitude() - commonmode[mob]);
287 rch->setPedestal (rch->pedestal() + commonmode[mob]);
292 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,...
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...