Project
Loading...
Searching...
No Matches
o2::tpc::CalibPadGainTracksBase Class Reference

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 CalPadgetPadGainMap () const
 
CalPadgetPadGainMap ()
 
const CalPadgetSigmaMap () const
 
const CalPadgetNTracksMap () 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)
 

Detailed Description

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.

Member Typedef Documentation

◆ DataTHisto

◆ DataTHistos

Member Enumeration Documentation

◆ NormType

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.

Constructor & Destructor Documentation

◆ CalibPadGainTracksBase() [1/2]

CalibPadGainTracksBase::CalibPadGainTracksBase ( const bool  initCalPad = true)

constructor

Parameters
initCalPadinitialisation 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.

◆ CalibPadGainTracksBase() [2/2]

o2::tpc::CalibPadGainTracksBase::CalibPadGainTracksBase ( const CalibPadGainTracksBase other)
inline

copy constructor

Definition at line 64 of file CalibPadGainTracksBase.h.

Member Function Documentation

◆ divideGainMap()

void CalibPadGainTracksBase::divideGainMap ( const char inpFile,
const char mapName 
)

divide the extracted gain map with a CalDet (can be usefull for comparing two gainmaps)

Parameters
inpFileinput file containing some caldet
mapNamename of the caldet

Definition at line 99 of file CalibPadGainTracksBase.cxx.

◆ drawExtractedGainMapPainter()

TCanvas * CalibPadGainTracksBase::drawExtractedGainMapPainter ( ) const

draw gain map using painter functionality

Definition at line 129 of file CalibPadGainTracksBase.cxx.

◆ drawExtractedGainMapSector()

void o2::tpc::CalibPadGainTracksBase::drawExtractedGainMapSector ( const int  sector,
const std::string  filename = "GainMapSector.pdf",
const float  minZ = 0,
const float  maxZ = -1 
) const
inline

draw gain map sector

Parameters
sectorsector which will be drawn
filenamename of the output file. If empty the canvas is drawn
minZmin z value for drawing (if minZ > maxZ automatic z axis)
maxZmax z value for drawing (if minZ > maxZ automatic z axis)

Definition at line 126 of file CalibPadGainTracksBase.h.

◆ drawExtractedGainMapSide()

void o2::tpc::CalibPadGainTracksBase::drawExtractedGainMapSide ( const o2::tpc::Side  side,
const std::string  filename = "GainMapSide.pdf",
const float  minZ = 0,
const float  maxZ = -1 
) const
inline

draw gain map side

Parameters
sideside of the TPC which will be drawn
filenamename of the output file. If empty the canvas is drawn
minZmin z value for drawing (if minZ > maxZ automatic z axis)
maxZmax z value for drawing (if minZ > maxZ automatic z axis)

Definition at line 133 of file CalibPadGainTracksBase.h.

◆ drawExtractedSigmaMapSector()

void o2::tpc::CalibPadGainTracksBase::drawExtractedSigmaMapSector ( const int  sector,
const bool  norm = false,
const std::string  filename = "StdDevMapSector.pdf",
const float  minZ = 0,
const float  maxZ = -1 
) const
inline

draw sigma map sector

Parameters
sectorsector which will be drawn
normnormalizing the sigma to the extracted gain map
filenamename of the output file. If empty the canvas is drawn
minZmin z value for drawing (if minZ > maxZ automatic z axis)
maxZmax z value for drawing (if minZ > maxZ automatic z axis)

Definition at line 148 of file CalibPadGainTracksBase.h.

◆ drawExtractedSigmaMapSide()

void o2::tpc::CalibPadGainTracksBase::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
inline

draw sigma map side

Parameters
sideside of the TPC which will be drawn
normnormalizing the sigma to the extracted gain map
filenamename of the output file. If empty the canvas is drawn
minZmin z value for drawing (if minZ > maxZ automatic z axis)
maxZmax z value for drawing (if minZ > maxZ automatic z axis)

Definition at line 156 of file CalibPadGainTracksBase.h.

◆ drawNClustersMapSector()

void o2::tpc::CalibPadGainTracksBase::drawNClustersMapSector ( const int  sector,
const std::string  filename = "NClustersMapSector.pdf",
const float  minZ = 0,
const float  maxZ = -1 
) const
inline

draw number of clusters sector

