Belle II Software development
EclConfiguration.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11/* ECL headers. */
12#include <ecl/dataobjects/ECLElementNumbers.h>
13
14namespace Belle2 {
19 namespace ECL {
22 public:
25 {
26 static EclConfiguration instance;
27 return instance;
28 }
30 bool background() const { return m_background; }
32 void setBackground(bool val) { m_background = val; }
33
34 static constexpr int m_nch =
36 static constexpr double m_step = 0.5;
37 static constexpr double s_clock = 24.*12.;
38 static constexpr int m_ntrg = 144;
40 static constexpr int m_nsmp = 31;
41 static constexpr double m_tmin = -15;
43 static constexpr int m_nl = 48;
44 static constexpr int m_ns = 32;
45 static constexpr int m_ndt = 96;
47 private:
48 static double m_rf;
49 static double m_tick;
51 public:
53 static double getRF();
55 static double getTick();
56
57 private:
58 EclConfiguration() {};
59 bool m_background{false};
60 public:
61
67 void InitSample(const float* MP, double unitscale = -1);
71 void InitSample(const double* MPd, double unitscale = -1);
79 double Accumulate(const double a, const double t0, double* s) const;
80
81 double m_sumscale;
82 double m_ft[m_nl * m_ns];
83 };
84
86 struct adccounts_t {
88 void AddHit(const double a, const double t0, const signalsample_t& q);
89 double total;
90 double c[m_nsmp];
92 double totalDep;
94 double flighttime;
95 double timeshift;
96 double timetosensor;
97 };
98
100 struct fitparams_t {
101 typedef int int_array_192x16_t[2 * m_ndt][16];
102 typedef int int_array_24x16_t[m_ndt / 4][16];
110 };
111
114 union {
115 short int id[16];
116 unsigned char ic[32];
117 };
118 };
119
120 };
121 }
123}
Singleton class to hold the ECL configuration.
static constexpr double m_tmin
lower range of the signal fitting region in ADC clocks
static constexpr double m_step
time between points in internal units t_{asrto}*m_rf/2.
static constexpr double s_clock
digitization clock in RF units
static constexpr int m_nl
length of samples signal in number of ADC clocks
static double m_rf
RF clock, www-linac.kek.jp/linac-com/report/skb-tdr/, ch.
static constexpr int m_ns
number of samples per ADC clock
static double getTick()
See m_tick.
static EclConfiguration & get()
return this instance
bool background() const
return the background flag
static double m_tick
== 72/127 digitization clock tick (in microseconds)
static constexpr int m_nch
total number of electronic channels (crystals) in calorimeter
void setBackground(bool val)
set the background flag
static double getRF()
See m_rf.
static constexpr int m_ntrg
number of trigger counts per ADC clock tick
static constexpr int m_ndt
number of points per ADC tick where signal fit procedure parameters are evaluated
static constexpr int m_nsmp
number of ADC measurements for signal fitting
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.
double totalHadronDep
total true hadron energy deposition
void AddHit(const double a, const double t0, const signalsample_t &q)
add hit method
double totalDep
total true energy deposition
double c[m_nsmp]
flash ADC measurements
double timetosensor
simulated time to sensor
double total
total deposition (sum of m_s array)
double energyConversion
energy conversion factor
double flighttime
simulated time weighted by true deposited energy
a struct for the parameters of the algorithm
a struct for the fit parameters
int_array_192x16_t f
Array with tabulated signal waveform.
int_array_192x16_t fg31
Array to estimate signal amplitude.
int_array_24x16_t fg43
Alternative for FG33 for low amplitude fits.
int_array_192x16_t fg33
Array to estimate pedestal height.
int_array_192x16_t fg32
Array to estimate amp * time.
int int_array_192x16_t[2 *m_ndt][16]
Array for DSP coefs in normal fit.
int int_array_24x16_t[m_ndt/4][16]
Array for DSP coefs in fast fit.
int_array_24x16_t fg41
Alternative for FG31 for low amplitude fits.
int_array_192x16_t f1
Array with tabulated derivative of signal waveform.
double m_ft[m_nl *m_ns]
Simulated signal shape.
double Accumulate(const double a, const double t0, double *s) const
double m_sumscale
energy deposit in fitting window scale factor
void InitSample(const float *MP, double unitscale=-1)