PlottI
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
SingleRatioPlot Class Reference

Class for a rectangle plot with the distributions in the upper pad and the ratios in the lower pad. More...

#include <PlotDerived.h>

Inheritance diagram for SingleRatioPlot:
RatioPlot Plot

Specifications

Class for a rectangle plot with the distributions in the upper pad and the ratios in the lower pad.

Ratio.png
Example of a SingleRatioPlot

Default measures:

Public Member Functions

 SingleRatioPlot (TObjArray *mainArray, TObjArray *ratioArray, TString xTitle, TString yTitle, TString ratioTitle)
 Constructor.
 
void Draw (TString outname)
 
void SetPadFraction (Double_t frac)
 
void SetCanvasOffsets (Float_t xOffset, Float_t yOffset, Float_t rOffset=0)
 
void SetOffset (Int_t off, Int_t roff)
 
virtual void SetRanges (Float_t xLow, Float_t xUp, Float_t yLow, Float_t yUp, Float_t rLow, Float_t rUp)
 
virtual void SetOptions (std::string optns, std::string postns)
 
- Public Member Functions inherited from RatioPlot
 RatioPlot (TObjArray *rArray, TString xTitle, TString yTitle)
 Constructor.
 
void Draw (TString outname)
 
void DrawRatioArray (TObjArray *array, Int_t off, Int_t offOpt=0)
 
void SetUpperOneLimit (Double_t up)
 
void ToggleOne ()
 Toggle wether TLine indicating ratio = 1, will be drawn.
 
- Public Member Functions inherited from Plot
 Plot (TString xTitle, TString yTitle)
 Abstract constructor.
 
void Draw ()
 Abstract template for function.
 
void SetProperties (TObject *obj, Int_t index)
 
void SetCanvasDimensions (Float_t cWidth, Float_t cHeight)
 
void SetCanvasMargins (Float_t rMargin, Float_t lMargin, Float_t tMargin, Float_t bMargin)
 
void SetCanvasOffsets (Float_t xOffset, Float_t yOffset)
 
void SetLog (Bool_t xLog=kFALSE, Bool_t yLog=kTRUE)
 
void SetRanges (Float_t xLow, Float_t xUp, Float_t yLow, Float_t yUp)
 
void SetOffset (Int_t off)
 
void SetMode (Mode m)
 
void SetStyle (std::vector< Color_t > col, std::vector< Style_t > mark, std::vector< Size_t > siz={}, std::vector< Style_t > lstyl={}, std::vector< Size_t > lwid={})
 
void ToggleStyle ()
 Toggle wether style arrays are used. Note that SetStyles will automatically set this to on.
 
void SetPalette (Int_t pal, Bool_t invert=kFALSE)
 
void SetPalette (ColorGradient &pal, Bool_t invert=kFALSE)
 
void SetOptions (TString opt)
 
void SetOptions (std::vector< std::string > optns)
 
virtual void SetOptions (std::string optns, std::string postns, Int_t off=0)
 
void SetOption (std::string opt, Int_t pos)
 

Additional Inherited Members

- Public Types inherited from Plot
enum  Mode : unsigned int { Presentation, Thesis, Auto }
 Enumerator for choice of Mode, determining font size and style. More...
 
- Static Public Member Functions inherited from Plot
template<class PO >
static void SetLineProperties (PO *pobj, Color_t color, Style_t lstyle, Size_t lwid=2.)
 
template<class PO >
static void SetMarkerProperties (PO *pobj, Color_t color, Style_t mstyle, Size_t msize=3.)
 
template<class PO >
static void SetPlottjectProperties (PO *pobj, Color_t color, Style_t mstyle, Size_t msize=3., Style_t lstyle=1, Size_t lwid=2., std::string title="")
 
- Protected Member Functions inherited from Plot
void EnsureAxes (TObject *first, std::string arrayName="")
 
template<class AO >
void SetCanvasStyle (AO *first, Float_t xOff, Float_t yOff)
 
template<class AO >
void SetPadStyle (AO *first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow)
 
template<class AO >
void SetRangesAuto (AO *first)
 
template<class AO >
void SuppressXaxis (AO *first)
 
template<class AO >
void SuppressYaxis (AO *first)
 
void SetUpStyle (TObject *first, TString xTitle, TString yTitle, Float_t xUp, Float_t xLow, Float_t yUp, Float_t yLow, Float_t xOff, Float_t yOff)
 
void SetUpPad (TPad *pad, Bool_t xLog, Bool_t yLog)
 
void DrawArray (TObjArray *array, Int_t off=0, Int_t offOpt=0)
 
- Protected Attributes inherited from RatioPlot
TObjArray * plotArray
 Array containing all objects to be plotted.
 
TLine * one {nullptr}
 Horizontal TLine which will be included to every ratio at height 1.
 
Double_t oneUp {0}
 Upper bound on x-Range for TLine one.
 
Bool_t drawone {kTRUE}
 Variable indicating wether TLine one will be drawn.
 
- Protected Attributes inherited from Plot
TPad * mainPad {nullptr}
 Main pad.
 
TCanvas * canvas {nullptr}
 Main canvas.
 
std::vector< std::string > options
 Drawing options.
 
TString titleX
 Title of X-axis.
 
TString titleY
 Title of Y-axis.
 
Float_t width {0}
 Width of canvas.
 
Float_t height {0}
 Height of canvas.
 
Float_t offsetX {0}
 Offset of X title.
 
Float_t offsetY {0}
 Offset of Y title.
 
Float_t rightMargin {0}
 Right margin of (main) pad.
 
Float_t leftMargin {0}
 Left margin of (main) pad.
 
Float_t topMargin {0}
 Top margin of (main) pad.
 
Float_t bottomMargin {0}
 Bottom margin of (main) pad.
 
Bool_t logX {kFALSE}
 Should X-axis be logarithmic?
 
Bool_t logY {kFALSE}
 Should Y-axis be logarithmic?
 
Float_t yRangeLow {0}
 Lower Y-axis range.
 
Float_t yRangeUp {100}
 Upper Y-axis range.
 
Float_t xRangeLow {0}
 Lower X-axis range.
 
Float_t xRangeUp {100}
 Upper X-axis range.
 
Bool_t ranges {kFALSE}
 Were ranges set manually?
 
Bool_t broken {kFALSE}
 Did any fatal error occur?
 
- Static Protected Attributes inherited from Plot
static Int_t palette {109}
 Color Palette.
 
static Bool_t inversion {kFALSE}
 Should palette be inverted?
 
static Bool_t inverted {kFALSE}
 Is palette currently inverted?
 
static std::vector< Int_t > palColors
 Color vector of personalised palette.
 
static std::vector< Color_t > colors
 Object colors.
 
static std::vector< Style_t > markers
 Object marker style.
 
static std::vector< Style_t > lstyles
 Object line style.
 
static std::vector< Size_t > sizes
 Object marker size.
 
static std::vector< Size_t > lwidths
 Object line width.
 
static Bool_t styles {kFALSE}
 Were styles set manually?
 
static Style_t font {43}
 Font style.
 
static Style_t label {28}
 Label size.
 
static Int_t mOffset {0}
 Offset for style array index.
 

Member Function Documentation

void SingleRatioPlot::Draw ( TString  outname)

Main function for Drawing

void SingleRatioPlot::SetCanvasOffsets ( Float_t  xOffset,
Float_t  yOffset,
Float_t  rOffset = 0 
)

Set the Title Offsets

void SingleRatioPlot::SetOffset ( Int_t  off,
Int_t  roff 
)
Sets the offset of the ratio style properties,

namely where the ratio markers are in the marker, color and size arrays

void SingleRatioPlot::SetOptions ( std::string  optns,
std::string  postns 
)
virtual

Set the plot options for a few specific plottjects, mind that any legend or pave object is also included in the options ; will seperate different arrays

void SingleRatioPlot::SetPadFraction ( Double_t  frac)

Sets Fraction of the Pad taken by the Ratio

void SingleRatioPlot::SetRanges ( Float_t  xLow,
Float_t  xUp,
Float_t  yLow,
Float_t  yUp,
Float_t  rLow,
Float_t  rUp 
)
virtual

Sets the Ranges for the Pads


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