12#ifndef CPV_GAIN_CALIBRATOR_H_
13#define CPV_GAIN_CALIBRATOR_H_
31 static constexpr uint16_t
nBins = 1000;
33 static constexpr float rRange = 1000.;
40 void fill(
float amplitude);
41 double getMean()
const {
return mSumA / mNEntries; }
42 double getRMS()
const {
return (mSumA2 / mNEntries) - ((mSumA * mSumA) / (mNEntries * mNEntries)); };
52 std::array<uint32_t, nBins> mBinContent;
63 void fill(
const gsl::span<const Digit>
data);
98 uint32_t mMinEvents = 1000;
99 uint32_t mMinNChannelsToCalibrate = 10000;
100 float mDesiredLandauMPV = 200.;
101 float mToleratedChi2PerNDF = 100.;
102 float mMinAllowedCoeff = 0.1;
103 float mMaxAllowedCoeff = 10.;
104 float mFitRangeL = 10.;
105 float mFitRangeR = 1000.;
106 uint32_t mUpdateTFInterval = 100;
108 std::unique_ptr<CalibParams> mPreviousGains =
nullptr;
109 std::unique_ptr<GainCalibData> mPreviousGainCalibData;
110 std::vector<o2::ccdb::CcdbObjectInfo> mCcdbInfoGainsVec;
111 std::vector<o2::ccdb::CcdbObjectInfo> mCcdbInfoGainCalibDataVec;
112 std::vector<CalibParams> mGainsVec;
113 std::vector<GainCalibData> mGainCalibDataVec;
Class for time synchronization of RawReader instances.
static constexpr float lRange
const uint32_t * getBinContent()
uint32_t getNEntries() const
static constexpr float rRange
int nEventsInRange(float lR, float rR)
~AmplitudeSpectrum()=default
void fill(float amplitude)
AmplitudeSpectrum & operator+=(const AmplitudeSpectrum &rhs)
static constexpr uint16_t nBins
void dumpToHisto(TH1F *h)
AmplitudeSpectrum(const AmplitudeSpectrum &)=default
ClassDef(GainCalibData, 1)
std::array< AmplitudeSpectrum, Geometry::kNCHANNELS > mAmplitudeSpectra
void fill(const gsl::span< const Digit > data)
void merge(const GainCalibData *prev)
std::vector< o2::ccdb::CcdbObjectInfo > & getCcdbInfoGainsVector()
void setPreviousGainCalibData(GainCalibData *previousGainCalibData)
~GainCalibrator() final=default
void finalizeSlot(GainTimeSlot &slot) final
bool isSettedPreviousGainCalibData()
bool isSettedPreviousGains()
const std::vector< GainCalibData > & getGainCalibDataVector() const
bool hasEnoughData(const GainTimeSlot &slot) const final
GainTimeSlot & emplaceNewSlot(bool front, TFType tstart, TFType tend) final
void setUpdateTFInterval(uint32_t interval)
void setPreviousGains(CalibParams *previousGains)
std::vector< o2::ccdb::CcdbObjectInfo > & getCcdbInfoGainCalibDataVector()
const std::vector< CalibParams > & getGainsVector() const
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.