API
KM3OpenOsc.HistogramDefinitionsKM3OpenOsc.HistogramsOscillationsKM3OpenOsc.build_HDF5_fileKM3OpenOsc.create_histogramsKM3OpenOsc.export_histograms_hdf5KM3OpenOsc.fill_HDF5_file!KM3OpenOsc.fill_all_hists_from_event!KM3OpenOsc.fill_all_hists_from_event_oscillations_and_flux!KM3OpenOsc.fill_hist_by_bin!KM3OpenOsc.fill_response!KM3OpenOsc.get_flux_dictKM3OpenOsc.get_oscillation_matrices
Oscillations Open Data
KM3OpenOsc.HistogramDefinitions — Typestruct HistogramDefinitionsHistogramDefinitions is a structure defining the binning for histograms.
Fields
xbins::Union{Int64, Vector{Float64}}ybins::Union{Nothing, Int64, Vector{Float64}}
KM3OpenOsc.HistogramsOscillations — Typestruct HistogramsOscillationsHistogramsOscillationsis a structure containing histograms for oscillation analysis.
Fields
hists_true::Dict{String, FHist.Hist2D}hists_reco::Dict{String, FHist.Hist2D}
KM3OpenOsc.fill_hist_by_bin! — Functionfill_hist_by_bin!(h::FHist.Hist2D, xbin::Int64, ybin::Int64, w::Float64, werr::Float64) -> Float64
Fill a histogram bin with a given weight and error.
KM3OpenOsc.fill_all_hists_from_event! — Functionfill_all_hists_from_event!(hs::HistogramsOscillations, e::KM3io.ResponseMatrixBin) -> Float64
Fill all histograms based on an event.
KM3OpenOsc.fill_all_hists_from_event_oscillations_and_flux! — Functionfill_all_hists_from_event_oscillations_and_flux!(hs::HistogramsOscillations, e::KM3io.ResponseMatrixBin, flux_dict::Dict)
fill_all_hists_from_event_oscillations_and_flux!(hs::HistogramsOscillations, e::KM3io.ResponseMatrixBin, flux_dict::Dict, U0::Union{Nothing, Matrix{ComplexF64}})
fill_all_hists_from_event_oscillations_and_flux!(hs::HistogramsOscillations, e::KM3io.ResponseMatrixBin, flux_dict::Dict, U0::Union{Nothing, Matrix{ComplexF64}}, H0::Union{Nothing, Vector{ComplexF64}}) -> Float64
Fill histograms for an event, applying oscillations and flux weights.
KM3OpenOsc.get_flux_dict — Functionget_flux_dict() -> Dict{Int32, NuFlux.FluxTable}
get_flux_dict(flux_path::String) -> Dict{Int32, NuFlux.FluxTable}
Retrieve a dictionary of neutrino fluxes from the Honda flux model file given as input.
Inputs
flux_path::String: String of path to input flux file.
Notes
- If no input is given, default argument is the Honda flux at Frejus site without mountain at solar-min with averaged azimuth.
KM3OpenOsc.get_oscillation_matrices — Functionget_oscillation_matrices() -> Tuple{Matrix{ComplexF64}, Vector{ComplexF64}}
get_oscillation_matrices(nu_params::Dict) -> Tuple{Matrix{ComplexF64}, Vector{ComplexF64}}
Compute the PMNS matrix and Hamiltonian for neutrino oscillations for a given input dictionary containing the parameters of neutrino oscillations.
Inputs
nu_params::Dict: Dictionary of oscillation parameters
Example input
NuFitv5 = Dict(
"dm_21" => 7.42e-5,
"dm_31" => 2.510e-3,
"theta_12" => deg2rad(33.45),
"theta_23" => deg2rad(42.1),
"theta_13" => deg2rad(8.62),
"dcp" => deg2rad(230)
)Outputs
U::Matrix{ComplexF64}: PMNS matrix computed from the input oscillation parameters.H::Vector{ComplexF64}: Form of the Hamiltonian of propagation.
Notes
- If no input is given, default parameters are based on NuFit v5.1 results http://www.nu-fit.org/?q=node/238.
KM3OpenOsc.build_HDF5_file — Functionbuild_HDF5_file() -> KM3io.H5File
build_HDF5_file(filename::String) -> KM3io.H5File
Build an HDF5 file with datasets for neutrino, muon, and data events.
KM3OpenOsc.export_histograms_hdf5 — Functionexport_histograms_hdf5(histo::HistogramsOscillations, filename::String)
Export histograms to an HDF5 file.
KM3OpenOsc.create_histograms — Functioncreate_histograms(fpath::String) -> HistogramsOscillations
Create histograms needed for detector response for oscillations analysis from either a ROOT file or a JSON file.
Inputs
fpath::String: String to ROOT file or JSON file containing the definition of the true and reco axes for the histograms.
Outputs
HistogramsOscillations: Structure containing two dictionaries (hists_trueandhists_reco), each structure will contain the empty histograms for each case to fill.
KM3OpenOsc.fill_response! — Functionfill_response!(hs::HistogramsOscillations, f::KM3io.OscOpenDataTree)
fill_response!(hs::HistogramsOscillations, f::KM3io.OscOpenDataTree, flux_dict::Union{Nothing, Dict})
fill_response!(hs::HistogramsOscillations, f::KM3io.OscOpenDataTree, flux_dict::Union{Nothing, Dict}, U0::Union{Nothing, Matrix{ComplexF64}})
fill_response!(hs::HistogramsOscillations, f::KM3io.OscOpenDataTree, flux_dict::Union{Nothing, Dict}, U0::Union{Nothing, Matrix{ComplexF64}}, H0::Union{Nothing, Vector{ComplexF64}})
Fill histograms with events from an KM3io.OscOpenDataTree, optionally applying oscillations and flux weights.
Inputs
hs::HistogramsOscillations: Histogram structure to fillf::KM3io.OscOpenDataTree: Struct containing the bins with the weights to fill.flux_dict::Dict (optional): If filling neutrinos from MC,flux_dictcontains the information of the atmospheric neutrino flux to use to compute the event weights.U0::Matrix{ComplexF64} (optional): If filling neutrinos from MC,U0corresponds to the precomputed PMNS matrixH0::Vector{ComplexF64} (optional): If filling neutrinos from MC,H0corresponds to the precomp of propagationuted hamiltonian.oscillations::Bool (optional): Boolean to whether compute the weights using oscillations or not. It is to note oscillations are computed given the value at the bin center, thus for bins where fast oscillations happen there will be some differences compared with computing the average oscillations in the bin.MC_scaling::Float64 (optional): If doing sensitivity studies, this argument allows to scale the MC by a certain value.
KM3OpenOsc.fill_HDF5_file! — Functionfill_HDF5_file!(h5file::KM3io.H5File, f::KM3io.OscOpenDataTree)
fill_HDF5_file!(h5file::KM3io.H5File, f::KM3io.OscOpenDataTree, filetype::String)
Fill an HDF5 file with datasets for neutrino, muon, and data events.
Inputs
h5file::H5File: H5File which will store the datasets. If the file already exists, datasets with same name will be overwritten.f::KM3io.OscOpenDataTree: Structured information of the response matrix.filetype::String: Name of the response to be stored. Default name isneutrinos