35 namespace HistFactory {
38 vector< pair<std::string, std::string> >
get_comb(vector<std::string> names){
39 vector< pair<std::string, std::string> > list;
40 for(vector<std::string>::iterator itr=names.begin(); itr!=names.end(); ++itr){
41 vector<std::string>::iterator itr2=itr;
42 for(++itr2; itr2!=names.end();++itr2){
43 list.push_back(pair<std::string, std::string>(*itr, *itr2));
52 vector<EstimateSummary>* summaries =
new vector<EstimateSummary>;
53 outFile->
cd(channel.c_str());
61 cout <<
"was able to read summary with name " << summary->
name << std::endl;
62 cout <<
" nominal hist = " << summary->
nominal << std::endl;
65 cout <<
"still ok" << std::endl;
67 summaries->push_back(*summary);
79 void saveInputs(
TFile* outFile, std::string channel, vector<EstimateSummary> summaries){
80 vector<EstimateSummary>::iterator it = summaries.begin();
81 vector<EstimateSummary>::iterator end = summaries.end();
82 vector<TH1*>::iterator histIt;
83 vector<TH1*>::iterator histEnd;
84 outFile->
mkdir(channel.c_str());
87 if(channel != it->channel){
88 cout <<
"channel mismatch" << std::endl;
91 outFile->
cd(channel.c_str());
101 histIt = it->lowHists.begin();
102 histEnd = it->lowHists.end();
103 for(; histIt!=histEnd; ++histIt)
106 histIt = it->highHists.begin();
107 histEnd = it->highHists.end();
108 for(; histIt!=histEnd; ++histIt)
117 if(!inFile ||
name.empty()){
118 cerr <<
"Not all necessary info are set to access the input file. Check your config" << std::endl;
119 cerr <<
"fileptr: " << inFile
120 <<
"path/obj: " <<
name << std::endl;
124 cout <<
"Retrieving " <<
name ;
128 cout <<
" found at " << ptr <<
" with integral " << ptr->
Integral() <<
" and mean " << ptr->
GetMean() << std::endl;
136 TH1 *
GetHisto(
const std::string
file,
const std::string path,
const std::string obj){
139 cout <<
"Retrieving " <<
file <<
":" << path << obj ;
146 cout <<
" found at " << ptr <<
" with integral " << ptr->
Integral()
147 <<
" and mean " << ptr->
GetMean() << std::endl;
152 cerr <<
"Not all necessary info are set to access the input file. Check your config"
154 cerr <<
"filename: " <<
file
156 <<
"obj: " << obj << std::endl;
166 const std::string delims(
"\\ ");
167 std::string::size_type begIdx, endIdx;
168 begIdx=
s.find_first_not_of(delims);
169 while(begIdx!=string::npos){
170 endIdx=
s.find_first_of(delims, begIdx);
171 if(endIdx==string::npos) endIdx=
s.length();
172 vs.push_back(
s.substr(begIdx,endIdx-begIdx));
173 begIdx=
s.find_first_not_of(delims, endIdx);
181 std::vector<std::string> child_vec;
183 const std::string delims(
"\\ ");
184 std::string::size_type begIdx, endIdx;
185 begIdx=str.find_first_not_of(delims);
186 while(begIdx!=string::npos){
187 endIdx=str.find_first_of(delims, begIdx);
188 if(endIdx==string::npos) endIdx=str.length();
189 std::string child_name = str.substr(begIdx,endIdx-begIdx);
190 child_vec.push_back(child_name);
191 begIdx=str.find_first_not_of(delims, endIdx);
208 std::map<std::string, double> param_map;
210 for(
unsigned int i=0; i < string_list.size(); ++i) {
212 std::string param = string_list.at(i);
214 size_t eql_location = param.find(
"=");
218 if( eql_location==string::npos ) {
223 std::string param_name = param.substr(0,eql_location);
224 double param_val = atof( param.substr(eql_location+1, param.size()).c_str() );
226 std::cout <<
"ASIMOV - Param Name: " << param_name
227 <<
" Param Val: " << param_val << std::endl;
264 std::vector<EstimateSummary> channel_estimateSummary;
266 std::cout <<
"Processing data: " << std::endl;
270 data_es.
name =
"Data";
273 if( data_hist != NULL ) {
276 channel_estimateSummary.push_back( data_es );
280 for(
unsigned int sampleItr = 0; sampleItr < channel.
GetSamples().size(); ++sampleItr ) {
285 std::cout <<
"Processing sample: " << sample.
GetName() << std::endl;
292 std::cout <<
"Checking NormalizeByTheory" << std::endl;
299 lumiStr += measurement.
GetLumi();
304 std::cout <<
"Setting the Histo Systs" << std::endl;
307 for(
unsigned int histoItr = 0; histoItr < sample.
GetHistoSysList().size(); ++histoItr ) {
317 std::cout <<
"Setting the NormFactors" << std::endl;
319 for(
unsigned int normItr = 0; normItr < sample.
GetNormFactorList().size(); ++normItr ) {
330 sample_es.
normFactor.push_back( normFactor_es );
334 std::cout <<
"Setting the OverallSysList" << std::endl;
336 for(
unsigned int sysItr = 0; sysItr < sample.
GetOverallSysList().size(); ++sysItr ) {
340 std::pair<double, double> DownUpPair( overallSys.
GetLow(), overallSys.
GetHigh() );
345 std::cout <<
"Checking Stat Errors" << std::endl;
367 std::cout <<
"Using Gaussian StatErrors" << std::endl;
371 std::cout <<
"Using Poisson StatErrors" << std::endl;
376 std::cout <<
"Getting the shape Factor" << std::endl;
383 std::cout <<
"Error: Only One Shape Factor currently supported" << std::endl;
388 std::cout <<
"Setting the ShapeSysts" << std::endl;
391 for(
unsigned int shapeItr=0; shapeItr < sample.
GetShapeSysList().size(); ++shapeItr ) {
412 sample_es.
shapeSysts.push_back( shapeSys_es );
416 std::cout <<
"Adding this sample" << std::endl;
419 channel_estimateSummary.push_back( sample_es );
423 return channel_estimateSummary;
474 // mcInWs -> The ModelCofig for this likelihood
475 // doConditional -> Minimize parameters for asimov quantities
476 // b_only -> Make the 'background only' asimov dataset, ie mu=0 (set muVal = 0)
477 // doNuisPro -> Set all nuisance parameters to '0' and to constant
478 // before minimizing. This should be done with *care*!!
479 // i.e. It should probably be removed as an option.
480 // signalInjection -> If true, then do the following:
481 // Perform the fit with m=0
482 // After the fit, set the value to mu=muVal
483 // so that the asimov is created with that value of mu fixed
484 // doMuHat -> Set 'mu' to be float during the fit (in the range -10 to 100)
485 // Even if it floats in the fit, it is still set to
486 // 'muVal' before the dataset is made (so the only difference
487 // comes from the other parameters that can float simultaneously with mu
490 // double doMuHat = false
491 // double muVal = -999,
492 // bool signalInjection = false
493 // bool doNuisPro = true
495 if( b_only ) muVal = 0.0;
499 // If using signal injection or a non-zero mu value,
500 // add a suffix showing that value
501 std::stringstream muStr;
502 if(signalInjection || !b_only) {
503 muStr << "_" << muVal;
506 // Create the name of the resulting dataset
507 std::string dataSetName;
508 if(signalInjection) dataSetName = "signalInjection" + muStr.str();
509 else dataSetName = "asimovData" + muStr.str();
511 // Set the parameter of interest
512 // to the 'background' value
513 RooRealVar* mu = (RooRealVar*) mcInWs->GetParametersOfInterest()->first();
515 std::cout << "Asimov: Setting " << mu->GetName() << " value to 0 for fit" << std::endl;
519 std::cout << "Asimov: Setting " << mu->GetName() << " value to " << muVal << " for fit" << std::endl;
523 // Get necessary info from the ModelConfig
524 RooArgSet mc_obs = *mcInWs->GetObservables();
525 RooArgSet mc_globs = *mcInWs->GetGlobalObservables();
526 RooArgSet mc_nuis = *mcInWs->GetNuisanceParameters();
528 // Create a set of constraint terms, which
529 // is stored in 'constraint_set'
530 // Make some temporary variables and use the
531 // unfoldConstrants function to do this.
532 RooArgSet constraint_set;
534 RooArgSet mc_nuis_tmp = mc_nuis;
535 RooArgSet constraint_set_tmp(*combPdf->getAllConstraints(mc_obs, mc_nuis_tmp, false));
536 unfoldConstraints(constraint_set_tmp, constraint_set, mc_obs, mc_nuis_tmp, counter_tmp);
538 // Now that we have the constraint terms, we
539 // can create the full lists of nuisance parameters
540 // and global variables
541 RooArgList nui_list("ordered_nuis");
542 RooArgList glob_list("ordered_globs");
544 TIterator* cIter = constraint_set.createIterator();
546 while ((arg = (RooAbsArg*)cIter->Next())) {
547 RooAbsPdf* pdf = (RooAbsPdf*) arg;
550 TIterator* nIter = mc_nuis.createIterator();
551 RooRealVar* thisNui = NULL;
553 while((nui_arg = (RooAbsArg*)nIter->Next())) {
554 if(pdf->dependsOn(*nui_arg)) {
555 thisNui = (RooRealVar*) nui_arg;
561 // need this in case the observable isn't fundamental.
562 // in this case, see which variable is dependent on the nuisance parameter and use that.
563 RooArgSet* components = pdf->getComponents();
564 components->remove(*pdf);
565 if(components->getSize()) {
566 TIterator* itr1 = components->createIterator();
568 while ((arg1 = (RooAbsArg*)itr1->Next())) {
569 TIterator* itr2 = components->createIterator();
571 while ((arg2 = (RooAbsArg*)itr2->Next())) {
572 if(arg1 == arg2) continue;
573 if(arg2->dependsOn(*arg1)) {
574 components->remove(*arg1);
581 if (components->getSize() > 1) {
582 std::cout << "ERROR::Couldn't isolate proper nuisance parameter" << std::endl;
585 else if (components->getSize() == 1) {
586 thisNui = (RooRealVar*)components->first();
589 TIterator* gIter = mc_globs.createIterator();
590 RooRealVar* thisGlob = NULL;
592 while ((glob_arg = (RooAbsArg*)gIter->Next()))
594 if (pdf->dependsOn(*glob_arg))
596 thisGlob = (RooRealVar*)glob_arg;
602 if (!thisNui || !thisGlob)
604 std::cout << "WARNING::Couldn't find nui or glob for constraint: " << pdf->GetName() << std::endl;
608 if (_printLevel >= 1) std::cout << "Pairing nui: " << thisNui->GetName() << ", with glob: " << thisGlob->GetName() << ", from constraint: " << pdf->GetName() << std::endl;
610 nui_list.add(*thisNui);
611 glob_list.add(*thisGlob);
613 } // End Loop over Constraint Terms
616 //save the snapshots of nominal parameters
617 combWS->saveSnapshot("nominalGlobs",glob_list);
618 combWS->saveSnapshot("nominalNuis", nui_list);
620 RooArgSet nuiSet_tmp(nui_list);
622 // Interesting line here:
624 std::cout << "Asimov: Setting mu constant in fit" << std::endl;
625 mu->setConstant(true);
628 std::cout << "Asimov: Letting mu float in fit (muHat)" << std::endl;
629 mu->setRange(-10,100);
632 // Conditional: "Minimize the parameters"
635 std::cout << "Starting minimization.." << std::endl;
637 // Consider removing this option:
639 std::cout << "Asimov: Setting nuisance parameters constant in the fit (ARE YOU SURE YOU WANT THIS)" << std::endl;
640 TIterator* nIter = nuiSet_tmp.createIterator();
641 RooRealVar* thisNui = NULL;
642 while((thisNui = (RooRealVar*) nIter->Next())) {
644 thisNui->setConstant();
647 // This should be checked, we don't want to
648 if(combWS->var("Lumi")) {
649 combWS->var("Lumi")->setVal(1);
650 combWS->var("Lumi")->setConstant();
654 // Create the nll and its minimizer
655 RooAbsReal* nll = combPdf->createNLL(*combData, RooFit::Constrain(nuiSet_tmp));
656 RooMinimizer minim(*nll);
657 minim.setStrategy(2);
658 minim.setPrintLevel(999);
660 // Do the minimization
661 std::cout << "Minimizing to make Asimov dataset:" << std::endl;
662 int status = minim.minimize(ROOT::Math::MinimizerOptions::DefaultMinimizerType().c_str(), "migrad");
664 // status==0 means fit was successful
665 std::cout << "Successfully minimized to make Asimov dataset:" << std::endl;
666 RooFitResult* fit_result = minim.lastMinuitFit();
667 std::cout << "Asimov: Final Fitted Parameters" << std::endl;
668 fit_result->Print("V");
670 std::cout << "Fit failed for mu = " << mu->getVal() << " with status " << status << std::endl;
671 std::cout << "Trying minuit..." << std::endl;
672 status = minim.minimize("Minuit", "migrad");
674 cout << "Fit failed for mu = " << mu->getVal() << " with status " << status << std::endl;
679 // Undo the 'doNuisPro' part
680 // Again, may want to remove this
682 TIterator* nIter = nuiSet_tmp.createIterator();
683 RooRealVar* thisNui = NULL;
684 while ((thisNui = (RooRealVar*)nIter->Next())) {
685 thisNui->setConstant(false);
688 if (combWS->var("Lumi")) {
689 combWS->var("Lumi")->setConstant(false);
693 std::cout << "Done" << std::endl;
694 } // END: DoConditional
696 mu->setConstant(false);
698 //loop over the nui/glob list, grab the corresponding variable from the tmp ws,
699 // and set the glob to the value of the nui
700 int nrNuis = nui_list.getSize();
701 if (nrNuis != glob_list.getSize()) {
702 std::cout << "ERROR::nui_list.getSize() != glob_list.getSize()!" << std::endl;
706 for(int i=0; i<nrNuis; i++) {
707 RooRealVar* nui = (RooRealVar*) nui_list.at(i);
708 RooRealVar* glob = (RooRealVar*) glob_list.at(i);
710 if (_printLevel >= 1) std::cout << "nui: " << nui << ", glob: " << glob << std::endl;
711 if (_printLevel >= 1) std::cout << "Setting glob: " << glob->GetName() << ", which had previous val: " << glob->getVal() << ", to conditional val: " << nui->getVal() << std::endl;
713 glob->setVal(nui->getVal());
716 //save the snapshots of conditional parameters
717 //cout << "Saving conditional snapshots" << std::endl;
718 combWS->saveSnapshot(("conditionalGlobs"+muStr.str()).c_str(),glob_list);
719 combWS->saveSnapshot(("conditionalNuis" +muStr.str()).c_str(), nui_list);
722 combWS->loadSnapshot("nominalGlobs");
723 combWS->loadSnapshot("nominalNuis");
726 //cout << "Making asimov" << std::endl;
727 //make the asimov data (snipped from Kyle)
729 // Restore the value of mu to the target value
732 ModelConfig* mc = mcInWs;
736 const char* weightName = "weightVar";
737 RooArgSet obsAndWeight;
738 obsAndWeight.add(*mc->GetObservables());
740 // Get the weightVar, or create one if necessary
741 RooRealVar* weightVar = combWS->var(weightName); // NULL;
742 // if (!(weightVar = combWS->var(weightName)))
743 if( weightVar==NULL ) {
744 combWS->import(*(new RooRealVar(weightName, weightName, 1,0,1000)));
745 weightVar = combWS->var(weightName);
747 if (_printLevel >= 1) std::cout << "weightVar: " << weightVar << std::endl;
748 obsAndWeight.add(*combWS->var(weightName));
755 // MAKE ASIMOV DATA FOR OBSERVABLES
757 // dummy var can just have one bin since it's a dummy
758 if(combWS->var("ATLAS_dummyX")) combWS->var("ATLAS_dummyX")->setBins(1);
760 if (_printLevel >= 1) std::cout << " check expectedData by category" << std::endl;
761 RooSimultaneous* simPdf = dynamic_cast<RooSimultaneous*>(mc->GetPdf());
763 // Create the pointer to be returned
764 RooDataSet* asimovData=NULL;
766 // If the pdf isn't simultaneous:
769 // Get pdf associated with state from simpdf
770 RooAbsPdf* pdftmp = mc->GetPdf();//simPdf->getPdf(channelCat->getLabel()) ;
772 // Generate observables defined by the pdf associated with this state
773 RooArgSet* obstmp = pdftmp->getObservables(*mc->GetObservables()) ;
775 if (_printLevel >= 1) {
780 asimovData = new RooDataSet(dataSetName.c_str(), dataSetName.c_str(),
781 RooArgSet(obsAndWeight), RooFit::WeightVar(*weightVar));
783 RooRealVar* thisObs = ((RooRealVar*)obstmp->first());
784 double expectedEvents = pdftmp->expectedEvents(*obstmp);
786 for(int jj=0; jj<thisObs->numBins(); ++jj){
789 thisNorm=pdftmp->getVal(obstmp)*thisObs->getBinWidth(jj);
790 if (thisNorm*expectedEvents <= 0)
792 cout << "WARNING::Detected bin with zero expected events (" << thisNorm*expectedEvents << ") ! Please check your inputs. Obs = " << thisObs->GetName() << ", bin = " << jj << std::endl;
794 if (thisNorm*expectedEvents > 0 && thisNorm*expectedEvents < pow(10.0, 18)) asimovData->add(*mc->GetObservables(), thisNorm*expectedEvents);
797 if (_printLevel >= 1)
800 std::cout <<"sum entries "<<asimovData->sumEntries()<<endl;
802 if(asimovData->sumEntries()!=asimovData->sumEntries()){
803 std::cout << "sum entries is nan"<<endl;
807 // don't import, return (of course)
808 //combWS->import(*asimovData);
813 // If it IS a simultaneous pdf
815 std::cout << "found a simPdf: " << simPdf << std::endl;
816 map<std::string, RooDataSet*> asimovDataMap;
818 RooCategory* channelCat = (RooCategory*)&simPdf->indexCat();
819 TIterator* iter = channelCat->typeIterator() ;
820 RooCatType* tt = NULL;
822 while((tt=(RooCatType*) iter->Next())) {
826 for (int i=0;i<nrIndices;i++){
828 channelCat->setIndex(i);
830 std::cout << "Checking channel: " << channelCat->getLabel() << std::endl;
832 // Get pdf associated with state from simpdf
833 RooAbsPdf* pdftmp = simPdf->getPdf(channelCat->getLabel()) ;
835 // Generate observables defined by the pdf associated with this state
836 RooArgSet* obstmp = pdftmp->getObservables(*mc->GetObservables()) ;
838 if (_printLevel >= 1) {
840 cout << "on type " << channelCat->getLabel() << " " << iFrame << std::endl;
843 RooDataSet* obsDataUnbinned = new RooDataSet(Form("combAsimovData%d",iFrame),Form("combAsimovData%d",iFrame),
844 RooArgSet(obsAndWeight,*channelCat), RooFit::WeightVar(*weightVar));
845 RooRealVar* thisObs = ((RooRealVar*)obstmp->first());
846 double expectedEvents = pdftmp->expectedEvents(*obstmp);
848 TString pdftmp_name = pdftmp->GetName();
850 if (!expectedEvents) {
851 std::cout << "Not expected events" << std::endl;
852 if (pdftmp_name == "model_E")
853 ((RooRealVar*)obstmp->first())->setVal(combWS->function("p_e")->getVal());
855 else if (pdftmp_name == "model_MU")
856 ((RooRealVar*)obstmp->first())->setVal(combWS->function("p_mu")->getVal());
858 else if ((pdftmp_name == "model_ratio_ELMU") || (pdftmp_name == "model_comb")) {
859 //((RooRealVar*)obstmp->first())->setVal(combWS->function("p_comb")->getVal());
860 double p_asimov_val = combWS->var("p_asimov")->getVal();
861 std::cout << "p_asimov val: " << p_asimov_val << std::endl;
862 ((RooRealVar*)obstmp->first())->setVal(combWS->var("p_asimov")->getVal());
866 std::cout << "Failed to set asimov data for non-extended pdf" << std::endl;
869 obsDataUnbinned->add(*mc->GetObservables());
873 std::cout << "expected events" << std::endl;
874 for(int jj=0; jj<thisObs->numBins(); ++jj){
877 thisNorm=pdftmp->getVal(obstmp)*thisObs->getBinWidth(jj);
878 if (thisNorm*expectedEvents <= 0)
880 std::cout << "WARNING::Detected bin with zero expected events (" << thisNorm*expectedEvents << ") ! Please check your inputs. Obs = " << thisObs->GetName() << ", bin = " << jj << std::endl;
882 if (thisNorm*expectedEvents > pow(10.0, -9) && thisNorm*expectedEvents < pow(10.0, 9)) obsDataUnbinned->add(*mc->GetObservables(), thisNorm*expectedEvents);
886 if (_printLevel >= 1)
888 obsDataUnbinned->Print();
889 std::cout <<"sum entries "<<obsDataUnbinned->sumEntries()<<endl;
891 if(obsDataUnbinned->sumEntries()!=obsDataUnbinned->sumEntries()){
892 cout << "sum entries is nan"<<endl;
896 asimovDataMap[string(channelCat->getLabel())] = obsDataUnbinned;//tempData;
898 if (_printLevel >= 1)
900 std::cout << "channel: " << channelCat->getLabel() << ", data: ";
901 obsDataUnbinned->Print();
902 std::cout << std::endl;
906 channelCat->setIndex(0);
908 asimovData = new RooDataSet(dataSetName.c_str(),dataSetName.c_str(),
909 RooArgSet(obsAndWeight,*channelCat), RooFit::Index(*channelCat),
910 RooFit::Import(asimovDataMap), RooFit::WeightVar(*weightVar));
912 // Don't import, return (of course)
913 //combWS->import(*asimovData);
914 } // End if over simultaneous pdf
916 combWS->loadSnapshot("nominalNuis");
917 combWS->loadSnapshot("nominalGlobs");
TODO Here, we are missing some documentation.
void SetParamValue(const std::string ¶m, double value)
void SetFixedParam(const std::string ¶m, bool constant=true)
This class encapsulates all information for the statistical interpretation of one experiment.
HistFactory::StatErrorConfig & GetStatErrorConfig()
get information about threshold for statistical uncertainties and constraint term
RooStats::HistFactory::Data & GetData()
get data object
std::string GetName()
get name of channel
std::vector< RooStats::HistFactory::Sample > & GetSamples()
get vector of samples for this channel
ConstraintType constraint
Configuration for a constrained, coherent shape variation of affected samples.
const std::string & GetName() const
const TH1 * GetHistoHigh() const
const TH1 * GetHistoLow() const
The RooStats::HistFactory::Measurement class can be used to construct a model by combining multiple R...
double GetLumi()
retrieve integrated luminosity
Configuration for an un- constrained overall systematic to scale sample normalisations.
std::string GetName() const
Configuration for a constrained overall systematic to scale sample normalisations.
std::string GetName() const
std::vector< RooStats::HistFactory::OverallSys > & GetOverallSysList()
std::string GetName() const
get name of sample
const TH1 * GetHisto() const
RooStats::HistFactory::StatError & GetStatError()
std::vector< RooStats::HistFactory::ShapeFactor > & GetShapeFactorList()
std::string GetChannelName() const
get name of associated channel
std::vector< RooStats::HistFactory::NormFactor > & GetNormFactorList()
std::vector< RooStats::HistFactory::HistoSys > & GetHistoSysList()
bool GetNormalizeByTheory() const
does the normalization scale with luminosity
std::vector< RooStats::HistFactory::ShapeSys > & GetShapeSysList()
Constrained bin-by-bin variation of affected histogram.
Constraint::Type GetConstraintType() const
const TH1 * GetErrorHist() const
double GetRelErrorThreshold() const
Constraint::Type GetConstraintType() const
const TH1 * GetErrorHist() const
TDirectory * mkdir(const char *name, const char *title="", Bool_t returnExistingDirectory=kFALSE) override
Create a sub-directory "a" or a hierarchy of sub-directories "a/b/c/...".
Bool_t cd(const char *path=nullptr) override
Change current directory to "this" directory.
TObject * Get(const char *namecycle) override
Return pointer to object identified by namecycle.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
virtual void ShowStreamerInfo()
Show the StreamerInfo of all classes written to this file.
virtual void SetDirectory(TDirectory *dir)
By default when an histogram is created, it is added to the list of histogram objects in the current ...
virtual Double_t GetMean(Int_t axis=1) const
For axis = 1,2 or 3 returns the mean value of the histogram along X,Y or Z axis.
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
virtual Double_t Integral(Option_t *option="") const
Return integral of bin contents.
virtual const char * GetName() const
Returns name of object.
virtual TObject * Clone(const char *newname="") const
Make a clone of an object using the Streamer facility.
TString & ReplaceAll(const TString &s1, const TString &s2)
vector< EstimateSummary > * loadSavedInputs(TFile *outFile, std::string channel)
std::vector< RooStats::HistFactory::EstimateSummary > GetChannelEstimateSummaries(RooStats::HistFactory::Measurement &measurement, RooStats::HistFactory::Channel &channel)
vector< pair< std::string, std::string > > get_comb(vector< std::string > names)
void AddSubStrings(vector< std::string > &vs, std::string s)
TH1 * GetHisto(TFile *inFile, const std::string name)
void saveInputs(TFile *outFile, std::string channel, vector< EstimateSummary > summaries)
std::vector< std::string > GetChildrenFromString(std::string str)
void AddParamsToAsimov(RooStats::HistFactory::Asimov &asimov, std::string str)
Namespace for the RooStats classes.
static constexpr double s
void Print(const char *opt=0) const
This method must be overridden when a class wants to print itself.
Double_t RelErrorThreshold
std::vector< NormFactor > normFactor
std::vector< std::string > systSourceForHist
std::vector< ShapeSys > shapeSysts
std::map< std::string, std::pair< double, double > > overallSyst
ConstraintType StatConstraintType
std::string shapeFactorName
std::vector< TH1 * > lowHists
std::vector< TH1 * > highHists