CbmRoot
|
Helper functions for drawing 1D and 2D histograms and graphs. More...
#include <Rtypes.h>
#include <RtypesCore.h>
#include <TAttMarker.h>
#include <string>
#include <vector>
Go to the source code of this file.
Classes | |
class | CbmDrawingOptions |
Default options for drawing. More... | |
Enumerations | |
enum | HistScale { kLog = 0 , kLinear = 1 } |
Define linear or logarithmic scale for drawing. More... | |
Functions | |
void | SetDefaultDrawStyle () |
void | DrawH1 (TH1 *hist, HistScale logx=kLinear, HistScale logy=kLinear, const std::string &drawOpt="", Int_t color=CbmDrawingOptions::Color(0), Int_t lineWidth=CbmDrawingOptions::LineWidth(), Int_t lineStyle=CbmDrawingOptions::LineStyle(0), Int_t markerSize=CbmDrawingOptions::MarkerSize(), Int_t markerStyle=CbmDrawingOptions::MarkerStyle(0)) |
void | DrawH2 (TH2 *hist, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const std::string &drawOpt="COLZ") |
void | DrawH1 (const std::vector< TH1 * > &histos, const std::vector< std::string > &histLabels, HistScale logx=kLinear, HistScale logy=kLinear, Bool_t drawLegend=true, Double_t x1=0.25, Double_t y1=0.99, Double_t x2=0.55, Double_t y2=0.75, const std::string &drawOpt="") |
void | DrawGraph (TGraph *graph, HistScale logx=kLinear, HistScale logy=kLinear, const std::string &drawOpt="AC", Int_t color=CbmDrawingOptions::Color(0), Int_t lineWidth=CbmDrawingOptions::LineWidth(), Int_t lineStyle=CbmDrawingOptions::LineStyle(0), Int_t markerSize=CbmDrawingOptions::MarkerSize(), Int_t markerStyle=CbmDrawingOptions::MarkerStyle(0)) |
void | DrawGraph (const std::vector< TGraph * > &graphs, const std::vector< std::string > &graphLabels, HistScale logx=kLinear, HistScale logy=kLinear, Bool_t drawLegend=true, Double_t x1=0.50, Double_t y1=0.78, Double_t x2=0.99, Double_t y2=0.99) |
void | DrawGraph2D (TGraph2D *graph, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const std::string &drawOpt="colz") |
void | DrawTextOnPad (const std::string &text, Double_t x1, Double_t y1, Double_t x2, Double_t y2) |
void | DrawH1andFitGauss (TH1 *hist, Bool_t drawResults=true, Bool_t doScale=true, Double_t userRangeMin=0., Double_t userRangeMax=0.) |
void | DrawH2WithProfile (TH2 *hist, Bool_t doGaussFit=false, Bool_t drawOnlyMean=false, const std::string &drawOpt="COLZ", Int_t profileColor=kBlack, Int_t profileLineWidth=4) |
TH2D * | DrawH3Profile (TH3 *h, Bool_t drawMean=true, Bool_t doGaussFit=false, Double_t zUserRangeMin=0., Double_t zUserRangeMax=0.) |
Helper functions for drawing 1D and 2D histograms and graphs.
Definition in file CbmDrawHist.h.
enum HistScale |
Define linear or logarithmic scale for drawing.
Enumerator | |
---|---|
kLog | |
kLinear |
|
Definition at line 66 of file CbmDrawHist.h.
void DrawGraph | ( | const std::vector< TGraph * > & | graphs, |
const std::vector< std::string > & | graphLabels, | ||
HistScale | logx = kLinear, | ||
HistScale | logy = kLinear, | ||
Bool_t | drawLegend = true, | ||
Double_t | x1 = 0.50, | ||
Double_t | y1 = 0.78, | ||
Double_t | x2 = 0.99, | ||
Double_t | y2 = 0.99 ) |
void DrawGraph | ( | TGraph * | graph, |
HistScale | logx = kLinear, | ||
HistScale | logy = kLinear, | ||
const std::string & | drawOpt = "AC", | ||
Int_t | color = CbmDrawingOptions::Color(0), | ||
Int_t | lineWidth = CbmDrawingOptions::LineWidth(), | ||
Int_t | lineStyle = CbmDrawingOptions::LineStyle(0), | ||
Int_t | markerSize = CbmDrawingOptions::MarkerSize(), | ||
Int_t | markerStyle = CbmDrawingOptions::MarkerStyle(0) ) |
void DrawGraph2D | ( | TGraph2D * | graph, |
HistScale | logx = kLinear, | ||
HistScale | logy = kLinear, | ||
HistScale | logz = kLinear, | ||
const std::string & | drawOpt = "colz" ) |
void DrawH1 | ( | const std::vector< TH1 * > & | histos, |
const std::vector< std::string > & | histLabels, | ||
HistScale | logx = kLinear, | ||
HistScale | logy = kLinear, | ||
Bool_t | drawLegend = true, | ||
Double_t | x1 = 0.25, | ||
Double_t | y1 = 0.99, | ||
Double_t | x2 = 0.55, | ||
Double_t | y2 = 0.75, | ||
const std::string & | drawOpt = "" ) |
void DrawH1 | ( | TH1 * | hist, |
HistScale | logx = kLinear, | ||
HistScale | logy = kLinear, | ||
const std::string & | drawOpt = "", | ||
Int_t | color = CbmDrawingOptions::Color(0), | ||
Int_t | lineWidth = CbmDrawingOptions::LineWidth(), | ||
Int_t | lineStyle = CbmDrawingOptions::LineStyle(0), | ||
Int_t | markerSize = CbmDrawingOptions::MarkerSize(), | ||
Int_t | markerStyle = CbmDrawingOptions::MarkerStyle(0) ) |
void DrawH1andFitGauss | ( | TH1 * | hist, |
Bool_t | drawResults = true, | ||
Bool_t | doScale = true, | ||
Double_t | userRangeMin = 0., | ||
Double_t | userRangeMax = 0. ) |
Definition at line 222 of file CbmDrawHist.cxx.
References DrawH1(), kLinear, and Cbm::NumberToString().
Referenced by CbmRichMirrorSortingCorrection::DrawDistanceComp(), CbmRichGeoTest::DrawHist(), and CbmRichMCbmQa::DrawHist().
void DrawH2 | ( | TH2 * | hist, |
HistScale | logx = kLinear, | ||
HistScale | logy = kLinear, | ||
HistScale | logz = kLinear, | ||
const std::string & | drawOpt = "COLZ" ) |
void DrawH2WithProfile | ( | TH2 * | hist, |
Bool_t | doGaussFit = false, | ||
Bool_t | drawOnlyMean = false, | ||
const std::string & | drawOpt = "COLZ", | ||
Int_t | profileColor = kBlack, | ||
Int_t | profileLineWidth = 4 ) |
TH2D * DrawH3Profile | ( | TH3 * | h, |
Bool_t | drawMean = true, | ||
Bool_t | doGaussFit = false, | ||
Double_t | zUserRangeMin = 0., | ||
Double_t | zUserRangeMax = 0. ) |
Definition at line 297 of file CbmDrawHist.cxx.
References DrawH2(), x, and y.
Referenced by CbmRichGeoTest::DrawHist(), CbmRichRecoQa::DrawHist(), CbmRichRecoQa::DrawRingTrackDist(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), and CbmRichRecoQa::DrawRingTrackDistHistWithSuffixPmtHalf().
void DrawTextOnPad | ( | const std::string & | text, |
Double_t | x1, | ||
Double_t | y1, | ||
Double_t | x2, | ||
Double_t | y2 ) |
void SetDefaultDrawStyle | ( | ) |
Definition at line 37 of file CbmDrawHist.cxx.
Referenced by CbmLitCheckEnergyLossMuons::Check(), CbmAnaDielectronStudyReportAll::Draw(), CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEventReport::Draw(), CbmLitFieldApproximationQaReport::Draw(), CbmLitFieldQaReport::Draw(), CbmLitFitQaStudyReport::Draw(), CbmLitRadLengthQaReport::Draw(), CbmLitTrackingQaReport::Draw(), CbmLitTrackingQaStudyReport::Draw(), CbmRichGeoTestOpt::Draw(), CbmRichTrainAnnElectrons::Draw(), CbmTrdElectronsTrainAnn::Draw(), CbmAnaLmvmDrawStudy::DrawFromFile(), CbmRichGeoTest::DrawHist(), CbmRichMCbmQa::DrawHist(), CbmRichRecoQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichUrqmdTest::DrawHist(), LmvmDraw::DrawHistFromFile(), LmvmDrawAll::DrawHistFromFile(), CbmRichEventDisplay::Exec(), and CbmRichRonchiAna::Run().