diff --git a/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx b/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx index f5d9a473ffcf5..4f84339b57a00 100644 --- a/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx +++ b/roofit/histfactory/src/HistoToWorkspaceFactoryFast.cxx @@ -34,13 +34,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -56,8 +54,6 @@ #include "TH1.h" #include "TStopwatch.h" -#include "TVectorD.h" -#include "TMatrixDSym.h" // specific to this package #include @@ -1515,7 +1511,9 @@ RooArgList HistoToWorkspaceFactoryFast::createObservables(const TH1 *hist, RooWo if(!model) std::cout <<"failed to find model for channel"<< std::endl; // std::cout << "int = " << model->createIntegral(*obsN)->getVal() << std::endl; models.push_back(model); - globalObs.add(*ch->set("globalObservables"), /*silent=*/true); // silent because observables might exist in other channel. + auto &modelConfig = *static_cast(chs[i]->obj("ModelConfig")); + // silent because observables might exist in other channel: + globalObs.add(*modelConfig.GetGlobalObservables(), /*silent=*/true); // constrainedParams->add( * ch->set("constrainedParams") ); pdfMap[channel_name]=model;