Skip to main content

NeutronExtraction

Trait NeutronExtraction 

Source
pub trait NeutronExtraction: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn configure(&mut self, config: ExtractionConfig);
    fn config(&self) -> &ExtractionConfig;
    fn extract_soa(
        &self,
        batch: &HitBatch,
        num_clusters: usize,
    ) -> Result<Vec<Neutron>, ExtractionError>;
}
Expand description

Trait for neutron extraction algorithms.

Extracts neutron events from clustered hits by computing centroids.

Required Methods§

Source

fn name(&self) -> &'static str

Algorithm name.

Source

fn configure(&mut self, config: ExtractionConfig)

Configure the extraction.

Source

fn config(&self) -> &ExtractionConfig

Get current configuration.

Source

fn extract_soa( &self, batch: &HitBatch, num_clusters: usize, ) -> Result<Vec<Neutron>, ExtractionError>

Extract neutrons from a HitBatch using SoA layout.

This implementation is optimized for SoA and uses a single pass over the hits (O(N) + O(C)) rather than iterating by cluster (O(N*C)).

§Errors

Returns an error if extraction fails.

Implementors§