Belle II Software development
ECLDspUtilities.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#include <vector>
12#include <ecl/utility/ECLDspEmulator.h>
13
14namespace Belle2 {
19 class ECLDigit;
20 class ECLDspData;
21
22 namespace ECL {
23
32 typedef struct ECLPedestalFit {
34 int amp;
36
42 public:
50 static ECLDspData* readEclDsp(const char* raw_file, int boardNumber);
51
58 static void writeEclDsp(const char* raw_file, const ECLDspData* obj);
59
75 static ECLShapeFit shapeFitter(int cid, const std::vector<int>& adc, int ttrig,
76 bool adjusted_timing = true);
77
86 static void initPedestalFit();
87
97 static ECLPedestalFit pedestalFit(const std::vector<int>& adc);
98
99 private:
103 static float pedfit_fg31[768];
105 static float pedfit_fg32[768];
106
112 };
113 }
115}
116
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition ECLDigit.h:25
This object contains ECL DSP coefs – electromagnetic calorimeter digital signal processing coefficien...
Definition ECLDspData.h:33
static ECLDspData * readEclDsp(const char *raw_file, int boardNumber)
Convert ECLDspData from *.dat file to Root object.
static ECLShapeFit shapeFitter(int cid, const std::vector< int > &adc, int ttrig, bool adjusted_timing=true)
Emulate shape fitting algorithm from ShaperDSP using algorithm from ecl/utility/src/ECLDspEmulator....
static ECLPedestalFit pedestalFit(const std::vector< int > &adc)
Fit pedestal part of the signal waveform (first 16 samples) This method will fit the first 16 samples...
ECLDspUtilities()
Private constructor since class only contains static methods, no need to create an instance.
static void writeEclDsp(const char *raw_file, const ECLDspData *obj)
Convert ECLDspData from Root object to *.dat file.
static int pedestal_fit_initialized
Flag indicating whether arrays fg31,fg32 are filled.
static float pedfit_fg32[768]
DSP coefficients used to determine time in pedestalFit.
static float pedfit_fg31[768]
DSP coefficients used to determine amplitude in pedestalFit.
static void initPedestalFit()
Load DSP coefficients used in the pedestal fit function.
Abstract base class for different kinds of events.
This struct is returned by the pedestalFit method that fits the first 16 samples of the waveform (ped...
int amp
Fit amplitude, -128..262015, ADC units (20 ADC units ~= 1 MeV)
ShaperDSP fit results from _lftda function.