'Neutrino Oscillation Example from Feldman & Cousins'
This tutorial shows a more complex example using the FeldmanCousins utility to create a confidence interval for a toy neutrino oscillation experiment. The example attempts to faithfully reproduce the toy example described in Feldman & Cousins' original paper, Phys.Rev.D57:3873-3889,1998.
Processing /mnt/build/workspace/root-makedoc-v608/rootspi/rdoc/src/v6-08-00-patches/tutorials/roostats/rs401d_FeldmanCousins.C...
#include <iostream>
#if !defined(__CINT__) || defined(__MAKECINT__)
#include "../tutorials/roostats/NuMuToNuE_Oscillation.h"
#include "../tutorials/roostats/NuMuToNuE_Oscillation.cxx"
#else
#include "../tutorials/roostats/NuMuToNuE_Oscillation.cxx+"
#endif
void rs401d_FeldmanCousins(bool doFeldmanCousins=false, bool doMCMC = true)
{
RooRealVar deltaMSq(
"deltaMSq",
"#Delta m^{2}",40,1,300,
"eV/c^{2}");
RooRealVar sinSq2theta(
"sinSq2theta",
"sin^{2}(2#theta)", .006,.0,.02);
RooRealVar LPrime(
"LPrime",
"", .800,.600, 1.0,
"km");
LPrime,EPrime,deltaMSq);
RooConstVar maxEventsTot(
"maxEventsTot",
"maximum number of sinal events",50000);
RooConstVar inverseArea(
"inverseArea",
"1/(#Delta E #Delta L)",
1./(EPrime.getMax()-EPrime.getMin())/(LPrime.getMax()-LPrime.getMin()));
RooProduct sigNorm(
"sigNorm",
"",
RooArgSet(maxEventsTot, *intProbToOscInExp, inverseArea, sinSq2theta));
RooConstVar bkgNorm(
"bkgNorm",
"normalization for background",500);
Int_t nEventsData = bkgNorm.getVal()+sigNorm.getVal();
cout << "generate toy data with nEvents = " << nEventsData << endl;
Eframe->
SetTitle(
"toy data with best fit model (and sig+bkg components)");
fc.SetTestSize(.1);
fc.UseAdaptiveSampling(true);
fc.SetNBins(10);
if(doFeldmanCousins)
interval = fc.GetInterval();
if (doMCMC) {
mc.SetNumIters(5000);
mc.SetNumBurnInSteps(100);
mc.SetUseKeys(true);
mc.SetTestSize(.1);
mc.SetAxes(axisList);
}
if (doFeldmanCousins) {
if (interval){
}else{
}
}
delete tmpPoint;
}
if (interval){
forContour->
Draw(
"cont2,same");
}
}
if (mcInt) {
cout << "MCMC actual confidence level: "
}
plotInt.SetTitle("90% Confidence Intervals");
if (mcInt)
plotInt.Draw("same");
else
plotInt.Draw();
}
- Author
- Kyle Cranmer
Definition in file rs401d_FeldmanCousins.C.