|
ATLAS Offline Software
|
Go to the documentation of this file.
21 const std::string&
name,
const IInterface*
parent)
66 return StatusCode::SUCCESS;
79 uint32_t bsFlags = rchCont.get_bsflags();
83 && (bsFlags & (1U << 26U)) == 0) {
94 emScale = emScaleHandle.
cptr();
98 digitsContainer = allDigits.
cptr();
107 sampleNoise = sampleNoiseHandle.
retrieve();
111 onlineSampleNoise = onlineSampleNoiseHandle.
retrieve();
118 int fragId = rawChannelCollection->
identify();
119 unsigned int drawer = (fragId & 0x3F);
120 unsigned int ros = fragId >> 8;
123 bool checkDigits(
false);
125 if (digitsContainer) {
135 for (
const TileDigits* tile_digits : *digitsCollection) {
150 float onlinePedestalDifference = emScale->calibrateOnlineChannel(drawerIdx,
channel,
gain, (onlinePedestal - pedestal), rawChannelUnit);
154 float weightsSum(0.0);
156 float energyCorrection = onlinePedestalDifference * weightsSum;
159 <<
"online pedestal difference: " << onlinePedestalDifference
160 <<
"; OFC weights (a) sum: " << weightsSum
161 <<
" => energy correction: " << energyCorrection);
163 rawChannel->setAmplitude(rawChannel->amplitude() + energyCorrection);
167 if (checkDigits && noDigits[
channel]) {
169 float amplitude = emScale->undoOnlineChannelCalibration(drawerIdx,
channel,
gain, rawChannel->amplitude(), rawChannelUnit);
170 float minimuAmplitudeThreshold(-99999.0);
171 float maximumAmplitudeThreshold(99999.0);
173 if (amplitude < minimuAmplitudeThreshold
174 || amplitude > maximumAmplitudeThreshold)
179 <<
" amplitude: " << amplitude <<
" [ADC]"
180 <<
" outside range: " << minimuAmplitudeThreshold <<
".." << maximumAmplitudeThreshold
181 <<
" without digits => set apmlitude/time/quality: 0.0/0.0/15.0");
183 rawChannel->insert(0.0
F, 0.0
F, 15.0
F);
194 return StatusCode::SUCCESS;
200 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
Condition object to keep calibration factors of TileCal channels.
bool m_correctPedestalDifference
virtual StatusCode finalize() override
AlgTool finalize method.
const_pointer_type cptr()
Dereference the pointer.
Condition object to keep and provide Tile sample noise.
bool m_zeroAmplitudeWithoutDigits
#define ATH_MSG_VERBOSE(x)
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
int adc(const HWIdentifier &id) const
extract adc field from HW identifier
const_pointer_type retrieve()
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
ToolHandle< TileCondToolTiming > m_tileToolTiming
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
::StatusCode StatusCode
StatusCode definition for legacy code.
Helper for holding non-const raw data prior to recording in SG.
ToolHandle< ITileCondToolDspThreshold > m_tileDspThreshold
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
TileRawChannelOF1Corrector(const std::string &type, const std::string &name, const IInterface *parent)
AlgTool like constructor.
Collection * indexFindPtr(IdentifierHash hash)
Look up a (non-const) collection via hash.
const TileHWID * m_tileHWID
Pointer to TileHWID.
ToolHandle< ITileCondToolOfc > m_tileCondToolOfc
Helpers for checking error return status codes and reporting errors.
const TileFragHash & hashFunc() const
StatusCode initialize(bool used=true)
SG::ReadCondHandleKey< TileSampleNoise > m_onlineSampleNoiseKey
Name of online TileSampleNoise in condition store.
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
static std::string getDrawerString(unsigned int ros, unsigned int drawer)
Return the drawer name, e.g.
Helper for holding non-const raw data prior to recording in SG.
uint32_t getFragBCID() const
Get BCID.
SG::ReadHandleKey< TileDigitsContainer > m_digitsContainerKey
virtual StatusCode initialize() override
AlgTool initialize method.
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Handle class for reading from StoreGate.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
static const unsigned int MAX_CHAN
Number of channels in drawer.
float getPed(unsigned int drawerIdx, unsigned int channel, unsigned int adc) const
virtual StatusCode process(TileMutableRawChannelContainer &rchCont, const EventContext &ctx) const override
Correct TileRawChannel amplitudes if pedestal changed.
const_pointer_type cptr()