Logo ROOT   6.08/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 to plot an HypoTestInverterResult, result of the HypoTestInverter calculator
27 
28  It can be used to plot the obtained p-values ( CLb, CLs+b or CLs) for each scanned point and
29  the test statistic distributions (when a calculator based on pseudo-experiments is used) for the two
30  hypotheses.
31 
32  \ingroup Roostats
33  */
34 
35 
36  class HypoTestInverterPlot : public TNamed {
37 
38  public:
39 
40  // constructor
42 
43  HypoTestInverterPlot( const char* name,
44  const char* title,
45  HypoTestInverterResult* results ) ;
46 
47  /// return a TGraphErrors with the obtained observed p-values
48  /// resultinf from the scan
49  /// By default (Option = "") return CLs or CLsb depending if the flag UseCLs is set
50  /// If Option = "CLb" return CLb plot
51  /// = "CLs+b" return CLs+b plot independently of the flag
52  /// = "CLs" return CLs plot independently of the flag
53  TGraphErrors* MakePlot(Option_t *opt="") ;
54 
55  /// Make the expected plot and the bands
56  /// nsig1 and nsig2 indicates the n-sigma value for the bands
57  /// if nsig1 = 0 no band is computed (only expected value)
58  /// if nsig2 > nsig1 (default is nsig1=1 and nsig2=2) the second band is also done.
59  /// The first band is drawn in green while the second in yellow
60  /// The plot (expected value + bands) is returned as a TMultiGraph object
61  TMultiGraph* MakeExpectedPlot(double sig1=1, double sig2=2) ;
62 
63  /// Plot the test statistic distributions
64  /// type =0 null and alt
65  /// type = 1 only null (S+B)
66  /// type = 2 only alt (B)
67  SamplingDistPlot * MakeTestStatPlot(int index, int type=0, int nbins = 100);
68 
69 
70  /// Draw the scan result in the current canvas
71  /// Possible options:
72  /// "" (default): draw observed + expected with 1 and 2 sigma bands
73  /// SAME : draw in the current axis
74  /// OBS : draw only the observed plot
75  /// EXP : draw only the expected plot
76  /// CLB : draw also CLb
77  /// 2CL : drow both CLs+b and CLs
78  void Draw(Option_t *opt="");
79 
80  /// destructor
82 
83  private:
84 
86 
87  protected:
88 
89  ClassDef(HypoTestInverterPlot,1) // HypoTestInverterPlot class
90 
91  };
92 }
93 
94 #endif
const char Option_t
Definition: RtypesCore.h:62
A TMultiGraph is a collection of TGraph (or derived) objects.
Definition: TMultiGraph.h:37
int nbins[3]
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)
HypoTestInverterResult * fResults
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
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 int...
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:28
char name[80]
Definition: TGX11.cxx:109