17#ifndef ALICEO2_TPC_CALIBPADGAINTRACKSBASE_H
18#define ALICEO2_TPC_CALIBPADGAINTRACKSBASE_H
61 void initCalPadStat() { mNClMap = std::make_unique<CalPad>(
"NClustersMap"); }
68 void fill(
const gsl::span<const DataTHistos>& caldets);
91 void finalize(
const int minEntries = 10,
const float minRelgain = 0.1f,
const float maxRelgain = 2.f,
const float low = 0.05f,
const float high = 0.6f,
const float minStDev = 0.01);
94 const auto&
getHistos()
const {
return mPadHistosDet; }
148 void drawExtractedSigmaMapSector(
const int sector,
const bool norm =
false,
const std::string
filename =
"StdDevMapSector.pdf",
const float minZ = 0,
const float maxZ = -1)
const { drawExtractedGainMapHelper(
false, 1, sector,
filename,
minZ,
maxZ, norm); }
156 void drawExtractedSigmaMapSide(
const o2::tpc::Side side,
const bool norm =
false,
const std::string
filename =
"StdDevMapSide.pdf",
const float minZ = 0,
const float maxZ = -1)
const { drawExtractedGainMapHelper(
true, 1,
side ==
Side::A ?
Sector(0) :
Sector(
Sector::MAXSECTOR - 1),
filename,
minZ,
maxZ, norm); }
171 void divideGainMap(
const char* inpFile,
const char* mapName);
175 void dumpGainMap(
const char* fileName =
"GainMap.root")
const;
180 void dumpToFile(
const char* outFileName =
"calPadGainTracksBase.root",
const char* outName =
"calPadGain")
const;
189 void setGainMap(
const char* inpFile,
const char* mapName);
195 void setRMSMap(
const CalPad& rmsMap) { mSigmaMap = std::make_unique<CalPad>(rmsMap); }
221 void init(
const unsigned int nBins,
const float xmin,
const float xmax,
const bool useUnderflow,
const bool useOverflow);
229 std::unique_ptr<DataTHistos> mPadHistosDet;
230 std::unique_ptr<CalPad> mGainMap;
231 std::unique_ptr<CalPad> mSigmaMap;
232 std::unique_ptr<CalPad> mNClMap;
234 bool mLogTransformQ{
true};
237 void drawExtractedGainMapHelper(
const bool type,
const int typeMap,
const Sector sector,
const std::string
filename,
const float minZ,
const float maxZ,
const bool norm =
false)
const;
242 void normalize(std::vector<float>&
data,
const std::vector<int>& nPads);
246 void normalizeGain(
CalPad& calPad);
249 std::vector<int> getNPadsForNormalization(
const bool iroc)
const;
252 void normalizeGainMap() { normalizeGain(*mGainMap.get()); }
base class for the pad-by-pad residual gain calibration this class can be used to store for each pad ...
const CalPad & getSigmaMap() const
void initCalPadMemory()
initializing CalPad object for gainmap
void resetHistos()
resetting the histograms which are used for extraction of the gain map
void dumpGainMap(const char *fileName="GainMap.root") const
void setNClMap(const CalPad &nclMap)
setting number of clusters map
void dumpToFile(const char *outFileName="calPadGainTracksBase.root", const char *outName="calPadGain") const
TCanvas * drawExtractedGainMapPainter() const
draw gain map using painter functionality
void divideGainMap(const char *inpFile, const char *mapName)
void initCalPadStdDevMemory()
initializing CalPad object for std dev map
void setGainMap(const CalPad &gainmap)
setting the gain map
void setNormalizationType(const NormType type)
set how the extracted gain map is normalized
FastHisto< unsigned int > DataTHisto
void fill(const DataTHistos &caldet)
bool setLogTransformQ(const bool logTransformQ)
set if the cluster charge is transformed using log(1+Q)
const CalPad & getNTracksMap() const
const CalPad & getPadGainMap() const
const auto & getHistos() const
returns calpad containing pad-by-pad histograms
void fill(const gsl::span< const DataTHistos > &caldets)
void initCalPadStat()
initializing CalPad object for std dev map
void drawNClustersMapSector(const int sector, const std::string filename="NClustersMapSector.pdf", const float minZ=0, const float maxZ=-1) const
NormType
normalization type of the extracted gain map
@ region
normalization per region
@ stack
normalization per GEM stack
void dumpToTree(const std::string filename="map_debug.root") const
void print() const
Print the total number of entries and minimum number of entries (ToDo add some more informations whic...
void fillPadByPadHistogram(const size_t roc, const size_t padInROC, const float val)
void finalize(const int minEntries=10, const float minRelgain=0.1f, const float maxRelgain=2.f, const float low=0.05f, const float high=0.6f, const float minStDev=0.01)
bool hasEnoughData(const int minEntries) const
void setGainMap(const char *inpFile, const char *mapName)
CalibPadGainTracksBase(const CalibPadGainTracksBase &other)
copy constructor
void drawExtractedGainMapSector(const int sector, const std::string filename="GainMapSector.pdf", const float minZ=0, const float maxZ=-1) const
void init(const unsigned int nBins, const float xmin, const float xmax, const bool useUnderflow, const bool useOverflow)
auto getNormalizationType() const
void setRMSMap(const CalPad &rmsMap)
setting the RMS map
void drawExtractedGainMapSide(const o2::tpc::Side side, const std::string filename="GainMapSide.pdf", const float minZ=0, const float maxZ=-1) const
void drawNClustersMapSide(const o2::tpc::Side side, const std::string filename="NClustersMapSide.pdf", const float minZ=0, const float maxZ=-1) const
bool getLogTransformQ() const
void merge(const CalibPadGainTracksBase *other)
Add histograms from other container.
void drawExtractedSigmaMapSector(const int sector, const bool norm=false, const std::string filename="StdDevMapSector.pdf", const float minZ=0, const float maxZ=-1) const
void drawExtractedSigmaMapSide(const o2::tpc::Side side, const bool norm=false, const std::string filename="StdDevMapSide.pdf", const float minZ=0, const float maxZ=-1) const
DataTHisto getHistogram(const int sector, const int region, const int lrow, const int pad) const
templated 1D-histogram class.
static constexpr int MAXSECTOR
GLint GLint GLsizei GLint GLenum GLenum type
GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat maxZ
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
VectorOfTObjectPtrs other