54#if !defined(__CINT__) || defined(__MAKECINT__) 
   55#include "../tutorials/roostats/NuMuToNuE_Oscillation.h" 
   56#include "../tutorials/roostats/NuMuToNuE_Oscillation.cxx"  
   58#include "../tutorials/roostats/NuMuToNuE_Oscillation.cxx+"  
   65void rs401d_FeldmanCousins(
bool doFeldmanCousins = 
false, 
bool doMCMC = 
true)
 
   94   RooRealVar deltaMSq(
"deltaMSq", 
"#Delta m^{2}", 40, 1, 300, 
"eV/c^{2}");
 
   95   RooRealVar sinSq2theta(
"sinSq2theta", 
"sin^{2}(2#theta)", .006, .0, .02);
 
  117   RooRealVar EPrime(
"EPrime", 
"", 15, 10, 60, 
"GeV");
 
  118   RooRealVar LPrime(
"LPrime", 
"", .800, .600, 1.0, 
"km"); 
 
  119   NuMuToNuE_Oscillation PnmuTonePrime(
"PnmuTonePrime", 
"P(#nu_{#mu} #rightarrow #nu_{e}", LPrime, EPrime, deltaMSq);
 
  129   RooConstVar maxEventsTot(
"maxEventsTot", 
"maximum number of sinal events", 50000);
 
  130   RooConstVar inverseArea(
"inverseArea", 
"1/(#Delta E #Delta L)",
 
  131                           1. / (EPrime.getMax() - EPrime.getMin()) / (LPrime.getMax() - LPrime.getMin()));
 
  134   RooProduct sigNorm(
"sigNorm", 
"", 
RooArgSet(maxEventsTot, *intProbToOscInExp, inverseArea, sinSq2theta));
 
  136   RooConstVar bkgNorm(
"bkgNorm", 
"normalization for background", 500);
 
  155   Int_t nEventsData = bkgNorm.getVal() + sigNorm.getVal();
 
  156   cout << 
"generate toy data with nEvents = " << nEventsData << endl;
 
  178   data->plotOn(Eframe);
 
  180   model.plotOn(Eframe);
 
  183   model.plotOn(Eframe);
 
  184   Eframe->
SetTitle(
"toy data with best fit model (and sig+bkg components)");
 
  189   std::unique_ptr<RooAbsReal> nll{model.createNLL(*
data, 
Extended(
true))};
 
  194   hhh->
SetTitle(
"Likelihood Function");
 
  202   RooArgSet parameters(deltaMSq, sinSq2theta);
 
  207   modelConfig.
SetPdf(model);
 
  212   fc.UseAdaptiveSampling(
true);
 
  217   if (doFeldmanCousins)
 
  218      interval = fc.GetInterval();
 
  241      mc.SetNumIters(5000);
 
  242      mc.SetNumBurnInSteps(100);
 
  245      mc.SetAxes(axisList); 
 
  258   if (doFeldmanCousins) {
 
  289         forContour->
Draw(
"cont2,same");
 
  303   plotInt.SetTitle(
"90% Confidence Intervals");
 
  305      plotInt.Draw(
"same");
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
 
double getRealValue(const char *name, double defVal=0.0, bool verbose=false) const
Get value of a RooAbsReal stored in set with given name.
 
virtual Int_t numEntries() const
Return number of entries in dataset, i.e., count unweighted entries.
 
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
Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) c...
 
virtual RooAbsPdf * createProjection(const RooArgSet &iset)
Return a p.d.f that represent a projection of this p.d.f integrated over given observables.
 
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
 
RooFit::OwningPtr< 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 std::liste...
 
RooAddPdf is an efficient implementation of a sum of PDFs of the form.
 
RooArgList is a container object that can hold multiple RooAbsArg objects.
 
RooArgSet is a container object that can hold multiple RooAbsArg objects.
 
TObject * clone(const char *newname) const override
 
RooConstVar represent a constant real-valued object.
 
