Belle II Software  release-05-02-19
EclConfiguration.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015-2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Guglielmo De Nardo *
7  * Alon Hershenhorn *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef ECLCONFIGURATION_H_
13 #define ECLCONFIGURATION_H_
14 
15 namespace Belle2 {
20  namespace ECL {
22  class EclConfiguration {
23  public:
25  static EclConfiguration& get()
26  {
27  static EclConfiguration instance;
28  return instance;
29  }
31  bool background() const { return m_background; }
33  void setBackground(bool val) { m_background = val; }
34 
35  static constexpr int m_nch = 8736;
36  static constexpr double m_rf = 508.887;
37  static constexpr double m_tick = 24.*12. / m_rf;
38  static constexpr double m_step = 0.5;
39  static constexpr double s_clock = 24.*12.;
40  static constexpr int m_ntrg = 144;
42  static constexpr int m_nsmp = 31;
43  static constexpr double m_tmin = -15;
45  static constexpr int m_nl = 48;
46  static constexpr int m_ns = 32;
48  static constexpr int m_ndt = 96;
50  private:
52  bool m_background{false};
53  public:
54 
56  struct signalsample_t {
57  void InitSample(const float*, double);
58  void InitSample(const double*, double);
59  double Accumulate(const double, const double, double*) const;
60 
61  double m_sumscale;
62  double m_ft[m_nl * m_ns];
63  };
64 
66  struct adccounts_t {
68  void AddHit(const double a, const double t0, const signalsample_t& q);
69  double total;
70  double c[m_nsmp];
71  double totalHadronDep;
72  double totalDep;
73  double energyConversion;
74  double flighttime;
75  double timeshift;
76  double timetosensor;
77  };
78 
80  struct fitparams_t {
81  typedef int int_array_192x16_t[2 * m_ndt][16];
82  typedef int int_array_24x16_t[m_ndt / 4][16];
83  int_array_192x16_t f, f1, fg31, fg32, fg33;
84  int_array_24x16_t fg41, fg43;
85  };
86 
88  struct algoparams_t {
89  typedef short int shortint_array_16_t[16];
90  typedef unsigned char uchar_array_32_t[32];
91  union {
92  shortint_array_16_t id;
93  uchar_array_32_t ic;
94  };
95  };
96 
97  };
98  }
100 }
101 #endif
Belle2::ECL::EclConfiguration::m_nch
static constexpr int m_nch
total number of electronic channels (crystals) in calorimeter
Definition: EclConfiguration.h:44
Belle2::ECL::EclConfiguration::m_ntrg
static constexpr int m_ntrg
number of trigger counts per ADC clock tick
Definition: EclConfiguration.h:49
Belle2::ECL::EclConfiguration::m_nsmp
static constexpr int m_nsmp
number of ADC measurements for signal fitting
Definition: EclConfiguration.h:51
Belle2::ECL::EclConfiguration::algoparams_t
a struct for the parameters of the algorithm
Definition: EclConfiguration.h:97
Belle2::ECL::EclConfiguration::signalsample_t
a struct for a signal sample
Definition: EclConfiguration.h:65
Belle2::ECL::EclConfiguration::background
bool background() const
return the background flag
Definition: EclConfiguration.h:40
Belle2::ECL::EclConfiguration::m_nl
static constexpr int m_nl
length of samples signal in number of ADC clocks
Definition: EclConfiguration.h:54
Belle2::ECL::EclConfiguration::m_ns
static constexpr int m_ns
number of samples per ADC clock
Definition: EclConfiguration.h:55
Belle2::ECL::EclConfiguration::adccounts_t::flighttime
double flighttime
simulated time weighted by true deposited energy
Definition: EclConfiguration.h:83
Belle2::ECL::EclConfiguration
singleton class to hold the ECL configuration
Definition: EclConfiguration.h:31
Belle2::ECL::EclConfiguration::get
static EclConfiguration & get()
return this instance
Definition: EclConfiguration.h:34
Belle2::ECL::EclConfiguration::fitparams_t
a struct for the fit parameters
Definition: EclConfiguration.h:89
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ECL::EclConfiguration::adccounts_t::total
double total
total deposition (sum of m_s array)
Definition: EclConfiguration.h:78
Belle2::ECL::EclConfiguration::m_background
bool m_background
constructor
Definition: EclConfiguration.h:61
Belle2::ECL::EclConfiguration::m_tick
static constexpr double m_tick
== 72/127 digitization clock tick (in microseconds ???)
Definition: EclConfiguration.h:46
Belle2::ECL::EclConfiguration::s_clock
static constexpr double s_clock
digitization clock in RF units
Definition: EclConfiguration.h:48
Belle2::ECL::EclConfiguration::m_rf
static constexpr double m_rf
accelerating RF, http://ptep.oxfordjournals.org/content/2013/3/03A006.full.pdf
Definition: EclConfiguration.h:45
Belle2::ECL::EclConfiguration::m_ndt
static constexpr int m_ndt
number of points per ADC tick where signal fit procedure parameters are evaluated
Definition: EclConfiguration.h:57
Belle2::ECL::EclConfiguration::adccounts_t::AddHit
void AddHit(const double a, const double t0, const signalsample_t &q)
add hit method
Definition: EclConfiguration.cc:39
Belle2::ECL::EclConfiguration::setBackground
void setBackground(bool val)
set the background flag
Definition: EclConfiguration.h:42
Belle2::ECL::EclConfiguration::adccounts_t::energyConversion
double energyConversion
energy conversion factor
Definition: EclConfiguration.h:82
Belle2::ECL::EclConfiguration::m_step
static constexpr double m_step
time between points in internal units t_{asrto}*m_rf/2.
Definition: EclConfiguration.h:47
Belle2::ECL::EclConfiguration::signalsample_t::m_sumscale
double m_sumscale
energy deposit in fitting window scale factor
Definition: EclConfiguration.h:70
Belle2::ECL::EclConfiguration::m_tmin
static constexpr double m_tmin
lower range of the signal fitting region in ADC clocks
Definition: EclConfiguration.h:52
Belle2::ECL::EclConfiguration::adccounts_t::totalDep
double totalDep
total true energy deposition
Definition: EclConfiguration.h:81
Belle2::ECL::EclConfiguration::adccounts_t::totalHadronDep
double totalHadronDep
total true hadron energy deposition
Definition: EclConfiguration.h:80
Belle2::ECL::EclConfiguration::adccounts_t::timetosensor
double timetosensor
simulated time to sensor
Definition: EclConfiguration.h:85
Belle2::ECL::EclConfiguration::adccounts_t::c
double c[m_nsmp]
flash ADC measurements
Definition: EclConfiguration.h:79
Belle2::ECL::EclConfiguration::adccounts_t::timeshift
double timeshift
simulated time shift
Definition: EclConfiguration.h:84