ROOT  6.06/09
Reference Guide
EstimateSummary.h
Go to the documentation of this file.
1 // @(#)root/roostats:$Id: cranmer $
2 // Author: Kyle Cranmer, Akira Shibata
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 
12 #ifndef ROOSTATS_ESTIMATESUMMARY_h
13 #define ROOSTATS_ESTIMATESUMMARY_h
14 
15 #include "TH1.h"
16 #include <string>
17 #include <vector>
18 #include <map>
19 #include <iostream>
20 #include "TObject.h"
21 
22 
23 namespace RooStats{
24 namespace HistFactory{
25 
26 struct EstimateSummary : public TObject {
27 
29 
30  struct NormFactor{
31  std::string name;
32  double val, high, low;
33  bool constant;
34  };
35 
36 
37  class ShapeSys{
38  public:
39  ShapeSys() : name(""), hist(NULL) {;}
40  std::string name;
43  };
44 
45 
46  typedef std::vector<std::string> vecstring;
47  typedef std::vector<TH1*> vechist;
48  typedef std::pair<double, double> pairdouble;
49  typedef std::map<std::string, std::pair<double, double> > mappair;
50 
51  // simple structure to hold necessary information about each channel
53  virtual ~EstimateSummary();
54  void Print(const char *opt = 0) const ;
55  void AddSyst( const std::string & sname, TH1* low, TH1* high);
56  bool operator==(const EstimateSummary &other) const ;
57  bool CompareHisto( const TH1 * one, const TH1 * two) const ;
58 
59 
60  //data members .
61  std::string name;
62  std::string channel;
63  std::string normName;
64  TH1* nominal; // x pb per jet bin. all histograms need index of binning to be consistent
65  std::vector<std::string> systSourceForHist;
66  std::vector<TH1*> lowHists; // x pb per jet bin for - variations over list of systematics
67  std::vector<TH1*> highHists; // x pb per jet bin for + variations over list of systematics
68  std::map<std::string, std::pair<double, double> > overallSyst; // "acceptance"->(0.8,1.2)
69  std::pair<double, double> dummyForRoot;
70  std::vector<NormFactor> normFactor;
71 
72 
73 
74  bool IncludeStatError; // Flag to implement Statistical errors for this sample
75  ConstraintType StatConstraintType; // The type of constraint binwise stat errors
76  Double_t RelErrorThreshold; // The minimum relative uncertainty for a bin to use stat errors
77  TH1* relStatError; // An (optional) externally provided shape for this error
78 
79  // bool doShapeFactor; // A flag to include a ShapeFactor ParamatarizedHistogram
80  std::string shapeFactorName; //
81  std::vector<ShapeSys> shapeSysts; //
82 
84 };
85 
86 }
87 }
88 
89 #endif
std::pair< double, double > dummyForRoot
std::vector< std::string > vecstring
void Print(const char *opt=0) const
This method must be overridden when a class wants to print itself.
std::map< std::string, std::pair< double, double > > mappair
std::map< std::string, std::pair< double, double > > overallSyst
bool operator==(const EstimateSummary &other) const
#define ClassDef(name, id)
Definition: Rtypes.h:254
std::pair< double, double > pairdouble
const std::string sname
Definition: testIO.cxx:45
std::vector< std::string > systSourceForHist
void AddSyst(const std::string &sname, TH1 *low, TH1 *high)
Namespace for the RooStats classes.
Definition: Asimov.h:20
double Double_t
Definition: RtypesCore.h:55
The TH1 histogram class.
Definition: TH1.h:80
std::vector< NormFactor > normFactor
bool CompareHisto(const TH1 *one, const TH1 *two) const
Mother of all ROOT objects.
Definition: TObject.h:58
#define NULL
Definition: Rtypes.h:82