Parameters
sectorsector which will be drawn
filenamename of the output file. If empty the canvas is drawn
minZmin z value for drawing (if minZ > maxZ automatic z axis)
maxZmax z value for drawing (if minZ > maxZ automatic z axis)

Definition at line 163 of file CalibPadGainTracksBase.h.

◆ drawNClustersMapSide()

void o2::tpc::CalibPadGainTracksBase::drawNClustersMapSide ( const o2::tpc::Side  side,
const std::string  filename = "NClustersMapSide.pdf",
const float  minZ = 0,
const float  maxZ = -1 
) const
inline

draw number of clusters side

Parameters
sideside of the TPC which will be drawn
filenamename of the output file. If empty the canvas is drawn
minZmin z value for drawing (if minZ > maxZ automatic z axis)
maxZmax z value for drawing (if minZ > maxZ automatic z axis)

Definition at line 140 of file CalibPadGainTracksBase.h.

◆ dumpGainMap()

void CalibPadGainTracksBase::dumpGainMap ( const char fileName = "GainMap.root") const

dump the gain map to disk

Parameters
fileNamename of the output file

Definition at line 47 of file CalibPadGainTracksBase.cxx.

◆ dumpToFile()

void CalibPadGainTracksBase::dumpToFile ( const char outFileName = "calPadGainTracksBase.root",
const char outName = "calPadGain" 
) const

dump object to disc

Parameters
outFileNamename of the output file
outNamename of the object in the output file

Definition at line 143 of file CalibPadGainTracksBase.cxx.

◆ dumpToTree()

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.

◆ fill() [1/2]

void o2::tpc::CalibPadGainTracksBase::fill ( const DataTHistos caldet)
inline

filling the pad-by-pad histograms

Parameters
caldetsspan of caldets containing pad-by-pad histograms

Definition at line 72 of file CalibPadGainTracksBase.h.

◆ fill() [2/2]

void CalibPadGainTracksBase::fill ( const gsl::span< const DataTHistos > &  caldets)

filling the pad-by-pad histograms

Parameters
caldetsspan of caldets containing pad-by-pad histograms

Definition at line 150 of file CalibPadGainTracksBase.cxx.

◆ fillPadByPadHistogram()

void o2::tpc::CalibPadGainTracksBase::fillPadByPadHistogram ( const size_t  roc,
const size_t  padInROC,
const float  val 
)
inline
Parameters
rocnumerical ROC value
padInROCpad number in ROC
valvalue which is filled in the pad-by-pad histogram

Definition at line 226 of file CalibPadGainTracksBase.h.

◆ finalize()

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

Parameters
minEntriesminimum number of entries in pad-by-pad histogram to calculate the mean
minRelgainminimum accpeted relative gain (if the gain is below this value it will be set to 1)
maxRelgainmaximum accpeted relative gain (if the gain is above this value it will be set to 1)
lowlower truncation range for calculating the rel gain
highupper truncation range
minStDevto exlude outliers (histograms with a very narrow distributions) a min std dev cut is used

Definition at line 195 of file CalibPadGainTracksBase.cxx.

◆ getHistogram() [1/2]

o2::tpc::CalibPadGainTracksBase::DataTHisto CalibPadGainTracksBase::getHistogram ( const int  sector,
const int  grow,
const int  pad 
) const
Returns
return histogram which is used to extract the gain
Parameters
sectorsector of the TPC
growglobal row in sector
padpad in row

Definition at line 286 of file CalibPadGainTracksBase.cxx.

◆ getHistogram() [2/2]

o2::tpc::CalibPadGainTracksBase::DataTHisto CalibPadGainTracksBase::getHistogram ( const int  sector,
const int  region,
const int  lrow,
const int  pad 
) const
Returns
return histogram which is used to extract the gain
Parameters
sectorsector of the TPC
regionregion of the TPC
lrowlocal row in region
padpad in row

Definition at line 281 of file CalibPadGainTracksBase.cxx.

◆ getHistos()

const auto & o2::tpc::CalibPadGainTracksBase::getHistos ( ) const
inline

returns calpad containing pad-by-pad histograms

Definition at line 94 of file CalibPadGainTracksBase.h.

◆ getLogTransformQ()

bool o2::tpc::CalibPadGainTracksBase::getLogTransformQ ( ) const
inline
Returns
returns if the cluster charge is transformed using log(1+Q)

Definition at line 210 of file CalibPadGainTracksBase.h.

◆ getNormalizationType()

