18#include "Gaudi/Property.h"
37 const std::string& name,
const IInterface *parent)
43 declareInterface< TileRawChannelBuilder >(
this );
44 declareInterface< TileRawChannelBuilderManyAmps >(
this);
67 ATH_MSG_INFO(
"TileRawChannelBuilderManyAmps::initialize()" );
93 if (nParamMax > Nsamp + 1) nParamMax = Nsamp;
94 if (nParamMax < 3) nParamMax = 3;
97 int jEsamp = Nsamp - 1;
99 int jEcross = Nsamp - 1;
102 std::vector<double> ShapeXHi =
m_tileInfo->digitsShapeHi();
103 std::vector<double> ShapeXLo =
m_tileInfo->digitsShapeLo();
105 bool lVerbose =
msgLvl(MSG::VERBOSE);
107 Nsamp, InTsamp, jBsamp, jEsamp, jBcross, jEcross, Nshape, InTshape, ShapeXHi, lVerbose);
110 Nsamp, InTsamp, jBsamp, jEsamp, jBcross, jEcross, Nshape, InTshape, ShapeXLo, lVerbose);
120 delete tFilterTestHi;
126 delete tFilterTestLo;
129 ATH_MSG_DEBUG(
"TileRawChannelBuilderManyAmps::initialize() completed successfully" );
131 return StatusCode::SUCCESS;
142 return StatusCode::SUCCESS;
150 unsigned int drawerIdx(0), channel(0), gain(0);
153 bool lVerbose(
false);
154 if (
msgLvl(MSG::VERBOSE)) {
155 msg(MSG::VERBOSE) <<
"Running ManyAmps Fit for TileRawChannel with HWID "
169 std::vector<float> digits = tiledigits->
samples();
173 double chisq_ch = 0.;
188 tResult.
getInTime(amp_ch, err_ch, ped_ch, chisq_ch, t_ch);
190 ATH_MSG_VERBOSE(
" TileRawChannelBuilderManyAmps: return from FilterManager/Fitter."
191 <<
", chisq_ch=" << chisq_ch );
198 chisq_ch = -fabs(chisq_ch);
203 rawCh->
assign (adcId, amp_ch, t_ch, chisq_ch, 0);
207 <<
" q=" << chisq_ch );
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool msgLvl(const MSG::Level lvl) const
a typed memory pool that saves time spent allocation small object.
pointer nextElementPtr()
obtain the next available element in pool by pointer pool is resized if its limit has been reached On...
const std::vector< float > & samples() const
Auxiliary class for TileRawChannelMakerManyAmps.
Auxiliary class for TileRawChannelMakerManyAmps.
double getInTime(double &, double &, double &, double &, double &)
Auxiliary class for TileRawChannelMakerManyAmps.
void genEvents(int nEvent)
TileFilterManager * m_tileFilterManagerLo
~TileRawChannelBuilderManyAmps()
Destructor.
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
virtual StatusCode finalize() override
Finalize.
TileFilterManager * m_tileFilterManagerHi
virtual StatusCode initialize() override
Initialize.
TileRawChannelBuilderManyAmps(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
virtual TileRawChannel * rawChannel(const TileDigits *digits, const EventContext &ctx) override
Builder virtual method to be implemented by subclasses.
const TileHWID * m_tileHWID
ToolHandle< TileCondIdTransforms > m_tileIdTransforms
virtual StatusCode initialize()
Initializer.
const TileInfo * m_tileInfo
ToolHandle< TileCondToolEmscale > m_tileToolEmscale
TileFragHash::TYPE m_rChType
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
TileRawChannelBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
void assign(const HWIdentifier &id, float amplitude, float time, float quality, float ped=0.0)
HWIdentifier adc_HWID(void) const