75using std::string, std::unique_ptr;
 
  114      fNLLObs(0), fNLLAsimov(0),
 
  129         oocoutI(
nullptr,InputArguments) << 
"AsymptotiCalculator: Minimum of POI is " << 
muNull->getMin() << 
" corresponds to null  snapshot   - default configuration is  one-sided discovery formulae  " << std::endl;
 
 
  149      oocoutP(
nullptr,Eval) << 
"AsymptoticCalculator::Initialize...." << std::endl;
 
  154      oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator::Initialize - ModelConfig has not a pdf defined" << std::endl;
 
  159      oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator::Initialize - data set has not been defined" << std::endl;
 
  167   if (!poi || poi->
empty()) {
 
  168      oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator::Initialize -  ModelConfig has not POI defined." << std::endl;
 
  171   if (poi->
size() > 1) {
 
  172      oocoutW(
nullptr,InputArguments) << 
"AsymptoticCalculator::Initialize - ModelConfig has more than one POI defined \n\t" 
  173                                          << 
"The asymptotic calculator works for only one POI - consider as POI only the first parameter" 
  181      oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator::Initialize - Null model needs a snapshot. Set using modelconfig->SetSnapshot(poi)." << std::endl;
 
  204      oocoutP(
nullptr,Eval) << 
"AsymptoticCalculator::Initialize - Find  best unconditional NLL on observed data" << std::endl;
 
  211      oocoutP(
nullptr,Eval) << 
"Best fitted POI value = " << 
muBest->getVal() << 
" +/- " << 
muBest->getError() << std::endl;
 
  218      oocoutE(
nullptr,InputArguments) << 
"Alt (Background)  model needs a snapshot. Set using modelconfig->SetSnapshot(poi)." << std::endl;
 
  224   oocoutP(
nullptr,Eval) << 
"AsymptoticCalculator: Building Asimov data Set" << std::endl;
 
  235         if (
data.numEntries() != 
xobs->getBins() ) {
 
  237            oocoutW(
nullptr,InputArguments) << 
"AsymptoticCalculator: number of bins in " << 
xobs->GetName() << 
" are different than data bins " 
  238                                                << 
" set the same data bins " << 
data.numEntries() << 
" in range " 
  239                                                << 
" [ " << 
xobs->getMin() << 
" , " << 
xobs->getMax() << 
" ]" << std::endl;
 
  247         oocoutI(
nullptr,InputArguments) << 
"AsymptoticCalculator: Asimov data will be generated using fitted nuisance parameter values" << std::endl;
 
  255         oocoutI(
nullptr,InputArguments) << 
"AsymptoticCalculator: Asimovdata set will be generated using nominal (current) nuisance parameter values" << std::endl;
 
  261      oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator: Error : Asimov data set could not be generated " << std::endl;
 
  284         << 
"AsymptoticCalculator::Initialize Find  best conditional NLL on ASIMOV data set for given alt POI ( " 
  285         << 
muAlt->GetName() << 
" ) = " << 
muAlt->getVal() << std::endl;
 
 
  337          std::cout << 
"Model with more than one POI are not supported - ignore extra parameters, consider only first one" << std::endl;
 
  376       minim.setEvalErrorWall(config.useEvalErrorWall);
 
  384       minim.optimizeConst(2);
 
  389          std::cout << 
"AsymptoticCalculator::EvaluateNLL  ........ using " << minimizer << 
" / " << 
algorithm 
  390                    << 
" with strategy  " << 
strategy << 
" and tolerance " << 
tol << std::endl;
 
  401                std::cout << 
"    ----> Doing a re-scan first\n";
 
  402                minim.minimize(minimizer,
"Scan");
 
  406                   std::cout << 
"    ----> trying with strategy = 1\n";
 
  407                   minim.setStrategy(1);
 
  413                std::cout << 
"    ----> trying with improve\n";
 
  414                minimizer = 
"Minuit";
 
  420       std::unique_ptr<RooFitResult> 
result;
 
  424          result = std::unique_ptr<RooFitResult>{
minim.save()};
 
  438          oocoutE(
nullptr,Fitting) << 
"FIT FAILED !- return a NaN NLL " << std::endl;
 
  442       minim.optimizeConst(
false);
 
  447       std::cout << 
"AsymptoticCalculator::EvaluateNLL -  value = " << val;
 
  450          std::cout << 
" for poi fixed at = " << 
muTest;
 
  453          std::cout << 
"\tfit time : ";
 
  456          std::cout << std::endl;
 
  486         oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator::GetHypoTest - Error initializing Asymptotic calculator - return nullptr result " << std::endl;
 
  492       oocoutE(
nullptr,InputArguments) << 
"AsymptoticCalculator::GetHypoTest - Asimov data set has not been generated - return nullptr result " << std::endl;
 
  512      oocoutW(
nullptr,InputArguments) << 
"AsymptoticCalculator::GetHypoTest: snapshot has more than one POI - assume as POI first parameter " << std::endl;
 
  528      std::cout << std::endl;
 
  529      oocoutI(
nullptr,Eval) << 
"AsymptoticCalculator::GetHypoTest: - perform  an hypothesis test for  POI ( " << 
muTest->GetName() << 
" ) = " << 
muTest->getVal() << std::endl;
 
  530      oocoutP(
nullptr,Eval) << 
"AsymptoticCalculator::GetHypoTest -  Find  best conditional NLL on OBSERVED data set ..... " << std::endl;
 
  541      oocoutP(
nullptr,Eval) << 
"\t OBSERVED DATA :  qmu   = " << qmu << 
" condNLL = " << 
condNLL << 
" uncond " << 
fNLLObs << std::endl;
 
  549         oocoutW(
nullptr,Minimization) << 
"AsymptoticCalculator:  Found a negative value of the qmu - retry to do the unconditional fit " 
  553            << 
"AsymptoticCalculator:  unconditional fit failed before - retry to do it now " << std::endl;
 
  559         oocoutW(
nullptr,Minimization) << 
"AsymptoticCalculator:  Found a better unconditional minimum " 
  560                                           << 
" old NLL = " << 
fNLLObs << 
" old muHat " << 
muHat->getVal() << std::endl;
 
  572        oocoutW(
nullptr,Minimization) << 
"AsymptoticCalculator:  New minimum  found for                       " 
  573                                          << 
"    NLL = " << 
fNLLObs << 
"    muHat  " << 
muHat->getVal() << std::endl;
 
  579           oocoutP(
nullptr,Eval) << 
"After unconditional refit,  new qmu value is " << qmu << std::endl;
 
  585      oocoutE(
nullptr,Minimization) << 
"AsymptoticCalculator:  qmu is still < 0  for mu = " 
  586                                        <<  
muTest->getVal() << 
" return a dummy result " 
  591      oocoutE(
nullptr,Minimization) << 
"AsymptoticCalculator:  failure in fitting for qmu or qmuA " 
  592                                        <<  
muTest->getVal() << 
" return a dummy result " 
  616   if (verbose > 0) 
oocoutP(
nullptr,Eval) << 
"AsymptoticCalculator::GetHypoTest -- Find  best conditional NLL on ASIMOV data set .... " << std::endl;
 
  630           << 
"AsymptoticCalculator:  Found a negative value of the qmu Asimov- retry to do the unconditional fit " 
  634           << 
"AsymptoticCalculator:  Fit failed for  unconditional the qmu Asimov- retry  unconditional fit " 
  641         oocoutW(
nullptr,Minimization) << 
"AsymptoticCalculator:  Found a better unconditional minimum for Asimov data set" 
  647         oocoutW(
nullptr,Minimization) << 
"AsymptoticCalculator:  New minimum  found for                       " 
  652           oocoutP(
nullptr,Eval) << 
"After unconditional Asimov refit,  new qmu_A value is " << 
qmu_A << std::endl;
 
  658      oocoutE(
nullptr,Minimization) << 
"AsymptoticCalculator:  qmu_A is still < 0  for mu = " 
  659                                        <<  
muTest->getVal() << 
" return a dummy result " 
  664      oocoutE(
nullptr,Minimization) << 
"AsymptoticCalculator:  failure in fitting for qmu or qmuA " 
  665                                        <<  
muTest->getVal() << 
" return a dummy result " 
  695            oocoutI(
nullptr,InputArguments) << 
"Minimum of POI is " << 
muTest->getMin() << 
" corresponds to alt  snapshot   - using qtilde asymptotic formulae  " << std::endl;
 
  698            oocoutI(
nullptr,InputArguments) << 
"Minimum of POI is " << 
muTest->getMin() << 
" is different to alt snapshot " << 
muAlt->getVal()
 
  699                                                << 
" - using standard q asymptotic formulae  " << std::endl;
 
  709         oocoutI(
nullptr,Eval) << 
"Using one-sided qmu - setting qmu to zero  muHat = " << 
muHat->getVal()
 
  710                                   << 
" muTest = " << 
muTest->getVal() << std::endl;
 
  716         oocoutI(
nullptr,Eval) << 
"Using one-sided discovery qmu - setting qmu to zero  muHat = " << 
muHat->getVal()
 
  717                                   << 
" muTest = " << 
muTest->getVal() << std::endl;
 
  737   double sqrtqmu = (qmu > 0) ? std::sqrt(qmu) : 0;
 
  745            oocoutI(
nullptr,Eval) << 
"Using one-sided limit asymptotic formula (qmu)" << std::endl;
 
  747            oocoutI(
nullptr, Eval) << 
"Using one-sided discovery asymptotic formula (q0)" << std::endl;
 
  755      if (verbose > 2) 
oocoutI(
nullptr,Eval) << 
"Using two-sided asymptotic  formula (tmu)" << std::endl;
 
  766            if (verbose > 2) 
oocoutI(
nullptr,Eval) << 
"Using qmu_tilde (qmu is greater than qmu_A)" << std::endl;
 
  775            if (verbose > 2) 
oocoutI(
nullptr,Eval) << 
"Using tmu_tilde (qmu is greater than qmu_A)" << std::endl;
 
  787   string resultname = 
"HypoTestAsymptotic_result";
 
  791      oocoutP(
nullptr, Eval) << 
"poi = " << 
muTest->getVal() << 
" qmu = " << qmu << 
" qmu_A = " << 
qmu_A 
  793                             << 
" CLb = " << 
palt << 
" CLs = " << res->
CLs() << std::endl;
 
 
  835   brf.SetFunction( 
wf, 0, 20);
 
  838      oocoutE(
nullptr,Eval)  << 
"Error finding expected p-values - return -1" << std::endl;
 
  846   brf.SetFunction(
wf2,0,20);
 
  849      oocoutE(
nullptr,Eval)  << 
"Error finding expected p-values - return -1" << std::endl;
 
 
  870   if (
debug) std::cout << 
"looping on observable " << 
v->GetName() << std::endl;
 
  871   for (
int i = 0; i < 
v->getBins(); ++i) {
 
  876         binVolume *= 
v->getBinWidth(i); 
 
  887         if (
fval*expectedEvents <= 0)
 
  889            if (
fval*expectedEvents < 0) {
 
  890               oocoutW(
nullptr,InputArguments)
 
  891                   << 
"AsymptoticCalculator::" << 
__func__ 
  892                   << 
"(): Bin " << i << 
" of " << 
v->GetName() << 
" has negative expected events! Please check your inputs." << std::endl;
 
  895               oocoutW(
nullptr,InputArguments)
 
  896                   << 
"AsymptoticCalculator::" << 
__func__ 
  897                   << 
"(): Bin " << i << 
" of " << 
v->GetName() << 
" has zero expected events - skip it" << std::endl;
 
  906            std::cout << 
"bin " << 
ibin << 
"\t";
 
  907            for (std::size_t 
j=0; 
j < obs.
size(); ++
j) { std::cout << 
"  " <<  (
static_cast<RooRealVar&
>( obs[
j])).getVal(); }
 
  908            std::cout << 
" w = " << 
fval*expectedEvents;
 
  909            std::cout << std::endl;
 
  916      std::cout << 
"ending loop on .. " << 
v->GetName() << std::endl;
 
  929         if (
myobs != 
nullptr) {
 
  930            oocoutF(
nullptr,Generation) << 
errPrefix << 
"Has two observables ?? " << std::endl;
 
  934         if (
myobs == 
nullptr) {
 
  935            oocoutF(
nullptr,Generation) << 
errPrefix << 
"Observable is not a RooRealVar??" << std::endl;
 
  939         if (!
a->isConstant() ) {
 
  940            if (
myexp != 
nullptr) {
 
  941               oocoutE(
nullptr,Generation) << 
errPrefix << 
"Has two non-const arguments  " << std::endl;
 
  945            if (
myexp == 
nullptr) {
 
  946               oocoutF(
nullptr,Generation) << 
errPrefix << 
"Expected is not a RooAbsReal??" << std::endl;
 
  952   if (
myobs == 
nullptr)  {
 
  956   if (
myexp == 
nullptr) {
 
  964      std::cout << 
"SetObsToExpected : setting " << 
myobs->GetName() << 
" to expected value " << 
myexp->getVal() << 
" of " << 
myexp->GetName() << std::endl;
 
  980   std::string 
const &
errPrefix = 
"AsymptoticCalculator::SetObsExpected( " + std::string{pdf.
ClassName()} + 
" ) : ";
 
  981   std::vector<RooAbsArg *> servers;
 
  983      servers.emplace_back(
a);
 
  993   std::string 
const &
errPrefix = 
"AsymptoticCalculator::SetObsExpected( " + std::string{
mvgauss.ClassName()} + 
" ) : ";
 
  994   std::vector<RooAbsArg *> servers{
nullptr, 
nullptr};
 
 1011    for (
auto *
a : prod.pdfList()) {
 
 1012        if (!
a->dependsOn(obs)) 
continue;
 
 1019            pois->setNoRounding(
true);  
 
 1020        } 
else if ((gauss = 
dynamic_cast<RooGaussian *
>(
a)) != 
nullptr) {
 
 1027        oocoutE(
nullptr, InputArguments)
 
 1028           << 
"Illegal term in counting model: " 
 1029           << 
"the PDF " << 
a->GetName() << 
" depends on the observables, but is not a Poisson, Gaussian or Product" 
 1051       std::cout << 
"generate counting Asimov data for pdf of type " << pdf.
ClassName() << std::endl;
 
 1054    if (prod != 
nullptr) {
 
 1056    } 
else if ((
pois = 
dynamic_cast<RooPoisson *
>(&pdf)) != 
nullptr) {
 
 1059        pois->setNoRounding(
true);
 
 1060    } 
else if ((gauss = 
dynamic_cast<RooGaussian *
>(&pdf)) != 
nullptr) {
 
 1065       oocoutE(
nullptr,InputArguments) << 
"A counting model pdf must be either a RooProdPdf or a RooPoisson or a RooGaussian" << std::endl;
 
 1067    if (!
r) 
return nullptr;
 
 1074                                     "CountingAsimovData" + std::to_string(
icat), obs);
 
 1102      asimovData = std::make_unique<RooDataSet>(
"AsimovData" + std::to_string(
icat),
 
 1103                                  "combAsimovData" + std::to_string(
icat),
 
 1117       std::cout << 
"Generating Asimov data for pdf " << pdf.
GetName() << std::endl;
 
 1118       std::cout << 
"list of observables  " << std::endl;
 
 1123    double binVolume = 1;
 
 1127       std::cout << 
"filled from " << pdf.
GetName() << 
"   " << nbins << 
" nbins " << 
" volume is " << binVolume << std::endl;
 
 1150      std::cout << 
"sum entries is nan"<< std::endl;
 
 1169   RooRealVar weightVar{
"binWeightAsimov", 
"binWeightAsimov", 1, 0, 1.e30};
 
 1171   if (
printLevel > 1) std::cout <<
" Generate Asimov data for observables"<< std::endl;
 
 1179   std::map<std::string, std::unique_ptr<RooDataSet>> 
asimovDataMap;
 
 1185    oocoutW(
nullptr,Generation) << 
"Simultaneous pdf does not contain any categories." << std::endl;
 
 1196      std::cout << 
"on type " << 
channelCat.getCurrentLabel() << 
" " << 
channelCat.getCurrentIndex() << std::endl;
 
 1201       oocoutE(
nullptr,Generation) << 
"Error generating an Asimov data set for pdf " << 
pdftmp->GetName() << std::endl;
 
 1206      oocoutE(
nullptr,Generation) << 
"AsymptoticCalculator::GenerateAsimovData(): The PDF for " << 
channelCat.getCurrentLabel()
 
 1207          << 
" was already defined. It will be overridden. The faulty category definitions follow:" << std::endl;
 
 1213      std::cout << 
"channel: " << 
channelCat.getCurrentLabel() << 
", data: ";
 
 1215      std::cout << std::endl;
 
 
 1254         std::cout << 
"MakeAsimov: Setting poi " << 
tmpPar->GetName() << 
" to a constant value = " << 
tmpPar->getVal() << std::endl;
 
 1279         std::cout << 
"MakeAsimov: doing a conditional fit for finding best nuisance values " << std::endl;
 
 1282            std::cout << 
"POI values:\n"; poi.
Print(
"v");
 
 1284               std::cout << 
"Nuis param values:\n";
 
 1293      std::vector<RooCmdArg> args{
 
 1304      for (
auto& arg : args) {
 
 1308      if (verbose>0) { std::cout << 
"fit time "; 
tw2.Print();}
 
 1312            std::cout << 
"Nuisance parameters after fit for asimov dataset: " << std::endl;
 
 
 1366      std::cout << 
"Generated Asimov data for observables "; (model.
GetObservables() )->
Print();
 
 1369            std::cout << 
"--- Asimov data values \n";
 
 1370            asimov->
get()->Print(
"v");
 
 1373            std::cout << 
"--- Asimov data numEntries = " << asimov->
numEntries() << 
" sumOfEntries = " << asimov->
sumEntries() << std::endl;
 
 1375         std::cout << 
"\ttime for generating : ";  
tw.Print();
 
 1395         std::cout << 
"Generating Asimov data for global observables " << std::endl;
 
 1409            oocoutW(
nullptr,Generation) << 
"AsymptoticCalculator::MakeAsimovData: model does not have nuisance parameters but has global observables" 
 1410                                            << 
" set global observables to model values " << std::endl;
 
 1418            oocoutF(
nullptr, Generation) << 
"AsymptoticCalculator::MakeAsimovData: model has nuisance parameters and " 
 1419                                            "global obs but no nuisance pdf " 
 1434                "AsimovUtils: a factor of the nuisance pdf is not a Pdf!");
 
 1442         if (
cgobs->size() > 1) {
 
 1443            oocoutE(
nullptr,Generation) << 
"AsymptoticCalculator::MakeAsimovData: constraint term  " <<  
cterm->GetName()
 
 1444                                            << 
" has multiple global observables -cannot generate - skip it" << std::endl;
 
 1447         else if (
cgobs->empty()) {
 
 1449               << 
"AsymptoticCalculator::MakeAsimovData: constraint term  " << 
cterm->GetName()
 
 1450                                            << 
" has no global observables - skip it" << std::endl;
 
 1458         if (
cpars->size() != 1) {
 
 1460               << 
"AsymptoticCalculator::MakeAsimovData:constraint term " 
 1461                                            << 
cterm->GetName() << 
" has multiple floating params - cannot generate - skip it " << std::endl;
 
 1469         if (verbose > 2) std::cout << 
"Constraint " << 
cterm->GetName() << 
" of type " << 
cClass->GetName() << std::endl;
 
 1475               << 
"AsymptoticCalculator::MakeAsimovData:constraint term " 
 1476                                            << 
cterm->GetName() << 
" of type " << className
 
 1477                                            << 
" is a non-supported type - result might be not correct " << std::endl;
 
 1484            pois->setNoRounding(
true);
 
 1495                  << 
"AsymptoticCalculator::MakeAsimovData:constraint term " 
 1496                                               << 
cterm->GetName() << 
" has no direct dependence on global observable- cannot generate it " << std::endl;
 
 1515                  << 
"AsymptoticCalculator::MakeAsimovData:constraint term " 
 1516                                               << 
cterm->GetName() << 
" is a Gamma distribution and no server named theta is found. Assume that the Gamma scale is  1 " << std::endl;
 
 1518            else if (verbose>2) {
 
 1519                  std::cout << 
"Gamma constraint has a scale " << 
thetaGamma->GetName() << 
"  = " << 
thetaGamma->getVal() << std::endl;
 
 1524            if (verbose > 2) std::cout << 
"Loop on constraint server term  " << 
a2->GetName() << std::endl;
 
 1530                  oocoutE(
nullptr,Generation) << 
"AsymptoticCalculator::MakeAsimovData:constraint term " 
 1531                                            << 
cterm->GetName() << 
" constraint term has more server depending on nuisance- cannot generate it " <<
 
 1544                  std::cout << 
"setting global observable " << 
rrv.GetName() << 
" to value " << 
rrv.getVal()
 
 1545                            << 
" which comes from " << 
rrv2->GetName() << std::endl;
 
 1551            oocoutE(
nullptr,Generation) << 
"AsymptoticCalculator::MakeAsimovData - can't find nuisance for constraint term - global observables will not be set to Asimov value " << 
cterm->GetName() << std::endl;
 
 1552            std::cerr << 
"Parameters: " << std::endl;
 
 1554            std::cerr << 
"Observables: " << std::endl;
 
 1570         std::cout << 
"Generated Asimov data for global observables ";
 
 1571         if (verbose == 1) 
gobs.Print();
 
 1575         std::cout << 
"\nGlobal observables for data: " << std::endl;
 
 1577         std::cout << 
"\nGlobal observables for asimov: " << std::endl;
 
 
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t result
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
 
void Print(Option_t *option="") const override
 
TRObject operator()(const T1 &t1) const
 
Class for finding the root of a one dimensional function using the Brent algorithm.
 
static int DefaultPrintLevel()
 
static double DefaultTolerance()
 
static const std::string & DefaultMinimizerAlgo()
 
static int DefaultStrategy()
 
Template class to wrap any C++ callable object which takes one argument i.e.
 
Common abstract base class for objects that represent a value and a "shape" in RooFit.
 
RooFit::OwningPtr< RooArgSet > getParameters(const RooAbsData *data, bool stripDisconnected=true) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
 
RooFit::OwningPtr< RooArgSet > getObservables(const RooArgSet &set, bool valueOnly=true) const
Given a set of possible observables, return the observables that this PDF depends on.
 
RooFit::OwningPtr< RooArgSet > getVariables(bool stripDisconnected=true) const
Return RooArgSet with all variables (tree leaf nodes of expression tree)
 
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
 
bool contains(const RooAbsArg &var) const
Check if collection contains an argument with the same name as var.
 
virtual bool add(const RooAbsArg &var, bool silent=false)
Add the specified argument to list.
 
void assign(const RooAbsCollection &other) const
Sets the value, cache and constant attribute of any argument in our set that also appears in the othe...
 
Storage_t::size_type size() const
 
RooAbsArg * first() const
 
void Print(Option_t *options=nullptr) const override
This method must be overridden when a class wants to print itself.
 
Abstract base class for binned and unbinned datasets.
 
virtual double sumEntries() const =0
Return effective number of entries in dataset, i.e., sum all weights.
 
virtual const RooArgSet * get() const
 
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
 
Abstract interface for all probability density functions.
 
virtual double expectedEvents(const RooArgSet *nset) const
Return expected number of events to be used in calculation of extended likelihood.
 
bool canBeExtended() const
If true, PDF can provide extended likelihood term.
 
Abstract base class for objects that represent a real value and implements functionality common to al...
 
double getVal(const RooArgSet *normalisationSet=nullptr) const
Evaluate object.
 
static void setHideOffset(bool flag)
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet * snapshot(bool deepCopy=true) const
Use RooAbsCollection::snapshot(), but return as RooArgSet.
 
Object to represent discrete states.
 
Container class to hold unbinned data.
 
Collection class for internal use, storing a collection of RooAbsArg pointers in a doubly linked list...
 
virtual void Add(TObject *arg)
 
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
 
static RooMsgService & instance()
Return reference to singleton instance.
 
Multivariate Gaussian p.d.f.
 
Efficient implementation of a product of PDFs of the form.
 
const RooArgList & pdfList() const
 
Variable that can be changed from the outside.
 
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
 
static double GetExpectedPValues(double pnull, double palt, double nsigma, bool usecls, bool oneSided=true)
function given the null and the alt p value - return the expected one given the N - sigma value
 
static void SetPrintLevel(int level)
set print level (static function)
 
RooArgSet fAsimovGlobObs
snapshot of Asimov global observables
 
static RooAbsData * GenerateAsimovData(const RooAbsPdf &pdf, const RooArgSet &observables)
generate the asimov data for the observables (not the global ones) need to deal with the case of a si...
 
int fUseQTilde
flag to indicate if using qtilde or not (-1 (default based on RooRealVar)), 0 false,...
 
bool fIsInitialized
! flag to check if calculator is initialized
 
HypoTestResult * GetHypoTest() const override
re-implement HypoTest computation using the asymptotic
 
bool fOneSided
for one sided PL test statistic (upper limits)
 
RooArgSet fBestFitParams
snapshot of all best fitted Parameter values
 
AsymptoticCalculator(RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, bool nominalAsimov=false)
constructor for asymptotic calculator from Data set and ModelConfig
 
bool fOneSidedDiscovery
for one sided PL test statistic (for discovery)
 
RooAbsData * fAsimovData
asimov data set
 
RooArgSet fBestFitPoi
snapshot of best fitted POI values
 
static RooAbsData * MakeAsimovData(RooAbsData &data, const ModelConfig &model, const RooArgSet &poiValues, RooArgSet &globObs, const RooArgSet *genPoiValues=nullptr)
Make Asimov data.
 
bool fNominalAsimov
make Asimov at nominal parameter values
 
bool Initialize() const
initialize the calculator by performing a global fit and make the Asimov data set
 
Common base class for the Hypothesis Test Calculators.
 
const ModelConfig * GetNullModel(void) const
 
const ModelConfig * GetAlternateModel(void) const
 
const RooAbsData * GetData(void) const
 
HypoTestResult is a base class for results from hypothesis tests.
 
virtual double CLs() const
is simply  (not a method, but a quantity)
 
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
 
std::unique_ptr< RooFitResult > fitTo(RooAbsData &data, CmdArgs_t const &...cmdArgs) const
Wrapper around RooAbsPdf::fitTo(), where the pdf and some configuration options are retrieved from th...
 
const RooArgSet * GetGlobalObservables() const
get RooArgSet for global observables (return nullptr if not existing)
 
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return nullptr if not existing)
 
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return nullptr if not existing)
 
const RooArgSet * GetObservables() const
get RooArgSet for observables (return nullptr if not existing)
 
RooAbsPdf * GetPdf() const
get model PDF (return nullptr if pdf has not been specified or does not exist)
 
TClass instances represent classes, structs and namespaces in the ROOT type system.
 
const char * GetName() const override
Returns name of object.
 
virtual const char * ClassName() const
Returns name of class to which the object belongs.
 
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
 
RooCmdArg Index(RooCategory &icat)
 
RooCmdArg WeightVar(const char *name="weight", bool reinterpretAsWeight=false)
 
RooCmdArg Import(const char *state, TH1 &histo)
 
RooCmdArg Offset(std::string const &mode)
 
RooCmdArg Constrain(const RooArgSet ¶ms)
 
RooCmdArg Minimizer(const char *type, const char *alg=nullptr)
 
RooCmdArg Hesse(bool flag=true)
 
RooCmdArg Strategy(Int_t code)
 
RooCmdArg EvalErrorWall(bool flag)
 
RooCmdArg PrintLevel(Int_t code)
 
double normal_cdf_c(double x, double sigma=1, double x0=0)
Complement of the cumulative distribution function of the normal (Gaussian) distribution (upper tail)...
 
double normal_cdf(double x, double sigma=1, double x0=0)
Cumulative distribution function of the normal (Gaussian) distribution (lower tail).
 
double normal_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
 
double normal_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
 
double nll(double pdf, double weight, int binnedL, int doBinOffset)
 
MsgLevel
Verbosity level for RooMsgService::StreamConfig in RooMsgService.
 
Namespace for the RooStats classes.
 
bool SetAllConstant(const RooAbsCollection &coll, bool constant=true)
utility function to set all variable constant in a collection (from G.
 
void RemoveConstantParameters(RooArgSet *set)
 
std::string const & NLLOffsetMode()
Test what offsetting mode RooStats should use by default.
 
RooAbsPdf * MakeNuisancePdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name)
extract constraint terms from pdf
 
RooStatsConfig & GetGlobalRooStatsConfig()
Retrieve the config object which can be used to set flags for things like offsetting the likelihood o...
 
Double_t QuietNaN()
Returns a quiet NaN as defined by IEEE 754.
 
PaltFunction(double offset, double pval, int icase)