ATLAS Offline Software
TileCellNoiseFilter.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Tile includes
8 #include "TileEvent/TileCell.h"
11 
12 // Calo includes
13 #include "CaloEvent/CaloCell.h"
15 #include "CaloDetDescr/CaloDetDescrElement.h"
16 
17 // Atlas includes
20 #include "Identifier/Identifier.h"
22 
23 #include <cmath>
24 #include <algorithm>
25 #include <functional>
26 
27 static const InterfaceID IID_ITileCellNoiseFilter("TileCellNoiseFilter", 1, 0);
28 
29 const InterfaceID& TileCellNoiseFilter::interfaceID() {
30  return IID_ITileCellNoiseFilter;
31 }
32 
33 //========================================================
34 // constructor
36  const std::string& name, const IInterface* parent)
37  : base_class(type, name, parent)
38  , m_truncationThresholdOnAbsEinSigma(4.0) // 4 sigma of ADC HF noise by default
39  , m_minimumNumberOfTruncatedChannels(0.6) // at least 60% of channels should be below threshold
40  , m_useTwoGaussNoise(false) // do not use 2G - has no sense for ADC HF noise for the moment
41 {
42 
43  declareInterface<TileCellNoiseFilter>(this);
44 
45  declareProperty("UseTwoGaussNoise", m_useTwoGaussNoise);
46  declareProperty("TruncationThresholdOnAbsEinSigma", m_truncationThresholdOnAbsEinSigma);
47  declareProperty("MinimumNumberOfTruncatedChannels", m_minimumNumberOfTruncatedChannels);
48  declareProperty("MaxNoiseSigma", m_maxNoiseSigma = 5.0, "Channels with noise more than that value are igonred in calculation of correction");
49 }
50 
51 //========================================================
52 // Initialize
54  ATH_MSG_INFO("Initializing...");
55 
58 
60 
62 
63  if (m_caloNoiseKey.empty()) {
64  //=== get TileBadChanTool
65  ATH_CHECK( m_tileBadChanTool.retrieve() );
66 
67  } else {
69 
70  m_tileBadChanTool.disable();
71  }
72 
73  return StatusCode::SUCCESS;
74 }
75 
76 // ============================================================================
77 // process container
79  const EventContext& ctx) const
80 {
81  ATH_MSG_DEBUG("in process()");
82 
83  int nCells = cellcoll->nCellsCalo(s_caloIndex);
84  if (nCells <= 0) {
85  ATH_MSG_DEBUG("No TileCells in the container - nothing to do");
86  return StatusCode::SUCCESS;
87  }
88 
89  const CaloNoise* caloNoise = nullptr;
90  const TileSampleNoise* sampleNoise = nullptr;
91  if (!m_caloNoiseKey.empty()) {
93  caloNoise = noiseH.cptr();
94  } else {
96  ATH_CHECK( sampleNoiseHandle.isValid() );
97  sampleNoise = sampleNoiseHandle.cptr();
98  }
99 
101  ATH_CHECK( emScale.isValid() );
102 
103  // common-mode shift calculation
104  ATH_MSG_DEBUG("Calculating common-mode shift...");
105  cmdata_t commonMode = {{{0}}};
106  int ncorr = this->calcCM(caloNoise, sampleNoise, *emScale, cellcoll, commonMode);
107  if (ncorr <= 0) {
108  ATH_MSG_DEBUG( "Failed to calculate common-mode shift - no corrections applied");
109  return StatusCode::SUCCESS;
110  } else {
111  ATH_MSG_DEBUG("common-mode shift calculation ended");
112  }
113 
114  size_t cellItr = cellcoll->indexFirstCellCalo(s_caloIndex);
115  size_t lastCell = cellcoll->indexLastCellCalo(s_caloIndex);
116 
117  for (; cellItr != lastCell; ++cellItr) {
118  CaloCell* cell = (*cellcoll)[cellItr];
119  TileCell* tilecell = dynamic_cast<TileCell*>(cell);
120  if (tilecell == 0) continue;
121  if (tilecell->badcell()) continue;
122 
123  setCMSEnergy(*emScale, commonMode, tilecell);
124  }
125 
126  return StatusCode::SUCCESS;
127 }
128 
129 // ============================================================================
130 // finalize
132  return StatusCode::SUCCESS;
133 }
134 
135 // ============================================================================
136 // correct energy
138  const cmdata_t& commonMode,
139  TileCell* tilecell) const {
140  //Identifier id = tilecell->ID();
141  bool good1 = !tilecell->badch1();
142  bool good2 = !tilecell->badch2();
143  int gain1 = tilecell->gain1();
144  int gain2 = tilecell->gain2();
145  const CaloDetDescrElement * caloDDE = tilecell->caloDDE();
146  IdentifierHash hash1 = caloDDE->onl1();
147  IdentifierHash hash2 = caloDDE->onl2();
148 
149  float e1 = tilecell->ene1();
150  float e2 = tilecell->ene2();
151 
152  if (gain1 == TileID::HIGHGAIN && good1 && hash1 != TileHWID::NOT_VALID_HASH) {
153  HWIdentifier adc_id = m_tileHWID->adc_id(hash1, gain1);
154  int partition = m_tileHWID->ros(adc_id); // 1-4
155  int drawer = m_tileHWID->drawer(adc_id); // 0-63
156  int chan = m_tileHWID->channel(adc_id); // 0-47
157  unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(partition, drawer);
158  e1 -= emScale->calibrateChannel(drawerIdx, chan, gain1,
159  this->getCMShift(commonMode, partition - 1, drawer, chan),
161  }
162 
163  if (gain2 == TileID::HIGHGAIN && good2 && hash2 != TileHWID::NOT_VALID_HASH) {
164  HWIdentifier adc_id = m_tileHWID->adc_id(hash2, gain2);
165  int partition = m_tileHWID->ros(adc_id); // 1-4
166  int drawer = m_tileHWID->drawer(adc_id); // 0-63
167  int chan = m_tileHWID->channel(adc_id); // 0-47
168  unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(partition, drawer);
169  e2 -= emScale->calibrateChannel(drawerIdx, chan, gain2,
170  this->getCMShift(commonMode, partition - 1, drawer, chan),
172  }
173 
174  if ((good1 && good2)
175  || hash1 == TileHWID::NOT_VALID_HASH
176  || hash2 == TileHWID::NOT_VALID_HASH) {
177 
178  // either both channels are good or there is only one channel in a cell
179  tilecell->setEnergy(e1, e2);
180  } else if (!good1 && good2) {
181  // first channel is bad, so second channel is used twice
182  tilecell->setEnergy(e2, e2);
183  } else if (good1 && !good2) {
184  // second channel is bad, so first channel is used twice
185  tilecell->setEnergy(e1, e1);
186  } else {
187  // both are bad - nothing to do
188  // but should not be here, because this function is not called for completely bad cells
189  }
190 
191  return;
192 }
193 
194 // ============================================================================
195 // calculate correction
197  const TileSampleNoise* sampleNoise,
198  const TileEMScale* emScale,
199  const CaloCellContainer* cellcoll,
200  cmdata_t& commonMode) const
201 {
202  int nEmptyChan[s_maxPartition][s_maxDrawer][s_maxMOB] = {{{0}}};
203  int nGoodChan[s_maxPartition][s_maxDrawer][s_maxMOB] = {{{0}}};
204 
205  size_t cellItr = cellcoll->indexFirstCellCalo(s_caloIndex);
206  size_t lastCell = cellcoll->indexLastCellCalo(s_caloIndex);
207 
208  for (; cellItr != lastCell; ++cellItr) {
209  const CaloCell* cell = (*cellcoll)[cellItr];
210  const TileCell* tilecell = dynamic_cast<const TileCell*>(cell);
211  if (tilecell == 0) continue;
212  if (tilecell->badcell()) continue;
213 
214  float noise_sigma = 1.5, significance = 0.0;
215 
216  if (caloNoise) {
217  if (m_useTwoGaussNoise) {
218  noise_sigma = caloNoise->getEffectiveSigma(cell->ID(), cell->gain(), cell->energy());
219 
220  } else {
221  noise_sigma = caloNoise->getNoise(cell->ID(), cell->gain());
222  }
223 
224  significance = (noise_sigma != 0.0) ? fabs(cell->energy() / noise_sigma) : 999.999;
225 
226  ATH_MSG_VERBOSE( "ID " << m_tileID->to_string(tilecell->ID())
227  << " ene " << cell->energy()
228  << " noise " << noise_sigma
229  << " significance " << significance );
230  }
231 
232  //Identifier id = tilecell->ID();
233  bool good1 = !tilecell->badch1();
234  bool good2 = !tilecell->badch2();
235  int gain1 = tilecell->gain1();
236  int gain2 = tilecell->gain2();
237  const CaloDetDescrElement * caloDDE = tilecell->caloDDE();
238  IdentifierHash hash1 = caloDDE->onl1();
239  IdentifierHash hash2 = caloDDE->onl2();
240 
241  if (good1 && hash1 != TileHWID::NOT_VALID_HASH) {
242  HWIdentifier adc_id = m_tileHWID->adc_id(hash1, gain1);
243  int partition = m_tileHWID->ros(adc_id); // 1-4
244  int drawer = m_tileHWID->drawer(adc_id); // 0-63
245  int chan = m_tileHWID->channel(adc_id); // 0-47
246  int mob = (int) (chan / s_maxChannel);
247 
248  ++nGoodChan[partition - 1][drawer][mob];
249 
250  if (gain1 == TileID::HIGHGAIN) {
251 
252  unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(partition, drawer);
253  float chanCalMeV = emScale->calibrateChannel(drawerIdx, chan, gain1, 1.,
255 
256  float amp = tilecell->ene1() / chanCalMeV;
257  if (amp != 0.0) { // second iteration (in case there is non-linear correction)
258  chanCalMeV = emScale->calibrateChannel(drawerIdx, chan, gain1, amp,
260 
261  amp = tilecell->ene1() / chanCalMeV;
262  }
263 
264  if (!caloNoise) {
265  if (m_useTwoGaussNoise) {
266  // nothing for the moment - keep 1.5 ADC counts
267  } else {
268  noise_sigma = sampleNoise->getHfn(drawerIdx, chan, gain1);
269  }
270 
271  significance = 999.999;
272  if ((noise_sigma != 0.0)
273  && (noise_sigma < m_maxNoiseSigma)
274  /* && (!m_tileBadChanTool->getAdcStatus(drawerIdx, chan, gain1).isNoisy()) */) {
275 
276  significance = fabs(amp / noise_sigma); // caluclate signal/noise ratio
277  }
278 
279  ATH_MSG_VERBOSE( "HWID " << m_tileHWID->to_string(adc_id)
280  << " calib " << chanCalMeV
281  << " amp " << amp
282  << " noise " << noise_sigma
283  << " significance " << significance );
284  }
285 
286  // use only empty channels with less significance
287  if (significance <= m_truncationThresholdOnAbsEinSigma) {
288  commonMode[partition - 1][drawer][mob] += amp;
289  nEmptyChan[partition - 1][drawer][mob]++;
290  }
291  }
292  }
293 
294  if (good2 && hash2 != TileHWID::NOT_VALID_HASH) {
295  HWIdentifier adc_id = m_tileHWID->adc_id(hash2, gain2);
296  int partition = m_tileHWID->ros(adc_id); // 1-4
297  int drawer = m_tileHWID->drawer(adc_id); // 0-63
298  int chan = m_tileHWID->channel(adc_id); // 0-47
299  int mob = (int) (chan / s_maxChannel);
300 
301  ++nGoodChan[partition - 1][drawer][mob];
302 
303  if (gain2 == TileID::HIGHGAIN) {
304 
305  unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(partition, drawer);
306  float chanCalMeV = emScale->calibrateChannel(drawerIdx, chan, gain2, 1.,
308 
309  float amp = tilecell->ene2() / chanCalMeV;
310  if (amp != 0.0) { // second iteration (in case there is non-linear correction)
311  chanCalMeV = emScale->calibrateChannel(drawerIdx, chan, gain2, amp,
313 
314  amp = tilecell->ene2() / chanCalMeV;
315  }
316 
317  if (!caloNoise) {
318  if (m_useTwoGaussNoise) {
319  // nothing for the moment - keep 1.5 ADC counts
320  } else {
321  noise_sigma = sampleNoise->getHfn(drawerIdx, chan, gain2);
322  }
323 
324  // use only empty channels with less significance
325  significance = 999.999;
326  if ((noise_sigma != 0.0)
327  && (noise_sigma < m_maxNoiseSigma)
328  /* && (!m_tileBadChanTool->getAdcStatus(drawerIdx, chan, gain2).isNoisy()) */) {
329 
330  significance = fabs(amp / noise_sigma); // caluclate signal/noise ratio
331  }
332 
333 
334  ATH_MSG_VERBOSE( "HWID " << m_tileHWID->to_string(adc_id)
335  << " calib " << chanCalMeV
336  << " amp " << amp
337  << " noise " << noise_sigma
338  << " significance " << significance );
339  }
340 
341  // use only empty channels with less significance
342  if (significance <= m_truncationThresholdOnAbsEinSigma) {
343  commonMode[partition - 1][drawer][mob] += amp;
344  nEmptyChan[partition - 1][drawer][mob]++;
345  }
346  }
347  }
348  }
349 
350  int ncorr = 0;
352 
353  for (int partition = 0; partition < s_maxPartition; partition++) {
354  for (int drawer = 0; drawer < s_maxDrawer; drawer++) {
355  for (int mob = 0; mob < s_maxMOB; mob++) {
356 
359  * nGoodChan[partition][drawer][mob]);
360  if (nchmin < 2) nchmin = 2;
361  }
362 
363  if (nEmptyChan[partition][drawer][mob] >= nchmin) {
364  commonMode[partition][drawer][mob] /= nEmptyChan[partition][drawer][mob];
365  ++ncorr;
366  ATH_MSG_VERBOSE( "ros " << partition + 1 << std::setw(2)
367  << " drawer " << std::setw(2) << drawer
368  << " mb " << mob
369  << " mean " << commonMode[partition][drawer][mob]
370  << " taken from " << nEmptyChan[partition][drawer][mob] << " channels"
371  << " nchgood " << nGoodChan[partition][drawer][mob]
372  << " nchmin " << nchmin );
373 
374  } else {
375  if (msgLvl(MSG::VERBOSE)) {
376  if (commonMode[partition][drawer][mob] != 0.0) {
377  msg(MSG::VERBOSE) << "ros " << partition + 1 << std::setw(2)
378  << " drawer " << std::setw(2) << drawer
379  << " mb " << mob
380  << " mean is zero instead of " << commonMode[partition][drawer][mob]
381  << " / " << nEmptyChan[partition][drawer][mob]
382  << " nchgood " << nGoodChan[partition][drawer][mob]
383  << " nchmin " << nchmin
384  << endmsg;
385  } else {
386  msg(MSG::VERBOSE) << "ros " << partition + 1
387  << " drawer " << std::setw(2) << drawer
388  << " mb " << mob
389  << " mean is zero - nothing to correct"
390  << " nchgood " << nGoodChan[partition][drawer][mob]
391  << " nchmin " << nchmin
392  << endmsg;
393  }
394  }
395  commonMode[partition][drawer][mob] = 0.0;
396  }
397  }
398  }
399  }
400 
401  return ncorr;
402 }
403 
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
TileCell::badcell
virtual bool badcell(void) const override final
check if whole cell is bad (i.e.
Definition: TileCell.h:220
TileCell
Definition: TileCell.h:57
TileCellNoiseFilter::m_tileHWID
const TileHWID * m_tileHWID
Pointer to TileHWID.
Definition: TileCellNoiseFilter.h:85
TileEMScale
Condition object to keep calibration factors of TileCal channels.
Definition: TileEMScale.h:87
CaloDetDescrElement::onl2
IdentifierHash onl2() const
cell online identifier 2
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:408
TileCellNoiseFilter.h
TileCellNoiseFilter::s_maxMOB
static const int s_maxMOB
Definition: TileCellNoiseFilter.h:65
CaloCellContainer::indexLastCellCalo
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...
Definition: CaloCellContainer.cxx:141
CaloNoise::getEffectiveSigma
float getEffectiveSigma(const Identifier id, const int gain, const float energy) const
Definition: CaloNoise.h:55
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
TileCellNoiseFilter::finalize
StatusCode finalize() override
AlgTool finalize method.
Definition: TileCellNoiseFilter.cxx:131
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
egammaEnergyPositionAllSamples::e1
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
TileSampleNoise
Condition object to keep and provide Tile sample noise.
Definition: TileSampleNoise.h:18
TileCell::ene1
float ene1(void) const
get energy of first PMT
Definition: TileCell.h:193
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
TileCell::badch1
bool badch1(void) const
check if first PMT is in bad channel list and masked
Definition: TileCell.h:215
CaloTime_fillDB.gain2
gain2
Definition: CaloTime_fillDB.py:357
SG::ReadCondHandle::isValid
bool isValid()
Definition: ReadCondHandle.h:205
CaloCell.h
TileCellNoiseFilter::m_minimumNumberOfTruncatedChannels
float m_minimumNumberOfTruncatedChannels
Definition: TileCellNoiseFilter.h:108
Tile_Base_ID::HIGHGAIN
@ HIGHGAIN
Definition: Tile_Base_ID.h:57
TileCalibUtils.h
TileSampleNoise::getHfn
float getHfn(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
Definition: TileSampleNoise.h:51
TileCellNoiseFilter::m_truncationThresholdOnAbsEinSigma
float m_truncationThresholdOnAbsEinSigma
Definition: TileCellNoiseFilter.h:107
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
HWIdentifier
Definition: HWIdentifier.h:13
CaloNoise::getNoise
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
Definition: CaloNoise.h:34
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
TileCellNoiseFilter::TileCellNoiseFilter
TileCellNoiseFilter(const std::string &type, const std::string &name, const IInterface *parent)
AlgTool like constructor.
Definition: TileCellNoiseFilter.cxx:35
ReadCondHandle.h
TileCellNoiseFilter::s_caloIndex
static const CaloCell_ID::SUBCALO s_caloIndex
Definition: TileCellNoiseFilter.h:111
TileHWID::channel
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
Definition: TileHWID.h:189
TileID.h
TileCellNoiseFilter::s_maxChannel
static const int s_maxChannel
Definition: TileCellNoiseFilter.h:66
TileHWID::ros
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
Definition: TileHWID.h:167
CaloDetDescrElement::onl1
IdentifierHash onl1() const
cell online identifier 1
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:404
TileCellNoiseFilter::s_maxDrawer
static const int s_maxDrawer
Definition: TileCellNoiseFilter.h:64
TileEMScale::calibrateChannel
float calibrateChannel(unsigned int drawerIdx, unsigned int channel, unsigned int adc, float amplitude, TileRawChannelUnit::UNIT rawDataUnitIn, TileRawChannelUnit::UNIT rawDataUnitOut) const
Calibrate a Tile channel.
Definition: TileEMScale.cxx:136
CaloCellContainer::indexFirstCellCalo
int indexFirstCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of first cell of given calorimeter (-1 if none).
Definition: CaloCellContainer.cxx:137
TileCellNoiseFilter::initialize
StatusCode initialize() override
AlgTool initialize method.
Definition: TileCellNoiseFilter.cxx:53
TileHWID.h
TileCellNoiseFilter::m_sampleNoiseKey
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
Definition: TileCellNoiseFilter.h:96
xAOD::nCells
setRawEt setRawPhi nCells
Definition: TrigCaloCluster_v1.cxx:33
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
TileCell::badch2
bool badch2(void) const
check if second PMT is in bad channel list and masked
Definition: TileCell.h:218
CaloCellContainer::nCellsCalo
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
Definition: CaloCellContainer.cxx:145
TileCell.h
TileRawChannelUnit::MegaElectronVolts
@ MegaElectronVolts
Definition: TileRawChannelUnit.h:20
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TileCellNoiseFilter::setCMSEnergy
void setCMSEnergy(const TileEMScale *emScale, const cmdata_t &commonMode, TileCell *cell) const
Definition: TileCellNoiseFilter.cxx:137
TileCell::gain1
int gain1(void) const
get gain of first PMT
Definition: TileCell.cxx:182
TileCellNoiseFilter::getCMShift
float getCMShift(const cmdata_t &commonMode, int partition, int drawer, int channel) const
Definition: TileCellNoiseFilter.h:78
CaloNoise
Definition: CaloNoise.h:16
CaloTime_fillDB.gain1
gain1
Definition: CaloTime_fillDB.py:356
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
TileCellNoiseFilter::s_maxPartition
static const int s_maxPartition
Definition: TileCellNoiseFilter.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
IdentifierHash.h
errorcheck.h
Helpers for checking error return status codes and reporting errors.
TileCellNoiseFilter::m_caloNoiseKey
SG::ReadCondHandleKey< CaloNoise > m_caloNoiseKey
Definition: TileCellNoiseFilter.h:99
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:279
CaloCellContainer.h
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
TileCellNoiseFilter::m_emScaleKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
Definition: TileCellNoiseFilter.h:90
TileCell::setEnergy
virtual void setEnergy(float ene) override final
set total energy, reset eneDiff to zero
Definition: TileCell.cxx:123
TileHWID::adc_id
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
Definition: TileHWID.cxx:228
TileCell::gain2
int gain2(void) const
get gain of second PMT
Definition: TileCell.cxx:189
TileCell::ene2
float ene2(void) const
get energy of second PMT
Definition: TileCell.h:195
TileHWID::NOT_VALID_HASH
@ NOT_VALID_HASH
Definition: TileHWID.h:314
TileCellNoiseFilter::cmdata_t
float cmdata_t[s_maxPartition][s_maxDrawer][s_maxMOB]
Definition: TileCellNoiseFilter.h:68
TileCellNoiseFilter::process
virtual StatusCode process(CaloCellContainer *cellcoll, const EventContext &ctx) const override
proceed the coherent noise subtraction algorithm and correct Tile cell energies
Definition: TileCellNoiseFilter.cxx:78
TileHWID::drawer
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
Definition: TileHWID.h:171
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
egammaEnergyPositionAllSamples::e2
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
Tile_Base_ID::to_string
std::string to_string(const Identifier &id, int level=0) const
Definition: Tile_Base_ID.cxx:52
TileCellNoiseFilter::m_tileID
const TileID * m_tileID
Pointer to TileID.
Definition: TileCellNoiseFilter.h:84
TileCellNoiseFilter::m_tileBadChanTool
ToolHandle< ITileBadChanTool > m_tileBadChanTool
Definition: TileCellNoiseFilter.h:103
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
TileCalibUtils::getDrawerIdx
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Definition: TileCalibUtils.cxx:60
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
TileHWID::to_string
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
Definition: TileHWID.cxx:49
IdentifierHash
Definition: IdentifierHash.h:38
TileCellNoiseFilter::m_maxNoiseSigma
float m_maxNoiseSigma
Definition: TileCellNoiseFilter.h:113
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
TileCellNoiseFilter::m_useTwoGaussNoise
bool m_useTwoGaussNoise
Definition: TileCellNoiseFilter.h:109
TileCellNoiseFilter::interfaceID
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
Definition: TileCellNoiseFilter.cxx:29
TileRawChannelUnit::ADCcounts
@ ADCcounts
Definition: TileRawChannelUnit.h:17
SG::ReadCondHandle::cptr
const_pointer_type cptr()
Definition: ReadCondHandle.h:67
TileCellNoiseFilter::calcCM
int calcCM(const CaloNoise *caloNoise, const TileSampleNoise *sampleNoise, const TileEMScale *emScale, const CaloCellContainer *cellcoll, cmdata_t &commonMode) const
Definition: TileCellNoiseFilter.cxx:196