Induced Charge (detsim)¶
Calculates the current induced on each pixel by drifted charge segments, using a pre-computed near-field response look-up table.
Module that calculates the current induced by edep-sim track segments on the pixels
- larndsim.detsim.get_pixel_coordinates(pixel_id)[source]¶
Returns the coordinates of the pixel center given the pixel ID
- larndsim.detsim.get_closest_waveform(x, y, t, response)[source]¶
This function, given a point on the pixel pad and a time, returns the closest tabulated waveformm from the response array.
- Parameters:
x (float) – x coordinate of the point
y (float) – y coordinate of the point
t (float) – time of the waveform
response (
numpy.ndarray) – array containing the tabulated waveforms
- Returns:
the value of the induced current at time t for a charge at (x,y)
- Return type:
- larndsim.detsim.overlapping_segment(x, y, start, end, radius)[source]¶
Computes the relevant segment part that’s around the pixel center (x, y). The projected positions of the new start and end on the pixel plane has distances of one “radius” away from the pixel center. The new start and end of the segment is along the original segment.
- larndsim.detsim.tracks_current_mc(signals, pixels, tracks, response, rng_states)[source]¶
This CUDA kernel calculates the charge induced on the pixels by the input tracks using a MC method
- Parameters:
signals (
numpy.ndarray) – empty 3D array with dimensions S x P x T, where S is the number of track segments, P is the number of pixels, and T is the number of time ticks. The output is stored here.pixels (
numpy.ndarray) – 2D array with dimensions S x P , where S is the number of track segments, P is the number of pixels and contains the pixel ID number.tracks (
numpy.ndarray) – 2D array containing the detector segments.response (
numpy.ndarray) – 3D array containing the tabulated response.rng_states (
numpy.ndarray) – array of random states for noise generation
- larndsim.detsim.sum_pixel_signals(pixels_signals, signals, track_t0, pixel_index_map, track_pixel_map, pixels_tracks_signals, num_backtrack, offset_backtrack, overflow_flag)[source]¶
This function sums the induced current signals on the same pixel. Converting “signals” from per segment to per pixel (“pixel_signals” and “pixels_tracks_signals”)
- Parameters:
pixels_signals (
numpy.ndarray) – 2D array that will contain the summed signal for each pixel. First dimension is the pixel ID, second dimension is the time ticksignals (
numpy.ndarray) – 3D array with dimensions S x P x T, where S is the total number of track segments, P is the max number of pixels for any segment, and T is the number of time ticks.track_starts (
numpy.ndarray) – 1D array containing the starting time of each trackpixel_index_map (
numpy.ndarray) – 2D array containing the correspondence between the track index and the pixel ID index.track_pixel_map (
numpy.ndarray) – 2D array containing the association between the unique pixels array and the array containing the pixels for each track.pixels_tracks_signals (
numpy.ndarray) – 1D jagged array that collapse the information of (#unique_pix, #ticks, backtracked_segments) for backtracking info per pixel per time tick. for each pixel and each track that induced current on the pixel.overflow_flag (
cupy.ndarray) – Single-element output array to indicate whether MAX_TRACKS_PER_PIXEL is insufficient
- larndsim.detsim.get_track_pixel_map(track_pixel_map, unique_pix, pixels)[source]¶
This kernel fills a 2D array which contains, for each unique pixel, an array with the track indices associated to that pixel.
- Parameters:
track_pixel_map (
numpy.ndarray) – 2D array that will contain the association between the unique pixels array and the track indicesunique_pix (
numpy.ndarray) – 1D array containing the unique pixelspixels (
numpy.ndarray) – 2D array containing the pixels for each track.
- larndsim.detsim.get_track_pixel_map2(track_pixel_map, unique_pix, pixels, distances)[source]¶
This kernel fills a 2D array which contains, for each unique pixel, an array with the track indices associated to that pixel. Summary of the different get_track_pixel_map get_track_pixel_map, fills track_pixel_map without distance ranking get_track_pixel_map3, fills track_pixel_map ranked by distances of unit pixel pitch