Skip to content
Snippets Groups Projects
Verified Commit 87e9fff2 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Readd some ROyFit methods

parent 6a343a31
No related branches found
No related tags found
No related merge requests found
Pipeline #48421 passed
......@@ -58,6 +58,7 @@ include("hits.jl")
include("mc.jl")
include("scanfit.jl")
include("dumandfit.jl")
include("royfit.jl")
include("db.jl")
end
mutable struct SingleDUParams
d::Float64
t::Float64
z::Float64
dz::Float64
t₀::Float64
end
"""
Returns a function which calculates the arrival time of a Cherenkov photon
at a given position.
"""
function make_cherenkov_calculator(d_closest, t_closest, z_closest, dir_z, t₀; n=KM3io.Constants.INDEX_OF_REFRACTION_WATER)
c_ns = KM3io.Constants.c / 1e9
d_γ(z) = n/(n^2 - 1) * (d_closest^2 + (z-z_closest)^2 * (1 - dir_z^2))
t(z) = (t₀) + 1/c_ns * ((z - z_closest)*dir_z + (n^2 - 1)/n * d_γ(z))
d_γ, t
end
"""
Returns a function which calculates the arrival time of a Cherenkov photon
at a given position.
"""
function make_cherenkov_calculator(sdp::SingleDUParams; n=KM3io.Constants.INDEX_OF_REFRACTION_WATER)
c_ns = KM3io.Constants.c / 1e9
d_γ(z) = n/(n^2 - 1) * (sdp.d^2 + (z-sdp.z)^2 * (1 - sdp.dz^2))
t(z) = (sdp.t₀) + 1/c_ns * ((z - sdp.z)*sdp.dz + (n^2 - 1)/n * d_γ(z))
d_γ, t
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment