Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
This tool subtracts common-mode noise from all TileCells.
More...
#include <TileCellNoiseFilter.h>
This tool subtracts common-mode noise from all TileCells.
Definition at line 38 of file TileCellNoiseFilter.h.
◆ cmdata_t
◆ TileCellNoiseFilter()
TileCellNoiseFilter::TileCellNoiseFilter |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
AlgTool like constructor.
Definition at line 35 of file TileCellNoiseFilter.cxx.
43 declareInterface<TileCellNoiseFilter>(
this);
48 declareProperty(
"MaxNoiseSigma",
m_maxNoiseSigma = 5.0,
"Channels with noise more than that value are igonred in calculation of correction");
◆ ~TileCellNoiseFilter()
virtual TileCellNoiseFilter::~TileCellNoiseFilter |
( |
| ) |
|
|
inlinevirtual |
◆ calcCM()
Definition at line 196 of file TileCellNoiseFilter.cxx.
208 for (; cellItr != lastCell; ++cellItr) {
211 if (tilecell == 0)
continue;
212 if (tilecell->
badcell())
continue;
214 float noise_sigma = 1.5, significance = 0.0;
224 significance = (noise_sigma != 0.0) ? fabs(
cell->energy() / noise_sigma) : 999.999;
227 <<
" ene " <<
cell->energy()
228 <<
" noise " << noise_sigma
229 <<
" significance " << significance );
233 bool good1 = !tilecell->
badch1();
234 bool good2 = !tilecell->
badch2();
256 float amp = tilecell->
ene1() / chanCalMeV;
261 amp = tilecell->
ene1() / chanCalMeV;
271 significance = 999.999;
272 if ((noise_sigma != 0.0)
276 significance = fabs(amp / noise_sigma);
280 <<
" calib " << chanCalMeV
282 <<
" noise " << noise_sigma
283 <<
" significance " << significance );
309 float amp = tilecell->
ene2() / chanCalMeV;
314 amp = tilecell->
ene2() / chanCalMeV;
325 significance = 999.999;
326 if ((noise_sigma != 0.0)
330 significance = fabs(amp / noise_sigma);
335 <<
" calib " << chanCalMeV
337 <<
" noise " << noise_sigma
338 <<
" significance " << significance );
355 for (
int mob = 0; mob <
s_maxMOB; mob++) {
360 if (nchmin < 2) nchmin = 2;
367 <<
" drawer " << std::setw(2) <<
drawer
372 <<
" nchmin " << nchmin );
378 <<
" drawer " << std::setw(2) <<
drawer
383 <<
" nchmin " << nchmin
387 <<
" drawer " << std::setw(2) <<
drawer
389 <<
" mean is zero - nothing to correct"
391 <<
" nchmin " << nchmin
◆ finalize()
StatusCode TileCellNoiseFilter::finalize |
( |
| ) |
|
|
override |
◆ getCMShift()
float TileCellNoiseFilter::getCMShift |
( |
const cmdata_t & |
commonMode, |
|
|
int |
partition, |
|
|
int |
drawer, |
|
|
int |
channel |
|
) |
| const |
|
inlineprivate |
◆ initialize()
StatusCode TileCellNoiseFilter::initialize |
( |
| ) |
|
|
override |
◆ interfaceID()
const InterfaceID & TileCellNoiseFilter::interfaceID |
( |
| ) |
|
|
static |
◆ process()
proceed the coherent noise subtraction algorithm and correct Tile cell energies
Definition at line 78 of file TileCellNoiseFilter.cxx.
85 ATH_MSG_DEBUG(
"No TileCells in the container - nothing to do");
86 return StatusCode::SUCCESS;
93 caloNoise = noiseH.cptr();
97 sampleNoise = sampleNoiseHandle.cptr();
106 int ncorr = this->
calcCM(caloNoise, sampleNoise, *emScale, cellcoll, commonMode);
108 ATH_MSG_DEBUG(
"Failed to calculate common-mode shift - no corrections applied");
109 return StatusCode::SUCCESS;
117 for (; cellItr != lastCell; ++cellItr) {
120 if (tilecell == 0)
continue;
121 if (tilecell->
badcell())
continue;
126 return StatusCode::SUCCESS;
◆ setCMSEnergy()
Definition at line 137 of file TileCellNoiseFilter.cxx.
141 bool good1 = !tilecell->badch1();
142 bool good2 = !tilecell->badch2();
143 int gain1 = tilecell->gain1();
144 int gain2 = tilecell->gain2();
149 float e1 = tilecell->ene1();
150 float e2 = tilecell->ene2();
179 tilecell->setEnergy(
e1,
e2);
180 }
else if (!good1 && good2) {
182 tilecell->setEnergy(
e2,
e2);
183 }
else if (good1 && !good2) {
185 tilecell->setEnergy(
e1,
e1);
◆ m_caloNoiseKey
Initial value:{this, "CaloNoise",
"",
"CaloNoise object to read, or null to use the DB directly"}
Definition at line 99 of file TileCellNoiseFilter.h.
◆ m_emScaleKey
Initial value:{this,
"TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}
Name of TileEMScale in condition store.
Definition at line 90 of file TileCellNoiseFilter.h.
◆ m_maxNoiseSigma
float TileCellNoiseFilter::m_maxNoiseSigma |
|
private |
◆ m_minimumNumberOfTruncatedChannels
float TileCellNoiseFilter::m_minimumNumberOfTruncatedChannels |
|
private |
◆ m_sampleNoiseKey
◆ m_tileBadChanTool
Initial value:{this,
"TileBadChanTool", "TileBadChanTool", "Tile bad channel tool"}
Definition at line 103 of file TileCellNoiseFilter.h.
◆ m_tileHWID
◆ m_tileID
◆ m_truncationThresholdOnAbsEinSigma
float TileCellNoiseFilter::m_truncationThresholdOnAbsEinSigma |
|
private |
◆ m_useTwoGaussNoise
bool TileCellNoiseFilter::m_useTwoGaussNoise |
|
private |
◆ s_caloIndex
◆ s_maxChannel
const int TileCellNoiseFilter::s_maxChannel = 12 |
|
staticprivate |
◆ s_maxDrawer
const int TileCellNoiseFilter::s_maxDrawer = 64 |
|
staticprivate |
◆ s_maxMOB
const int TileCellNoiseFilter::s_maxMOB = 4 |
|
staticprivate |
◆ s_maxPartition
const int TileCellNoiseFilter::s_maxPartition = 4 |
|
staticprivate |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
virtual bool badcell(void) const override final
check if whole cell is bad (i.e.
const TileHWID * m_tileHWID
Pointer to TileHWID.
IdentifierHash onl2() const
cell online identifier 2
static const int s_maxMOB
int indexLastCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of last cell of given calorimeter (-2 if none) Note that it is normally more efficient to use i...
float getEffectiveSigma(const Identifier id, const int gain, const float energy) const
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Condition object to keep and provide Tile sample noise.
float ene1(void) const
get energy of first PMT
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
bool badch1(void) const
check if first PMT is in bad channel list and masked
float m_minimumNumberOfTruncatedChannels
float getHfn(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
float m_truncationThresholdOnAbsEinSigma
#define ATH_MSG_VERBOSE(x)
bool empty() const
Test if the key is blank.
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
static const CaloCell_ID::SUBCALO s_caloIndex
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
static const int s_maxChannel
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
IdentifierHash onl1() const
cell online identifier 1
static const int s_maxDrawer
float calibrateChannel(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const
Calibrate a Tile channel.
int indexFirstCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of first cell of given calorimeter (-1 if none).
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
setRawEt setRawPhi nCells
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
bool badch2(void) const
check if second PMT is in bad channel list and masked
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
void setCMSEnergy(const TileEMScale *emScale, const cmdata_t &commonMode, TileCell *cell) const
int gain1(void) const
get gain of first PMT
float getCMShift(const cmdata_t &commonMode, int partition, int drawer, int channel) const
static const int s_maxPartition
SG::ReadCondHandleKey< CaloNoise > m_caloNoiseKey
StatusCode initialize(bool used=true)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
int gain2(void) const
get gain of second PMT
float ene2(void) const
get energy of second PMT
float cmdata_t[s_maxPartition][s_maxDrawer][s_maxMOB]
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Data object for each calorimeter readout cell.
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
std::string to_string(const Identifier &id, int level=0) const
const TileID * m_tileID
Pointer to TileID.
ToolHandle< ITileBadChanTool > m_tileBadChanTool
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...
int calcCM(const CaloNoise *caloNoise, const TileSampleNoise *sampleNoise, const TileEMScale *emScale, const CaloCellContainer *cellcoll, cmdata_t &commonMode) const