|
ROOT
Reference Guide |
|
Go to the documentation of this file.
12 #ifndef ROOT_TRatioPlot
13 #define ROOT_TRatioPlot
257 virtual void SetGridlines(std::vector<double> gridlines);
@ kErrorFunc
Use the square root of the function value as the error.
void SetGraphDrawOpt(Option_t *opt)
Sets the drawing option for the lower graph.
Float_t fUpBottomMargin
Stores the bottom margin of the upper pad.
TAxis * GetUpperRefXaxis() const
Gets the x axis of the object returned by TRatioPlot::GetUpperRefObject.
Class to manage histogram axis.
Int_t fMode
Stores which calculation is supposed to be performed as specified by user option.
virtual void SetupPads()
Setup the pads.
void SetFitDrawOpt(Option_t *opt)
Sets the drawing option for the fit in the fit residual case.
@ kDifferenceSign
Calculate the difference divided by the error.
@ kForceHideUp
Always hide the first label of the upper y axis.
Using a TBrowser one can browse all ROOT objects.
@ kHideLow
Hide the last label of the lower y axis when there is low space.
void SetConfidenceIntervalColors(Color_t ci1=kGreen, Color_t ci2=kYellow)
Set the confidence interval colors.
TString fH1DrawOpt
Stores draw option for h1 given in constructor.
TGraphErrors * fConfidenceInterval2
Stores the graph for the 2 sigma band.
Float_t fUpTopMargin
Stores the top margin of the upper pad.
TGaxis * fUpperGXaxisMirror
Upper mirror of the x axis.
Bool_t fShowConfidenceIntervals
Stores whether to show the confidence interval bands. From Draw option.
virtual ~TRatioPlot()
Destructor.
TString fOption
Stores the option which is given in the constructor as a string.
void SetSeparationMargin(Float_t)
Sets the margin that separates the two pads.
The most important graphics class in the ROOT system.
virtual Bool_t SyncPadMargins()
Figures out which pad margin has deviated from the stored ones, to figure out what the new nominal is...
void UnZoomed()
Slot for the UnZoomed signal that was introduced to TAxis.
TPad * GetLowerPad() const
Color_t fCi1Color
Stores the color for the 1 sigma band.
TAxis * fSharedXAxis
X axis that stores the range for both plots.
void SetRightMargin(Float_t margin)
Sets the right margin of both pads.
The Histogram stack class.
void SetH2DrawOpt(Option_t *opt)
Sets the drawing option for h2.
virtual void Paint(Option_t *opt="")
Creates the visual axes when painting.
TGaxis * fUpperGYaxis
Upper graphical y axis.
Double_t fC2
Stores the scale factor for h2.
void ImportAxisAttributes(TGaxis *gaxis, TAxis *axis)
Internal method to import TAxis attributes to a TGaxis.
TGraphErrors * GetConfidenceInterval1() const
Returns the graph for the 1 sigma confidence interval in the fit residual case.
void SubPadResized()
Slot that handles common resizing of upper and lower pad.
Extends the ROOT::Fit::Result class with a TNamed inheritance providing easy possibility for I/O.
include TDocParser_001 C image html pict1_TDocParser_001 png width
virtual void Browse(TBrowser *b)
Browse.
void SetLowTopMargin(Float_t margin)
Sets the top margin of the lower pad.
Float_t fLeftMargin
Stores the common left margin of both pads.
Int_t fHideLabelMode
Stores which label to hide if the margin is to narrow, if at all.
Double_t fC1
Stores the scale factor for h1 (or THStack sum)
@ kHideUp
Hide the first label of the upper y axis when there is low space.
TRatioPlot()
TRatioPlot default constructor.
Float_t fRightMargin
Stores the common right margin of both pads.
virtual void Init(TH1 *h1, TH1 *h2, Option_t *option="")
Internal method that shares constructor logic.
Int_t BuildLowerPlot()
Build the lower plot according to which constructor was called, and which options were passed.
void SetUpTopMargin(Float_t margin)
Sets the top margin of the upper pad.
TAxis * GetYaxis() const
Get y axis of the graph.
void CreateGridline()
Create a grid line.
TH1 * fH1
Stores the primary histogram.
void SetPadMargins()
Sets the margins of all the pads to the value specified in class members.
TAxis * GetUpperRefYaxis() const
Gets the y axis of the object returned by TRatioPlot::GetUpperRefObject.
TGraphErrors * fConfidenceInterval1
Stores the graph for the 1 sigma band.
TGaxis * fLowerGYaxisMirror
Lower mirror of the y axis.
TGraph * GetCalculationOutputGraph() const
Get the output of the calculation in the form of a graph.
void SetUpBottomMargin(Float_t margin)
Sets the bottom margin of the upper pad.
Float_t fLowBottomMargin
Stores the bottom margin of the lower pad.
TObject * fHistDrawProxy
The object which is actually drawn, this might be TH1 or THStack.
TAxis * fUpYaxis
Clone of the upper y axis.
TAxis * GetXaxis() const
Get x axis of the graph.
TAxis * GetLowerRefYaxis() const
Shortcut for:
Bool_t fIsUpdating
Keeps track of whether its currently updating to reject other calls until done.
Provides an indirection to the TFitResult class and with a semantics identical to a TFitResult pointe...
TAxis * fLowYaxis
Clone of the lower y axis.
Color_t fCi2Color
Stores the color for the 2 sigma band.
TPad * GetUpperPad() const
@ kDivideHist
Use TH1::Divide to create the ratio.
virtual TGraph * GetLowerRefGraph() const
Returns the reference graph for the lower pad, which means the graph that is responsible for setting ...
void SetLowBottomMargin(Float_t margin)
Sets the bottom margin of the lower pad.
void SetInsetWidth(Double_t width)
Set the inset on the outer sides of all the pads.
virtual void Draw(Option_t *chopt="")
Draws the ratio plot to the currently active pad.
void SetSplitFraction(Float_t sf)
Set the fraction of the parent pad, at which the to sub pads should meet.
TFitResult * Get() const
Return contained pointer.
Bool_t fIsPadUpdating
Keeps track whether pads are updating during resizing.
virtual TObject * GetUpperRefObject() const
Return the reference object.
@ kFitResidual
Calculate the fit residual between the histogram and a fit stored within it.
void SetH1DrawOpt(Option_t *opt)
Sets the drawing option for h1.
@ kErrorSymmetric
Use the regular TH1::GetBinError as the error.
TPad * fTopPad
The Pad that drawn on top on the others to have consistent coordinates.
@ kErrorAsymmetric
Use TH1::GetBinErrorUp and TH1::GetBinErrorLow for the error, depending on y values.
Double_t fCl1
Stores the confidence level for the inner confidence interval band.
TString fGraphDrawOpt
Stores draw option for the lower plot graph given in constructor.
TGraph with asymmetric error bars.
TAxis * GetUpYaxis() const
TGaxis * fLowerGYaxis
Lower graphical y axis.
TPad * fUpperPad
The pad which contains the upper plot part.
TAxis * GetLowerRefXaxis() const
Shortcut for:
TGaxis * fLowerGXaxisMirror
Lower mirror of the x axis.
TString fFitDrawOpt
Stores draw option for the fit function in the fit residual case.
void SetFitResult(TFitResultPtr fitres)
Explicitly specify the fit result that is to be used for fit residual calculation.
Double_t fCl2
Stores the confidence level for the outer confidence interval band.
virtual void SetGridlines(Double_t *gridlines, Int_t numGridlines)
Set where horizontal, dashed lines are drawn on the lower pad.
A TGraph is an object made of two arrays X and Y with npoints each.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
TGraphErrors * GetConfidenceInterval2() const
Returns the graph for the 2 sigma confidence interval in the fit residual case.
A TGraphErrors is a TGraph with error bars.
Float_t GetSeparationMargin() const
Return the separation margin value.
Bool_t IsDrawn()
Check if ... is drawn.
void RangeAxisChanged()
Slot that receives the RangeAxisChanged signal from any of the pads and reacts correspondingly.
@ kNoHide
Do not hide labels when there is low space.
TH1 * fH2
Stores the secondary histogram, if there is one.
TVirtualPad * fParentPad
Stores the pad the ratio plot was created in.
TGaxis * fUpperGYaxisMirror
Upper mirror of the y axis.
@ kDivideGraph
Use TGraphAsymmErrors::Divide to create the ratio.
Class for displaying ratios, differences and fit residuals.
Mother of all ROOT objects.
#define ClassDef(name, id)
TH1 is the base class of all histogram classes in ROOT.
TRatioPlot(const TRatioPlot &)=delete
@ kDifference
Calculate the difference between the histograms.
TGraph * fRatioGraph
Stores the lower plot's graph.
TRatioPlot & operator=(const TRatioPlot &)=delete
Bool_t fShowGridlines
Stores whether to show the gridlines at all.
Float_t fSplitFraction
Stores the fraction at which the upper and lower pads meet.
TGaxis * fUpperGXaxis
Upper graphical x axis.
Float_t fLowTopMargin
Stores the top margin of the lower pad.
void SetConfidenceLevels(Double_t cl1, Double_t cl2)
Sets the confidence levels used to calculate the bands in the fit residual case.
void SetLeftMargin(Float_t margin)
Sets the left margin of both pads.
TAxis * GetLowYaxis() const
virtual void CreateVisualAxes()
(Re-)Creates the TGAxis objects that are used for consistent display of the axes.
virtual void SyncAxesRanges()
Syncs the axes ranges from the shared ones to the actual ones.
@ kForceHideLow
Always hide the last label of the lower y axis.
std::vector< TLine * > fGridlines
Keeps TLine objects for the gridlines.
TGaxis * fLowerGXaxis
Lower graphical x axis.
TString fH2DrawOpt
Stores draw option for h2 given in constructor.
TFitResult * fFitResult
Stores the explicit fit result given in the fit residual case. Can be 0.
TPad * fLowerPad
The pad which contains the calculated lower plot part.
Int_t fErrorMode
Stores the error mode, sym, asym or func.
std::vector< double > fGridlinePositions
Stores the y positions for the gridlines.