CbmRoot
|
#include "CbmDrawHist.h"
#include "CbmUtils.h"
#include <TAxis.h>
#include <TF1.h>
#include <TGraph.h>
#include <TGraph2D.h>
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
#include <TLatex.h>
#include <TLegend.h>
#include <TStyle.h>
#include <TVirtualPad.h>
#include <algorithm>
#include <cassert>
#include <iostream>
#include <limits>
#include <string>
Go to the source code of this file.
Functions | |
void | SetDefaultDrawStyle () |
void | DrawH1 (TH1 *hist, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle) |
void | DrawH2 (TH2 *hist, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt) |
void | DrawH1 (const vector< TH1 * > &histos, const vector< string > &histLabels, HistScale logx, HistScale logy, Bool_t drawLegend, Double_t x1, Double_t y1, Double_t x2, Double_t y2, const string &drawOpt) |
void | DrawGraph (TGraph *graph, HistScale logx, HistScale logy, const string &drawOpt, Int_t color, Int_t lineWidth, Int_t lineStyle, Int_t markerSize, Int_t markerStyle) |
void | DrawGraph (const vector< TGraph * > &graphs, const vector< string > &graphLabels, HistScale logx, HistScale logy, Bool_t drawLegend, Double_t x1, Double_t y1, Double_t x2, Double_t y2) |
void | DrawGraph2D (TGraph2D *graph, HistScale logx, HistScale logy, HistScale logz, const string &drawOpt) |
void | DrawTextOnPad (const string &text, Double_t x1, Double_t y1, Double_t x2, Double_t y2) |
void | DrawH1andFitGauss (TH1 *hist, Bool_t drawResults, Bool_t doScale, Double_t userRangeMin, Double_t userRangeMax) |
void | DrawH2WithProfile (TH2 *hist, Bool_t doGaussFit, Bool_t drawOnlyMean, const string &drawOpt2D, Int_t profileColor, Int_t profileLineWidth) |
TH2D * | DrawH3Profile (TH3 *h, Bool_t drawMean, Bool_t doGaussFit, Double_t zMin, Double_t zMax) |
Definition in file CbmDrawHist.cxx.
void DrawGraph | ( | const vector< TGraph * > & | graphs, |
const vector< string > & | graphLabels, | ||
HistScale | logx, | ||
HistScale | logy, | ||
Bool_t | drawLegend, | ||
Double_t | x1, | ||
Double_t | y1, | ||
Double_t | x2, | ||
Double_t | y2 | ||
) |
Definition at line 186 of file CbmDrawHist.cxx.
References CbmDrawingOptions::Color(), DrawGraph(), CbmDrawingOptions::LineStyle(), CbmDrawingOptions::LineWidth(), CbmDrawingOptions::MarkerSize(), CbmDrawingOptions::MarkerStyle(), max(), and min().
void DrawGraph | ( | TGraph * | graph, |
HistScale | logx, | ||
HistScale | logy, | ||
const string & | drawOpt, | ||
Int_t | color, | ||
Int_t | lineWidth, | ||
Int_t | lineStyle, | ||
Int_t | markerSize, | ||
Int_t | markerStyle | ||
) |
Definition at line 151 of file CbmDrawHist.cxx.
References kLog, and CbmDrawingOptions::TextSize().
Referenced by CbmTrdElectronsTrainAnn::Draw(), CbmLitFieldQaReport::DrawFieldAlongZ(), DrawGraph(), CbmLitCheckEnergyLossMuons::DrawGraphs(), CbmLitTofQaReport::FitFunction(), and CbmLitTofQaReport::FitHistograms().
void DrawGraph2D | ( | TGraph2D * | graph, |
HistScale | logx, | ||
HistScale | logy, | ||
HistScale | logz, | ||
const string & | drawOpt | ||
) |
Definition at line 224 of file CbmDrawHist.cxx.
References kLog, and CbmDrawingOptions::TextSize().
Referenced by CbmLitFieldQaReport::DrawFieldSlices(), CbmRichDraw::DrawPmtGraph2D(), and CbmLitFieldApproximationQaReport::DrawSlices().
void DrawH1 | ( | const vector< TH1 * > & | histos, |
const vector< string > & | histLabels, | ||
HistScale | logx, | ||
HistScale | logy, | ||
Bool_t | drawLegend, | ||
Double_t | x1, | ||
Double_t | y1, | ||
Double_t | x2, | ||
Double_t | y2, | ||
const string & | drawOpt | ||
) |
Definition at line 115 of file CbmDrawHist.cxx.
References CbmDrawingOptions::Color(), DrawH1(), CbmDrawingOptions::LineStyle(), CbmDrawingOptions::LineWidth(), CbmDrawingOptions::MarkerSize(), CbmDrawingOptions::MarkerStyle(), max(), and min().
void DrawH1 | ( | TH1 * | hist, |
HistScale | logx, | ||
HistScale | logy, | ||
const string & | drawOpt, | ||
Int_t | color, | ||
Int_t | lineWidth, | ||
Int_t | lineStyle, | ||
Int_t | markerSize, | ||
Int_t | markerStyle | ||
) |
Definition at line 49 of file CbmDrawHist.cxx.
References kLog, and CbmDrawingOptions::TextSize().
Referenced by CbmAnaDielectronTaskDrawAll::CalcCutEffRange(), CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEventReport::Draw(), CbmAnaJpsiSuperEvent::Draw(), CbmTrdElectronsTrainAnn::Draw(), CbmRichTrainAnnSelect::Draw(), CbmRichTrainAnnElectrons::Draw(), CbmAnaDielectronTaskDraw::Draw1DCut(), CbmAnaDielectronTaskDraw::Draw1DHistoForEachAnalysisStep(), CbmAnaDielectronTaskDraw::Draw1DSourceTypes(), CbmAnaDielectronTaskDraw::Draw2DCut(), CbmLitTrackingQaReport::DrawAccAndRec(), CbmLitTrackingQaStudyReport::DrawAccAndRec(), CbmAnaJpsiReport::DrawAnalysisStepsH1(), CbmLitFieldApproximationQaReport::DrawApr(), CbmAnaDielectronStudyReportAll::DrawBgMinv(), CbmAnaLmvmDrawStudy::DrawBgSourceMinv(), CbmAnaLmvmDrawStudy::DrawBgSourcePairs(), CbmAnaLmvmDrawStudy::DrawBgSourcePairsStep(), CbmAnaDielectronTaskDraw::DrawBgSourcesVsMomentum(), CbmAnaLmvmDrawStudy::DrawBgSourceTracks(), CbmAnaDielectronTaskDraw::DrawBgSourceTracks(), CbmAnaJpsiSuperEventReport::DrawComparison(), CbmLitRadLengthQaReport::DrawDetector(), CbmAnaLmvmDrawStudy::DrawDistributions(), CbmLitTrackingQaReport::DrawEfficiency(), CbmLitTrackingQaStudyReport::DrawEfficiency(), CbmAnaDielectronTaskDraw::DrawElPiMomHis(), CbmLitFieldQaReport::DrawFieldRichPmtPlane(), CbmAnaDielectronTaskDraw::DrawGammaVertex(), DrawH1(), DrawH1andFitGauss(), DrawH2WithProfile(), CbmRichMCbmQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichRecoQa::DrawHist(), CbmPsdMCbmQaReal::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichPMTMapping::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichAlignment::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistAlignment(), CbmStsDigitizeQaReport::DrawHistograms(), CbmRichCorrectionVector::DrawHistProjection(), CbmLitTrackingQaReport::DrawHitsHistos(), CbmStsDigitizeQaReport::DrawLogHistograms(), CbmRichGeoTestOpt::DrawManyH1(), CbmAnaLmvmDrawStudy::DrawMinv(), CbmAnaDielectronTaskDrawAll::DrawMinv(), CbmAnaJpsiSuperEventReport::DrawMinvDiffPtBins(), CbmAnaJpsiReport::DrawMinvMismatches(), CbmAnaJpsiSuperEventReport::DrawMinvMismatchPt(), CbmAnaJpsiReport::DrawMinvSAndBg(), CbmAnaDielectronTaskDraw::DrawMinvSandBg(), CbmAnaJpsiSuperEventReport::DrawMinvSignalBg(), CbmAnaDielectronTaskDraw::DrawMinvSource(), CbmAnaDielectronTaskDraw::DrawMinvSourceAll(), CbmAnaDielectronTaskDraw::DrawMismatchesAndGhosts(), CbmAnaJpsiReport::DrawMomEffAllSteps(), CbmAnaDielectronTaskDraw::DrawMotherPdg(), CbmAnaLmvmDrawStudy::DrawNofBgTracks(), CbmStsDigitizeQaReport::DrawNofObjectsHistograms(), CbmLitClusteringQaReport::DrawNofObjectsHistograms(), CbmAnaJpsiSuperEventReport::DrawPairSource(), CbmAnaJpsiReport::DrawPairSourceAnaSteps(), CbmLitTrackingQaReport::DrawPionSuppression(), CbmAnaDielectronTaskDraw::DrawRapidityDistributionAll(), CbmLitFitQaReport::DrawResidualAndPullHistograms(), CbmLitClusteringQaReport::DrawResidualsAndPulls(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), CbmAnaDielectronStudyReportAll::DrawSBgMinv(), CbmAnaDielectronTaskDrawAll::DrawSBgSignals(), CbmAnaDielectronTaskDrawAll::DrawSBgVsMinv(), CbmAnaJpsiReport::DrawSignalMinv(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmAnaJpsiReport::DrawSourceTypesH1(), CbmRichRecoTbQa::DrawTimeLog(), CbmLitFitQaReport::DrawTrackMomentumAtVertex(), CbmLitFitQaReport::DrawTrackParams(), CbmLitFitQaStudyReport::DrawTrackParamsAtVertex(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmRichRonchiAna::Run(), CbmAnaDielectronTaskDrawAll::SBgRangeAll(), CbmAnaJpsiSuperEventReport::SignalOverBgAllSteps(), and CbmAnaJpsiReport::SignalOverBgAllSteps().
void DrawH1andFitGauss | ( | TH1 * | hist, |
Bool_t | drawResults, | ||
Bool_t | doScale, | ||
Double_t | userRangeMin, | ||
Double_t | userRangeMax | ||
) |
Definition at line 266 of file CbmDrawHist.cxx.
References DrawH1(), kLinear, and m.
Referenced by CbmRichMirrorSortingCorrection::DrawDistanceComp(), CbmRichGeoTest::DrawH2MeanRms(), CbmRichMCbmQa::DrawHist(), CbmRichUrqmdTest::DrawHist(), and CbmRichGeoTest::DrawHist().
Definition at line 84 of file CbmDrawHist.cxx.
References kLog, and CbmDrawingOptions::TextSize().
Referenced by CbmRichRonchiAna::DoDeviation(), CbmAnaJpsiReport::Draw(), CbmRichTrainAnnElectrons::Draw(), CbmAnaJpsiReport::Draw2DCut(), CbmAnaDielectronTaskDraw::Draw2DCut(), CbmStsDigitizeQaReport::Draw2dHistograms(), CbmAnaJpsiReport::DrawAnalysisStepsH2(), CbmAnaJpsiReport::DrawBgSource2D(), CbmAnaDielectronTaskDraw::DrawBgSource2D(), CbmLitRadLengthQaReport::DrawDetector(), CbmLitTrackingQaReport::DrawEfficiencyHistos(), CbmRichMCbmQa::DrawEvent(), CbmAnaDielectronTaskDraw::DrawGammaVertex(), CbmSimulationReport::DrawH2ByPattern(), DrawH2WithProfile(), DrawH3Profile(), CbmRichMCbmQa::DrawHist(), CbmPsdMCbmQaReal::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichMCbmAerogelAna::DrawHist(), CbmRichPMTMapping::DrawHist(), CbmRichMCbmQaRichOnly::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMCbmQaReal::DrawHist(), CbmRichAlignment::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistAlignment(), CbmRichCorrectionVector::DrawHistMapping(), CbmRichGeoTestOpt::DrawMeanEff2D(), CbmRichGeoTestOpt::DrawMeanRms2D(), CbmAnaDielectronTaskDrawAll::DrawMinvPt(), CbmAnaDielectronTaskDraw::DrawMinvPtAll(), CbmRichRonchiAna::DrawMirrorSegments(), CbmRichRonchiAna::DrawMirrorSegmentsSphere(), CbmRichRonchiAna::DrawMirrorSegmentsSphereAll(), CbmAnaJpsiReport::DrawMomMcVsRec(), CbmRichEventDisplay::DrawOneEvent(), CbmRichDraw::DrawPmtH2(), CbmAnaDielectronTaskDraw::DrawPmtXY(), CbmAnaDielectronTaskDraw::DrawPPAngleMCSignal(), CbmAnaDielectronTaskDraw::DrawPtYDistribution(), CbmAnaJpsiReport::DrawPtYEfficiency(), CbmAnaDielectronTaskDraw::DrawPtYEfficiency(), CbmLitFieldApproximationQaReport::DrawSlices(), CbmAnaDielectronTaskDraw::DrawSourcesBgPairsEpEm(), CbmLitFitQaReport::DrawTrackParamsAtVertex(), CbmRichRonchiAna::DrawXYMum(), CbmRichRonchiAna::DrawXZProjection(), CbmLitTrackingQaReport::DrawYPt(), CbmLitTofQaReport::FitHistograms(), and CbmRichRonchiAna::Run().
void DrawH2WithProfile | ( | TH2 * | hist, |
Bool_t | doGaussFit, | ||
Bool_t | drawOnlyMean, | ||
const string & | drawOpt2D, | ||
Int_t | profileColor, | ||
Int_t | profileLineWidth | ||
) |
Definition at line 296 of file CbmDrawHist.cxx.
References DrawH1(), DrawH2(), i, kLinear, and m.
Referenced by CbmRichGeoTest::DrawH2MeanRms(), CbmRichRecoQa::DrawHist(), CbmRichGeoTest::DrawHist(), CbmLitFitQaReport::DrawResidualAndPullHistograms(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), and CbmRichRecoQa::DrawRingTrackDistHistWithSuffix().
TH2D* DrawH3Profile | ( | TH3 * | h, |
Bool_t | drawMean, | ||
Bool_t | doGaussFit, | ||
Double_t | zMin, | ||
Double_t | zMax | ||
) |
Definition at line 369 of file CbmDrawHist.cxx.
References DrawH2(), x, and y.
Referenced by CbmRichRecoQa::DrawHist(), CbmRichGeoTest::DrawHist(), CbmRichMirrorSortingCorrection::DrawRingTrackDistance(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), and CbmRichRecoQa::DrawRingTrackDistHistWithSuffixPmtHalf().
void DrawTextOnPad | ( | const string & | text, |
Double_t | x1, | ||
Double_t | y1, | ||
Double_t | x2, | ||
Double_t | y2 | ||
) |
Definition at line 253 of file CbmDrawHist.cxx.
Referenced by CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEventReport::Draw(), CbmAnaJpsiSuperEvent::Draw(), CbmAnaJpsiReport::Draw2DCut(), CbmAnaDielectronTaskDraw::Draw2DCut(), CbmAnaJpsiReport::DrawAnalysisStepsH2(), CbmAnaDielectronTaskDraw::DrawBgSourcesVsMomentum(), CbmAnaJpsiSuperEventReport::DrawComparison(), CbmAnaJpsiReport::DrawEfficiency(), CbmRichUrqmdTest::DrawHist(), CbmRichGeoTestOpt::DrawMeanEff2D(), CbmRichGeoTestOpt::DrawMeanRms2D(), CbmAnaJpsiSuperEventReport::DrawMinvDiffPtBins(), CbmAnaJpsiReport::DrawMinvMismatches(), CbmAnaJpsiSuperEventReport::DrawMinvMismatchPt(), CbmAnaDielectronTaskDraw::DrawMinvPtAll(), CbmAnaJpsiReport::DrawMinvSAndBg(), CbmAnaDielectronTaskDraw::DrawMinvSandBg(), CbmAnaJpsiSuperEventReport::DrawMinvSignalBg(), CbmAnaDielectronTaskDraw::DrawMinvSource(), CbmAnaJpsiSuperEventReport::DrawPairSource(), CbmAnaJpsiReport::DrawPairSource(), CbmAnaDielectronTaskDraw::DrawPmtXY(), CbmAnaDielectronTaskDraw::DrawPtYDistribution(), CbmAnaJpsiReport::DrawPtYEfficiency(), CbmAnaDielectronTaskDraw::DrawPtYEfficiency(), CbmAnaDielectronTaskDraw::DrawRapidityDistributionAll(), CbmRichRecoQa::DrawRingTrackDistHistWithSuffix(), and CbmAnaDielectronTaskDraw::DrawSourcesBgPairsEpEm().
void SetDefaultDrawStyle | ( | ) |
Definition at line 33 of file CbmDrawHist.cxx.
Referenced by CbmRichEventDisplay::CbmRichEventDisplay(), CbmLitCheckEnergyLossMuons::Check(), CbmAnaDielectronStudyReportAll::Draw(), CbmAnaJpsiReport::Draw(), CbmAnaJpsiSuperEventReport::Draw(), CbmLitFieldQaReport::Draw(), CbmLitFieldApproximationQaReport::Draw(), CbmLitFitQaStudyReport::Draw(), CbmLitTrackingQaReport::Draw(), CbmLitTrackingQaStudyReport::Draw(), CbmRichGeoTestOpt::Draw(), CbmTrdElectronsTrainAnn::Draw(), CbmRichTrainAnnElectrons::Draw(), CbmAnaLmvmDrawStudy::DrawFromFile(), CbmRichMCbmQa::DrawHist(), CbmRichRecoTbQa::DrawHist(), CbmRichRecoQa::DrawHist(), CbmRichUrqmdTest::DrawHist(), CbmRichGeoTest::DrawHist(), CbmAnaDielectronTaskDraw::DrawHistFromFile(), CbmRichEventDisplay::Exec(), and CbmRichRonchiAna::Run().