4#include "../tutorial/SetNiceStyle.C"
11 p->
SetDm(3, 2.507e-3);
13 p->
SetAngle(1,3, asin(sqrt(0.02225)));
15 p->
SetDelta(1,3, 232 * TMath::DegToRad());
122 p->
SetaT(0,0, 0.1e-22, 0);
123 p->
SetaT(0,1, 0.2e-22, 0);
124 p->
SetaT(0,2, 0.3e-22, 0);
125 p->
SetaT(1,1, 0.4e-22, 0);
126 p->
SetaT(1,2, 0.5e-22, 0);
127 p->
SetaT(2,2, 0.6e-22, 0);
128 p->
SetcT(0,0, 0.1e-22, 0);
129 p->
SetcT(0,1, 0.2e-22, 0);
130 p->
SetcT(0,2, 0.3e-22, 0);
131 p->
SetcT(1,1, 0.4e-22, 0);
132 p->
SetcT(1,2, 0.5e-22, 0);
133 p->
SetcT(2,2, 0.6e-22, 0);
161 if(model ==
"Iter")
return GetIter(is_nominal);
162 if(model ==
"Deco")
return GetDeco(is_nominal);
163 if(model ==
"Sterile")
return GetSterile(is_nominal);
164 if(model ==
"Decay")
return GetDecay(is_nominal);
165 if(model ==
"NSI")
return GetNSI(is_nominal);
166 if(model ==
"LIV")
return GetLIV(is_nominal);
167 if(model ==
"SNSI")
return GetSNSI(is_nominal);
168 if(model ==
"NUNM")
return GetNUNM(is_nominal);
179 return {
"Fast",
"Iter",
"Sterile",
"NSI",
180 "Deco",
"Decay",
"LIV",
"SNSI",
200 vector<double> xbins = GetLogAxis(nbins, 0.1, 10);
203 TFile* f =
new TFile(
"data/"+filename,
"recreate");
205 for(
int flvi=0; flvi<3; flvi++){
206 for(
int flvf=0; flvf<3; flvf++){
207 for(
int isnb=0; isnb<2; isnb++){
209 TString hname = TString::Format(
"h%d%d%d",flvi,flvf,isnb);
210 h =
new TH1D(hname,
"", nbins, &xbins[0]);
211 for(
int i=1; i<=nbins; i++){
212 double energy = h->GetBinCenter(i);
213 double dE = h->GetBinWidth(i);
214 h->SetBinContent(i, p->
AvgProb(flvi, flvf, energy, dE));
221 cout <<
"Saved new test file: data/" + filename << endl;
230 TFile* f =
new TFile(
"data/"+filename,
"read");
239 for(
int flvi=0; flvi<3; flvi++){
240 for(
int flvf=0; flvf<3; flvf++){
241 for(
int isnb=0; isnb<2; isnb++){
243 TString hname = TString::Format(
"h%d%d%d",flvi,flvf,isnb);
244 h0 = (TH1D*)f->Get(hname);
245 h = (TH1D*)h0->Clone();
247 for(
int i=1; i<=h0->GetNbinsX(); i++){
248 double energy = h->GetBinCenter(i);
249 double dE = h->GetBinWidth(i);
250 double p0 = h0->GetBinContent(i);
251 double p1 = p->
AvgProb(flvi, flvf, energy, dE);
253 if(abs(p0-p1)>1e-12){
257 h->SetBinContent(i, p1);
265 TString nu_lab = isnb ?
"#bar{#nu}" :
"#nu";
266 TString flv_lab[3] = {
"e",
"#mu",
"#tau"};
267 TString ylab =
"P(" + nu_lab +
"_{" + flv_lab[flvi] +
268 "}#rightarrow" + nu_lab +
"_{" + flv_lab[flvf] +
"})";
269 h0->SetTitle(
";Energy [GeV];"+ylab+
";");
271 double ymax = max(h->GetMaximum(),
273 double ymin = min(h->GetMinimum(),
275 h0->GetYaxis()->SetRangeUser(ymin, ymax);
276 h0->DrawCopy(
"hist");
277 h->DrawCopy(
"hist same");
281 h->SetTitle(
";Energy [GeV];#Delta"+ylab+
";");
287 MiscText(0.55,0.8,0.1,filename,kGray,1);
289 TString pngfile = filename;
290 pngfile.ReplaceAll(
".root",
".png");
291 c1->SaveAs(
"plots/Failed_"+hname+
"_"+pngfile);
298 printf((
Color::FAILED +
" Found %d differences in %d tests (%.3g%%) in %s\n").c_str(),
299 fails, ntests, 100.*fails/ntests, filename.Data());
302 cout <<
Color::PASSED <<
" No differences found in " << filename << endl;
OscProb::PMNS_NUNM * GetNUNM(bool is_nominal)
vector< string > GetListOfModels()
void SetNominalPars(OscProb::PMNS_Base *p)
void SetTestPath(OscProb::PMNS_Base *p)
void SaveTestFile(OscProb::PMNS_Base *p, TString filename)
int CheckProb(OscProb::PMNS_Base *p, TString filename)
Base class implementing general functions for computing neutrino oscillations.
virtual void SetDm(int j, double dm)
Set the mass-splitting dm_j1 in eV^2.
virtual void SetDelta(int i, int j, double delta)
Set the CP phase delta_ij.
virtual void SetIsNuBar(bool isNuBar)
Set the anti-neutrino flag.
virtual double AvgProb(vectorC nu_in, int flvf, double E, double dE=0)
Compute the average probability over a bin of energy.
virtual void AddPath(NuPath p)
Add a path to the sequence.
virtual void SetPath(NuPath p)
Set a single path.
virtual void SetAngle(int i, int j, double th)
Set the mixing angle theta_ij.
Implementation of neutrino decay in a three-neutrino framework.
virtual void SetAlpha3(double alpha3)
Implementation of oscillations of neutrinos in matter in a three-neutrino framework with decoherence.
virtual void SetGamma(int j, double val)
Set any given decoherence parameter.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework.
Implements oscillations with LIV as modelled by SME.
virtual void SetaT(int flvi, int flvj, int dim, double val, double phase)
virtual void SetcT(int flvi, int flvj, int dim, double val, double phase)
Implementation of oscillations of neutrinos in matter in a three-neutrino framework with NSI.
virtual void SetEps(int flvi, int flvj, double val, double phase)
Set any given NSI parameter.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework with Non unitary ...
virtual void SetAlpha(int i, int j, double val, double phase)
Set any given NUNM parameter.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework with scalar NSI.
Implementation of oscillations of neutrinos in matter in a N-neutrino framework.
static const string PASSED
static const string FAILED
OscProb::PMNS_Deco * GetDeco()
OscProb::PMNS_Iter * GetIter()
OscProb::PMNS_LIV * GetLIV()
OscProb::PMNS_Decay * GetDecay()
OscProb::PMNS_Base * GetModel(std::string model)
OscProb::PMNS_Sterile * GetSterile()
OscProb::PMNS_NSI * GetNSI()
OscProb::PMNS_SNSI * GetSNSI()
OscProb::PMNS_Fast * GetFast()