This class contains static methods to make them accessible from pyROOT.
More...
#include <ECLDspUtilities.h>
|
| ECLDspUtilities () |
| Private constructor since class only contains static methods, no need to create an instance.
|
|
|
static int | pedestal_fit_initialized = 0 |
| Flag indicating whether arrays fg31,fg32 are filled.
|
|
static float | pedfit_fg31 [768] = {} |
| DSP coefficients used to determine amplitude in pedestalFit.
|
|
static float | pedfit_fg32 [768] = {} |
| DSP coefficients used to determine time in pedestalFit.
|
|
This class contains static methods to make them accessible from pyROOT.
Definition at line 51 of file ECLDspUtilities.h.
◆ initPedestalFit()
Load DSP coefficients used in the pedestal fit function.
If it is not done explicitly, pedestalFit will do it internally when it is called the first time.
However, it is preferable to call it explicitly, in a thread-safe context.
Definition at line 321 of file ECLDspUtilities.cc.
324 TFile* file =
new TFile(path.c_str(),
"read");
325 if (!file->IsOpen()) {
326 B2FATAL(
"Unable to load coefficients for ECL pedestal fit");
328 TTree* tree = (TTree*)file->Get(
"dsp_coefs");
329 int nentries = tree->GetEntries();
330 float fg31_i, fg32_i;
331 tree->SetBranchAddress(
"fg31", &fg31_i);
332 tree->SetBranchAddress(
"fg32", &fg32_i);
334 for (
int i = 0; i < nentries; i++) {
◆ pedestalFit()
Fit pedestal part of the signal waveform (first 16 samples) This method will fit the first 16 samples of the waveform and return the amplitude of the peak found in that region.
- Parameters
-
[in] | adc | vector of waveform samples (size >= 16) |
- Returns
- struct with fit results
Definition at line 344 of file ECLDspUtilities.cc.
◆ readEclDsp()
ECLDspData * readEclDsp |
( |
const char * |
raw_file, |
|
|
int |
boardNumber |
|
) |
| |
|
static |
Convert ECLDspData from *.dat file to Root object.
- Parameters
-
[in] | raw_file | Path to dsp??.dat file. |
[in] | boardNumber | Number of shaperDSP board, from 1 to 52*12 |
- Returns
- ECLDspData object
Definition at line 48 of file ECLDspUtilities.cc.
◆ shapeFitter()
ECLShapeFit shapeFitter |
( |
int |
cid, |
|
|
std::vector< int > |
adc, |
|
|
int |
ttrig |
|
) |
| |
|
static |
◆ writeEclDsp()
void writeEclDsp |
( |
const char * |
raw_file, |
|
|
ECLDspData * |
obj |
|
) |
| |
|
static |
Convert ECLDspData from Root object to *.dat file.
- Parameters
-
[in] | raw_file | Path to dsp??.dat file to be created. |
[in] | obj | Object to be written |
Definition at line 133 of file ECLDspUtilities.cc.
The documentation for this class was generated from the following files: