API

Oscillations Open Data

KM3OpenOsc.HistogramDefinitionsType
struct HistogramDefinitions

HistogramDefinitions is a structure defining the binning for histograms.

Fields

  • xbins::Union{Int64, Vector{Float64}}

  • ybins::Union{Nothing, Int64, Vector{Float64}}

source
KM3OpenOsc.HistogramsOscillationsType
struct HistogramsOscillations

HistogramsOscillationsis a structure containing histograms for oscillation analysis.

Fields

  • hists_true::Dict{String, FHist.Hist2D}

  • hists_reco::Dict{String, FHist.Hist2D}

source
KM3OpenOsc.fill_hist_by_bin!Function
fill_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.

source
KM3OpenOsc.fill_all_hists_from_event_oscillations_and_flux!Function
fill_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.

source
KM3OpenOsc.get_flux_dictFunction
get_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.
source
KM3OpenOsc.get_oscillation_matricesFunction
get_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.
source
KM3OpenOsc.build_HDF5_fileFunction
build_HDF5_file() -> KM3io.H5File
build_HDF5_file(filename::String) -> KM3io.H5File

Build an HDF5 file with datasets for neutrino, muon, and data events.

source
KM3OpenOsc.create_histogramsFunction
create_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_true and hists_reco), each structure will contain the empty histograms for each case to fill.
source
KM3OpenOsc.fill_response!Function
fill_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 fill
  • f::KM3io.OscOpenDataTree: Struct containing the bins with the weights to fill.
  • flux_dict::Dict (optional): If filling neutrinos from MC, flux_dict contains the information of the atmospheric neutrino flux to use to compute the event weights.
  • U0::Matrix{ComplexF64} (optional): If filling neutrinos from MC, U0 corresponds to the precomputed PMNS matrix
  • H0::Vector{ComplexF64} (optional): If filling neutrinos from MC, H0 corresponds 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.
source
KM3OpenOsc.fill_HDF5_file!Function
fill_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 is neutrinos
source