Skip to content

Add option to cluster detector hits by time #523

@fhagemann

Description

@fhagemann

The current clustering algorithm in https://github.com/JuliaPhysics/SolidStateDetectors.jl/blob/main/src/ChargeClustering/ChargeClustering.jl only clusters by position, but does not consider timing information.

Similar to a cluster_radius, it might also make sense to add a cluster_time.

Also, when clustering a Geant4 output table, the times thit are not clustered but remain untouched.

function cluster_detector_hits(table::TypedTables.Table, cluster_radius::RealQuantity)
@assert :pos in TypedTables.columnnames(table) "Table has no column `pos`"
@assert :edep in TypedTables.columnnames(table) "Table has no column `edep`"
@assert :detno in TypedTables.columnnames(table) "Table has no column `detno`"
clustered_nt = map(
evt -> cluster_detector_hits(evt.detno, evt.edep, evt.pos, cluster_radius),
table
)
TypedTables.Table(merge(
TypedTables.columns(table),
map(
VectorOfVectors,
TypedTables.columns(clustered_nt)
)
))
end

It might make sense to add (optional) clustering of thit also here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions