Belle II Software development
ECLAutoCovariance Class Reference

Covariance matrices for offline ECL waveform fit. More...

#include <ECLAutoCovariance.h>

Inheritance diagram for ECLAutoCovariance:

Public Member Functions

 ECLAutoCovariance ()
 Default constructor.
 
 ~ECLAutoCovariance ()
 Destructor.
 
const PackedAutoCovariancegetPacked (const int cellID) const
 Get packed autocovariance.
 
void getAutoCovariance (const int cellID, double acov[31]) const
 Get auto covariance for a channel.
 
void setAutoCovariance (const int cellID, const double acov[31])
 Set auto covariance for a channel.
 

Private Member Functions

 ClassDef (ECLAutoCovariance, 1)
 ClassDef.
 

Private Attributes

PackedAutoCovariance m_acov [ECLElementNumbers::c_NCrystals] = {}
 Packed autocovariance matrix for each crystal.
 

Detailed Description

Covariance matrices for offline ECL waveform fit.

Definition at line 35 of file ECLAutoCovariance.h.

Constructor & Destructor Documentation

◆ ECLAutoCovariance()

ECLAutoCovariance ( )
inline

Default constructor.

Definition at line 41 of file ECLAutoCovariance.h.

41{};

◆ ~ECLAutoCovariance()

~ECLAutoCovariance ( )
inline

Destructor.

Definition at line 46 of file ECLAutoCovariance.h.

46{}

Member Function Documentation

◆ 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 }
PackedAutoCovariance m_acov[ECLElementNumbers::c_NCrystals]
Packed autocovariance matrix for each crystal.
const int c_NCrystals
Number of crystals.

◆ getPacked()

const PackedAutoCovariance & getPacked ( const int  cellID) const
inline

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 }
float sigmaNoiseSq
sigma noise squared in ADC channels

Member Data Documentation

◆ m_acov

Packed autocovariance matrix for each crystal.

Definition at line 77 of file ECLAutoCovariance.h.


The documentation for this class was generated from the following file: