Hits
The hit type hierarchy is currently being redesigned!
NeRCA.jl
has three main types of hits: AbstractDAQHit
, AbstractMCHit
and CalibratedHit
.
hit type | supertype | guaranteed attributes |
---|---|---|
Hit (in future SnapshotHit ) | AbstractDAQHit | channel_id , dom_id , t , tot |
TriggeredHit | AbstractDAQHit | channel_id , dom_id , t , tot , trigger_mask |
MCHit | AbstractMCHit | a , origin , pmt_id , t |
NeRCA.Clique
— Typestruct Clique{T<:NeRCA.AbstractMatcher}
Clique clusterizer which takes a matcher algorithm like Match3B
as input.
Fields
match::NeRCA.AbstractMatcher
weights::Vector{Float64}
times::Vector{Float64}
NeRCA.L1Builder
— MethodL1Builder(params) -> L1Builder
Find coincidences within the time window Δt
of the initialised params
. The return value is a vector of L1Hit
s.
NeRCA.Match1D
— Typemutable struct Match1D <: NeRCA.AbstractMatcher
Simple Cherenkov matcher for muon signals. The muon is assumed to travel parallel to the Z-axis.
Fields
roadwidth::Float64
tmaxextra::Float64
tmax::Float64
x::Float64
y::Float64
z::Float64
d::Float64
t::Float64
NeRCA.Match1D
— MethodOptimised version of Match1D which avoids the usage of calling time(hit)
multiple times.
NeRCA.Match3B
— Typemutable struct Match3B <: NeRCA.AbstractMatcher
3D match criterion with road width, intended for muon signals.
Origin: B. Bakker, "Trigger studies for the Antares and KM3NeT detector.", Master thesis, University of Amsterdam. With modifications from Jpp (M. de Jong).
Fields
roadwidth::Float64
tmaxextra::Float64
x::Float64
y::Float64
z::Float64
d::Float64
t::Float64
dmin::Float64
dmax::Float64
d₂::Float64
D0::Float64
D1::Float64
D2::Float64
D02::Float64
D12::Float64
D22::Float64
Rs2::Float64
Rst::Float64
Rt::Float64
R2::Float64
NeRCA.Match3B
— MethodOptimised version which avoids the usage of calling time(hit)
multiple times.
NeRCA.Match3B
— MethodMatch3B(roadwidth, tmaxextra) -> Match3B
The Match3B algorithm.
KM3io.calibrate
— Methodcalibrate(
T::Type{HitR1},
det::Detector,
hits
) -> Vector{HitR1}
Calibrates hits.
NeRCA.clusterize!
— Methodclusterize!(
hits::AbstractArray{T<:NeRCA.AbstractSpecialHit},
m::NeRCA.AbstractMatcher
) -> Any
Applies the clique clusterization algorithm and leaves only the best matching hits in the input array.
NeRCA.combine
— Methodcombine(
snapshot_hits::Vector{KM3io.SnapshotHit},
triggered_hits::Vector{KM3io.TriggeredHit}
) -> Vector{KM3io.TriggeredHit}
Combine snapshot and triggered hits to a single hits-vector.
This should be used to transfer the trigger information to the snapshot hits from a DAQEvent. The triggered hits are a subset of the snapshot hits.
NeRCA.combine
— Methodcombine(hits::Array{T<:KM3io.AbstractHit, 1}) -> Hit
Combines several hits into a single one by taking the earliest start time, then latest endtime and a ToT which spans over the time range.
NeRCA.count_multiplicities!
— Functioncount_multiplicities!(hits::Vector{KM3io.XCalibratedHit})
count_multiplicities!(
hits::Vector{KM3io.XCalibratedHit},
tmax
)
Counts the multiplicities and modifies the .multiplicity field of the hits. Important: the hits have to be sorted by time and then by DOM ID first.
NeRCA.count_multiplicities
— Methodcount_multiplicities(
hits::Array{T<:KM3io.AbstractHit, 1}
) -> Tuple{Vector{Int32}, Vector{Int32}}
count_multiplicities(
hits::Array{T<:KM3io.AbstractHit, 1},
tmax
) -> Tuple{Vector{Int32}, Vector{Int32}}
Calculate the multiplicities for a given time window. Two arrays are are returned, one contains the multiplicities, the second one the IDs of the coincidence groups. The hits should be sorted by time and then by dom_id.
NeRCA.duhits
— Methodduhits(hits::Array{T<:KM3io.XCalibratedHit, 1}) -> Dict
Categorise hits by DU and put them into a dictionary of DU=>Vector{Hit}.
Caveat: this function is not typesafe, only suited for high-level analysis (like plots).
NeRCA.hitcount
— Methodhitcount(
hits::AbstractArray{T<:NeRCA.AbstractReducedHit}
) -> Any
Return the total number of hits for a collection of reduced hits.
NeRCA.modulemap
— Methodmodulemap(hits::Array{T, 1}) -> Dict{Int32}
Creates a map (Dict{Int32, Vector{T}}
) from a flat Vector{T}
split up based on the dom_id
of each element. A typical use is to split up a vector of hits by their optical module IDs.
This function is similar to categorize(:dom_id, Vector{T})
but this method is completely typesafe.
NeRCA.nfoldhits
— Methodnfoldhits(
hits::Array{T<:KM3io.AbstractDAQHit, 1},
Δt,
n
) -> Vector
Create a Vector
with hits contributing to n
-fold coincidences within a time window of Δt.
NeRCA.nphes
— Methodnphes(tot) -> Any
Returns the estimated number of photoelectrons for a given ToT.
NeRCA.timetoz
— Methodtimetoz(hit) -> Any
Calculates the time to reach the z-position of the hit
along the z-axis.
NeRCA.totcut
— Methodtotcut(
hits::Array{T<:KM3io.AbstractDAQHit, 1},
tot
) -> Vector
Return a vector of hits with ToT >= tot
.