12#include <ecl/dataobjects/ECLElementNumbers.h>
13#include <ecl/utility/ECLTimingUtilities.h>
16#include <framework/core/Module.h>
17#include <framework/database/DBObjPtr.h>
18#include <framework/datastore/StoreArray.h>
19#include <framework/datastore/StoreObjPtr.h>
33 class EventLevelClusteringInfo;
35 class ECLCrystalCalib;
62 virtual void event()
override;
65 virtual void endRun()
override;
72 {
return "ECLDigits" ; }
76 {
return "ECLDsps" ; }
80 {
return "ECLCalDigits" ; }
84 {
return "EventLevelClusteringInfo" ; }
88 {
return "ECLPureCsIInfo" ; }
108 std::vector < float >
140 std::vector<float>& constantsUnc);
142 double getT99(
const int cellid,
const double energy,
const bool fitfailed,
const int bgcount)
const;
165 std::make_unique<Belle2::ECL::ECLTimingUtilities>();
184 {
return "ECLDigitsPureCsI" ; }
188 {
return "ECLCalDigitsPureCsI" ; }
192 {
return "ECLDspsPureCsI" ; }
196 {
return "EventLevelClusteringInfoPureCsI" ; }
Class for accessing objects in the database.
Class to find calibrate digits and convert waveform fit information to physics quantities.
double m_pureCsITimeCalib
conversion factor from eclPureCsIDigitizer to ns.
double m_energyDependenceTimeOffsetFitParam_p5
p5 in "energy dependence equation"
const double c_pol2Var2
2-order fit for p1.
virtual const char * eventLevelClusteringInfoName() const
Name of the EventLevelClusteringInfo.
StoreArray< ECLDsp > m_eclDsps
storearray ECLDsp
~ECLDigitCalibratorModule()
Destructor.
virtual const char * eclPureCsIInfoArrayName() const
Name of the ECL pure CsI Information.
DBObjPtr< ECLCrystalCalib > m_calibrationCrateTimeOffset
single crate time calibration offset (per crystal)
double m_pureCsITimeOffset
ad-hoc offset correction for pureCsI timing/
TH1F * m_th1fBackground
Background histogram.
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalElectronics
single crystal electronics calibration
double m_energyDependenceTimeOffsetFitParam_p2
p2 in "energy dependence equation"
const double c_minT99
The minimum t99.
virtual void initialize() override
Initialize variables.
std::vector< float > v_calibrationCrystalElectronicsUnc
single crystal electronics calibration as vector uncertainty
std::string m_fileBackgroundName
Background filename.
std::vector< float > v_calibrationCrateTimeOffsetUnc
single crate time calibration offset as vector uncertainty (per crystal)
double m_energyDependenceTimeOffsetFitParam_p3
p3 in "energy dependence equation"
double m_energyDependenceTimeOffsetFitParam_p6
p6 in "energy dependence equation"
std::vector< float > v_calibrationCrystalElectronicsTimeUnc
single crystal time calibration offset electronics as vector uncertainty
virtual void event() override
event per event.
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalEnergy
single crystal energy calibration
StoreArray< ECLPureCsIInfo > m_eclPureCsIInfo
storearray ECLPureCsIInfo - Special information for pure CsI simulation
virtual void endRun() override
end run.
double getT99(const int cellid, const double energy, const bool fitfailed, const int bgcount) const
t99%.
virtual void terminate() override
terminate.
const double c_pol2Var1
2-order fit for p1 Var1 + Var2*bg + Var3*bg^2.
StoreArray< ECLDigit > m_eclDigits
storearray ECLDigit
virtual const char * eclDspArrayName() const
Name of the ECLDsp.
const double c_timeResolutionForFitFailed
Time resolution for failed fits".
std::vector< float > v_calibrationCrystalElectronicsTime
single crystal time calibration offset electronics as vector
std::vector< float > v_calibrationCrystalFlightTime
single crystal time calibration TOF as vector
void callbackCalibration(DBObjPtr< ECLCrystalCalib > &cal, std::vector< float > &constants, std::vector< float > &constantsUnc)
reads calibration constants
std::unique_ptr< Belle2::ECL::ECLTimingUtilities > ECLTimeUtil
ECL timing tools.
double m_energyDependenceTimeOffsetFitParam_p4
p4 in "energy dependence equation"
void initializeCalibration()
reads calibration constants, performs checks, put them into a vector
std::vector< float > v_calibrationCrystalEnergy
single crystal energy calibration as vector
std::vector< float > v_calibrationCrystalEnergyUnc
single crystal energy calibration as vector uncertainty
virtual void beginRun() override
begin run.
const double c_pol2Var3
2-order fit for p1.
std::vector< float > v_calibrationCrateTimeOffset
single crate time calibration offset as vector (per crystal)
const double c_timeForFitFailed
Time for failed fits".
int determineBackgroundECL()
count out of time digits to determine baclground levels
double m_timeInverseSlope
Time calibration inverse slope "a".
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalTimeOffset
single crystal time calibration offset
double m_backgroundTimingCut
Timing window for background level counting.
std::vector< float > v_calibrationCrystalElectronics
single crystal electronics calibration as vector
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalElectronicsTime
single crystal time calibration offset electronics
double m_pureCsIEnergyCalib
conversion factor from ADC counts to GeV.
double m_energyDependenceTimeOffsetFitParam_p1
p1 in "energy dependence equation"
const int c_nCrystals
Number of ECL crystals.
std::vector< float > v_calibrationCrystalTimeOffset
single crystal time calibration offset as vector
virtual const char * eclDigitArrayName() const
Name of the ECLDigit.
DBObjPtr< ECLCrystalCalib > m_calibrationCrystalFlightTime
single crystal time calibration TOF
double m_averageBG
Average dose per crystal calculated from m_th1dBackground.
double m_pol2Max
Maximum of p1 2-order fit to limit values.
std::vector< float > v_calibrationCrystalFlightTimeUnc
single crystal time calibration TOF as vector uncertainty
virtual const char * eclCalDigitArrayName() const
Name of the ECLCalDigit.
ECLDigitCalibratorModule()
Constructor.
double m_backgroundEnergyCut
Energy cut for background level counting.
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
event level clustering info
StoreArray< ECLCalDigit > m_eclCalDigits
storearray ECLCalDigit
TFile * m_fileBackground
Background file.
const int c_nominalBG
Number of out of time digits at BGx1.0.
std::vector< float > v_calibrationCrystalTimeOffsetUnc
single crystal time calibration offset as vector uncertainty
bool m_simulatePure
Flag to set pure CsI simulation option.
Class derived from ECLDigitCalibratorModule, only difference are the names.
virtual const char * eclCalDigitArrayName() const override
PureCsI Name of the ECLCalDigitsPureCsI.
virtual const char * eventLevelClusteringInfoName() const override
PureCsI Name of the EventLevelClusteringInfoPureCsI.
virtual const char * eclDigitArrayName() const override
PureCsI Name of the ECLDigitsPureCsI.
virtual const char * eclDspArrayName() const override
Name of the ECLDspPureCsI.
Accessor to arrays stored in the data store.
const int c_NCrystals
Number of crystals.
Abstract base class for different kinds of events.