15#include <RtypesCore.h>
16#include <TAttMarker.h>
36 static Int_t
Color(Int_t colorIndex)
38 static const Int_t nofColors = 15;
39 static Int_t colors[nofColors] = {kRed, kBlue + 1, kGreen + 3, kMagenta + 4, kYellow + 2,
40 kViolet, kOrange - 5, kOrange + 3, kRed - 8, kPink + 9,
41 kBlue - 6, kCyan + 1, kGreen - 6, kYellow - 1, kGray + 1};
42 return (colorIndex < nofColors) ? colors[colorIndex] : colorIndex;
47 static Int_t
LineStyle(Int_t lineStyleIndex) {
return lineStyleIndex + 1; }
53 static const Int_t nofMarkers = 8;
54 static Int_t markers[nofMarkers] = {kOpenCircle, kOpenSquare, kOpenTriangleUp, kOpenDiamond,
55 kFullCircle, kFullSquare, kFullTriangleUp};
56 return (markerIndex < nofMarkers) ? markers[markerIndex] : markerIndex;
107 const std::string& drawOpt =
"COLZ");
125 HistScale logy =
kLinear, Bool_t drawLegend =
true, Double_t x1 = 0.25, Double_t y1 = 0.99,
126 Double_t x2 = 0.55, Double_t y2 = 0.75,
const std::string& drawOpt =
"");
159void DrawGraph(
const std::vector<TGraph*>& graphs,
const std::vector<std::string>& graphLabels,
161 Double_t y1 = 0.78, Double_t x2 = 0.99, Double_t y2 = 0.99);
173 const std::string& drawOpt =
"colz");
184void DrawTextOnPad(
const std::string& text, Double_t x1, Double_t y1, Double_t x2, Double_t y2);
196void DrawH1andFitGauss(TH1* hist, Bool_t drawResults =
true, Bool_t doScale =
true, Double_t userRangeMin = 0.,
197 Double_t userRangeMax = 0.);
210 const std::string& drawOpt =
"COLZ", Int_t profileColor = kBlack, Int_t profileLineWidth = 4);
221TH2D*
DrawH3Profile(TH3*
h, Bool_t drawMean =
true, Bool_t doGaussFit =
false, Double_t zUserRangeMin = 0.,
222 Double_t zUserRangeMax = 0.);
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 DrawH2(TH2 *hist, HistScale logx=kLinear, HistScale logy=kLinear, HistScale logz=kLinear, const std::string &drawOpt="COLZ")
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 SetDefaultDrawStyle()
void DrawGraph2D(TGraph2D *graph, 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)
void DrawTextOnPad(const std::string &text, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
HistScale
Define linear or logarithmic scale for drawing.
TH2D * DrawH3Profile(TH3 *h, Bool_t drawMean=true, Bool_t doGaussFit=false, Double_t zUserRangeMin=0., Double_t zUserRangeMax=0.)
void DrawH1andFitGauss(TH1 *hist, Bool_t drawResults=true, Bool_t doScale=true, Double_t userRangeMin=0., Double_t userRangeMax=0.)
Default options for drawing.
static Int_t MarkerSize()
static Double_t TextSize()
static Int_t LineStyle(Int_t lineStyleIndex)
static Int_t Color(Int_t colorIndex)
static Int_t MarkerStyle(Int_t markerIndex)
Data class with information on a STS local track.