28{
31
33
34
35 string inputFile;
37
38 string Xtype;
39 JAbstractHistogram_t Xbinning;
40
41 string Ytype;
42 JAbstractHistogram_t Ybinning;
43
46
48
49 try {
50
52
53 zap[
'f'] =
make_field(inputFile,
"oscillation probability table file");
55 zap[
'X'] =
make_field(Xtype,
"abscissa type") =
56 JOscVars::energy(),
57 JOscVars::log10E(),
58 JOscVars::LoE();
59 zap[
'x'] =
make_field(Xbinning,
"abscissa binning")
61 zap[
'Y'] =
make_field(Ytype,
"ordinate type") =
62 JOscVars::costh(),
63 JOscVars::sinth(),
64 JOscVars::L();
65 zap[
'y'] =
make_field(Ybinning,
"ordinate binning")
67 zap[
'@'] =
make_field(parameters,
"oscillation parameters")
69 zap[
'#'] =
make_field(channel,
"oscillation channel")
70 =
JOscChannel(JFlavour_t::MUON, JFlavour_t::MUON, JChargeParity_t::PARTICLE);
72 = 2;
73
74 zap(argc, argv);
75 }
76 catch (const exception& error) {
77 FATAL(error.what() << endl);
78 }
79
80
82
83 TH2D h0("h0", NULL,
84 Xbinning.getNumberOfBins(), Xbinning.getLowerLimit(), Xbinning.getUpperLimit(),
85 Ybinning.getNumberOfBins(), Ybinning.getLowerLimit(), Ybinning.getUpperLimit());
86
88 Ytype, Ybinning,
89 channel, p);
90
92
93 for (int ix = 1; ix <= h0.GetXaxis()->GetNbins(); ++ix) {
94 for (int iy = 1; iy <= h0.GetYaxis()->GetNbins(); ++iy) {
95
96 const double x = h0.GetXaxis()->GetBinCenter(ix);
97 const double y = h0.GetYaxis()->GetBinCenter(iy);
98
99 const double P = oscillogram.getP(ix-1, iy-1);
100
102
103 h0.SetBinContent(ix, iy, P);
104 }
105 }
106
108
109 h0.Write();
110
111 out.Write();
112 out.Close();
113}
#define DEBUG(A)
Message macros.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Data structure for single set of oscillation parameters.
Utility class to parse command line options.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Auxiliary data structure for floating point format specification.
Neutrino oscillation channel.
std::shared_ptr< JOscProbInterface > pointer_type
Auxiliary class for creating oscillograms.
Auxiliary data structure for alignment of data.