17 #include <ecl/modules/eclDataAnalysis/ECLDigiStudyModule.h>
27 #include <ecl/dataobjects/ECLDigit.h>
28 #include <ecl/dataobjects/ECLDsp.h>
29 #include <ecl/dataobjects/ECLTrig.h>
30 #include <ecl/dataobjects/ECLHit.h>
31 #include <ecl/geometry/ECLGeometryPar.h>
46 ECLDigiStudyModule::ECLDigiStudyModule() :
Module()
49 setDescription(
"EclCovMatrixNtuple: write ECL waveform and fitted time and amplitude in a root file");
53 "Output root file name of this module",
string(
"digistudy"));
68 B2INFO(
"[EclCovMatrixNtuple Module]: Starting initialization of EclCovMatrixNtuple Module.");
73 m_rootFile =
new TFile(dataFileName.c_str(),
"RECREATE");
74 m_tree =
new TTree(
"m_tree",
"EclCovMatrixNtuple tree");
103 B2INFO(
"[ECLDigiStudyModule Module]: Finished initialising");
125 fill_n(
m_phi, 8736, 0);
127 for (
int j = 0; j < 8736; j++) {
151 i = hit.getCellId() - 1;
153 double e = hit.getEnergyDep();
156 m_time[i] = hit.getTimeAve();
169 i = digit1.getCellId() - 1;
171 m_digiE1[i] = digit1.getAmp() / 20000.;
176 i = digit2.getCellId() - 1;
178 m_digiE2[i] = digit2.getAmp() / 20000.;
183 i = dsp.getCellId() - 1;
185 for (
int j = 0; j < 16; j++) {
195 i = dsp.getCellId() - 1;
197 for (
int j = 0; j < 16; j++) {
int m_phi[8736]
Array of PhiID.
TTree * m_tree
Root tree for saving the output.
int m_maxVal2[8736]
WF maximum for second digit array.
int m_maxVal1[8736]
WF maximum for first 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.
int m_baseline2[8736][16]
Baseline sampling points for second digit array.
virtual void initialize() override
Initializes the module.
double m_digiTime2[8736]
Digit time for second digit array.
virtual void event() override
Method is called for each event.
double m_time[8736]
Array of digit time.
int m_theta[8736]
Array oh ThetaID.
TFile * m_rootFile
Root file for saving the output.
int m_neclhits
Actual number of hits.
virtual void terminate() override
terminate
std::string m_dspArrayName1
Name of first DSP array.
int m_cellId[8736]
Array of cellIDs.
std::string m_digiArrayName2
Name of second digit array.
std::string m_digiArrayName1
Name of first digit array.
int m_nhits
Maximum number of hits.
double m_digiTime1[8736]
Digit time for first digit array.
StoreArray< ECLTrig > m_eclTrigArray
Store array: ECLTrig.
double m_baselineAvg1[8736]
Baseline energy for first digit array.
double m_baselineAvg2[8736]
Baseline energy for second digit array.
std::string m_dspArrayName2
Name of second DSP array.
int m_digiQual1[8736]
Digit quality for first digit array.
double m_digiE1[8736]
Deposited energy for first digit array.
int m_DspHit1[8736][31]
WF sampling points for first digit array.
StoreArray< ECLDigit > m_eclDigiArray1
Store array: ECLDigit.
double m_energy[8736]
Array of deposited MC energy.
int m_digiQual2[8736]
Digit quality for second digit array.
StoreArray< ECLHit > m_eclHitsArray
Store array: ECLHit.
double m_digiE2[8736]
Deposited energy for second digit array.
StoreArray< ECLDsp > m_eclDspArray1
Store array: ECLDsp.
double m_allenergy[8736]
Array of deposited energy.
double m_trig1
Trigger time for array 1.
StoreArray< ECLDsp > m_eclDspArray2
Store array: ECLDsp.
int m_DspHit2[8736][31]
WF sampling points for second digit array.
int m_baseline1[8736][16]
Baseline sampling points for first 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.
Abstract base class for different kinds of events.