16#ifndef TPC_VDrifITSTPCCalibration_H_
17#define TPC_VDrifITSTPCCalibration_H_
29 std::unique_ptr<o2::dataformats::FlatHisto2D_f>
histo;
38 histo = std::make_unique<o2::dataformats::FlatHisto2D_f>(ntgl, -tglMax, tglMax, ndtgl, -dtglMax, dtglMax);
43 histo = std::make_unique<o2::dataformats::FlatHisto2D_f>(*(
src.histo.get()));
49 if (
data.size() < 3) {
52 for (
size_t i = 2;
i <
data.size();
i++) {
54 auto bin =
histo->fill(p.first, p.first - p.second);
55 LOGP(
debug,
"fill #{} : {} for {} {}",
i - 1, bin, p.first, p.first - p.second);
61 float vfull =
data[0].first, vref =
data[0].second;
65 LOGP(warn,
"data with VDriftRef={} were received while initially was set to {}, keep old one", vref,
driftVRef);
78 LOGP(
debug,
"Old entries:{} New entries:{} oldSum: {} newSum: {}",
other->entries,
entries,
other->histo->getSum(),
histo->getSum());
94 TPCVDriftTglCalibration(
int ntgl,
float tglMax,
int ndtgl,
float dtglMax, uint32_t slotL,
float offsetFrac,
float maxDelay,
size_t minEnt,
float offset = 0.f)
95 : mNBinsTgl(ntgl), mMaxTgl(tglMax), mNBinsDTgl(ndtgl), mMaxDTgl(dtglMax), mMineEntriesPerSlot(minEnt)
104 bool hasEnoughData(const
Slot& slot) const final {
return slot.getContainer()->entries >= mMineEntriesPerSlot; }
111 std::vector<o2::tpc::VDriftCorrFact>&
getVDPerSlot() {
return mVDPerSlot; }
117 size_t mMineEntriesPerSlot = 10000;
119 int mNBinsDTgl = 100;
121 float mMaxDTgl = 0.2;
122 std::string mSaveHistosFile{};
123 std::vector<o2::tpc::VDriftCorrFact> mVDPerSlot;
124 std::vector<o2::ccdb::CcdbObjectInfo> mCCDBInfoPerSlot;
2D messeageable histo class
calibration data from laser track calibration
void setStartOffsetFrac(float f)
void setSlotLengthInSeconds(int s)
void setMaxSlotsDelay(float v)
bool hasEnoughData(const Slot &slot) const final
TPCVDriftTglCalibration(int ntgl, float tglMax, int ndtgl, float dtglMax, uint32_t slotL, float offsetFrac, float maxDelay, size_t minEnt, float offset=0.f)
Slot & emplaceNewSlot(bool front, TFType tstart, TFType tend) final
void setSaveHistosFile(const std::string &f)
~TPCVDriftTglCalibration() final=default
const std::vector< o2::tpc::VDriftCorrFact > & getVDPerSlot() const
std::vector< o2::ccdb::CcdbObjectInfo > & getCCDBInfoPerSlot()
void finalizeSlot(Slot &slot) final
TPCVDriftTglCalibration()=default
std::vector< o2::tpc::VDriftCorrFact > & getVDPerSlot()
const std::vector< o2::ccdb::CcdbObjectInfo > & getCCDBInfoPerSlot() const
Global TPC definitions and constants.
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
void fill(const gsl::span< const o2::dataformats::Triplet< float, float, float > > data)
TPCVDTglContainer(const TPCVDTglContainer &src)
std::unique_ptr< o2::dataformats::FlatHisto2D_f > histo
TPCVDTglContainer(int ntgl, float tglMax, int ndtgl, float dtglMax)
void merge(const TPCVDTglContainer *other)
ClassDefNV(TPCVDTglContainer, 1)
VectorOfTObjectPtrs other
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"