8 #ifndef LARCALIBUTILS_LAROFCALGORITHM_H
9 #define LARCALIBUTILS_LAROFCALGORITHM_H
13 #include "GaudiKernel/ToolHandle.h"
21 #include <Eigen/Dense>
23 #include "tbb/blocked_range.h"
24 #include "tbb/global_control.h"
44 LArOFCAlg (
const std::string&
name, ISvcLocator* pSvcLocator);
56 ,
"CaloDetDescrManager"
57 ,
"CaloDetDescrManager"
58 ,
"SG Key for CaloDetDescrManager in the Condition Store" };
61 ,
"CaloSuperCellDetDescrManager"
62 ,
"CaloSuperCellDetDescrManager"
63 ,
"SG Key for CaloSuperCellDetDescrManager in the Condition Store" };
72 std::vector<std::vector<float> >
ofc_a;
73 std::vector<std::vector<float> >
ofc_b;
78 std::vector<std::vector<float> >
shape;
89 inputWave(wave), chid(hi),
gain(
g),
tstart(0), timeBinWidthOFC(25./24), phasewMaxAt3(0), faultyOFC(false), shortWave(false) {};
96 static void optFilt(
const std::vector<float> &gWave_in,
const std::vector<float> &gDerivWave_in,
const Eigen::MatrixXd& autoCorrInv,
97 std::vector<float>& OFCa, std::vector<float>& OFCb
100 static void optFiltDelta(
const std::vector<float> &gWave_in,
const std::vector<float> &gDerivWave_in,
const Eigen::MatrixXd& autoCorrInv,
101 const Eigen::VectorXd& delta,
102 std::vector<float>& vecOFCa, std::vector<float>& vecOFCb
108 bool verify(
const HWIdentifier chid,
const std::vector<float>& OFCa,
const std::vector<float>& OFCb,
109 const std::vector<float>& Shape,
const char* ofcversion,
const unsigned phase)
const;
111 static void printOFCVec(
const std::vector<float>&
vec, MsgStream& mLog) ;
135 ToolHandle<ILArAutoCorrDecoderTool> m_AutoCorrDecoder{
this,
"DecoderTool",{} };
136 ToolHandle<ILArAutoCorrDecoderTool> m_AutoCorrDecoderV2{
this,
"DecoderToolV2", {} };
168 Eigen::VectorXd getDelta(std::vector<float>& samples,
const HWIdentifier chid,
unsigned nSamples)
const;
174 static const float m_fcal3Delta[5];
175 static const float m_fcal2Delta[5];
176 static const float m_fcal1Delta[5];
184 void operator() (tbb::blocked_range<size_t>&
r)
const {
185 for (
size_t i=
r.begin();
i!=
r.end();++
i) {
186 m_ofcAlg->process(m_perChanData->at(
i),m_cabling);