17#include <ecl/modules/eclDataAnalysis/EclCovMatrixNtupleModule.h>
20#include <ecl/dataobjects/ECLDigit.h>
21#include <ecl/dataobjects/ECLDsp.h>
22#include <ecl/dataobjects/ECLTrig.h>
23#include <ecl/geometry/ECLGeometryPar.h>
43 setDescription(
"EclCovMatrixNtuple: write ECL waveform and fitted time and amplitude in a root file");
47 "Output root file name of this module",
string(
"EclCovMatrixNtuple"));
56 B2INFO(
"[EclCovMatrixNtuple Module]: Starting initialization of EclCovMatrixNtuple Module.");
61 m_rootFile =
new TFile(dataFileName.c_str(),
"RECREATE");
62 m_tree =
new TTree(
"m_tree",
"EclCovMatrixNtuple tree");
77 B2INFO(
"[EclCovMatrixNtuple Module]: Finished initialising the Time Information Study in Gamma Reconstruction Module.");
107 for (
int j = 0; j < 31; j++) {
119 size_t cellIndex =
static_cast<size_t>(adigit.getCellId() - 1);
130 m_hitE[cellIndex] = adigit.getAmp();
135 m_hitTime[cellIndex] = 1520 - adigit.getTimeFit() - 64 * deltaT * 12.0 * 24.0 / 508.0 / 1536.0;
144 size_t cellIndex =
static_cast<size_t>(eclDsp.getCellId() - 1);
145 eclDsp.getDspA(
m_DspHit[cellIndex]);
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.
StoreArray< ECLDsp > m_eclDspArray
Store array: ECLDsp.
double m_hitTime[ECLElementNumbers::c_NCrystals]
eclHit Time
int m_theta[ECLElementNumbers::c_NCrystals]
Crystal Theta ID.
TTree * m_tree
Root tree name.
std::string m_dataOutFileName
output root file name (given as Module parameter)
virtual void initialize() override
Initializes the module.
virtual void event() override
Method is called for each event.
double m_hitE[ECLElementNumbers::c_NCrystals]
eclHit Energy
TFile * m_rootFile
Root file for saving the output.
double m_DeltaT[ECLElementNumbers::c_NCrystals]
eclTrig Time
virtual void terminate() override
Terminates the module.
std::string m_digiArrayName
eclDigit array name
EclCovMatrixNtupleModule()
Constructor.
int m_nhits
Number of eclHits.
StoreArray< ECLTrig > m_eclTrigArray
Store array: ECLTrig.
int m_cellID[ECLElementNumbers::c_NCrystals]
Crystal ID.
std::string m_dspArrayName
eclDSPs array name
int m_DspHit[ECLElementNumbers::c_NCrystals][31]
eclDsp sample Array
int m_phi[ECLElementNumbers::c_NCrystals]
Crystal Phi ID.
StoreArray< ECLDigit > m_eclDigiArray
Store array: ECLDigit.
int m_DigiTime[ECLElementNumbers::c_NCrystals]
eclDigit Time
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.