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§
Sourcefn configure(&mut self, config: ExtractionConfig)
fn configure(&mut self, config: ExtractionConfig)
Configure the extraction.
Sourcefn config(&self) -> &ExtractionConfig
fn config(&self) -> &ExtractionConfig
Get current configuration.
Sourcefn extract_soa(
&self,
batch: &HitBatch,
num_clusters: usize,
) -> Result<Vec<Neutron>, ExtractionError>
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.