auto o2::tpc::CalibPadGainTracksBase::getNormalizationType ( ) const
inline
Returns
return how the extracted gain map is normalized

Definition at line 204 of file CalibPadGainTracksBase.h.

◆ getNTracksMap()

const CalPad & o2::tpc::CalibPadGainTracksBase::getNTracksMap ( ) const
inline
Returns
returns the number of tracks per pad map

Definition at line 106 of file CalibPadGainTracksBase.h.

◆ getPadGainMap() [1/2]

CalPad & o2::tpc::CalibPadGainTracksBase::getPadGainMap ( )
inline
Returns
returns the gainmap object as reference

Definition at line 100 of file CalibPadGainTracksBase.h.

◆ getPadGainMap() [2/2]

const CalPad & o2::tpc::CalibPadGainTracksBase::getPadGainMap ( ) const
inline
Returns
returns the gainmap object as const reference

Definition at line 97 of file CalibPadGainTracksBase.h.

◆ getSigmaMap()

const CalPad & o2::tpc::CalibPadGainTracksBase::getSigmaMap ( ) const
inline
Returns
returns the gainmap object

Definition at line 103 of file CalibPadGainTracksBase.h.

◆ hasEnoughData()

bool CalibPadGainTracksBase::hasEnoughData ( const int  minEntries) const

check if the pad-by-pad histograms has enough data

Parameters
minEntriesminimum number of entries in each histogram

Definition at line 174 of file CalibPadGainTracksBase.cxx.

◆ init()

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

Parameters
nBinsnumber of bins used in the histograms
xminminimum value in histogram
xmaxmaximum value in histogram
useUnderflowset usage of underflow bin
useOverflowset usage of overflow bin

Definition at line 37 of file CalibPadGainTracksBase.cxx.

◆ initCalPadMemory()

void o2::tpc::CalibPadGainTracksBase::initCalPadMemory ( )
inline

initializing CalPad object for gainmap

Definition at line 55 of file CalibPadGainTracksBase.h.

◆ initCalPadStat()

void o2::tpc::CalibPadGainTracksBase::initCalPadStat ( )
inline

initializing CalPad object for std dev map

Definition at line 61 of file CalibPadGainTracksBase.h.

◆ initCalPadStdDevMemory()

void o2::tpc::CalibPadGainTracksBase::initCalPadStdDevMemory ( )
inline

initializing CalPad object for std dev map

Definition at line 58 of file CalibPadGainTracksBase.h.

◆ merge()

void o2::tpc::CalibPadGainTracksBase::merge ( const CalibPadGainTracksBase other)
inline

Add histograms from other container.

Definition at line 78 of file CalibPadGainTracksBase.h.

◆ print()

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.

◆ resetHistos()

void CalibPadGainTracksBase::resetHistos ( )

resetting the histograms which are used for extraction of the gain map

Definition at line 134 of file CalibPadGainTracksBase.cxx.

◆ setGainMap() [1/2]

void o2::tpc::CalibPadGainTracksBase::setGainMap ( const CalPad gainmap)
inline

setting the gain map

Definition at line 192 of file CalibPadGainTracksBase.h.

◆ setGainMap() [2/2]

void CalibPadGainTracksBase::setGainMap ( const char inpFile,
const char mapName 
)

setting a gain map from a file

Parameters
inpFileinput file containing some caldet
mapNamename of the caldet

Definition at line 114 of file CalibPadGainTracksBase.cxx.

◆ setLogTransformQ()

bool o2::tpc::CalibPadGainTracksBase::setLogTransformQ ( const bool  logTransformQ)
inline

set if the cluster charge is transformed using log(1+Q)

Definition at line 207 of file CalibPadGainTracksBase.h.

◆ setNClMap()

void o2::tpc::CalibPadGainTracksBase::setNClMap ( const CalPad nclMap)
inline

setting number of clusters map

Definition at line 198 of file CalibPadGainTracksBase.h.

◆ setNormalizationType()

void o2::tpc::CalibPadGainTracksBase::setNormalizationType ( const NormType  type)
inline

set how the extracted gain map is normalized

Definition at line 201 of file CalibPadGainTracksBase.h.

◆ setRMSMap()

void o2::tpc::CalibPadGainTracksBase::setRMSMap ( const CalPad rmsMap)
inline

setting the RMS map

Definition at line 195 of file CalibPadGainTracksBase.h.


The documentation for this class was generated from the following files: