12#ifndef ALICEO2_TPC_CALIBPULSER_H_
13#define ALICEO2_TPC_CALIBPULSER_H_
20#include <unordered_map>
65 const Int_t timeBin,
const Float_t signal)
final;
69 const Int_t timeBin,
const Float_t signal)
final {
return 0; }
79 mNumberOfADCs = mADCMax - mADCMin + 1;
85 mFirstTimeBin =
first;
89 mXminT0 = mFirstTimeBin;
90 mXmaxT0 = mLastTimeBin;
180 int mMaxTimeBinRange;
181 std::unordered_map<std::string, CalPad> mCalDets;
186 std::map<PadROCPos, VectorType> mPulserData;
188 std::array<std::vector<size_t>,
ROC::MaxROC> mTimeBinEntries{};
200 bool isValid()
const {
return (mT0 > 0.f) || (mWidth > 0.f) || (mQtot > 0.f); }
216 int nbins,
float min,
float max,
217 std::string_view
type,
bool create );
220 TH2S* getHistoT0(ROC
roc, Bool_t force)
222 return getHistogram(
roc, mT0Histograms, mNbinsT0, mXminT0, mXmaxT0,
"T0", force);
226 TH2S* getHistoQtot(ROC
roc, Bool_t force)
228 return getHistogram(
roc, mQtotHistograms, mNbinsQtot, mXminQtot, mXmaxQtot,
"Qtot", force);
232 TH2S* getHistoSigma(ROC
roc, Bool_t force)
234 return getHistogram(
roc, mWidthHistograms, mNbinsWidth, mXminWidth, mXmaxWidth,
"Width", force);
240 PulserData processPadData(
const PadROCPos& padROCPos,
const VectorType& adcData,
const ElemPair&
range);
243 std::array<ElemPair, ROC::MaxROC> getTimeRangeROCs();
246 void resetEvent() final {}
Pulser calibration class.
Int_t updateCRU(const CRU &cru, const Int_t row, const Int_t pad, const Int_t timeBin, const Float_t signal) final
not used
void setMinQmax(float minQmax)
set minimum Qmax for the signal
void setWidthBinning(int nbins, float min, float max)
set Width Binning
void setPedestalAndNoise(const CalPad *pedestal, const CalPad *noise)
set noise and pedestal calibration objects
std::vector< float > VectorType
void init()
initialize the clusterer from CalibPedestalParam
void endReader() final
Process the end of one raw reader.
void setTimeBinRange(int first, int last)
set the timeBin range
void setQtotBinning(int nbins, float min, float max)
set Qtot Binning
void setMinQtot(float minQtot)
set minimum Qtot for the signal
void analyse()
Analyse the buffered pulser information.
Int_t updateROC(const Int_t roc, const Int_t row, const Int_t pad, const Int_t timeBin, const Float_t signal) final
const CalPad & getWidth() const
void resetData()
Reset temporary data and histogrms.
~CalibPulser() override=default
default destructor
void setMaxTimeBinRange(int max)
set time bin range around the one with the maximum number of entries
const CalPad & getT0() const
const CalPad & getQtot() const
std::vector< std::unique_ptr< TH2S > > PtrVectorType
void dumpToFile(const std::string filename, uint32_t type=0) final
Dump the relevant data to file.
void endEvent() final
Dummy end event.
const auto & getCalDets() const
void setADCRange(int minADC, int maxADC)
set the adc range
void setT0Binning(int nbins, float min, float max)
set T0 Binning
Base class for raw data calibrations.
GLint GLint GLsizei GLint GLenum GLenum type
bool isValid(std::string_view dcsAlias)
PadSubset
Definition of the different pad subsets.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...