![]() |
Project
|
base class for the pad-by-pad residual gain calibration this class can be used to store for each pad in the TPC a histogram. After all pad-by-pad histograms are filled one can calculate and store for each histogram the mean value in a CalPad object. More...
#include <CalibPadGainTracksBase.h>
Inherited by o2::tpc::CalibPadGainTracks.
Public Types | |
enum | NormType : unsigned char { none , stack , region } |
normalization type of the extracted gain map More... | |
using | DataTHisto = FastHisto< unsigned int > |
using | DataTHistos = CalDet< DataTHisto > |
Public Member Functions | |
CalibPadGainTracksBase (const bool initCalPad=true) | |
void | initCalPadMemory () |
initializing CalPad object for gainmap | |
void | initCalPadStdDevMemory () |
initializing CalPad object for std dev map | |
void | initCalPadStat () |
initializing CalPad object for std dev map | |
CalibPadGainTracksBase (const CalibPadGainTracksBase &other) | |
copy constructor | |
void | fill (const gsl::span< const DataTHistos > &caldets) |
void | fill (const DataTHistos &caldet) |
void | print () const |
Print the total number of entries and minimum number of entries (ToDo add some more informations which will be printed) | |
void | merge (const CalibPadGainTracksBase *other) |
Add histograms from other container. | |
bool | hasEnoughData (const int minEntries) const |
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) |
const auto & | getHistos () const |
returns calpad containing pad-by-pad histograms | |
const CalPad & | getPadGainMap () const |
CalPad & | getPadGainMap () |
const CalPad & | getSigmaMap () const |
const CalPad & | getNTracksMap () const |
DataTHisto | getHistogram (const int sector, const int region, const int lrow, const int pad) const |
DataTHisto | getHistogram (const int sector, const int grow, const int pad) const |
void | drawExtractedGainMapSector (const int sector, const std::string filename="GainMapSector.pdf", const float minZ=0, const float maxZ=-1) const |
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 |
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 |
void | drawNClustersMapSector (const int sector, const std::string filename="NClustersMapSector.pdf", const float minZ=0, const float maxZ=-1) const |
TCanvas * | drawExtractedGainMapPainter () const |
draw gain map using painter functionality | |
void | divideGainMap (const char *inpFile, const char *mapName) |
void | dumpGainMap (const char *fileName="GainMap.root") const |
void | dumpToFile (const char *outFileName="calPadGainTracksBase.root", const char *outName="calPadGain") const |
void | dumpToTree (const std::string filename="map_debug.root") const |
void | setGainMap (const char *inpFile, const char *mapName) |
void | setGainMap (const CalPad &gainmap) |
setting the gain map | |
void | setRMSMap (const CalPad &rmsMap) |
setting the RMS map | |
void | setNClMap (const CalPad &nclMap) |
setting number of clusters map | |
void | setNormalizationType (const NormType type) |
set how the extracted gain map is normalized | |
auto | getNormalizationType () const |
bool | setLogTransformQ (const bool logTransformQ) |
set if the cluster charge is transformed using log(1+Q) | |
bool | getLogTransformQ () const |
void | resetHistos () |
resetting the histograms which are used for extraction of the gain map | |
void | init (const unsigned int nBins, const float xmin, const float xmax, const bool useUnderflow, const bool useOverflow) |
void | fillPadByPadHistogram (const size_t roc, const size_t padInROC, const float val) |
base class for the pad-by-pad residual gain calibration this class can be used to store for each pad in the TPC a histogram. After all pad-by-pad histograms are filled one can calculate and store for each histogram the mean value in a CalPad object.
Definition at line 37 of file CalibPadGainTracksBase.h.
using o2::tpc::CalibPadGainTracksBase::DataTHisto = FastHisto<unsigned int> |
Definition at line 47 of file CalibPadGainTracksBase.h.
Definition at line 48 of file CalibPadGainTracksBase.h.
enum o2::tpc::CalibPadGainTracksBase::NormType : unsigned char |
normalization type of the extracted gain map
Enumerator | |
---|---|
none | no normalization |
stack | normalization per GEM stack |
region | normalization per region |
Definition at line 41 of file CalibPadGainTracksBase.h.
CalibPadGainTracksBase::CalibPadGainTracksBase | ( | const bool | initCalPad = true | ) |
constructor
initCalPad | initialisation of the calpad for the gain map (if the gainmap is not extracted it can be false to save some memory) |
Definition at line 28 of file CalibPadGainTracksBase.cxx.
|
inline |
copy constructor
Definition at line 64 of file CalibPadGainTracksBase.h.
divide the extracted gain map with a CalDet (can be usefull for comparing two gainmaps)
inpFile | input file containing some caldet |
mapName | name of the caldet |
Definition at line 99 of file CalibPadGainTracksBase.cxx.
TCanvas * CalibPadGainTracksBase::drawExtractedGainMapPainter | ( | ) | const |
draw gain map using painter functionality
Definition at line 129 of file CalibPadGainTracksBase.cxx.
|
inline |
draw gain map sector
sector | sector which will be drawn |
filename | name of the output file. If empty the canvas is drawn |
minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 126 of file CalibPadGainTracksBase.h.
|
inline |
draw gain map side
side | side of the TPC which will be drawn |
filename | name of the output file. If empty the canvas is drawn |
minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 133 of file CalibPadGainTracksBase.h.
|
inline |
draw sigma map sector
sector | sector which will be drawn |
norm | normalizing the sigma to the extracted gain map |
filename | name of the output file. If empty the canvas is drawn |
minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 148 of file CalibPadGainTracksBase.h.
|
inline |
draw sigma map side
side | side of the TPC which will be drawn |
norm | normalizing the sigma to the extracted gain map |
filename | name of the output file. If empty the canvas is drawn |
minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 156 of file CalibPadGainTracksBase.h.
|
inline |
draw number of clusters sector
sector | sector which will be drawn |
filename | name of the output file. If empty the canvas is drawn |
minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 163 of file CalibPadGainTracksBase.h.
|
inline |
draw number of clusters side
side | side of the TPC which will be drawn |
filename | name of the output file. If empty the canvas is drawn |
minZ | min z value for drawing (if minZ > maxZ automatic z axis) |
maxZ | max z value for drawing (if minZ > maxZ automatic z axis) |
Definition at line 140 of file CalibPadGainTracksBase.h.
dump the gain map to disk
fileName | name of the output file |
Definition at line 47 of file CalibPadGainTracksBase.cxx.
void CalibPadGainTracksBase::dumpToFile | ( | const char * | outFileName = "calPadGainTracksBase.root" , |
const char * | outName = "calPadGain" |
||
) | const |
dump object to disc
outFileName | name of the output file |
outName | name of the object in the output file |
Definition at line 143 of file CalibPadGainTracksBase.cxx.
void CalibPadGainTracksBase::dumpToTree | ( | const std::string | filename = "map_debug.root" | ) | const |
dump extracted gain and sigma map to tree \filename name of the output file
Definition at line 83 of file CalibPadGainTracksBase.cxx.
|
inline |
filling the pad-by-pad histograms
caldets | span of caldets containing pad-by-pad histograms |
Definition at line 72 of file CalibPadGainTracksBase.h.
void CalibPadGainTracksBase::fill | ( | const gsl::span< const DataTHistos > & | caldets | ) |
filling the pad-by-pad histograms
caldets | span of caldets containing pad-by-pad histograms |
Definition at line 150 of file CalibPadGainTracksBase.cxx.
|
inline |
roc | numerical ROC value |
padInROC | pad number in ROC |
val | value which is filled in the pad-by-pad histogram |
Definition at line 226 of file CalibPadGainTracksBase.h.
void CalibPadGainTracksBase::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 |
||
) |
get the truncated mean and the sigma for each histogram and fill the extracted values in a CalPad object
minEntries | minimum number of entries in pad-by-pad histogram to calculate the mean |
minRelgain | minimum accpeted relative gain (if the gain is below this value it will be set to 1) |
maxRelgain | maximum accpeted relative gain (if the gain is above this value it will be set to 1) |
low | lower truncation range for calculating the rel gain |
high | upper truncation range |
minStDev | to exlude outliers (histograms with a very narrow distributions) a min std dev cut is used |
Definition at line 195 of file CalibPadGainTracksBase.cxx.
o2::tpc::CalibPadGainTracksBase::DataTHisto CalibPadGainTracksBase::getHistogram | ( | const int | sector, |
const int | grow, | ||
const int | pad | ||
) | const |
sector | sector of the TPC |
grow | global row in sector |
pad | pad in row |
Definition at line 286 of file CalibPadGainTracksBase.cxx.
o2::tpc::CalibPadGainTracksBase::DataTHisto CalibPadGainTracksBase::getHistogram | ( | const int | sector, |
const int | region, | ||
const int | lrow, | ||
const int | pad | ||
) | const |
sector | sector of the TPC |
region | region of the TPC |
lrow | local row in region |
pad | pad in row |
Definition at line 281 of file CalibPadGainTracksBase.cxx.
|
inline |
returns calpad containing pad-by-pad histograms
Definition at line 94 of file CalibPadGainTracksBase.h.
|
inline |
Definition at line 210 of file CalibPadGainTracksBase.h.
|
inline |
Definition at line 204 of file CalibPadGainTracksBase.h.
|
inline |
Definition at line 106 of file CalibPadGainTracksBase.h.
|
inline |
Definition at line 100 of file CalibPadGainTracksBase.h.
|
inline |
Definition at line 97 of file CalibPadGainTracksBase.h.
|
inline |
Definition at line 103 of file CalibPadGainTracksBase.h.
bool CalibPadGainTracksBase::hasEnoughData | ( | const int | minEntries | ) | const |
check if the pad-by-pad histograms has enough data
minEntries | minimum number of entries in each histogram |
Definition at line 174 of file CalibPadGainTracksBase.cxx.
void CalibPadGainTracksBase::init | ( | const unsigned int | nBins, |
const float | xmin, | ||
const float | xmax, | ||
const bool | useUnderflow, | ||
const bool | useOverflow | ||
) |
initialize the histograms with custom parameters
nBins | number of bins used in the histograms |
xmin | minimum value in histogram |
xmax | maximum value in histogram |
useUnderflow | set usage of underflow bin |
useOverflow | set usage of overflow bin |
Definition at line 37 of file CalibPadGainTracksBase.cxx.
|
inline |
initializing CalPad object for gainmap
Definition at line 55 of file CalibPadGainTracksBase.h.
|
inline |
initializing CalPad object for std dev map
Definition at line 61 of file CalibPadGainTracksBase.h.
|
inline |
initializing CalPad object for std dev map
Definition at line 58 of file CalibPadGainTracksBase.h.
|
inline |
Add histograms from other container.
Definition at line 78 of file CalibPadGainTracksBase.h.
void CalibPadGainTracksBase::print | ( | ) | const |
Print the total number of entries and minimum number of entries (ToDo add some more informations which will be printed)
Definition at line 157 of file CalibPadGainTracksBase.cxx.
void CalibPadGainTracksBase::resetHistos | ( | ) |
resetting the histograms which are used for extraction of the gain map
Definition at line 134 of file CalibPadGainTracksBase.cxx.
setting the gain map
Definition at line 192 of file CalibPadGainTracksBase.h.
setting a gain map from a file
inpFile | input file containing some caldet |
mapName | name of the caldet |
Definition at line 114 of file CalibPadGainTracksBase.cxx.
|
inline |
set if the cluster charge is transformed using log(1+Q)
Definition at line 207 of file CalibPadGainTracksBase.h.
setting number of clusters map
Definition at line 198 of file CalibPadGainTracksBase.h.
set how the extracted gain map is normalized
Definition at line 201 of file CalibPadGainTracksBase.h.
setting the RMS map
Definition at line 195 of file CalibPadGainTracksBase.h.