The RooDataHist is a container class to hold N-dimensional binned data.
 
const RooArgSet * get() const override
Get bin centre of current bin.
 
RooDataSet is a container class to hold unbinned data.
 
static RooMsgService & instance()
Return reference to singleton instance.
 
void setStreamStatus(Int_t id, bool active)
(De)Activate stream with given unique ID
 
A RooPlot is a plot frame and a container for graphics objects within that frame.
 
void SetTitle(const char *name) override
Set the title of the RooPlot to 'title'.
 
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
 
RooPolynomial implements a polynomial p.d.f of the form.
 
A RooProduct represents the product of a given set of RooAbsReal objects.
 
Class RooProfileLL implements the profile likelihood estimator for a given likelihood and set of para...
 
static TRandom * randomGenerator()
Return a pointer to a singleton random-number generator implementation.
 
RooRealVar represents a variable that can be changed from the outside.
 
ConfInterval is an interface class for a generic interval in the RooStats framework.
 
virtual bool IsInInterval(const RooArgSet &) const =0
check if given point is in the interval
 
The FeldmanCousins class (like the Feldman-Cousins technique) is essentially a specific configuration...
 
This class provides simple and straightforward utilities to plot a LikelihoodInterval object.
 
LikelihoodInterval is a concrete implementation of the RooStats::ConfInterval interface.
 
Bayesian Calculator estimating an interval or a credible region using the Markov-Chain Monte Carlo me...
 
This class provides simple and straightforward utilities to plot a MCMCInterval object.
 
void SetLineColor(Color_t color)
 
void Draw(const Option_t *options=nullptr) override
 
MCMCInterval is a concrete implementation of the RooStats::ConfInterval interface.
 
virtual double GetActualConfidenceLevel()
virtual double GetKeysPdfCutoff() { return fKeysCutoff; }
 
ModelConfig is a simple class that holds configuration information specifying how a model should be u...
 
virtual void SetWorkspace(RooWorkspace &ws)
 
virtual void SetParametersOfInterest(const RooArgSet &set)
Specify parameters of interest.
 
virtual void SetPdf(const RooAbsPdf &pdf)
Set the Pdf, add to the workspace if not already there.
 
The ProfileLikelihoodCalculator is a concrete implementation of CombinedCalculator (the interface cla...
 
The RooWorkspace is a persistable container for RooFit projects.
 
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
 
virtual void SetLineColor(Color_t lcolor)
Set the line color.
 
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
 
void Update() override
Update canvas pad buffers.
 
TH1 is the base class of all histogram classes in ROOT.
 
void SetTitle(const char *title) override
Change (i.e.
 
void Draw(Option_t *option="") override
Draw this histogram with options.
 
virtual void SetContour(Int_t nlevels, const Double_t *levels=nullptr)
Set the number and values of contour levels.
 
virtual Int_t FindBin(Double_t x, Double_t y=0, Double_t z=0)
Return Global bin number corresponding to x,y,z.
 
TObject * Clone(const char *newname="") const override
Make a complete copy of the underlying object.
 
2-D histogram with a float per channel (see TH1 documentation)}
 
void SetBinContent(Int_t bin, Double_t content) override
Set bin content.
 
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
 
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
 
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
 
void Stop()
Stop the stopwatch.
 
void Print(Option_t *option="") const override
Print the real and cpu time passed between the start and stop events.
 
RooCmdArg YVar(const RooAbsRealLValue &var, const RooCmdArg &arg=RooCmdArg::none())
 
RooCmdArg Scaling(bool flag)
 
RooCmdArg Extended(bool flag=true)
 
RooCmdArg Components(Args_t &&... argsOrArgSet)
 
RooCmdArg Binning(const RooAbsBinning &binning)
 
RooCmdArg LineColor(Color_t color)
 
RooArgList L(Args_t &&... args)
 
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
 
Namespace for the RooStats classes.
 
constexpr Double_t E()
Base of natural log: .