12#include <ecl/dataobjects/ECLElementNumbers.h>
61 const double norm = acov[0] * (1.0 / 32767);
62 for (
int i = 0; i < 30; i++) acov[i + 1] = norm * static_cast<double>(tempPacked.
packedCovMat[i]);
69 const double norm = 32767 / acov[0];
72 for (
int i = 0; i < 30; i++)
73 tempPacked.
packedCovMat[i] =
static_cast<short int>(std::max(-32767.0, std::min(acov[i + 1] * norm, 32767.0)));
Covariance matrices for offline ECL waveform fit.
void getAutoCovariance(const int cellID, double acov[31]) const
Get auto covariance for a channel.
PackedAutoCovariance m_acov[ECLElementNumbers::c_NCrystals]
Packed autocovariance matrix for each crystal.
~ECLAutoCovariance()
Destructor.
ECLAutoCovariance()
Default constructor.
void setAutoCovariance(const int cellID, const double acov[31])
Set auto covariance for a channel.
const PackedAutoCovariance & getPacked(const int cellID) const
Get packed autocovariance.
ClassDef(ECLAutoCovariance, 1)
ClassDef.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.
float sigmaNoiseSq
sigma noise squared in ADC channels
ClassDef(PackedAutoCovariance, 1)
ClassDef to make streamer.
short int packedCovMat[30]
packed covariance, the range [-1.0, 1.0] is mapped to [-32767, 32767]