Belle II Software  release-06-02-00
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 #ifndef ECLCONFIGURATION_H_
10 #define ECLCONFIGURATION_H_
11 
12 namespace Belle2 {
17  namespace ECL {
20  public:
23  {
24  static EclConfiguration instance;
25  return instance;
26  }
28  bool background() const { return m_background; }
30  void setBackground(bool val) { m_background = val; }
31 
32  static constexpr int m_nch = 8736;
33  static constexpr double m_rf = 508.887;
34  static constexpr double m_tick = 24.*12. / m_rf;
35  static constexpr double m_step = 0.5;
36  static constexpr double s_clock = 24.*12.;
37  static constexpr int m_ntrg = 144;
39  static constexpr int m_nsmp = 31;
40  static constexpr double m_tmin = -15;
42  static constexpr int m_nl = 48;
43  static constexpr int m_ns = 32;
45  static constexpr int m_ndt = 96;
47  private:
48  EclConfiguration() {};
49  bool m_background{false};
50  public:
51 
53  struct signalsample_t {
54  void InitSample(const float*, double);
55  void InitSample(const double*, double);
56  double Accumulate(const double, const double, double*) const;
57 
58  double m_sumscale;
59  double m_ft[m_nl * m_ns];
60  };
61 
63  struct adccounts_t {
65  void AddHit(const double a, const double t0, const signalsample_t& q);
66  double total;
67  double c[m_nsmp];
68  double totalHadronDep;
69  double totalDep;
71  double flighttime;
72  double timeshift;
73  double timetosensor;
74  };
75 
77  struct fitparams_t {
78  typedef int int_array_192x16_t[2 * m_ndt][16];
79  typedef int int_array_24x16_t[m_ndt / 4][16];
80  int_array_192x16_t f, f1, fg31, fg32, fg33;
81  int_array_24x16_t fg41, fg43;
82  };
83 
85  struct algoparams_t {
86  typedef short int shortint_array_16_t[16];
87  typedef unsigned char uchar_array_32_t[32];
88  union {
89  shortint_array_16_t id;
90  uchar_array_32_t ic;
91  };
92  };
93 
94  };
95  }
97 }
98 #endif
singleton class to hold the ECL configuration
static constexpr double m_tmin
lower range of the signal fitting region in ADC clocks
static EclConfiguration & get()
return this instance
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 constexpr int m_ns
number of samples per ADC clock
static constexpr double m_rf
accelerating RF, http://ptep.oxfordjournals.org/content/2013/3/03A006.full.pdf
bool background() const
return the background flag
static constexpr int m_nch
total number of electronic channels (crystals) in calorimeter
void setBackground(bool val)
set the background flag
static constexpr double m_tick
== 72/127 digitization clock tick (in microseconds ???)
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
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
double m_sumscale
energy deposit in fitting window scale factor