CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Friends
EcalPulseSymmCovariance Struct Reference

#include <EcalPulseSymmCovariances.h>

Public Member Functions

 EcalPulseSymmCovariance ()
 
int indexFor (int i, int j) const
 
float & val (int i, int j)
 
float val (int i, int j) const
 

Public Attributes

float covval [EcalPulseShape::TEMPLATESAMPLES *(EcalPulseShape::TEMPLATESAMPLES+1)/2]
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 11 of file EcalPulseSymmCovariances.h.

Constructor & Destructor Documentation

◆ EcalPulseSymmCovariance()

EcalPulseSymmCovariance::EcalPulseSymmCovariance ( )

Definition at line 3 of file EcalPulseSymmCovariances.cc.

3  {
5  for (int k = 0; k < N; ++k)
6  covval[k] = 0.;
7 }

References covval, dqmdumpme::k, N, and EcalPulseShape::TEMPLATESAMPLES.

Member Function Documentation

◆ indexFor()

int EcalPulseSymmCovariance::indexFor ( int  i,
int  j 
) const
inline

Definition at line 17 of file EcalPulseSymmCovariances.h.

17  {
18  int m = std::min(i, j);
19  int n = std::max(i, j);
20  return n + EcalPulseShape::TEMPLATESAMPLES * m - m * (m + 1) / 2;
21  }

References mps_fire::i, dqmiolumiharvest::j, visualization-live-secondInstance_cfg::m, SiStripPI::max, min(), dqmiodumpmetadata::n, and EcalPulseShape::TEMPLATESAMPLES.

Referenced by val().

◆ serialize()

template<class Archive >
void EcalPulseSymmCovariance::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ val() [1/2]

float& EcalPulseSymmCovariance::val ( int  i,
int  j 
)
inline

Definition at line 24 of file EcalPulseSymmCovariances.h.

24 { return covval[indexFor(i, j)]; }

References covval, mps_fire::i, indexFor(), and dqmiolumiharvest::j.

◆ val() [2/2]

float EcalPulseSymmCovariance::val ( int  i,
int  j 
) const
inline

Definition at line 23 of file EcalPulseSymmCovariances.h.

23 { return covval[indexFor(i, j)]; }

References covval, mps_fire::i, indexFor(), and dqmiolumiharvest::j.

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 26 of file EcalPulseSymmCovariances.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 26 of file EcalPulseSymmCovariances.h.

Member Data Documentation

◆ covval

float EcalPulseSymmCovariance::covval[EcalPulseShape::TEMPLATESAMPLES *(EcalPulseShape::TEMPLATESAMPLES+1)/2]

Definition at line 15 of file EcalPulseSymmCovariances.h.

Referenced by EcalPulseSymmCovariance(), and val().

mps_fire.i
i
Definition: mps_fire.py:428
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
min
T min(T a, T b)
Definition: MathUtil.h:58
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
N
#define N
Definition: blowfish.cc:9
EcalPulseSymmCovariance::indexFor
int indexFor(int i, int j) const
Definition: EcalPulseSymmCovariances.h:17
dqmdumpme.k
k
Definition: dqmdumpme.py:60
EcalPulseSymmCovariance::covval
float covval[EcalPulseShape::TEMPLATESAMPLES *(EcalPulseShape::TEMPLATESAMPLES+1)/2]
Definition: EcalPulseSymmCovariances.h:15
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EcalPulseShape::TEMPLATESAMPLES
static const int TEMPLATESAMPLES
Definition: EcalPulseShapes.h:10
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66