Belle II Software development
ECLSampledShaper Class Reference

digitisation shaper More...

#include <ECLSampledShaper.h>

Public Member Functions

 ECLSampledShaper (const TH1F *s, double ts=1)
 constructor
 
 ~ECLSampledShaper ()
 destructor
 
void fillarray (int N, double *a)
 fill the sampled shape array
 

Private Attributes

const TH1F * m_sampledShape
 the sampled shape
 
const int m_timeScale
 the time scale
 

Detailed Description

digitisation shaper

Definition at line 22 of file ECLSampledShaper.h.

Constructor & Destructor Documentation

◆ ECLSampledShaper()

ECLSampledShaper ( const TH1F *  s,
double  ts = 1 
)
inlineexplicit

constructor

Definition at line 25 of file ECLSampledShaper.h.

26 : m_sampledShape(s), m_timeScale(ts) {}
const int m_timeScale
the time scale
const TH1F * m_sampledShape
the sampled shape

◆ ~ECLSampledShaper()

~ECLSampledShaper ( )
inline

destructor

Definition at line 28 of file ECLSampledShaper.h.

28{ delete m_sampledShape;}

Member Function Documentation

◆ fillarray()

void fillarray ( int  N,
double *  a 
)
inline

fill the sampled shape array

Definition at line 30 of file ECLSampledShaper.h.

31 {
32 if (m_timeScale == 1)
33 for (int i = 0; i < N; i++) a[i] = m_sampledShape->GetBinContent(i * m_timeScale + 1);
34 else {
35 for (int i = 0; i < N; i++) {
36 a[i] = 0;
37 for (int j = 0; j < m_timeScale; j++)
38 a[i] += m_sampledShape->GetBinContent(i * m_timeScale + j);
39 a[i] /= m_timeScale;
40 }
41 }
42 }

Member Data Documentation

◆ m_sampledShape

const TH1F* m_sampledShape
private

the sampled shape

Definition at line 44 of file ECLSampledShaper.h.

◆ m_timeScale

const int m_timeScale
private

the time scale

Definition at line 45 of file ECLSampledShaper.h.


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