Skip to content

Conversation

@jaafar-chakrani
Copy link
Member

Overview

This PR introduces far-field dipole signal simulation into the charge readout pipeline, enabling complete electromagnetic response calculation for detector characterization. Far-field signals from voxelized ionization charge are now computed and added to the pixel response alongside near-field contributions.

Details

Architecture

The far-field simulation is integrated into the pixel batch processing loop as follows:

For each pixel batch:
  1. Calculate near-field signals (existing)
  2. Accumulate pixel signals from all contributing tracks
  3. [NEW] Add far-field dipole contribution per TPC
  4. [NEW] Handle induction-only pixels (far-field only)
  5. Simulate electronics response (ADC digitization)

Key Components

1. Voxelization (Per-Event-Batch)

  • Tracks are voxelized once per event batch to avoid cross-TPC contamination
  • Voxel positions: $(x_v, y_v, z_v)$ in detector coordinates
  • Voxel charges: summed ionization per voxel
  • Separate caches maintained per TPC
for tpc_idx in active_tpc_indices_all:
    voxel_indices, voxel_charges, ... = gpu_voxelize(tpc_tracks)
    voxel_cache[tpc_idx] = {x, y, z, q}  # GPU cupy arrays

2. Pixel Classification

  • Pixels categorized as collection, neighbor, or induction-only (right now, collection and neighbor are treated in the same way)
  • Classification cached per TPC to avoid recomputation
  • Used to identify pixels requiring only far-field treatment
classification_cache[tpc_idx] = pixel_classifier.classify_pixels(
    tracks, plane_id=tpc_idx
)

3. Far-Field Signal Calculation

Mixed Pixels (Near + Far-field):

  • Computed per TPC for pixels with track contributions
  • Dipole signals added after near-field accumulation
  • Handled in per-pixel-batch loop

Induction-Only Pixels (Far-field only):

  • Processed in separate loop after pixel batches
  • Uses classifier's pre-computed pixel coordinates
  • Avoids redundant classification per batch

4. Time Sampling & Digitization

  • Far-field signals computed on same time grid as near-field

Validation

See presentation here.

- Rename COARSE_VOXEL_SIZE_T to COARSE_VOXEL_SIZE_Z for clarity (voxels in Z-drift direction, not time)
- Set voxel sizes to 0.5 cm (refined from 5 cm) for better spatial resolution
- Adjust mesh parameters: CHARGE_NEIGHBOR_RADIUS (3→2), INDUCTION_SIGNAL_THRESHOLD (2000→1000), INDUCED_CURRENT_SCALE (0.1→0.03)
- Update voxelization.py to use COARSE_VOXEL_SIZE_Z instead of computing from time
- Integrate far-field signal calculation into charge readout pipeline
- Process far-field contribution per TPC per pixel batch
- Handle both mixed (near + far-field) and induction-only pixels
- Calculate dipole signals from voxelized charge distributions
- Apply induced current normalization and time sampling

The far-field contribution is added after near-field signal calculation
and before ADC digitization, enabling complete charge response simulation
for detector characterization and signal processing studies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants