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

Consolidation of NeRCA.jl stuff

parent 854d9a71
No related branches found
No related tags found
No related merge requests found
......@@ -11,11 +11,19 @@ using StaticArrays: FieldVector
using UnROOT
export OnlineFile
export Position, UTMPosition, Location, Quaternion
export Direction, Position, UTMPosition, Location, Quaternion
export Detector, DetectorModule, PMT, Tripod, Hydrophone
export Waveform, AcousticsTriggerParameter, piezoenabled, hydrophoneenabled
export is3dshower, ismxshower, is3dmuon, isnb
export Hit, TriggeredHit
export calibrate, floordist
# KM3NeT Dataformat definitions
......@@ -34,6 +42,7 @@ include("root/online.jl")
include("root/offline.jl")
include("daq.jl")
include("acoustics.jl")
include("calibration.jl")
include("tools.jl")
......
......@@ -212,6 +212,7 @@ function Base.iterate(d::Detector, state=(Int[], 1))
end
(d.modules[module_ids[count]], (module_ids, count + 1))
end
Base.getindex(d::Detector, module_id) = d.modules[module_id]
"""
......
......@@ -17,6 +17,12 @@ struct Direction{T} <: FieldVector{3, T}
end
Direction(ϕ, θ) = Direction(cos(ϕ)*sin(θ), sin(ϕ)*sin(θ), cos(θ))
struct Track
dir::Direction
pos::Position
time
end
struct Quaternion{T} <: FieldVector{4, T}
q0::T
qx::T
......@@ -48,22 +54,30 @@ struct TriggeredHit <: AbstractDAQHit
trigger_mask::UInt64
end
struct Hit <: AbstractDAQHit
dom_id::Int32
channel_id::UInt8
t::Int32
tot::UInt8
trigger_mask::UInt64
end
mutable struct Multiplicity
count::Int32
id::Int64
end
struct CalibratedHit <: AbstractDAQHit
channel_id::UInt32
dom_id::UInt32
du::UInt8
floor::UInt8
channel_id::UInt32
t::Float64
tot::UInt8
trigger_mask::UInt64
pos::Position
dir::Direction
t0::Float64
trigger_mask::UInt64
du::UInt8
floor::UInt8
multiplicity::Multiplicity
end
......
......@@ -5,3 +5,4 @@ include("daq.jl")
include("tools.jl")
include("hardware.jl")
include("acoustics.jl")
include("calibration.jl")
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