Logo ROOT   6.12/07
Reference Guide
HypoTestInverterPlot.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id$
2 // Author: Kyle Cranmer, Lorenzo Moneta, Gregory Schott, Wouter Verkerke
3 /*************************************************************************
4  * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers. *
5  * All rights reserved. *
6  * *
7  * For the licensing terms see $ROOTSYS/LICENSE. *
8  * For the list of contributors see $ROOTSYS/README/CREDITS. *
9  *************************************************************************/
10 
11 #ifndef ROOSTATS_HypoTestInverterPlot
12 #define ROOSTATS_HypoTestInverterPlot
13 
14 #include "TNamed.h"
15 
16 class TGraphErrors;
17 class TMultiGraph;
18 
19 
20 namespace RooStats {
21 
22  class HypoTestInverterResult;
23  class SamplingDistPlot;
24 
25 
26  class HypoTestInverterPlot : public TNamed {
27 
28  public:
29 
30  // constructor
32 
33  HypoTestInverterPlot( const char* name,
34  const char* title,
35  HypoTestInverterResult* results ) ;
36 
37  /// return a TGraphErrors with the obtained observed p-values
38  /// resultinf from the scan
39  /// By default (Option = "") return CLs or CLsb depending if the flag UseCLs is set
40  /// If Option = "CLb" return CLb plot
41  /// = "CLs+b" return CLs+b plot independently of the flag
42  /// = "CLs" return CLs plot independently of the flag
43  TGraphErrors* MakePlot(Option_t *opt="") ;
44 
45  /// Make the expected plot and the bands
46  /// nsig1 and nsig2 indicates the n-sigma value for the bands
47  /// if nsig1 = 0 no band is computed (only expected value)
48  /// if nsig2 > nsig1 (default is nsig1=1 and nsig2=2) the second band is also done.
49  /// The first band is drawn in green while the second in yellow
50  /// The plot (expected value + bands) is returned as a TMultiGraph object
51  TMultiGraph* MakeExpectedPlot(double sig1=1, double sig2=2) ;
52 
53  /// Plot the test statistic distributions
54  /// type =0 null and alt
55  /// type = 1 only null (S+B)
56  /// type = 2 only alt (B)
57  SamplingDistPlot * MakeTestStatPlot(int index, int type=0, int nbins = 100);
58 
59 
60  /// Draw the scan result in the current canvas
61  /// Possible options:
62  /// "" (default): draw observed + expected with 1 and 2 sigma bands
63  /// SAME : draw in the current axis
64  /// OBS : draw only the observed plot
65  /// EXP : draw only the expected plot
66  /// CLB : draw also CLb
67  /// 2CL : drow both CLs+b and CLs
68  void Draw(Option_t *opt="");
69 
70  /// destructor
72 
73  private:
74 
76 
77  protected:
78 
79  ClassDef(HypoTestInverterPlot,1) // HypoTestInverterPlot class
80 
81  };
82 }
83 
84 #endif
const char Option_t
Definition: RtypesCore.h:62
A TMultiGraph is a collection of TGraph (or derived) objects.
Definition: TMultiGraph.h:35
TMultiGraph * MakeExpectedPlot(double sig1=1, double sig2=2)
Make the expected plot and the bands nsig1 and nsig2 indicates the n-sigma value for the bands if nsi...
HypoTestInverterPlot(HypoTestInverterResult *results)
constructor from a HypoTestInverterResult class name and title are taken from the result class ...
HypoTestInverterResult * fResults
#define ClassDef(name, id)
Definition: Rtypes.h:320
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
SamplingDistPlot * MakeTestStatPlot(int index, int type=0, int nbins=100)
Plot the test statistic distributions type =0 null and alt type = 1 only null (S+B) type = 2 only alt...
TGraphErrors * MakePlot(Option_t *opt="")
return a TGraphErrors with the obtained observed p-values resultinf from the scan By default (Option ...
Namespace for the RooStats classes.
Definition: Asimov.h:20
HypoTestInverterResult class holds the array of hypothesis test results and compute a confidence inte...
Class to plot an HypoTestInverterResult, result of the HypoTestInverter calculator.
int type
Definition: TGX11.cxx:120
This class provides simple and straightforward utilities to plot SamplingDistribution objects...
void Draw(Option_t *opt="")
Draw the scan result in the current canvas Possible options: "" (default): draw observed + expected w...
A TGraphErrors is a TGraph with error bars.
Definition: TGraphErrors.h:26
char name[80]
Definition: TGX11.cxx:109