55 #if !defined(__CINT__) || defined(__MAKECINT__) 56 #include "../tutorials/roostats/NuMuToNuE_Oscillation.h" 57 #include "../tutorials/roostats/NuMuToNuE_Oscillation.cxx" 59 #include "../tutorials/roostats/NuMuToNuE_Oscillation.cxx+" 67 void rs401d_FeldmanCousins(
bool doFeldmanCousins=
false,
bool doMCMC =
true)
98 RooRealVar deltaMSq(
"deltaMSq",
"#Delta m^{2}",40,1,300,
"eV/c^{2}");
99 RooRealVar sinSq2theta(
"sinSq2theta",
"sin^{2}(2#theta)", .006,.0,.02);
121 RooRealVar EPrime(
"EPrime",
"", 15,10,60,
"GeV");
122 RooRealVar LPrime(
"LPrime",
"", .800,.600, 1.0,
"km");
124 LPrime,EPrime,deltaMSq);
134 RooConstVar maxEventsTot(
"maxEventsTot",
"maximum number of sinal events",50000);
135 RooConstVar inverseArea(
"inverseArea",
"1/(#Delta E #Delta L)",
136 1./(EPrime.getMax()-EPrime.getMin())/(LPrime.getMax()-LPrime.getMin()));
139 RooProduct sigNorm(
"sigNorm",
"",
RooArgSet(maxEventsTot, *intProbToOscInExp, inverseArea, sinSq2theta));
141 RooConstVar bkgNorm(
"bkgNorm",
"normalization for background",500);
163 Int_t nEventsData = bkgNorm.getVal()+sigNorm.getVal();
164 cout <<
"generate toy data with nEvents = " << nEventsData << endl;
188 model.plotOn(Eframe);
191 model.plotOn(Eframe);
192 Eframe->
SetTitle(
"toy data with best fit model (and sig+bkg components)");
202 hhh->
SetTitle(
"Likelihood Function");
212 RooArgSet parameters(deltaMSq, sinSq2theta);
222 fc.UseAdaptiveSampling(
true);
228 interval =
fc.GetInterval();
252 mc.SetNumIters(5000);
253 mc.SetNumBurnInSteps(100);
256 mc.SetAxes(axisList);
269 if (doFeldmanCousins) {
301 forContour->
Draw(
"cont2,same");
307 cout <<
"MCMC actual confidence level: " 316 plotInt.SetTitle(
"90% Confidence Intervals");
318 plotInt.Draw(
"same");
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
virtual const RooArgSet * get() const
virtual RooPlot * plotOn(RooPlot *frame, 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()) const
Plot dataset on specified frame.
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
This class provides simple and straightforward utilities to plot a MCMCInterval object.
Class RooProfileLL implements the profile likelihood estimator for a given likelihood and set of para...
void Print(Option_t *option="") const
Print the real and cpu time passed between the start and stop events.
RooCmdArg LineColor(Color_t color)
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
virtual void SetWorkspace(RooWorkspace &ws)
virtual void SetContour(Int_t nlevels, const Double_t *levels=0)
Set the number and values of contour levels.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
This class provides simple and straightforward utilities to plot a LikelihoodInterval object...
ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface class f...
virtual Bool_t IsInInterval(const RooArgSet &) const =0
check if given point is in the interval
void Draw(const Option_t *options=NULL)
void SetTitle(const char *name)
Set the title of the RooPlot to 'title'.
static RooMsgService & instance()
Return reference to singleton instance.
RooCmdArg Extended(Bool_t flag=kTRUE)
void setStreamStatus(Int_t id, Bool_t active)
(De)Activate stream with given unique ID
static struct mg_connection * fc(struct mg_context *ctx)
RooDataSet is a container class to hold N-dimensional binned data.
void Stop()
Stop the stopwatch.
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
virtual void SetPdf(const RooAbsPdf &pdf)
Set the Pdf, add to the the workspace if not already there.
static constexpr double L
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
RooConstVar represent a constant real-valued object.
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
virtual TObject * clone(const char *newname) const
RooRealVar represents a fundamental (non-derived) real valued object.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
RooAbsReal * createIntegral(const RooArgSet &iset, const RooCmdArg &arg1, 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()) const
Create an object that represents the integral of the function over one or more observables listed in ...
Class RooNLLVar implements a a -log(likelihood) calculation from a dataset and a PDF.
virtual void Draw(Option_t *option="")
Draw this histogram with options.
2-D histogram with a float per channel (see TH1 documentation)}
void SetLineColor(Color_t color)
RooDataSet is a container class to hold unbinned data.
RooProduct a RooAbsReal implementation that represent the product of a given set of other RooAbsReal ...
A RooPlot is a plot frame and a container for graphics objects within that frame. ...
The FeldmanCousins class (like the Feldman-Cousins technique) is essentially a specific configuration...
virtual Double_t GetActualConfidenceLevel()
virtual Double_t GetKeysPdfCutoff() { return fKeysCutoff; }
ConfInterval is an interface class for a generic interval in the RooStats framework.
Namespace for the RooStats classes.
virtual Int_t numEntries() const
Return the number of bins.
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
RooCmdArg Components(const RooArgSet &compSet)
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
RooCmdArg Scaling(Bool_t flag)
RooAbsPdf is the abstract interface for all probability density functions The class provides hybrid a...
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
Double_t getRealValue(const char *name, Double_t defVal=0, Bool_t verbose=kFALSE) const
Get value of a RooAbsReal stored in set with given name.
TObject * Clone(const char *newname=0) const
Make a complete copy of the underlying object.
RooPolynomial implements a polynomial p.d.f of the form By default coefficient a_0 is chosen to be 1...
virtual void SetParametersOfInterest(const RooArgSet &set)
virtual void SetTitle(const char *title)
See GetStatOverflows for more information.
virtual void SetBinContent(Int_t bin, Double_t content)
Set bin content.
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
virtual void Update()
Update canvas pad buffers.
TH1 * createHistogram(const char *name, const RooAbsRealLValue &xvar, 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()) const
Create and fill a ROOT histogram TH1,TH2 or TH3 with the values of this dataset.
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
The RooWorkspace is a persistable container for RooFit projects.
virtual void Draw(Option_t *options=0)
Draw this plot and all of the elements it contains.
RooCmdArg Binning(const RooAbsBinning &binning)