Belle II Software development
ECLDigitWaveformParameters.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
14/* ROOT headers. */
15#include <TObject.h>
16
17namespace Belle2 {
24 class ECLDigitWaveformParameters: public TObject {
25 public:
26
31 {
32
33 for (int i = 0; i < 11; i++) {
34 for (int j = 0; j < ECLElementNumbers::c_NCrystals; j++) {
35 m_PhotonPars[j][i] = 0.;
36 m_HadronPars[j][i] = 0.;
37 m_DiodePars[j][i] = 0.;
38 }
39 }
40
41 };
42
44 const float* getPhotonParameters(int cellID) const {return m_PhotonPars[cellID - 1];};
45
47 const float* getHadronParameters(int cellID) const {return m_HadronPars[cellID - 1];};
48
50 const float* getDiodeParameters(int cellID) const {return m_DiodePars[cellID - 1];};
51
53 void setTemplateParameters(int cellID, const float photonInput[11],
54 const float hadronInput[11],
55 const float diodeInput[11])
56 {
57 for (int i = 0; i < 11; i++) {
58 m_PhotonPars[cellID - 1][i] = photonInput[i];
59 m_HadronPars[cellID - 1][i] = hadronInput[i];
60 m_DiodePars[cellID - 1][i] = diodeInput[i];
61 }
62 };
63
68
69 private:
74 //2 convert vector of double to array of floats (SL)
75 //1 Initial Version
77 };
79} // end namespace Belle2
DB object to store photon, hadron and diode shape parameters.
float m_HadronPars[ECLElementNumbers::c_NCrystals][11]
hadron parameters all crystals
float m_PhotonPars[ECLElementNumbers::c_NCrystals][11]
photon parameters all crystals
const float * getDiodeParameters(int cellID) const
Get array of diode template parameters.
const float * getPhotonParameters(int cellID) const
Get array of photon template parameters.
ClassDef(ECLDigitWaveformParameters, 2)
ClassDef.
void setTemplateParameters(int cellID, const float photonInput[11], const float hadronInput[11], const float diodeInput[11])
Set photon, hadron and diode template parameters for crystal.
float m_DiodePars[ECLElementNumbers::c_NCrystals][11]
diode parameters all crystals
const float * getHadronParameters(int cellID) const
Get array of hadron template parameters.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.