5#ifndef TILERECUTILS_TILECELLBUILDER_H
6#define TILERECUTILS_TILECELLBUILDER_H
51#include "GaudiKernel/ToolHandle.h"
52#include "GaudiKernel/ServiceHandle.h"
108 :
public extends<AthAlgTool, ICaloCellMakerTool>
111 TileCellBuilder(
const std::string&
type,
const std::string& name,
const IInterface* parent);
117 virtual StatusCode
finalize()
override;
121 const EventContext& ctx)
const override;
123 void reset(
bool fullSizeCont,
bool printReset =
true);
138 "Input Tile raw channel container key"};
142 "Input Tile DSP raw channel container key"};
156 "Output Tile MBTS container key"};
160 "Output Tile E4 prime container key"};
164 "Dummy decoration key to aid scheduling"};
207 "TileBadChannels",
"TileBadChannels",
"Input Tile bad channel status"};
213 "TileEMScale",
"TileEMScale",
"Input Tile EMS calibration constants"};
216 "TileCondToolTiming",
"TileCondToolTiming",
"Tile timing tool"};
219 "NoiseFilterTools", {},
"Tile noise filter tools"};
225 "TileDCS",
"TileDCS",
"Input Tile DCS status"};
231 "TileCablingSvc",
"TileCablingSvc",
"The Tile cabling service"};
271 template<
class ITERATOR,
class COLLECTION>
272 void build (
const EventContext& ctx,
275 const ITERATOR & begin,
276 const ITERATOR & end,
291 void correctCell(
TileCell* pCell,
int correction,
int pmt,
int gain,
float ener,
float time,
292 unsigned char iqual,
unsigned char qbit,
int ch_type)
const;
295 return std::min(255, abs((
int) qual));
303 bool count_over,
bool good_time,
bool good_ener,
304 bool overflow,
bool underflow,
305 bool good_overflowfit)
const;
307 template<
typename T,
typename V>
335 m_itr = m_first->begin();
338 m_itr = m_second->begin();
340 m_params = m_params2;
343 m_itr = m_second->end();
352 if (
m_pos != i.m_pos ||
m_itr != i.m_itr)
return true;
object to store information about affected regions in calorimeter
defines and typedefs for IOVSvc
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
TileContainer< TileCell > TileCellContainer
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
Container class for CaloCell.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Condition object to keep Tile channel and ADC status.
DoubleVectorIterator & operator=(const DoubleVectorIterator &other)=default
DoubleVectorIterator(const DoubleVectorIterator &i)=default
DoubleVectorIterator(VecParams ¶ms, T *f, const VecParams ¶ms1, T *s, const VecParams ¶ms2, int p)
const VecParams & m_params1
bool operator!=(const DoubleVectorIterator &i)
DoubleVectorIterator & operator++()
const VecParams & m_params2
ToolHandle< TileCondToolTiming > m_tileToolTiming
const TileDetDescrManager * m_tileMgr
Pointer to TileDetDescrManager.
SG::ReadHandleKey< TileRawChannelContainer > m_dspRawChannelContainerKey
int m_qualityCut
cut on channel quality (set energy to m_zeroEnergy for them)
virtual ~TileCellBuilder()
Destructor.
float m_timeMaxThresh
correct amplitude is time is below time max threshold
TileDrawerEvtStatus TileDrawerEvtStatusArray[5][64]
status of every drawer
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
const TileTBID * m_tileTBID
Pointer to TileTBID.
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
float m_timeMinThresh
correct amplitude is time is above time min threshold
void reset(bool fullSizeCont, bool printReset=true)
Method to reset the options of the TileCellContainer.
TileCellBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Contructor.
SG::WriteDecorHandleKey< xAOD::EventInfo > m_EventInfoTileStatusKey
bool maskBadChannel(TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell, HWIdentifier hwid) const
method to check if channels are good or bad.
bool m_mergeChannels
If true, missing raw channels are taken from DSP container.
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
friend class TileHid2RESrcID
const MbtsDetDescrManager * m_mbtsMgr
Pointer to MbtsDetDescrManager.
const TileInfo * m_tileInfo
bool m_fakeCrackCells
if true=> fake E3/E4 cells added
bool maskBadChannels(TileDrawerEvtStatusArray &drawerEvtStatus, const TileDQstatus *DQstatus, const TileDCSState *dcsState, const TileBadChannels *badChannels, TileCell *pCell) const
unsigned char iquality(float qual) const
bool m_thresholdNotSet
bool variable to check whether some threshold have been set
SG::ReadCondHandleKey< TileDCSState > m_DCSStateKey
Name of TileDCSState object in condition store.
bool m_of2
If true, assume OF2 method for amplitude correction, otherwise - OF1.
float m_ADCmaskValuePlusEps
const TileCablingService * m_cabling
TileCabling instance.
int m_skipGain
for two-gain calib runs skip one of two gains
float m_eneForTimeCut
keep time for channels with energy above cut
unsigned char qbits(TileDrawerEvtStatusArray &drawerEvtStatus, TileFragHash::TYPE RChType, int ros, int drawer, bool count_over, bool good_time, bool good_ener, bool overflow, bool underflow, bool good_overflowfit) const
method to compute the cell quality bits
const TileHWID * m_tileHWID
Pointer to TileHWID.
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
std::vector< CaloAffectedRegionInfo > m_affectedRegionInfo_current_run
SG::WriteHandleKey< TileCellContainer > m_E4prContainerKey
float m_minEneChan[3]
channel energy thresholds for masking (normal,gap,mbts)
SG::WriteHandleKey< TileCellContainer > m_MBTSContainerKey
void correctCell(TileCell *pCell, int correction, int pmt, int gain, float ener, float time, unsigned char iqual, unsigned char qbit, int ch_type) const
Compute calibrated energy, time, etc.
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
static const InterfaceID & interfaceID()
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
float m_zeroEnergy
energy to store in every PMT if both PMT are bad
float m_maxChi2
maximum chi2 for the PMTs in the cels
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
void build(const EventContext &ctx, TileDrawerEvtStatusArray &drawerEvtStatus, VecParams ¶ms, const ITERATOR &begin, const ITERATOR &end, COLLECTION *coll, TileCellContainer *MBTSCells, TileCellContainer *E4prCells) const
< method to process raw channels from a given vector and store them in collection
bool m_correctTime
should time be corrected (deltat added from CondDB)
std::vector< CaloAffectedRegionInfo > m_affectedRegionInfo_global
std::string m_dspRawChannelContainer
float m_eneForTimeCutMBTS
similar cut for MBTS in pC
virtual StatusCode finalize() override
bool m_correctAmplitude
If true, amplitude is corrected by parabolic function (needed for OF without iterations)
float m_minTime
minimum time for the PMTs in the cels
float m_ampMinThresh
correct amplitude if it's above amplitude threshold (in ADC counts)
bool m_maskBadChannels
if true=> bad channels are masked
float m_maxTimeDiff
maximum time difference between the PMTs in the cell
float m_ADCmaskValueMinusEps
float m_maxTime
maximum time for the PMTs in the cels
const TileID * m_tileID
Pointer to TileID.
float m_minChi2
minimum chi2 for the PMTs in the cels
virtual StatusCode initialize() override
Initializer.
float m_eThreshold
cell energy threshold to consider the cell
Condition object to keep Tile DCS status from DB.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
This class keep detailed status info about one drawer in a given event.
This class keep detailed status info about one drawer in whole run.
Helper class for TileCal online (hardware) identifiers.
Helper class for TileCal offline identifiers.
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.
const std::string process
TileFragHash::TYPE m_RChType
TileRawChannelUnit::UNIT m_RChUnit