5#ifndef TILERECUTILS_ITILERAWCHANNELBUILDER_H
6#define TILERECUTILS_ITILERAWCHANNELBUILDER_H
42#include "GaudiKernel/ToolHandle.h"
43#include "GaudiKernel/ServiceHandle.h"
57typedef std::vector<std::pair<TileRawChannel*, const TileDigits*> >
Overflows_t;
62 const IInterface* parent);
89 void initLog(
const EventContext& ctx);
100 static double correctAmp(
double phase,
bool of2 =
true);
102 static double correctTime(
double phase,
bool of2 =
true);
104 static int CorruptedData(
int ros,
int drawer,
int channel,
int gain,
105 const std::vector<float> & digits,
float &dmin,
float &dmax,
float ADCmaxMinusEps,
float ADCmaskValueMinusEps);
126 {
this,
"DSPContainer",
"",
"DSP Container key"};
130 "Output Tile raw channels container key"};
164 "NoiseFilterTools", {},
"Tile noise filter tools"};
167 "TileCondToolEmscale",
"TileCondToolEmscale",
"Tile EM scale calibration tool"};
170 "TileCondToolTiming",
"TileCondToolTiming",
"Tile timing tool"};
173 "TileCondIdTransforms",
"TileCondIdTransforms",
174 "Tile tool to tranlate hardware identifier to the drawerIdx, channel, and adc"};
180 "TileCablingSvc",
"TileCablingSvc",
"The Tile cabling service"};
185 "DemoFragIDs", {},
"List of Tile frag IDs with new electronics (demonstrator)"};
Property holding a SG store/key/clid from which a WriteHandle is made.
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
Helper for holding non-const raw data prior to recording in SG.
std::vector< std::pair< TileRawChannel *, const TileDigits * > > Overflows_t
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.
The Athena Transient Store API.
Helper class for TileCal online (hardware) identifiers.
Helper class for TileCal offline identifiers.
virtual StatusCode finalize()
ToolHandle< TileCondToolTiming > m_tileToolTiming
Overflows_t & getOverflowedChannels(void)
static const char * BadPatternName(float ped)
TileRawChannelUnit::UNIT m_rChUnit
StatusCode build(const TileDigitsCollection *collection, const EventContext &ctx)
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
float m_timeMinThresh
correct amplitude is time is above time min threshold
std::unique_ptr< TileMutableRawChannelContainer > m_rawChannelCnt
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
static double correctTime(double phase, bool of2=true)
Time correction factor.
virtual ~TileRawChannelBuilder()
Destructor.
float m_ADCmaskValueMinusEps
indicates channels which were masked in background dataset
friend class TileHid2RESrcID
SG::ReadHandleKey< TileRawChannelContainer > m_DSPContainerKey
float m_ampMinThresh
correct amplitude if it's above amplitude threshold (in ADC counts)
virtual StatusCode createContainer(const EventContext &ctx)
Create container in SG with name given by parameter (m_rawChannelContainerKey)
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
unsigned int m_evtCounter
const TileHWID * m_tileHWID
float m_timeMaxThresh
correct amplitude is time is below time max threshold
static int CorruptedData(int ros, int drawer, int channel, int gain, const std::vector< float > &digits, float &dmin, float &dmax, float ADCmaxMinusEps, float ADCmaskValueMinusEps)
ToolHandle< TileCondIdTransforms > m_tileIdTransforms
static const int MAX_CHANNELS
void fill_drawer_errors(const EventContext &ctx, const TileDigitsCollection *collection)
std::string getTileRawChannelContainerID(void)
virtual StatusCode commitContainer(const EventContext &ctx)
Commit RawChannelContiner in SG and make const.
static double correctAmp(double phase, bool of2=true)
Amplitude correction factor according to the time when using weights for tau=0 without iterations.
const TileCablingService * m_cabling
TileCabling instance.
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx)
Builder virtual method to be implemented by subclasses.
void initLog(const EventContext &ctx)
ToolHandleArray< ITileRawChannelTool > m_noiseFilterTools
int m_error[MAX_CHANNELS]
virtual StatusCode initialize()
Initializer.
const TileInfo * m_tileInfo
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
TileFragHash::TYPE m_rChType
void resetOverflows(void)
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Gaudi::Property< std::vector< int > > m_demoFragIDs
TileRawChannelBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
static const int MAX_DMUS