Covariance matrices for offline ECL waveform fit.
More...
#include <ECLAutoCovariance.h>
Covariance matrices for offline ECL waveform fit.
Definition at line 35 of file ECLAutoCovariance.h.
◆ ECLAutoCovariance()
◆ ~ECLAutoCovariance()
◆ getAutoCovariance()
void getAutoCovariance |
( |
const int | cellID, |
|
|
double | acov[31] ) const |
|
inline |
Get auto covariance for a channel.
Definition at line 56 of file ECLAutoCovariance.h.
57 {
58 if (cellID < 1 || cellID > ECLElementNumbers::c_NCrystals) return;
59 const PackedAutoCovariance& tempPacked = m_acov[cellID - 1];
60 acov[0] = static_cast<double>(tempPacked.sigmaNoiseSq);
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]);
63 }
◆ getPacked()
Get packed autocovariance.
Definition at line 49 of file ECLAutoCovariance.h.
50 {
51 if (cellID < 1 || cellID > ECLElementNumbers::c_NCrystals) return m_acov[0];
52 return m_acov[cellID - 1];
53 }
◆ setAutoCovariance()
void setAutoCovariance |
( |
const int | cellID, |
|
|
const double | acov[31] ) |
|
inline |
Set auto covariance for a channel.
Definition at line 66 of file ECLAutoCovariance.h.
67 {
68 if (cellID < 1 || cellID > ECLElementNumbers::c_NCrystals) return;
69 const double norm = 32767 / acov[0];
70 PackedAutoCovariance& tempPacked = m_acov[cellID - 1];
71 tempPacked.sigmaNoiseSq = static_cast<float>(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)));
74 }
◆ m_acov
The documentation for this class was generated from the following file: