Project
Loading...
Searching...
No Matches
o2::tpc::painter Struct Reference

#include <Painter.h>

Classes

struct  PadCoordinates
 pad corner coordinates More...
 

Public Types

enum class  Type : int { Pad , Stack , FEC }
 

Static Public Member Functions

static std::vector< PadCoordinatesgetPadCoordinatesSector ()
 create a vector of pad corner coordinate for one full sector
 
static std::vector< PadCoordinatesgetStackCoordinatesSector ()
 create a vector of stack corner coordinate for one full sector
 
static std::vector< PadCoordinatesgetFECCoordinatesSector ()
 create a vector of FEC corner coordinates for one full sector
 
static std::vector< o2::tpc::painter::PadCoordinatesgetCoordinates (const Type type)
 
static std::vector< double > getRowBinningCM (uint32_t roc=72)
 
static std::string getROCTitle (const int rocNumber)
 ROC title from ROC number.
 
template<class T >
static TCanvas * draw (const CalDet< T > &calDet, int nbins1D=300, float xMin1D=0, float xMax1D=0, TCanvas *outputCanvas=nullptr)
 
template<class T >
static TCanvas * draw (const CalArray< T > &calArray)
 
template<class T >
static void fillHistogram2D (TH2 &h2D, const CalDet< T > &calDet, Side side)
 
template<class T >
static void fillHistogram2D (TH2 &h2D, const CalArray< T > &calArray)
 
template<class T >
static TH2 * getHistogram2D (const CalDet< T > &calDet, Side side)
 
template<class T >
static TH2 * getHistogram2D (const CalArray< T > &calArray)
 
static TH2Poly * makeSectorHist (const std::string_view name="hSector", const std::string_view title="Sector;local #it{x} (cm);local #it{y} (cm)", const float xMin=83.65f, const float xMax=247.7f, const float yMin=-43.7f, const float yMax=43.7f, const Type type=Type::Pad)
 
static TH2Poly * makeSideHist (Side side, const Type type=Type::Pad)
 
template<class T >
static void fillPoly2D (TH2Poly &h2D, const CalDet< T > &calDet, Side side)
 
template<class T >
static std::vector< TCanvas * > makeSummaryCanvases (const CalDet< T > &calDet, int nbins1D=300, float xMin1D=0, float xMax1D=0, bool onlyFilled=true, std::vector< TCanvas * > *outputCanvases=nullptr)
 
static std::vector< TCanvas * > makeSummaryCanvases (const std::string_view fileName, const std::string_view calPadNames, int nbins1D=300, float xMin1D=0, float xMax1D=0, bool onlyFilled=true)
 
static std::vector< TCanvas * > makeSummaryCanvases (TTree &tree, const std::string_view draw, std::string_view cut="1", int nbins1D=300, float xMin1D=0, float xMax1D=0)
 
static void drawSectorsXY (Side side, int sectorLineColor=920, int sectorTextColor=1)
 draw sector boundaris, side name and sector numbers
 
static void drawSectorLocalPadNumberPoly (short padTextColor=kBlack, float lineScalePS=1)
 
static void drawSectorInformationPoly (short regionLineColor=kRed, short rowTextColor=kRed)
 
template<typename DataT >
static TH3F convertCalDetToTH3 (const std::vector< CalDet< DataT > > &calDet, const bool norm=true, const int nRBins=150, const float rMin=83.5, const float rMax=254.5, const int nPhiBins=720, const float zMax=1)
 
static std::vector< TCanvas * > makeSummaryCanvases (const LtrCalibData &ltr, std::vector< TCanvas * > *outputCanvases=nullptr)
 make summary canvases for laser calibration data
 
static TCanvas * makeJunkDetectionCanvas (const TObjArray *data, TCanvas *outputCanvas=nullptr)
 make a canvas for junk detection data
 
static void adjustPalette (TH1 *h, float x2ndc, float tickLength=0.015)
 
static TMultiGraph * makeMultiGraph (TTree &tree, std::string_view varX, std::string_view varsY, std::string_view errVarsY="", std::string_view cut="", bool makeSparse=true)
 

Static Public Attributes

static std::array< int, 6 > colors
 
static std::array< int, 10 > markers
 

Detailed Description

Definition at line 51 of file Painter.h.

Member Enumeration Documentation

◆ Type

enum class o2::tpc::painter::Type : int
strong
Enumerator
Pad 

drawing pads

Stack 

drawing stacks

FEC 

drawing of FECs

Definition at line 53 of file Painter.h.

Member Function Documentation

◆ adjustPalette()

static void o2::tpc::painter::adjustPalette ( TH1 *  h,
float  x2ndc,
float  tickLength = 0.015 
)
static

Adjust the X2 position and the tick length of the color axis

Parameters
hhistogram to get z axis
x2ndcnew x2 value of color axis in NDC
tickLengthtick length of the color axis

◆ convertCalDetToTH3()

template<typename DataT >
static TH3F o2::tpc::painter::convertCalDetToTH3 ( const std::vector< CalDet< DataT > > &  calDet,
const bool  norm = true,
const int  nRBins = 150,
const float  rMin = 83.5,
const float  rMax = 254.5,
const int  nPhiBins = 720,
const float  zMax = 1 
)
static

convert std::vector<CalDet> objects (pad granularity) to a 3D-histogram with rxphixz binning. Each CalDet will be filled in a unique slice in the histogram

Parameters
calDetinput objects which will be converted to a 3D histogram
normwhether to normalize the histogram (weighted mean) or to just integrate the values of the CalDet
nRBinsnumber of bins in r direction of the output histogram
rMinmin r value of the output histogram
rMaxmax r value of the output histogram
nPhiBinsnumber of bins in phi direction of the output histogram
zMaxz range of the output histogram (-zMax to zMax)

◆ draw() [1/2]

template<class T >
static TCanvas * o2::tpc::painter::draw ( const CalArray< T > &  calArray)
static

Drawing of a CalDet object

Parameters
CalArrayobject to draw
Returns
TCanvas containing CalArray content

◆ draw() [2/2]

template<class T >
static TCanvas * o2::tpc::painter::draw ( const CalDet< T > &  calDet,
int  nbins1D = 300,
float  xMin1D = 0,
float  xMax1D = 0,
TCanvas *  outputCanvas = nullptr 
)
static

Drawing of a CalDet object

Parameters
CalDetobject to draw
Returns
TCanvas containing CalDet content

◆ drawSectorInformationPoly()

static void o2::tpc::painter::drawSectorInformationPoly ( short  regionLineColor = kRed,
short  rowTextColor = kRed 
)
static

draw information of the sector: pad row in region, global pad row, lines for separating the regions

Parameters
regionLineColorcolor of the line which is drawn at the start of a sector
rowTextColorcolor of the text which is drawn

◆ drawSectorLocalPadNumberPoly()

static void o2::tpc::painter::drawSectorLocalPadNumberPoly ( short  padTextColor = kBlack,
float  lineScalePS = 1 
)
static

draw information of the sector: pad number in row

Parameters
padTextColortext color of pad number
lineScalePSsetting the width of the lines of the pads which are drawn

◆ drawSectorsXY()

static void o2::tpc::painter::drawSectorsXY ( Side  side,
int  sectorLineColor = 920,
int  sectorTextColor = 1 
)
static

draw sector boundaris, side name and sector numbers

◆ fillHistogram2D() [1/2]

template<class T >
static void o2::tpc::painter::fillHistogram2D ( TH2 &  h2D,
const CalArray< T > &  calArray 
)
static

fill existing 2D histogram for CalArray object

Parameters
h2Dhistogram to fill
CalArrayobject with data

◆ fillHistogram2D() [2/2]

template<class T >
static void o2::tpc::painter::fillHistogram2D ( TH2 &  h2D,
const CalDet< T > &  calDet,
Side  side 
)
static

fill existing 2D histogram for CalDet object

Parameters
h2Dhistogram to fill
CalDetobject with data
sideside which to get the histogram for

◆ fillPoly2D()

template<class T >
static void o2::tpc::painter::fillPoly2D ( TH2Poly &  h2D,
const CalDet< T > &  calDet,
Side  side 
)
static

fill existing TH2Poly histogram for CalDet object

Parameters
h2Dhistogram to fill
CalDetobject with data
sideside which to get the histogram for

◆ getCoordinates()

static std::vector< o2::tpc::painter::PadCoordinates > o2::tpc::painter::getCoordinates ( const Type  type)
static
Returns
returns coordinates for given type

◆ getFECCoordinatesSector()

static std::vector< PadCoordinates > o2::tpc::painter::getFECCoordinatesSector ( )
static

create a vector of FEC corner coordinates for one full sector

◆ getHistogram2D() [1/2]

template<class T >
static TH2 * o2::tpc::painter::getHistogram2D ( const CalArray< T > &  calArray)
static

get 2D histogram for CalArray object

Parameters
CalDetobject with data
sideside which to get the histogram for
Returns
2D histogram with data

◆ getHistogram2D() [2/2]

template<class T >
static TH2 * o2::tpc::painter::getHistogram2D ( const CalDet< T > &  calDet,
Side  side 
)
static

get 2D histogram for CalDet object

Parameters
CalDetobject with data
sideside which to get the histogram for
Returns
2D histogram with data

◆ getPadCoordinatesSector()

static std::vector< PadCoordinates > o2::tpc::painter::getPadCoordinatesSector ( )
static

create a vector of pad corner coordinate for one full sector

◆ getROCTitle()

static std::string o2::tpc::painter::getROCTitle ( const int  rocNumber)
static

ROC title from ROC number.

◆ getRowBinningCM()

static std::vector< double > o2::tpc::painter::getRowBinningCM ( uint32_t  roc = 72)
static

binning vector with radial pad-row positions (in cm)

Parameters
rocroc number (0-35 IROC, 36-71 OROC, >=72 full sector)

◆ getStackCoordinatesSector()

static std::vector< PadCoordinates > o2::tpc::painter::getStackCoordinatesSector ( )
static

create a vector of stack corner coordinate for one full sector

◆ makeJunkDetectionCanvas()

static TCanvas * o2::tpc::painter::makeJunkDetectionCanvas ( const TObjArray *  data,
TCanvas *  outputCanvas = nullptr 
)
static

make a canvas for junk detection data

◆ makeMultiGraph()

static TMultiGraph * o2::tpc::painter::makeMultiGraph ( TTree &  tree,
std::string_view  varX,
std::string_view  varsY,
std::string_view  errVarsY = "",
std::string_view  cut = "",
bool  makeSparse = true 
)
static

Make a multi graph with sparse option

Produce a multi graph from a tree, where varX is a common x variable, e.g. a run number. TTree::Draw is used to fill the variables, so all expressions supported can be used. As in TTree::Draw, varsY have to be seperated by a ':'. For each variable a Graph will be created. Optionally one can give 'errVarsY', which must have the same number of entries as 'varsY'. In case the 'sparse' option is set (default), the x-axis will have as many bins as varX has entries. The bins will be labelled accordingly. Colors and marker are assigned automatically using the ones defined in 'colors' and 'markers'

Parameters
treethe input tree to use
varXthe x variable to create the sparse binning from
varsYthe y variable for ech of which to create a graph, separated by ':'
errVarsYthe y variable errors, separated by ':', same number of variables as in varsY required
cutscut string to be used in the TTree::Draw
makeSparsemake a sparse graph (default)

◆ makeSectorHist()

static TH2Poly * o2::tpc::painter::makeSectorHist ( const std::string_view  name = "hSector",
const std::string_view  title = "Sector;local #it{x} (cm);local #it{y} (cm)",
const float  xMin = 83.65f,
const float  xMax = 247.7f,
const float  yMin = -43.7f,
const float  yMax = 43.7f,
const Type  type = Type::Pad 
)
static

make a sector-wise histogram with correct pad corners

Parameters
xMinminimum x coordinate of the histogram
xMaxmaximum x coordinate of the histogram
yMinminimum y coordinate of the histogram
yMaxmaximum y coordinate of the histogram
typegranularity of the histogram (per pad or per stack)

◆ makeSideHist()

static TH2Poly * o2::tpc::painter::makeSideHist ( Side  side,
const Type  type = Type::Pad 
)
static

make a side-wise histogram with correct pad corners

Parameters
typegranularity of the histogram (per pad or per stack)

◆ makeSummaryCanvases() [1/4]

template<class T >
static std::vector< TCanvas * > o2::tpc::painter::makeSummaryCanvases ( const CalDet< T > &  calDet,
int  nbins1D = 300,
float  xMin1D = 0,
float  xMax1D = 0,
bool  onlyFilled = true,
std::vector< TCanvas * > *  outputCanvases = nullptr 
)
static

Create summary canvases for a CalDet object

1 Canvas with 2D and 1D distributions for each side 1 Canvas with 2D distributions for all ROCs 1 Canvas with 1D distributions for all ROCs

Parameters
CalDetobject to draw
nbins1Dnumber of bins used for the 1D projections
xMin1Dminimum value for 1D distribution (xMin = 0 and xMax = 0 for auto scaling)
xMax1Dmaximum value for 1D distribution (xMin = 0 and xMax = 0 for auto scaling)
outputCanvasesif outputCanvases are given, use them instead of creating new ones, 3 are required
Returns
TCanvas containing CalDet content

◆ makeSummaryCanvases() [2/4]

static std::vector< TCanvas * > o2::tpc::painter::makeSummaryCanvases ( const LtrCalibData ltr,
std::vector< TCanvas * > *  outputCanvases = nullptr 
)
static

make summary canvases for laser calibration data

◆ makeSummaryCanvases() [3/4]

static std::vector< TCanvas * > o2::tpc::painter::makeSummaryCanvases ( const std::string_view  fileName,
const std::string_view  calPadNames,
int  nbins1D = 300,
float  xMin1D = 0,
float  xMax1D = 0,
bool  onlyFilled = true 
)
static

Create summary canvases for a CalDet object

1 Canvas with 2D and 1D distributions for each side 1 Canvas with 2D distributions for all ROCs 1 Canvas with 1D distributions for all ROCs

Parameters
CalDetobject to draw
nbins1Dnumber of bins used for the 1D projections
xMin1Dminimum value for 1D distribution (xMin = 0 and xMax = 0 for auto scaling)
xMax1Dmaximum value for 1D distribution (xMin = 0 and xMax = 0 for auto scaling)
fileNameinput file name
calPadNamescomma separated list of names of the CalPad objects as stored in the file.
Returns
TCanvas containing CalDet content

◆ makeSummaryCanvases() [4/4]

std::vector< TCanvas * > o2::tpc::painter::makeSummaryCanvases ( TTree &  tree,
const std::string_view  draw,
std::string_view  cut = "1",
int  nbins1D = 300,
float  xMin1D = 0,
float  xMax1D = 0 
)
static

Create summary canvases from pad calibration tree dumped via CalibTreeDump

1 Canvas with 2D and 1D distributions for each side 1 Canvas with 2D distributions for all ROCs 1 Canvas with 1D distributions for all ROCs

Parameters
treeinput calibTree
drawdraw string to use for the variable (1D)
cutcut string to use (default 1 = no cut)
nbins1Dnumber of bins used for the 1D projections, if negative, exclude per ROC histograms
xMin1Dminimum value for 1D distribution (xMin = 0 and xMax = 0 for auto scaling)
xMax1Dmaximum value for 1D distribution (xMin = 0 and xMax = 0 for auto scaling)
Returns
TCanvas containing CalDet content

Definition at line 631 of file Painter.cxx.

Member Data Documentation

◆ colors

std::array<int, 6> o2::tpc::painter::colors
static

Definition at line 59 of file Painter.h.

◆ markers

std::array<int, 10> o2::tpc::painter::markers
static

Definition at line 60 of file Painter.h.


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