17#include <ecl/modules/eclDataAnalysis/ECLDigiStudyModule.h>
20#include <ecl/dataobjects/ECLDigit.h>
21#include <ecl/dataobjects/ECLDsp.h>
22#include <ecl/dataobjects/ECLHit.h>
23#include <ecl/dataobjects/ECLTrig.h>
24#include <ecl/geometry/ECLGeometryPar.h>
47 setDescription(
"EclCovMatrixNtuple: write ECL waveform and fitted time and amplitude in a root file");
51 "Output root file name of this module",
string(
"digistudy"));
66 B2INFO(
"[EclCovMatrixNtuple Module]: Starting initialization of EclCovMatrixNtuple Module.");
71 m_rootFile =
new TFile(dataFileName.c_str(),
"RECREATE");
72 m_tree =
new TTree(
"m_tree",
"EclCovMatrixNtuple tree");
101 B2INFO(
"[ECLDigiStudyModule Module]: Finished initialising");
149 i = hit.getCellId() - 1;
151 double e = hit.getEnergyDep();
154 m_time[i] = hit.getTimeAve();
167 i = digit1.getCellId() - 1;
169 m_digiE1[i] = digit1.getAmp() / 20000.;
174 i = digit2.getCellId() - 1;
176 m_digiE2[i] = digit2.getAmp() / 20000.;
181 i = dsp.getCellId() - 1;
183 for (
int j = 0; j < 16; j++) {
193 i = dsp.getCellId() - 1;
195 for (
int j = 0; j < 16; j++) {
int m_theta[ECLElementNumbers::c_NCrystals]
Array oh ThetaID.
TTree * m_tree
Root tree for saving the output.
int m_digiQual2[ECLElementNumbers::c_NCrystals]
Digit quality for second digit array.
double m_trig2
Trigger time for array 2.
std::string m_dataOutFileName
output root file name (given as Module parameter)
StoreArray< ECLDigit > m_eclDigiArray2
Store array: ECLDigit.
virtual void initialize() override
Initializes the module.
int m_DspHit1[ECLElementNumbers::c_NCrystals][31]
WF sampling points for first digit array.
virtual void event() override
Method is called for each event.
double m_time[ECLElementNumbers::c_NCrystals]
Array of digit time.
TFile * m_rootFile
Root file for saving the output.
int m_neclhits
Actual number of hits.
virtual void terminate() override
terminate
int m_digiQual1[ECLElementNumbers::c_NCrystals]
Digit quality for first digit array.
std::string m_dspArrayName1
Name of first DSP array.
int m_maxVal1[ECLElementNumbers::c_NCrystals]
WF maximum for first digit array.
std::string m_digiArrayName2
Name of second digit array.
int m_cellId[ECLElementNumbers::c_NCrystals]
Array of cellIDs.
std::string m_digiArrayName1
Name of first digit array.
double m_digiTime2[ECLElementNumbers::c_NCrystals]
Digit time for second digit array.
int m_nhits
Maximum number of hits.
StoreArray< ECLTrig > m_eclTrigArray
Store array: ECLTrig.
std::string m_dspArrayName2
Name of second DSP array.
double m_energy[ECLElementNumbers::c_NCrystals]
Array of deposited MC energy.
double m_digiTime1[ECLElementNumbers::c_NCrystals]
Digit time for first digit array.
StoreArray< ECLDigit > m_eclDigiArray1
Store array: ECLDigit.
double m_digiE2[ECLElementNumbers::c_NCrystals]
Deposited energy for second digit array.
double m_baselineAvg1[ECLElementNumbers::c_NCrystals]
Baseline energy for first digit array.
ECLDigiStudyModule()
Constructor.
int m_maxVal2[ECLElementNumbers::c_NCrystals]
WF maximum for second digit array.
int m_baseline2[ECLElementNumbers::c_NCrystals][16]
Baseline sampling points for second digit array.
StoreArray< ECLHit > m_eclHitsArray
Store array: ECLHit.
int m_baseline1[ECLElementNumbers::c_NCrystals][16]
Baseline sampling points for first digit array.
double m_digiE1[ECLElementNumbers::c_NCrystals]
Deposited energy for first digit array.
StoreArray< ECLDsp > m_eclDspArray1
Store array: ECLDsp.
double m_trig1
Trigger time for array 1.
double m_allenergy[ECLElementNumbers::c_NCrystals]
Array of deposited energy.
StoreArray< ECLDsp > m_eclDspArray2
Store array: ECLDsp.
int m_phi[ECLElementNumbers::c_NCrystals]
Array of PhiID.
int m_DspHit2[ECLElementNumbers::c_NCrystals][31]
WF sampling points for second digit array.
double m_baselineAvg2[ECLElementNumbers::c_NCrystals]
Baseline energy for second digit array.
The Class for ECL Geometry Parameters.
static ECLGeometryPar * Instance()
Static method to get a reference to the ECLGeometryPar instance.
int GetPhiID()
Get Phi Id.
void Mapping(int cid)
Mapping theta, phi Id.
int GetThetaID()
Get Theta Id.
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...
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#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.