70 fOneSided(false), fOneSidedDiscovery(false), fNominalAsimov(nominalAsimov),
72 fNLLObs(0), fNLLAsimov(0),
88 oocoutI((
TObject*)0,
InputArguments) <<
"AsymptotiCalculator: Minimum of POI is " << muNull->
getMin() <<
" corresponds to null snapshot - default configuration is one-sided discovery formulae " << std::endl;
125 if (!poi || poi->
getSize() == 0) {
131 <<
"The asymptotic calculator works for only one POI - consider as POI only the first parameter" 138 if(nullSnapshot ==
NULL || nullSnapshot->
getSize() == 0) {
139 oocoutE((
TObject*)0,
InputArguments) <<
"AsymptoticCalculator::Initialize - Null model needs a snapshot. Set using modelconfig->SetSnapshot(poi)." << endl;
162 oocoutP((
TObject*)0,
Eval) <<
"AsymptoticCalculator::Initialize - Find best unconditional NLL on observed data" << endl;
176 if(altSnapshot ==
NULL || altSnapshot->
getSize() == 0) {
183 oocoutP((
TObject*)0,
Eval) <<
"AsymptoticCalculator: Building Asimov data Set" << endl;
197 <<
" set the same data bins " << data.
numEntries() <<
" in range " 198 <<
" [ " << xobs->
getMin() <<
" , " << xobs->
getMax() <<
" ]" << std::endl;
206 oocoutI((
TObject*)0,
InputArguments) <<
"AsymptoticCalculator: Asimov data will be generated using fitted nuisance parameter values" << endl;
214 oocoutI((
TObject*)0,
InputArguments) <<
"AsymptoticCalculator: Asimovdata set will be generated using nominal (current) nuisance parameter values" << endl;
215 nominalParams = poiAlt;
242 oocoutP((
TObject*)0,
Eval) <<
"AsymptoticCalculator::Initialize Find best conditional NLL on ASIMOV data set for given alt POI ( " <<
251 globObs = globObsSnapshot;
254 if (prevBins > 0 && xobs) xobs->
setBins(prevBins);
275 if (condObs) conditionalObs.
add(*condObs);
285 if (poiSet && poiSet->
getSize() > 0) {
291 paramsSetConstant.
add(*poiVar);
294 std::cout <<
"Model with more than one POI are not supported - ignore extra parameters, consider only first one" << std::endl;
323 bool skipFit = (nllParams.
getSize() == 0);
347 std::cout <<
"AsymptoticCalculator::EvaluateNLL ........ using " << minimizer <<
" / " << algorithm
348 <<
" with strategy " << strategy <<
" and tolerance " << tol << std::endl;
351 for (
int tries = 1, maxtries = 4; tries <= maxtries; ++tries) {
353 status = minim.
minimize(minimizer, algorithm);
354 if (status%1000 == 0) {
358 printf(
" ----> Doing a re-scan first\n");
363 printf(
" ----> trying with strategy = 1\n");
370 printf(
" ----> trying with improve\n");
371 minimizer =
"Minuit";
372 algorithm =
"migradimproved";
380 if (status%100 == 0) {
381 result = minim.
save();
400 if (result)
delete result;
407 std::cout <<
"AsymptoticCalculator::EvaluateNLL - value = " << val;
410 std::cout <<
" for poi fixed at = " << muTest;
413 std::cout <<
"\tfit time : ";
417 std::cout << std::endl;
447 oocoutE((
TObject*)0,
InputArguments) <<
"AsymptoticCalculator::GetHypoTest - Error initializing Asymptotic calculator - return NULL result " << endl;
453 oocoutE((
TObject*)0,
InputArguments) <<
"AsymptoticCalculator::GetHypoTest - Asimov data set has not been generated - return NULL result " << endl;
472 if (poiTest.getSize() > 1) {
473 oocoutW((
TObject*)0,
InputArguments) <<
"AsymptoticCalculator::GetHypoTest: snapshot has more than one POI - assume as POI first parameter " << std::endl;
483 assert(muHat &&
"no best fit parameter defined");
485 assert(muTest &&
"poi snapshot is not existing");
490 std::cout << std::endl;
491 oocoutI((
TObject*)0,
Eval) <<
"AsymptoticCalculator::GetHypoTest: - perform an hypothesis test for POI ( " << muTest->
GetName() <<
" ) = " << muTest->
getVal() << std::endl;
492 oocoutP((
TObject*)0,
Eval) <<
"AsymptoticCalculator::GetHypoTest - Find best conditional NLL on OBSERVED data set ..... " << std::endl;
498 double qmu = 2.*(condNLL -
fNLLObs);
503 oocoutP((
TObject*)0,
Eval) <<
"\t OBSERVED DATA : qmu = " << qmu <<
" condNLL = " << condNLL <<
" uncond " <<
fNLLObs << std::endl;
511 oocoutW((
TObject*)0,
Minimization) <<
"AsymptoticCalculator: Found a negative value of the qmu - retry to do the unconditional fit " 522 <<
" old NLL = " <<
fNLLObs <<
" old muHat " << muHat->
getVal() << std::endl;
535 <<
" NLL = " <<
fNLLObs <<
" muHat " << muHat->
getVal() << std::endl;
541 oocoutP((
TObject*)0,
Eval) <<
"After unconditional refit, new qmu value is " << qmu << std::endl;
548 << muTest->
getVal() <<
" return a dummy result " 554 << muTest->
getVal() <<
" return a dummy result " 578 if (verbose > 0)
oocoutP((
TObject*)0,
Eval) <<
"AsymptoticCalculator::GetHypoTest -- Find best conditional NLL on ASIMOV data set .... " << std::endl;
591 oocoutW((
TObject*)0,
Minimization) <<
"AsymptoticCalculator: Found a negative value of the qmu Asimov- retry to do the unconditional fit " 594 oocoutW((
TObject*)0,
Minimization) <<
"AsymptoticCalculator: Fit failed for unconditional the qmu Asimov- retry unconditional fit " 612 oocoutP((
TObject*)0,
Eval) <<
"After unconditional Asimov refit, new qmu_A value is " << qmu_A << std::endl;
619 << muTest->
getVal() <<
" return a dummy result " 625 << muTest->
getVal() <<
" return a dummy result " 632 globObs = globObsSnapshot;
644 bool useQTilde =
false;
659 <<
" - using standard q asymptotic formulae " << std::endl;
670 <<
" muTest = " << muTest->
getVal() << std::endl;
677 <<
" muTest = " << muTest->
getVal() << std::endl;
683 if (qmu < 0 && qmu > -tol) qmu = 0;
684 if (qmu_A < 0 && qmu_A > -tol) qmu_A = 0;
691 double pnull = -1, palt = -1;
696 double sqrtqmu = (qmu > 0) ?
std::sqrt(qmu) : 0;
697 double sqrtqmu_A = (qmu_A > 0) ?
std::sqrt(qmu_A) : 0;
704 oocoutI((
TObject*)0,
Eval) <<
"Using one-sided limit asymptotic formula (qmu)" << endl;
706 oocoutI((
TObject*)0,
Eval) <<
"Using one-sided discovery asymptotic formula (q0)" << endl;
713 if (verbose > 2)
oocoutI((
TObject*)0,
Eval) <<
"Using two-sided asimptotic formula (tmu)" << endl;
723 if ( qmu > qmu_A && (qmu_A > 0 || qmu > tol) ) {
724 if (verbose > 2)
oocoutI((
TObject*)0,
Eval) <<
"Using qmu_tilde (qmu is greater than qmu_A)" << endl;
732 if ( qmu > qmu_A && (qmu_A > 0 || qmu > tol) ) {
733 if (verbose > 2)
oocoutI((
TObject*)0,
Eval) <<
"Using tmu_tilde (qmu is greater than qmu_A)" << endl;
745 string resultname =
"HypoTestAsymptotic_result";
751 <<
"poi = " << muTest->
getVal() <<
" qmu = " << qmu <<
" qmu_A = " << qmu_A
752 <<
" sigma = " << muTest->
getVal()/sqrtqmu_A
753 <<
" CLsplusb = " << pnull <<
" CLb = " << palt <<
" CLs = " << res->
CLs() << std::endl;
759 struct PaltFunction {
760 PaltFunction(
double offset,
double pval,
int icase) :
761 fOffset(offset), fPval(pval), fCase(icase) {}
776 if (!useCls)
return clsplusb;
778 return (clb == 0) ? -1 : clsplusb / clb;
789 PaltFunction
f( sqrttmu, palt, -1);
793 bool ret = brf.
Solve();
795 oocoutE((
TObject*)0,
Eval) <<
"Error finding expected p-values - return -1" << std::endl;
798 double sqrttmu_A = brf.
Root();
806 oocoutE((
TObject*)0,
Eval) <<
"Error finding expected p-values - return -1" << std::endl;
832 if (debug) cout <<
"looping on observable " << v->
GetName() << endl;
833 for (
int i = 0; i < v->
getBins(); ++i) {
835 if (index < obs.
getSize() -1) {
837 double prevBinVolume = binVolume;
839 FillBins(pdf, obs, data, index, binVolume, ibin);
841 binVolume = prevBinVolume;
846 double totBinVolume = binVolume * v->
getBinWidth(i);
847 double fval = pdf.
getVal(&obstmp)*totBinVolume;
850 if (fval*expectedEvents <= 0)
852 if (fval*expectedEvents < 0)
853 cout <<
"WARNING::Detected a bin with negative expected events! Please check your inputs." << endl;
855 cout <<
"WARNING::Detected a bin with zero expected events- skip it" << endl;
859 data.
add(obs, fval*expectedEvents);
862 cout <<
"bin " << ibin <<
"\t";
863 for (
int j=0; j < obs.
getSize(); ++j) { cout <<
" " << ((
RooRealVar&) obs[j]).getVal(); }
864 cout <<
" w = " << fval*expectedEvents;
875 cout <<
"ending loop on .. " << v->
GetName() << endl;
888 if (!
a->dependsOn(obs))
continue;
891 if ((pois = dynamic_cast<RooPoisson *>(
a)) != 0) {
894 }
else if ((gaus = dynamic_cast<RooGaussian *>(
a)) != 0) {
907 ret = (pois != 0 || gaus != 0 );
922 const char * pdfName = pdf.IsA()->
GetName();
924 for (
RooAbsArg *
a = iter.next();
a != 0;
a = iter.next()) {
927 oocoutF((
TObject*)0,
Generation) <<
"AsymptoticCalculator::SetObsExpected( " << pdfName <<
" ) : Has two observables ?? " << endl;
932 oocoutF((
TObject*)0,
Generation) <<
"AsymptoticCalculator::SetObsExpected( " << pdfName <<
" ) : Observable is not a RooRealVar??" << endl;
936 if (!
a->isConstant() ) {
938 oocoutE((
TObject*)0,
Generation) <<
"AsymptoticCalculator::SetObsExpected( " << pdfName <<
" ) : Has two non-const arguments " << endl;
943 oocoutF((
TObject*)0,
Generation) <<
"AsymptoticCalculator::SetObsExpected( " << pdfName <<
" ) : Expected is not a RooAbsReal??" << endl;
950 oocoutF((
TObject*)0,
Generation) <<
"AsymptoticCalculator::SetObsExpected( " << pdfName <<
" ) : No observable?" << endl;
954 oocoutF((
TObject*)0,
Generation) <<
"AsymptoticCalculator::SetObsExpected( " << pdfName <<
" ) : No observable?" << endl;
961 std::cout <<
"SetObsToExpected : setting " << myobs->
GetName() <<
" to expected value " << myexp->
getVal() <<
" of " << myexp->
GetName() << std::endl;
978 std::cout <<
"generate counting Asimov data for pdf of type " << pdf.IsA()->
GetName() << std::endl;
983 }
else if ((pois = dynamic_cast<RooPoisson *>(&pdf)) != 0) {
987 }
else if ((gaus = dynamic_cast<RooGaussian *>(&pdf)) != 0) {
1019 obsAndWeight.
add(weightVar);
1036 if (printLevel >= 2) {
1037 cout <<
"Generating Asimov data for pdf " << pdf.
GetName() << endl;
1038 cout <<
"list of observables " << endl;
1043 double binVolume = 1;
1045 FillBins(pdf, obsList, *asimovData, obsIndex, binVolume, nbins);
1046 if (printLevel >= 2)
1047 cout <<
"filled from " << pdf.
GetName() <<
" " << nbins <<
" nbins " <<
" volume is " << binVolume << endl;
1065 if (printLevel >= 1)
1067 asimovData->
Print();
1071 cout <<
"sum entries is nan"<<endl;
1089 if (printLevel > 1) cout <<
" Generate Asimov data for observables"<<endl;
1097 std::map<std::string, RooDataSet*> asimovDataMap;
1101 int nrIndices = channelCat.
numTypes();
1102 if( nrIndices == 0 ) {
1105 for (
int i=0;i<nrIndices;i++){
1114 cout <<
"on type " << channelCat.
getLabel() <<
" " << channelCat.
getIndex() << endl;
1120 if (!dataSinglePdf) {
1130 cout <<
"channel: " << channelCat.
getLabel() <<
", data: ";
1131 dataSinglePdf->
Print();
1137 obsAndWeight.
add(*weightVar);
1169 std::cout <<
"MakeAsimov: Setting poi " << tmpPar->
GetName() <<
" to a constant value = " << tmpPar->
getVal() << std::endl;
1170 paramsSetConstant.
add(*tmpPar);
1174 bool hasFloatParams =
false;
1179 if (constrainParams.
getSize() > 0) hasFloatParams =
true;
1187 if ( rrv != 0 && rrv->
isConstant() == false ) { hasFloatParams =
true;
break; }
1190 if (hasFloatParams) {
1196 std::cout <<
"MakeAsimov: doing a conditional fit for finding best nuisance values " << std::endl;
1199 std::cout <<
"POI values:\n"; poi.Print(
"v");
1201 std::cout <<
"Nuis param values:\n";
1202 constrainParams.
Print(
"v");
1218 if (verbose>0) { std::cout <<
"fit time "; tw2.
Print();}
1222 std::cout <<
"Nuisance parameters after fit for asimov dataset: " << std::endl;
1239 if (genPoiValues) *allParams = *genPoiValues;
1265 if (allParamValues.
getSize() > 0) {
1267 *allVars = allParamValues;
1276 std::cout <<
"Generated Asimov data for observables "; (model.
GetObservables() )->
Print();
1279 std::cout <<
"--- Asimov data values \n";
1283 std::cout <<
"--- Asimov data numEntries = " << asimov->
numEntries() <<
" sumOfEntries = " << asimov->
sumEntries() << std::endl;
1285 std::cout <<
"\ttime for generating : "; tw.
Print();
1305 std::cout <<
"Generating Asimov data for global observables " << std::endl;
1313 gobs.snapshot(snapGlobalObsData);
1319 oocoutW((
TObject*)0,
Generation) <<
"AsymptoticCalculator::MakeAsimovData: model does not have nuisance parameters but has global observables" 1320 <<
" set global observales to model values " << endl;
1321 asimovGlobObs = gobs;
1327 if (nuispdf.get() == 0) {
1328 oocoutF((
TObject*)0,
Generation) <<
"AsymptoticCalculator::MakeAsimovData: model has nuisance parameters and global obs but no nuisance pdf " 1339 pdfList.
add(*nuispdf.get());
1344 assert(cterm &&
"AsimovUtils: a factor of the nuisance pdf is not a Pdf!");
1347 if (
typeid(*cterm) ==
typeid(
RooUniform))
continue;
1349 std::unique_ptr<RooArgSet> cpars(cterm->
getParameters(&gobs));
1351 if (cgobs->getSize() > 1) {
1353 <<
" has multiple global observables -cannot generate - skip it" << std::endl;
1356 else if (cgobs->getSize() == 0) {
1358 <<
" has no global observables - skip it" << std::endl;
1366 if (cpars->getSize() != 1) {
1368 << cterm->
GetName() <<
" has multiple floating params - cannot generate - skip it " << std::endl;
1372 bool foundServer =
false;
1375 TClass * cClass = cterm->IsA();
1376 if (verbose > 2) std::cout <<
"Constraint " << cterm->
GetName() <<
" of type " << cClass->
GetName() << std::endl;
1382 << cterm->
GetName() <<
" of type " << className
1383 <<
" is a non-supported type - result might be not correct " << std::endl;
1401 << cterm->
GetName() <<
" has no direct dependence on global observable- cannot generate it " << std::endl;
1413 for (
RooAbsArg *a2 = itc.next(); a2 != 0; a2 = itc.next()) {
1414 if (
TString(a2->GetName()).Contains(
"theta") ) {
1419 if (thetaGamma == 0) {
1421 << cterm->
GetName() <<
" is a Gamma distribution and no server named theta is found. Assume that the Gamma scale is 1 " << std::endl;
1425 std::cout <<
"Gamma constraint has a scale " << thetaGamma->
GetName() <<
" = " << thetaGamma->
getVal() << std::endl;
1429 for (
RooAbsArg *a2 = iter2.next(); a2 != 0; a2 = iter2.next()) {
1431 if (verbose > 2) std::cout <<
"Loop on constraint server term " << a2->
GetName() << std::endl;
1438 << cterm->
GetName() <<
" constraint term has more server depending on nuisance- cannot generate it " <<
1440 foundServer =
false;
1443 if (thetaGamma && thetaGamma->
getVal() > 0)
1450 std::cout <<
"setting global observable "<< rrv.
GetName() <<
" to value " << rrv.
getVal()
1451 <<
" which comes from " << rrv2->
GetName() << std::endl;
1456 oocoutE((
TObject*)0,
Generation) <<
"AsymptoticCalculator::MakeAsimovData - can't find nuisance for constraint term - global observales will not be set to Asimov value " << cterm->
GetName() << std::endl;
1457 std::cerr <<
"Parameters: " << std::endl;
1459 std::cerr <<
"Observables: " << std::endl;
1470 gobs.snapshot(asimovGlobObs);
1473 gobs = snapGlobalObsData;
1476 std::cout <<
"Generated Asimov data for global observables ";
1477 if (verbose == 1) gobs.Print();
1481 std::cout <<
"\nGlobal observables for data: " << std::endl;
1483 std::cout <<
"\nGlobal observables for asimov: " << std::endl;
1484 asimovGlobObs.
Print(
"V");
virtual RooAbsReal * createNLL(RooAbsData &data, const RooLinkedList &cmdList)
Construct representation of -log(L) of PDFwith given dataset.
virtual Double_t sumEntries() const =0
double normal_quantile(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the lower tail of the normal (Gaussian) distri...
virtual Double_t getMin(const char *name=0) const
RooArgSet * getVariables(Bool_t stripDisconnected=kTRUE) const
Return RooArgSet with all variables (tree leaf nodes of expresssion tree)
static RooAbsData * GenerateAsimovData(const RooAbsPdf &pdf, const RooArgSet &observables)
virtual const char * GetName() const
Returns name of object.
virtual void setBin(Int_t ibin, const char *rangeName=0)
Set value to center of bin 'ibin' of binning 'rangeName' (or of default binning if no range is specif...
RooCmdArg Offset(Bool_t flag=kTRUE)
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add the specified argument to list.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
const ModelConfig * GetAlternateModel(void) const
const RooArgSet * GetObservables() const
get RooArgSet for observables (return NULL if not existing)
virtual Double_t getMax(const char *name=0) const
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
bool Solve(int maxIter=100, double absTol=1E-8, double relTol=1E-10)
Returns the X value corresponding to the function value fy for (xmin<x<xmax).
void optimizeConst(Int_t flag)
If flag is true, perform constant term optimization on function being minimized.
Bool_t dependsOn(const RooAbsCollection &serverList, const RooAbsArg *ignoreArg=0, Bool_t valueOnly=kFALSE) const
Test whether we depend on (ie, are served by) any object in the specified collection.
void Print(Option_t *option="") const
Print the real and cpu time passed between the start and stop events.
RooArgSet * getObservables(const RooArgSet &set, Bool_t valueOnly=kTRUE) const
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 int DefaultStrategy()
virtual const RooArgSet * get() const
RooAbsPdf * MakeNuisancePdf(RooAbsPdf &pdf, const RooArgSet &observables, const char *name)
double normal_quantile_c(double z, double sigma)
Inverse ( ) of the cumulative distribution function of the upper tail of the normal (Gaussian) distri...
RooCmdArg CloneData(Bool_t flag)
RooCmdArg PrintLevel(Int_t code)
virtual Bool_t setIndex(Int_t index, Bool_t printError=kTRUE)
Set value by specifying the index code of the desired state.
Double_t getVal(const RooArgSet *set=0) const
HypoTestResult is a base class for results from hypothesis tests.
RooFit::MsgLevel globalKillBelow() const
RooCmdArg Strategy(Int_t code)
static RooMsgService & instance()
Return reference to singleton instance.
AsymptoticCalculator(RooAbsData &data, const ModelConfig &altModel, const ModelConfig &nullModel, bool nominalAsimov=false)
static void setHideOffset(Bool_t flag)
TRObject operator()(const T1 &t1) const
void setEps(Double_t eps)
Change MINUIT epsilon.
void setStrategy(Int_t strat)
Change MINUIT strategy to istrat.
RooAbsArg * findServer(const char *name) const
Template class to wrap any C++ callable object which takes one argument i.e.
static void SetPrintLevel(int level)
static RooAbsData * GenerateCountingAsimovData(RooAbsPdf &pdf, const RooArgSet &obs, const RooRealVar &weightVar, RooCategory *channelCat=0)
Common base class for the Hypothesis Test Calculators.
static RooAbsData * MakeAsimovData(RooAbsData &data, const ModelConfig &model, const RooArgSet &poiValues, RooArgSet &globObs, const RooArgSet *genPoiValues=0)
make the asimov data from the ModelConfig and list of poi - return data set annd snapshoot of global ...
RooFIter serverMIterator() const
static void FillBins(const RooAbsPdf &pdf, const RooArgList &obs, RooAbsData &data, int &index, double &binVolume, int &ibin)
Int_t numTypes(const char *=0) const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void removeAll()
Remove all arguments from our set, deleting them if we own them.
double normal_cdf(double x, double sigma=1, double x0=0)
Cumulative distribution function of the normal (Gaussian) distribution (lower tail).
virtual HypoTestResult * GetHypoTest() const
re-implement HypoTest computation using the asymptotic
virtual void Print(Option_t *options=0) const
This method must be overridden when a class wants to print itself.
void setBins(Int_t nBins, const char *name=0)
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return expected number of events from this p.d.f for use in extended likelihood calculations.
virtual void add(const RooArgSet &row, Double_t weight=1, Double_t weightError=0)=0
virtual void setVal(Double_t value)
Set value of variable to 'value'.
double Root() const
Returns root value.
static double EvaluateNLL(RooAbsPdf &pdf, RooAbsData &data, const RooArgSet *condObs, const RooArgSet *poiSet=0)
const RooArgSet * GetConditionalObservables() const
get RooArgSet for conditional observables (return NULL if not existing)
bool Initialize() const
initialize the calculator by performin g a global fit and make the Asimov data set ...
RooAbsCollection * snapshot(Bool_t deepCopy=kTRUE) const
Take a snap shot of current collection contents: An owning collection is returned containing clones o...
static const std::string & DefaultMinimizerType()
const RooAbsCategoryLValue & indexCat() const
RooAbsArg * first() const
void setConstant(Bool_t value=kTRUE)
RooFitResult * save(const char *name=0, const char *title=0)
Save and return a RooFitResult snaphot of current minimizer status.
RooCmdArg Minimizer(const char *type, const char *alg=0)
const RooArgList & pdfList() const
static int DefaultPrintLevel()
void setGlobalKillBelow(RooFit::MsgLevel level)
The ROOT global object gROOT contains a list of all defined classes.
static bool SetObsToExpected(RooAbsPdf &pdf, const RooArgSet &obs)
void setNoRounding(bool flag=kTRUE)
virtual Int_t getIndex() const
Return index number of current state.
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)...
static Bool_t hideOffset()
Bool_t canBeExtended() const
virtual void add(const RooArgSet &row, Double_t weight=1.0, Double_t weightError=0)
Add a data point, with its coordinates specified in the 'data' argset, to the data set...
virtual Double_t CLs() const
is simply (not a method, but a quantity)
Class for finding the root of a one dimensional function using the Brent algorithm.
RooCmdArg Import(const char *state, TH1 &histo)
const RooAbsData * GetData(void) const
static const std::string & DefaultMinimizerAlgo()
RooCmdArg Index(RooCategory &icat)
virtual Double_t sumEntries() const
Namespace for the RooStats classes.
RooAbsPdf * GetPdf() const
get model PDF (return NULL if pdf has not been specified or does not exist)
virtual void Print(Option_t *options=0) const
Print TNamed name and title.
const RooArgSet * GetParametersOfInterest() const
get RooArgSet containing the parameter of interest (return NULL if not existing)
RooCmdArg Hesse(Bool_t flag=kTRUE)
void Print(std::ostream &os, const OptionType &opt)
RooAbsArg * find(const char *name) const
Find object with given name in list.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooArgSet * getParameters(const RooAbsData *data, Bool_t stripDisconnected=kTRUE) const
Create a list of leaf nodes in the arg tree starting with ourself as top node that don't match any of...
int fUseQTilde
flag to check if calculator is initialized
RooCmdArg WeightVar(const char *name, Bool_t reinterpretAsWeight=kFALSE)
bool SetAllConstant(const RooAbsCollection &coll, bool constant=true)
virtual const char * getLabel() const
Return label string of current state.
Int_t minimize(const char *type, const char *alg=0)
const ModelConfig * GetNullModel(void) const
static Vc_ALWAYS_INLINE int_v max(const int_v &x, const int_v &y)
Mother of all ROOT objects.
Int_t setPrintLevel(Int_t newLevel)
Change the MINUIT internal printing level.
RooAbsPdf * getPdf(const char *catName) const
Return the p.d.f associated with the given index category name.
void RemoveConstantParameters(RooArgSet *set)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
const RooArgSet * GetGlobalObservables() const
get RooArgSet for global observables (return NULL if not existing)
double f2(const double *x)
const RooArgSet * GetNuisanceParameters() const
get RooArgSet containing the nuisance parameters (return NULL if not existing)
RooLinkedListIter iterator(Bool_t dir=kIterForward) const
virtual RooFitResult * fitTo(RooAbsData &data, const RooCmdArg &arg1=RooCmdArg::none(), const RooCmdArg &arg2=RooCmdArg::none(), const RooCmdArg &arg3=RooCmdArg::none(), const RooCmdArg &arg4=RooCmdArg::none(), const RooCmdArg &arg5=RooCmdArg::none(), const RooCmdArg &arg6=RooCmdArg::none(), const RooCmdArg &arg7=RooCmdArg::none(), const RooCmdArg &arg8=RooCmdArg::none())
Fit PDF to given dataset.
virtual Int_t getBins(const char *name=0) const
bool SetFunction(const ROOT::Math::IGenFunction &f, double xlow, double xup)
Sets the function for the rest of the algorithms.
const RooArgSet * GetSnapshot() const
get RooArgSet for parameters for a particular hypothesis (return NULL if not existing) ...
Bool_t contains(const RooAbsArg &var) const
RooAbsArg is the common abstract base class for objects that represent a value (of arbitrary type) an...
virtual Double_t getBinWidth(Int_t i, const char *rangeName=0) const
static double DefaultTolerance()
RooCmdArg ConditionalObservables(const RooArgSet &set)
Double_t getError() const
Hypothesis Test Calculator based on the asymptotic formulae for the profile likelihood ratio...
Bool_t isConstant() const
virtual Bool_t add(const RooAbsArg &var, Bool_t silent=kFALSE)
Add element to non-owning set.
RooCmdArg Constrain(const RooArgSet ¶ms)
virtual Int_t numEntries() const
static RooAbsData * GenerateAsimovDataSinglePdf(const RooAbsPdf &pdf, const RooArgSet &obs, const RooRealVar &weightVar, RooCategory *channelCat=0)