Project
Loading...
Searching...
No Matches
CalibratorPadGainTracks.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
17#ifndef ALICEO2_TPC_CALIBRATORPADGAINTRACKS_H
18#define ALICEO2_TPC_CALIBRATORPADGAINTRACKS_H
19
23
24namespace o2::tpc
25{
28{
29 using TFType = o2::calibration::TFType;
31 using TFinterval = std::vector<std::pair<TFType, TFType>>;
32 using CalibVector = std::vector<std::unordered_map<std::string, CalPad>>; // extracted gain map
33 using TimeInterval = std::vector<std::pair<long, long>>;
34
35 public:
38
40 ~CalibratorPadGainTracks() final = default;
41
43 void initOutput() final;
44
47 bool hasEnoughData(const Slot& slot) const final { return slot.getContainer()->hasEnoughData(mMinEntries); };
48
50 void finalizeSlot(Slot& slot) final;
51
53 Slot& emplaceNewSlot(bool front, TFType tstart, TFType tend) final;
54
56 void setMinEntries(const size_t minEntries) { mMinEntries = minEntries; }
57
60
62 size_t getMinEntries() const { return mMinEntries; }
63
66 void setTruncationRange(const float low = 0.05f, const float high = 0.6f);
67
70 void setRelGainRange(const float minRelgain = 0.1f, const float maxRelgain = 2.f);
71
73 void setMinEntriesMean(const int minEntriesMean) { mMinEntriesMean = minEntriesMean; }
74
76 void setWriteDebug(const bool writeDebug) { mWriteDebug = writeDebug; }
77
79 void setStoreNClCCDB(const bool storeNClCCDB) { mStoreNClCCDB = storeNClCCDB; }
80
82 void setStoreRMSCCDB(const bool storeRMSCCDB) { mStoreRMSCCDB = storeRMSCCDB; }
83
85 bool setLogTransformQ(const bool logTransformQ) { return mLogTransformQ = logTransformQ; }
86
88 void setUseLastExtractedMapAsReference(const bool useLastMap) { mUseLastExtractedMapAsReference = useLastMap; }
89
91 bool getWriteDebug() const { return mWriteDebug; }
92
94 float getTruncationRangeLow() const { return mLowTruncation; }
95
97 float getTruncationRangeUp() const { return mUpTruncation; }
98
100 const TFinterval& getTFinterval() const { return mIntervals; }
101
103 const TimeInterval& getTimeIntervals() const { return mTimeIntervals; }
104
106 auto getCalibs() && { return std::move(mCalibs); }
107
109 bool hasCalibrationData() const { return mCalibs.size() > 0; }
110
111 private:
112 TFinterval mIntervals;
113 TimeInterval mTimeIntervals;
114 CalibVector mCalibs;
115 float mLowTruncation{0.05f};
116 float mUpTruncation{0.6f};
117 float mMinRelgain{0.1f};
118 float mMaxRelgain{2.f};
119 int mMinEntriesMean{10};
120 size_t mMinEntries{30};
121 bool mWriteDebug = false;
123 bool mUseLastExtractedMapAsReference{false};
124 std::unique_ptr<CalPad> mGainMapLastIteration;
125 bool mStoreNClCCDB{false};
126 bool mStoreRMSCCDB{false};
127 bool mLogTransformQ{true};
128
129 ClassDefOverride(CalibratorPadGainTracks, 1);
130};
131} // namespace o2::tpc
132
133#endif
uint64_t TFType
NormType
normalization type of the extracted gain map
calibrator class for the residual gain map extraction used on an aggregator node
void setStoreRMSCCDB(const bool storeRMSCCDB)
~CalibratorPadGainTracks() final=default
destructor
void setRelGainRange(const float minRelgain=0.1f, const float maxRelgain=2.f)
void finalizeSlot(Slot &slot) final
process time slot (create pad-by-pad gain map from tracks)
void setStoreNClCCDB(const bool storeNClCCDB)
bool hasCalibrationData() const
check if calibration data is available
CalibratorPadGainTracks()=default
construcor
const TimeInterval & getTimeIntervals() const
void setNormalizationType(const CalibPadGainTracksBase::NormType type)
set how the extracted gain map is normalized
const TFinterval & getTFinterval() const
void setTruncationRange(const float low=0.05f, const float high=0.6f)
Slot & emplaceNewSlot(bool front, TFType tstart, TFType tend) final
Creates new time slot.
bool hasEnoughData(const Slot &slot) const final
Check if there are enough data to compute the calibration.
void setMinEntriesMean(const int minEntriesMean)
minEntries minimum number of entries in pad-by-pad histogram to calculate the mean
void setWriteDebug(const bool writeDebug)
void setUseLastExtractedMapAsReference(const bool useLastMap)
void initOutput() final
clearing the output
void setMinEntries(const size_t minEntries)
bool setLogTransformQ(const bool logTransformQ)
set if the cluster charge is transformed using log(1+Q)
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
uint32_t TFType
Definition TimeSlot.h:29
Global TPC definitions and constants.
Definition SimTraits.h:167