From 977be0727f890f1c9549057fe4082293766ffe5e Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Wed, 20 Oct 2021 19:29:05 +0200 Subject: [PATCH] [RF] Don't use batch mode in `rf611_weightedfits.C` tutorial This is done so we don't have to adopt this tutorial to the new batch mode yet. --- tutorials/roofit/rf611_weightedfits.C | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tutorials/roofit/rf611_weightedfits.C b/tutorials/roofit/rf611_weightedfits.C index 3d64fb909fe43..d1082a128a5b1 100644 --- a/tutorials/roofit/rf611_weightedfits.C +++ b/tutorials/roofit/rf611_weightedfits.C @@ -65,6 +65,8 @@ #include "RooDataSet.h" #include "RooPolynomial.h" +#include "rbc.h" + using namespace RooFit; @@ -107,7 +109,7 @@ int rf611_weightedfits(int acceptancemodel=2) { TH1D* hc1pull3 = new TH1D("hc1pull3", "Asymptotically correct approach [Asymptotic(true)];Pull (c_{1}^{fit}-c_{1}^{gen})/#sigma(c_{1});", 20, -5.0, 5.0); //number of pseudoexperiments (toys) and number of events per pseudoexperiment - constexpr unsigned int ntoys = 500; + constexpr unsigned int ntoys = 20; constexpr unsigned int nstats = 5000; //parameters used in the generation constexpr double c0gen = 0.0; @@ -123,6 +125,8 @@ int rf611_weightedfits(int acceptancemodel=2) { // M a i n l o o p : r u n p s e u d o e x p e r i m e n t s //---------------------------------------------------------------- for (unsigned int i=0; iFill((c0.getVal()-c0gen)/c0.getError()); hc1pull1->Fill((c1.getVal()-c1gen)/c1.getError()); //this uses the correction with the Hesse matrix with squared weights - result = pol.fitTo(data, Save(true), SumW2Error(true), PrintLevel(-1), BatchMode(true)); + result = pol.fitTo(data, Save(true), SumW2Error(true), PrintLevel(-1), BatchMode(batchMode)); hc0pull2->Fill((c0.getVal()-c0gen)/c0.getError()); hc1pull2->Fill((c1.getVal()-c1gen)/c1.getError()); //this uses the asymptotically correct approach - result = pol.fitTo(data, Save(true), AsymptoticError(true), PrintLevel(-1), BatchMode(true)); + result = pol.fitTo(data, Save(true), AsymptoticError(true), PrintLevel(-1), BatchMode(batchMode)); hc0pull3->Fill((c0.getVal()-c0gen)/c0.getError()); hc1pull3->Fill((c1.getVal()-c1gen)/c1.getError()); }