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
— TypeClique clusterizer which takes a matcher algorithm like Match3B
as input.
NeRCA.L1Builder
— MethodFind coincidences within the time window Δt
of the initialised params
. The return value is a vector of L1Hit
.
NeRCA.Match1D
— TypeSimple Cherenkov matcher for muon signals. The muon is assumed to travel parallel to the Z-axis.
NeRCA.Match1D
— MethodOptimised version of Match1D which avoids the usage of calling time(hit)
multiple times.
NeRCA.Match3B
— Type3D 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).
NeRCA.Match3B
— MethodOptimised version which avoids the usage of calling time(hit)
multiple times.
NeRCA.Match3B
— MethodThe Match3B algorithm.
KM3io.calibrate
— MethodKM3io.calibrate(T::Type{HitR1}, det::Detector, hits)
Calibrates hits.
NeRCA.clusterize!
— MethodApplies the clique clusterization algorithm and leaves only the best matching hits in the input array.
NeRCA.combine
— Methodfunction combine(snapshothits::Vector{KM3io.SnapshotHit}, triggeredhits::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::Vector{T}) where T <: KM3io.AbstractHit
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!
— Methodfunction count_multiplicities!(hits::Vector{KM3io.XCalibratedHit}; tmax=20)
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
— Methodfunction count_multiplicities(hits::Vector{T}; tmax=20) where {T<:KM3io.AbstractHit}
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::Vector{T}) where {T<:KM3io.XCalibratedHit}
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}) where T<:AbstractReducedHit
Return the total number of hits for a collection of reduced hits.
NeRCA.modulemap
— Methodmodulemap(hits::Vector{T}) where T
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
— Methodfunction nfoldhits(hits::Vector{T}, Δt, n) where {T<:KM3io.AbstractDAQHit}
Create a Vector
with hits contributing to n
-fold coincidences within a time window of Δt.
NeRCA.nphes
— Methodnphes(tot)
Returns the estimated number of photoelectrons for a given ToT.
NeRCA.timetoz
— Methodtimetoz(hit)
Calculates the time to reach the z-position of the hit
along the z-axis.
NeRCA.totcut
— Methodtotcut(hits::Vector{T}, tot) where {T<:KM3io.AbstractDAQHit}
Return a vector of hits with ToT >= tot
.