10#include <ecl/modules/eclAutocovarianceCalibrationC3Collector/eclAutocovarianceCalibrationC3Collector.h>
14#include <framework/dataobjects/EventMetaData.h>
17#include <ecl/dataobjects/ECLDsp.h>
18#include <ecl/dbobjects/ECLCrystalCalib.h>
26REG_MODULE(eclAutocovarianceCalibrationC3Collector);
33 m_ECLAutocovarianceCalibrationC1Threshold(
"ECLAutocovarianceCalibrationC1Threshold")
36 setDescription(
"Module to compute covarience matrix using waveforms from delayed Bhabha events");
57 B2INFO(
"eclAutocovarianceCalibrationC3Collector: Experiment = " <<
m_evtMetaData->getExperiment() <<
" run = " <<
68 std::vector<float> m_tempArray;
70 const int NumDsp =
m_eclDsps.getEntries();
77 const int id = aECLDsp.getCellId() - 1;
80 float PeakToPeak = (float) aECLDsp.computePeaktoPeakAmp();
85 for (
int i = 0; i <
m_BaselineLimit; i++) baseline += aECLDsp.getDspA()[i];
90 for (
int i = 0; i <
m_nADCWaveformPoints; i++) m_tempArray.push_back(aECLDsp.getDspA()[i] - baseline);
106 float value_i = m_tempArray[i];
110 int tempIndex = abs(i - j);
Calibration collector module base class.
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
StoreArray< ECLDsp > m_eclDsps
Required input array of ECLDSPs.
eclAutocovarianceCalibrationC3CollectorModule()
Constructor.
void startRun() override
Load run-dep payloads.
int m_BaselineLimit
length used to compute baseline
float m_CovarianceMatrixInfoVsCrysIDHistogram[ECLElementNumbers::c_NCrystals][m_nADCWaveformPoints+1]
container for coveriance matrix
TH2F * CovarianceMatrixInfoVsCrysID
result returned by collector that contains the coveriance matrix for each crystal
DBObjPtr< ECLCrystalCalib > m_ECLAutocovarianceCalibrationC1Threshold
thresholds obtained from C1 stage
void collect() override
Select events and crystals and accumulate histograms.
StoreObjPtr< EventMetaData > m_evtMetaData
dataStore EventMetaData
std::vector< float > m_PeakToPeakThresholds
vector of thresholds obtained from DB object
void closeRun() override
Transfer fom array container to ROOT histogram.
void prepare() override
Define histograms and read payloads from DB.
static constexpr int m_nADCWaveformPoints
length of ECLDSP waveforms
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.