4#include "../tutorial/SetNiceStyle.C"
24 p->
SetDm(3, 2.507e-3);
26 p->
SetAngle(1,3, asin(sqrt(0.02225)));
28 p->
SetDelta(1,3, 232 * TMath::DegToRad());
150 p->
SetaT(0,0, 0.1e-22, 0);
151 p->
SetaT(0,1, 0.2e-22, 0);
152 p->
SetaT(0,2, 0.3e-22, 0);
153 p->
SetaT(1,1, 0.4e-22, 0);
154 p->
SetaT(1,2, 0.5e-22, 0);
155 p->
SetaT(2,2, 0.6e-22, 0);
156 p->
SetcT(0,0, 0.1e-22, 0);
157 p->
SetcT(0,1, 0.2e-22, 0);
158 p->
SetcT(0,2, 0.3e-22, 0);
159 p->
SetcT(1,1, 0.4e-22, 0);
160 p->
SetcT(1,2, 0.5e-22, 0);
161 p->
SetcT(2,2, 0.6e-22, 0);
174 p->
SetA(0,0, 0, 0.1e-22);
175 p->
SetA(0,1, 1, 0.2e-22);
176 p->
SetA(0,2, 2, 0.3e-22);
177 p->
SetA(1,1, 0, 0.4e-22);
178 p->
SetA(1,2, 1, 0.5e-22);
179 p->
SetA(2,2, 2, 0.6e-22);
180 p->
SetC(0,0, 0,0, 0.1e-22);
181 p->
SetC(0,1, 1,1, 0.2e-22);
182 p->
SetC(0,2, 2,2, 0.3e-22);
183 p->
SetC(1,1, 0,1, 0.4e-22);
184 p->
SetC(1,2, 1,2, 0.5e-22);
185 p->
SetC(2,2, 0,2, 0.6e-22);
216 if(model ==
"Iter")
return GetIter(is_nominal);
217 if(model ==
"Deco")
return GetDeco(is_nominal);
218 if(model ==
"Sterile")
return GetSterile(is_nominal);
219 if(model ==
"Decay")
return GetDecay(is_nominal);
220 if(model ==
"NSI")
return GetNSI(is_nominal);
221 if(model ==
"LIV")
return GetLIV(is_nominal);
222 if(model ==
"SNSI")
return GetSNSI(is_nominal);
223 if(model ==
"NUNM")
return GetNUNM(is_nominal);
224 if(model ==
"OQS")
return GetOQS(is_nominal);
234 return {
"Fast",
"Iter",
"Sterile",
"NSI",
235 "Deco",
"Decay",
"LIV",
"SNSI",
236 "NUNM",
"OQS",
"SiderealLIV"};
255 vector<double> xbins = GetLogAxis(nbins, 0.1, 10);
258 TFile* f =
new TFile(
"data/"+filename,
"recreate");
260 for(
int flvi=0; flvi<3; flvi++){
261 for(
int flvf=0; flvf<3; flvf++){
262 for(
int isnb=0; isnb<2; isnb++){
264 TString hname = TString::Format(
"h%d%d%d",flvi,flvf,isnb);
265 h =
new TH1D(hname,
"", nbins, &xbins[0]);
266 for(
int i=1; i<=nbins; i++){
267 double energy = h->GetBinCenter(i);
268 double dE = h->GetBinWidth(i);
269 h->SetBinContent(i, p->
AvgProb(flvi, flvf, energy, dE));
276 cout <<
"Saved new test file: data/" + filename << endl;
285 TFile* f = TFile::Open(
"data/"+filename,
"read");
288 printf((
Color::FAILED +
" data/%s not found\n").c_str(), filename.Data());
299 for(
int flvi=0; flvi<3; flvi++){
300 for(
int flvf=0; flvf<3; flvf++){
301 for(
int isnb=0; isnb<2; isnb++){
303 TString hname = TString::Format(
"h%d%d%d",flvi,flvf,isnb);
304 h0 = (TH1D*)f->Get(hname);
305 h = (TH1D*)h0->Clone();
307 for(
int i=1; i<=h0->GetNbinsX(); i++){
308 double energy = h->GetBinCenter(i);
309 double dE = h->GetBinWidth(i);
310 double p0 = h0->GetBinContent(i);
311 double p1 = p->
AvgProb(flvi, flvf, energy, dE);
313 if(abs(p0-p1)>1e-12){
317 h->SetBinContent(i, p1);
325 TString nu_lab = isnb ?
"#bar{#nu}" :
"#nu";
326 TString flv_lab[3] = {
"e",
"#mu",
"#tau"};
327 TString ylab =
"P(" + nu_lab +
"_{" + flv_lab[flvi] +
328 "}#rightarrow" + nu_lab +
"_{" + flv_lab[flvf] +
"})";
329 h0->SetTitle(
";Energy [GeV];"+ylab+
";");
331 double ymax = max(h->GetMaximum(),
333 double ymin = min(h->GetMinimum(),
335 h0->GetYaxis()->SetRangeUser(ymin, ymax);
336 h0->DrawCopy(
"hist");
337 h->DrawCopy(
"hist same");
341 h->SetTitle(
";Energy [GeV];#Delta"+ylab+
";");
347 MiscText(0.55,0.8,0.1,filename,kGray,1);
349 TString pngfile = filename;
350 pngfile.ReplaceAll(
".root",
".png");
351 c1->SaveAs(
"plots/Failed_"+hname+
"_"+pngfile);
359 printf((
Color::FAILED +
" Found %d differences in %d tests (%.3g%%) in %s\n").c_str(),
360 fails, ntests, 100.*fails/ntests, filename.Data());
363 cout <<
Color::PASSED <<
" No differences found in " << filename << endl;
OscProb::PMNS_NUNM * GetNUNM(bool is_nominal)
OscProb::PMNS_LIV * GetLIV(bool is_nominal)
OscProb::PMNS_Fast * GetFast(bool is_nominal)
OscProb::PMNS_Deco * GetDeco(bool is_nominal)
OscProb::PMNS_Sterile * GetSterile(bool is_nominal)
vector< string > GetListOfModels()
void SetNominalPars(OscProb::PMNS_Base *p)
OscProb::PMNS_Iter * GetIter(bool is_nominal)
OscProb::PMNS_NSI * GetNSI(bool is_nominal)
OscProb::PMNS_SiderealLIV * GetSiderealLIV(bool is_nominal)
OscProb::PMNS_Base * GetModel(string model, bool is_nominal=false)
void SetTestPath(OscProb::PMNS_Base *p)
OscProb::PMNS_Decay * GetDecay(bool is_nominal)
void SaveTestFile(OscProb::PMNS_Base *p, TString filename)
OscProb::PMNS_SNSI * GetSNSI(bool is_nominal)
OscProb::PMNS_OQS * GetOQS(bool is_nominal)
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.
Implements neutrino oscillations using an open quantum system approach.
virtual void SetDecoAngle(int i, int j, double th)
Set mixing angle between two decoherence parameters a_i, a_j.
virtual void SetDecoElement(int i, double val)
Set value of the a_i decoherence element in Gell-Mann basis.
Implementation of oscillations of neutrinos in matter in a three-neutrino framework with scalar NSI.
Implements oscillations with Sidereal LIV as modelled by SME.
virtual void SetA(int flvi, int flvj, int coord, double val)
virtual void SetColatitude(double chi)
virtual void SetC(int flvi, int flvj, int coord1, int coord2, double val)
virtual void SetNeutrinoDirection(double zenith, double azimuth)
virtual void SetTimeHours(double hours)
Implementation of oscillations of neutrinos in matter in a N-neutrino framework.
static const string PASSED
static const string FAILED