Logo ROOT   6.10/09
Reference Guide
Helper.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 #ifndef ROOSTATS_HELPER
12 #define ROOSTATS_HELPER
13 
14 #include <string>
15 #include <vector>
16 #include <map>
17 
18 #include "TFile.h"
19 
23 #include "RooWorkspace.h"
24 #include "RooStats/ModelConfig.h"
25 #include "RooDataSet.h"
26 
27 
28 namespace RooStats{
29  namespace HistFactory{
30 
31  std::vector<EstimateSummary>* loadSavedInputs(TFile* outFile, std::string channel );
32 
33  void saveInputs(TFile* outFile, std::string channel, std::vector<EstimateSummary> summaries);
34 
35  TH1 * GetHisto( TFile * inFile, const std::string name );
36 
37  TH1 * GetHisto( const std::string file, const std::string path, const std::string obj );
38 
39  bool AddSummaries( std::vector<EstimateSummary> & summary, std::vector<std::vector<EstimateSummary> > &master);
40 
41  std::vector<std::pair<std::string, std::string> > get_comb(std::vector<std::string> names);
42 
43  void AddSubStrings( std::vector<std::string> & vs, std::string s);
44 
45  std::vector<std::string> GetChildrenFromString( std::string str );
46 
47  //void AddStringValPairToMap( std::map<std::string, double>& map, double val, std::string children);
48 
49  std::vector<EstimateSummary> GetChannelEstimateSummaries(Measurement& measurement, Channel& channel);
50 
51 
52  void AddParamsToAsimov( RooStats::HistFactory::Asimov& asimov, std::string str );
53 
54  /*
55  RooAbsData* makeAsimovData(ModelConfig* mcInWs, bool doConditional, RooWorkspace* combWS, RooAbsPdf* combPdf, RooDataSet* combData, bool b_only, double doMuHat = false, double muVal = -999, bool signalInjection = false, bool doNuisPro = true);
56  void unfoldConstraints(RooArgSet& initial, RooArgSet& final, RooArgSet& obs, RooArgSet& nuis, int& counter);
57  */
58 
59  }
60 }
61 
62 #endif
void saveInputs(TFile *outFile, std::string channel, vector< EstimateSummary > summaries)
Definition: Helper.cxx:83
std::vector< RooStats::HistFactory::EstimateSummary > GetChannelEstimateSummaries(RooStats::HistFactory::Measurement &measurement, RooStats::HistFactory::Channel &channel)
Definition: Helper.cxx:261
vector< EstimateSummary > * loadSavedInputs(TFile *outFile, std::string channel)
Definition: Helper.cxx:53
TH1 * GetHisto(TFile *inFile, const std::string name)
Definition: Helper.cxx:119
void AddParamsToAsimov(RooStats::HistFactory::Asimov &asimov, std::string str)
Definition: Helper.cxx:203
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:46
void AddSubStrings(vector< std::string > &vs, std::string s)
Definition: Helper.cxx:169
vector< pair< std::string, std::string > > get_comb(vector< std::string > names)
Definition: Helper.cxx:42
Namespace for the RooStats classes.
Definition: Asimov.h:20
The TH1 histogram class.
Definition: TH1.h:56
Definition: file.py:1
std::vector< std::string > GetChildrenFromString(std::string str)
Definition: Helper.cxx:183
bool AddSummaries(std::vector< EstimateSummary > &summary, std::vector< std::vector< EstimateSummary > > &master)