A hit event position encoding method and system for a position sensitive detector
Patent Information
- Application Number
- CN202611106017.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-08-21
AI Technical Summary
因此,现有技术中,缺乏一种能够在统一数字读出框架下,根据应用需求灵活选择不同重心计算策略,从而兼顾高速处理能力与高精度定位能力的事件重心数字读出方法
本申请提供了一种用于位置灵敏探测器的击中事件位置编码方法及系统,通过在预设的时间窗口内采集位置灵敏探测器各通道的数字响应信号,生成比特流数据,并进行边界检测处理,提取至少一个击中簇团的左边界通道编号和右边界通道编号得到左右边界,能够在统一的时间窗口采集与击中簇团识别框架下,实现对粒子入射位置的数字编码。通过基于击中簇团的通道响应特征,在统一数字读出框架下,可以根据应用需求灵活选择不同重心计算策略(边界中心法和/或基于过阈时间的三点加权法)确定击中事件的位置坐标,能够兼顾高速处理能力与高精度定位能力,提高对高事例率和高精度测量场景的适应性。
Smart Images

Figure CN122621171A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of particle detection technology, and in particular to a method and system for encoding the location of a hit event for a position-sensitive detector. Background Technology
[0002] In particle physics and nuclear physics, scientific instruments, radiotherapy, and medical imaging equipment, position-sensitive detectors are widely used to detect and record the interaction processes between particles (such as electrons, protons, neutrons, and photons) and matter. Commonly used position-sensitive detectors include multi-wire proportional cells, microstructured gas detectors, microchannel plate detectors based on strip arrays, pixel arrays, or delayed line anode readout, scintillator-based flat panel detectors, and semiconductor detectors such as charge-coupled devices (CCDs), complementary metal-oxide-semiconductor (CMOS), silicon microstrips, and silicon pixel sensors.
[0003] When a particle enters the detector, if it interacts with the detector's working medium, it becomes a hit event, generating an electrical signal on one or more readout channels. By processing the electrical signal corresponding to the hit event, physical information such as the particle's impact location, energy, and time can be deduced. This process forms the basis for physical analyses such as particle spatial distribution measurement, particle imaging reconstruction, and energy spectrum measurement.
[0004] Existing position-sensitive detectors typically employ analog or digital signal processing methods to detect event impact locations. Analog signal processing methods usually involve weighted summation of the analog signals output from each channel, calculating the centroid position of the event based on charge or voltage distribution. This type of method fully utilizes the amplitude information of each channel's signal, achieving high position resolution. However, its circuit structure is complex, it is sensitive to noise, and signal accumulation is prone to occur under high event rates, affecting system stability and processing speed. Digital signal processing methods typically convert analog signals into digital pulse signals by thresholding each channel's signal, and then discretize the channel responses within a set time window. Based on this, the particle incident position can be estimated according to the spatial distribution characteristics of the channels. For example, the spatial interval formed by consecutive channels can be used to approximate the event location. This type of method has simple circuit implementation and fast processing speed, making it suitable for high event rate applications. However, because it only utilizes the existence information of the channel responses and does not consider the differences in response intensity between channels, its position resolution is somewhat limited.
[0005] On the other hand, with the development of digital readout technology, some methods attempt to introduce channel response intensity-related information into the digital domain. For example, they use time over threshold (TOT) or equivalent parameters to weight the multi-channel response to obtain a centroid estimate that is closer to the true incident position. For waveforms with fixed rise and fall times, there is a certain correlation between the signal's time over threshold and its peak value. The amplitude information of the signal can be obtained by measuring the time over threshold. This method has advantages in improving position resolution, but it usually requires more complex calculations, places higher demands on digital circuit resources and real-time processing capabilities, and has certain constraints in high-incident-rate or real-time processing scenarios. At the same time, this method has certain requirements on the waveform of the sensed signal.
[0006] Based on the above description, in digital readout methods for position-sensitive detectors, different application scenarios have different priorities regarding system performance. For example, under high event rates, processing speed and circuit complexity are more important; while in high-precision measurement or imaging scenarios, position resolution is more important. Therefore, existing technologies lack a digital readout method for event centroids that can flexibly select different centroid calculation strategies according to application requirements within a unified digital readout framework, thereby balancing high-speed processing capabilities with high-precision positioning capabilities. Summary of the Invention
[0007] To address the aforementioned problems in the existing technology, this application provides a method and system for encoding the location of a hit event in a position-sensitive detector.
[0008] To achieve the above objectives, this application provides the following solution: In a first aspect, this application provides a method for encoding the location of a hit event for a position-sensitive detector, including: Within a preset time window, digital response signals from each channel of the position-sensitive detector are acquired to generate bitstream data characterizing the channel response state. The bitstream data is subjected to boundary detection processing to extract at least one left boundary channel number and one right boundary channel number that hit the cluster, thus obtaining the left and right boundaries; Perform a validity check on the left and right boundaries; If the left and right boundaries are valid, the location coordinates of the hit event are determined by at least one centroid calculation strategy in the unified digital readout framework based on the channel response characteristics of the hit cluster; the centroid calculation strategy includes the boundary center method and the three-point weighted method based on the threshold time. The location coordinates of the hit event are mapped into a location encoding result and output to a counter or storage unit for statistical analysis; If the left and right boundaries are invalid, discard the data collected in the current time window and return to the idle state.
[0009] Secondly, this application provides a hit event location encoding system for a position-sensitive detector, implemented based on a programmable logic device or an application-specific integrated circuit chip; the hit event location encoding system includes: The signal acquisition module is used to acquire the digital response signals of each channel of the position-sensitive detector within a preset time window and generate bit stream data characterizing the channel response state. The boundary detection module is used to perform boundary detection processing on the bitstream data, extract at least one left boundary channel number and right boundary channel number that hit the cluster, and obtain the left and right boundaries; The centroid calculation module includes a boundary center calculation unit and a three-point weighted calculation unit based on threshold time, used to verify the validity of the left and right boundaries; if the left and right boundaries are valid, the location coordinates of the hit event are determined by at least one centroid calculation strategy in the unified digital readout framework based on the channel response characteristics of the hit cluster; the centroid calculation strategies include the boundary center method and the three-point weighted method based on threshold time; if the left and right boundaries are invalid, the data collected in the current time window is discarded and the system returns to an idle state; The output control module is used to map the location coordinates of the hit event into a location encoding result, and select the output path as a counter or a storage unit according to the configuration signal.
[0010] Thirdly, this application provides a hit event location encoding system for a location-sensitive detector, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to implement the hit event location encoding method for a location-sensitive detector provided above.
[0011] According to the specific embodiments provided in this application, this application has the following technical effects: This application provides a method and system for encoding the location of impact events in a position-sensitive detector. By acquiring digital response signals from each channel of the position-sensitive detector within a preset time window, generating bitstream data, and performing boundary detection processing, the left and right boundary channel numbers of at least one impact cluster are extracted to obtain the left and right boundaries. This enables digital encoding of particle incident positions within a unified time window acquisition and impact cluster identification framework. Based on the channel response characteristics of the impact cluster, and within a unified digital readout framework, different centroid calculation strategies (boundary center method and / or three-point weighted method based on threshold time) can be flexibly selected to determine the location coordinates of the impact event according to application requirements. This approach balances high-speed processing capabilities with high-precision positioning capabilities, improving adaptability to high-incident-rate and high-precision measurement scenarios. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A schematic flowchart illustrating a hit event location encoding method for a position-sensitive detector, provided as an embodiment of this application; Figure 2 A schematic diagram of functional modules for a hit event location encoding system for a location-sensitive detector provided in an embodiment of this application; Figure 3 A schematic diagram of a one-dimensional centroid calculation process for a boundary-center-based digital readout encoding circuit provided in an embodiment of this application; Figure 4 A two-dimensional architecture diagram provided for an embodiment of this application; Figure 5 A schematic diagram of the overall operation flow of a hit event location encoding method for a position-sensitive detector in a one-dimensional case provided in an embodiment of this application; Figure 6 This is a schematic diagram of a digital readout process provided in an embodiment of this application. Detailed Implementation
[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0015] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0016] In one exemplary embodiment, this application provides a method for encoding the location of a hit event for a position-sensitive detector. This method is executed by a computer device, specifically a terminal or server, or both. In this embodiment, the method is described using a server as an example. Figure 1 As shown, the method includes: Step 100: Acquire digital response signals of each channel of the position-sensitive detector within a preset time window, and generate bitstream data characterizing the channel response state.
[0017] Step 101: Perform boundary detection processing on the bitstream data, extract the left boundary channel number and right boundary channel number of at least one hit cluster, and obtain the left and right boundaries.
[0018] Step 102: Perform a validity check on the left and right boundaries.
[0019] Step 103: If the left and right boundaries are valid, the location coordinates of the hit event are determined based on the channel response characteristics of the hit cluster using at least one centroid calculation strategy in the unified digital readout framework. The centroid calculation strategies include the boundary center method and the three-point weighted method based on the threshold time.
[0020] Step 104: Map the location coordinates of the hit event into a location encoding result and output it to a counter or storage unit for statistics.
[0021] Step 105: If the left and right boundaries are invalid, discard the data collected in the current time window and return to the idle state.
[0022] By implementing steps 100-105 above, this application can balance high-speed processing capability and high-precision positioning capability in the process of digitally encoding the particle incident position, thereby improving its adaptability to high-incident-rate and high-precision measurement scenarios.
[0023] As an optional implementation of this application, in order to uniformly describe the event location reconstruction process as a centroid calculation problem, and to extract and verify the validity of hit cluster boundaries by shifting and XORing bitstream data, the implementation process of step 101 above includes: Step 200: Perform logical right shift and logical left shift on the bitstream data respectively. When performing the logical right shift, low-order bits can be padded with 0s to accommodate cases where the right boundary is 1, ensuring that the least significant bit 1 is not lost.
[0024] Step 201: Perform an XOR operation between the logically right-shifted or logically left-shifted bitstream data and the current bitstream data to obtain the right-shift XOR result or the left-shift XOR result. If there are *a* particle hit events in the bitstream data, the right-shift XOR result should have exactly 2*a* high-level bits, with the remaining bits being low-level bits. Similarly, the left-shift XOR result should also have only 2*a* high-level bits, with the remaining bits being low-level bits.
[0025] Furthermore, it is also possible to select to extract the left boundary using only right shift XOR and extract the right boundary using left shift XOR, without the need for a subtraction operation, but an additional displacement XOR calculation is required.
[0026] Step 202: In the right-shift XOR result, retrieve the odd-numbered high-level bits. The channel number corresponding to the odd-numbered high-level bits is the left boundary channel number of each hit cluster. Retrieve the even-numbered high-level bits. The channel number corresponding to the even-numbered high-level bits minus 1 is the right boundary channel number of each hit cluster. Alternatively, in the left-shift XOR result, retrieve the even-numbered high-level bits. The channel number corresponding to the even-numbered high-level bits is the right boundary channel number of each hit cluster. Retrieve the odd-numbered high-level bits. The channel number corresponding to the odd-numbered high-level bits minus 1 is the left boundary channel number of each hit cluster.
[0027] Step 203: Obtain the left and right boundaries based on the left and right boundary channel numbers. The extracted left and right boundary channel numbers can be arranged in ascending order and paired sequentially to form data packets (i.e., left and right boundaries). For example, a left-shifted XOR operation outputs the left boundary number {1, 6, n}, and a right-shifted XOR operation outputs the right boundary number {3, 7, n}. The resulting left and right boundaries are {1, 3}, {6, 7}, and {n, n}.
[0028] Each pair of left and right boundaries represents the effective channel range of a particle hit event, which can be used for subsequent centroid calculations or amplitude accumulation.
[0029] As an optional implementation of this application, to suit scenarios with high incident rates or fast real-time processing, the event location can be approximated based on the midpoints of the left and right boundaries of the hit cluster, thereby reducing computational load. Therefore, when the centroid calculation strategy used is the boundary center method, the process of determining the location coordinates of the hit event includes: Step 300: Obtain the left boundary channel number and right boundary channel number of the same hit cluster, and multiply the left boundary channel number and right boundary channel number of the same hit cluster to obtain the multiplied value.
[0030] Step 301: Add the multiplied values to obtain the sum.
[0031] Step 302: Perform a logical right shift or divide by 2 operation on the sum to obtain the center channel number of the hit event.
[0032] Step 303: Obtain the position coordinates of the hit event based on the center channel number of the hit event. For example, after obtaining the center channel number, increment the counter corresponding to this channel number in the hardware logic by 1, indicating that a hit event has occurred at the corresponding position. Store the counter result in a register.
[0033] Based on the description of steps 300-303 above, because of the doubling process, the position resolution is doubled. That is, if the channels are a and a-1, after the doubling process, the corresponding channels are 2a and 2a-2. After dividing by 2, the centroid channel is 2a-1. With the channels remaining unchanged, the interval between the channels is obtained as a virtual channel, thereby doubling the position resolution. That is, the total number of channel numbers changes from n to 2n-1.
[0034] As an optional implementation of this application, to suit scenarios with high positioning accuracy requirements, local weighted centroid calculation can be performed within the boundary constraints using the threshold time of the peak channel and its neighboring channels, thereby obtaining higher position resolution. Based on this, when the centroid calculation strategy is a three-point weighted method based on threshold time, the process of determining the position coordinates of the hit event includes: Step 400: Within the left and right boundaries, read the threshold time value of each channel one by one, compare and determine the peak channel with the largest threshold time value and the threshold time corresponding to the peak channel.
[0035] Step 401: Extract the threshold times of the left and right neighboring channels of the peak channel.
[0036] Step 402: Determine the position offset based on the threshold time corresponding to the peak channel, the threshold time of the left neighbor channel, and the threshold time of the right neighbor channel. Specifically, taking the peak channel as the center, extract the threshold times of one channel on each of its left and right (i.e., the threshold times of the left and right neighbor channels), and construct a three-point local centroid calculation window. The position offset is obtained based on the constructed three-point local centroid calculation window.
[0037] Step 403: The position offset is calculated using hardware acceleration through segmented comparison or shift approximation, and then superimposed with the peak channel number to obtain the position coordinates of the hit event.
[0038] In practical applications, the process of hardware-accelerated calculation of position offset using the shift approximation method includes: Step 1: Determine the difference component and total quantity based on the threshold time corresponding to the peak channel, the threshold time of the left neighbor channel, and the threshold time of the right neighbor channel.
[0039] Step 2: Divide the total amount into multiple threshold intervals through a binary right shift operation. Compare the absolute value of the difference component with each threshold interval step by step. Map the absolute value of the position offset according to the threshold interval into which the absolute value of the difference component falls.
[0040] Step 3: Determine the sign of the position offset based on the sign of the difference component.
[0041] Furthermore, based on the above description, by introducing a unified digital readout framework, compatibility and parallelism of various centroid calculation strategies can be achieved, such as: (1) Both methods (boundary center method and three-point weighted method based on threshold time) can simultaneously output event locations for offline analysis or error assessment.
[0042] (2) The final output of the two methods can be selected through control logic or experimental experience to achieve a two-choice output.
[0043] Therefore, this application provides a flexible trade-off between the processing rate and positioning accuracy, which can be applied to different physical experimental conditions and application requirements, and significantly improves the adaptability and scalability of digital readout systems in particle detection, radiation imaging and high-resolution position measurement.
[0044] As an optional implementation of this application, based on the above-described one-dimensional centroid calculation (steps 100-105), the position encoding method provided in this application can be extended to two-dimensional digital signal centroid calculation. Therefore, the hit event position encoding method for a position-sensitive detector provided in this application further includes: two-dimensional position encoding extension. The two-dimensional position encoding extension process includes: Step 106: Divide the channel of the position-sensitive detector into two orthogonal dimensions, the X-axis and the Y-axis.
[0045] Step 107: Using the processing methods provided in Steps 100-101, extract the left and right boundaries on the two orthogonal dimensions of the X-axis and Y-axis respectively.
[0046] Step 108: Determine whether the left and right boundaries extracted from the X-axis and Y-axis within the same time window are unique, and obtain the determination result.
[0047] Step 109: When the judgment result is yes, the hit clusters corresponding to the left and right boundaries are identified as valid two-dimensional single-particle hit events. At this time, based on the channel response characteristics of the hit clusters, at least one centroid calculation strategy in the unified digital readout framework is used to determine the position coordinates of the hit event in the two orthogonal dimensions of the X and Y axes. The position coordinates of the hit event in the two orthogonal dimensions of the X and Y axes are mapped to X-axis centroid codes and Y-axis centroid codes, respectively. The X-axis centroid codes and Y-axis centroid codes are combined or multiplied to obtain the position coding result. The specific method for determining this position coding result is similar to the method provided in steps 103 and 104 above.
[0048] Step 110: If the judgment result is negative, the clusters corresponding to the left and right boundaries are identified as multi-particle aliasing events, the multi-particle aliasing events are invalidated, and the process returns to the idle state.
[0049] Based on the same inventive concept, this application also provides a system for encoding the location of a hit event for a position-sensitive detector, which implements the aforementioned method for encoding the location of a hit event for a position-sensitive detector. The solution provided by this system is similar to the implementation described in the above method. Therefore, the specific limitations of one or more embodiments of the system for encoding the location of a hit event for a position-sensitive detector provided below can be found in the limitations of the method for encoding the location of a hit event for a position-sensitive detector described above, and will not be repeated here.
[0050] In one exemplary embodiment, a hit event location encoding system for a position-sensitive detector is provided, which is implemented based on a programmable logic device or an application-specific integrated circuit chip. Figure 2 As shown, the system includes: a signal acquisition module, a boundary detection module, a center of gravity calculation module, and an output control module.
[0051] The signal acquisition module is used to acquire the digital response signals of each channel of the position-sensitive detector within a preset time window, and generate bit stream data that characterizes the response state of the channel.
[0052] The boundary detection module is used to perform boundary detection processing on the bitstream data, extracting the left boundary channel number and right boundary channel number of at least one hit cluster to obtain the left and right boundaries.
[0053] The centroid calculation module includes a boundary center calculation unit and a three-point weighted calculation unit based on threshold time, used to verify the validity of the left and right boundaries. If the left and right boundaries are valid, the location coordinates of the hit event are determined using at least one centroid calculation strategy in the unified digital readout framework based on the channel response characteristics of the hit cluster. The centroid calculation strategies include the boundary center method and the three-point weighted method based on threshold time. If the left and right boundaries are invalid, the data collected in the current time window is discarded, and the system returns to an idle state.
[0054] The output control module is used to map the location coordinates of the hit event into a location encoding result, and selects the output path as a counter or a storage unit according to the configuration signal.
[0055] As an optional implementation, the unified digital readout framework supports the parallel operation of the boundary center method and the three-point weighted method. The two methods calculate independently and output the position results to different storage units. The system selects the result of one method as the final output through control signals, or outputs both results simultaneously for offline error analysis and algorithm optimization.
[0056] In an exemplary embodiment, the hit event location coding system for a position-sensitive detector provided above can be equivalent to a boundary center-based digital readout coding circuit and a centroid-based digital readout coding circuit, depending on the different centroid calculation strategies employed.
[0057] Specifically, for one-dimensional centroid calculation and two-dimensional digital signal centroid calculation, the processing flow of the boundary center-based digital readout encoding circuit can be described as follows: (I) Calculation of one-dimensional centroid.
[0058] Step 1: The charge signal output by the detector is converted into a digital signal through the amplification, shaping, and threshold discrimination circuits of the readout electronics. The obtained digital signal can be used to calculate the centroid position of the impact event by encoding circuits such as Field-Programmable Gate Array (FPGA) and Application-Specific Integrated Circuit (ASIC).
[0059] Step 2: Based on the multi-channel hit response, the channel response acquired within a single time window by the readout electronics can be recorded as a hit event. A high-level response from the digital signal indicates a hit event on that channel, while a low-level response indicates no hit event. In circuit logic, a hit event is represented by a stream of 1s and 0s of length n.
[0060] Step 3: To reduce the false detection rate of readout electronics, even with a reasonable acquisition time window designed, considering the relatively common occurrence of multiple particle hits in practical applications, this application calculates the centroid of multiple particle hit events for a single bitstream data. The specific method is as follows: Step 3-1: Preliminary processing of the bit stream.
[0061] Analyzing the channel response within a single acquisition time window, the channel response corresponding to each particle hit event should be a continuous high level, and each particle event has only a unique left and right boundary. Based on this, the logical right shift process is as follows: the original bitstream data is shifted one bit to the right, with low-order bits padded with 0s to accommodate the case where the right boundary is 1, ensuring that the least significant bit 1 is not lost. The right-shifted bitstream is then XORed with the original bitstream to obtain the right-shifted XOR result. A similar operation is used for left shifting, as described in steps 200-201 above.
[0062] Step 3-2: Validity check of left and right boundaries.
[0063] Check if a high-level bit exists in the XOR result of the right shift. If neither the right nor left shift XOR result has a high level, it means there was no particle hit event within this time window, and the system returns to the idle state, waiting for the next event.
[0064] If the XOR result is high, it indicates that the hit event is valid, and subsequent left and right boundary extraction and centroid calculation can be performed.
[0065] Step 3-3: Extract the left and right boundaries.
[0066] (1) Determine the left and right boundaries based on the result of the right shift XOR (see the description of step 202 above).
[0067] The high-level 1 of the odd-numbered bits corresponds to the left boundary of each particle hit event.
[0068] Retrieve the high-level 1 of even-numbered bits. The corresponding channel number is the right boundary plus 1. Subtract one from this number to obtain the actual right boundary.
[0069] (2) Determine the left and right boundaries based on the result of the left shift XOR (see the description of step 202 above).
[0070] After logically shifting the original bitstream left by one bit, perform an XOR operation with the original data. The XOR result should then have only 2a high-level bits, with the remaining bits being low-level bits.
[0071] Retrieve the high level 1 of even-numbered bits, which corresponds to the right boundary of each particle's hit position in the channel number. For odd-numbered bits, the channel number corresponds to the left boundary plus 1. The actual left boundary is obtained by subtracting one.
[0072] Steps 3-4: Boundary pairing and data packaging.
[0073] The extracted left and right boundary channel numbers are arranged in ascending order and paired one by one to form a data packet. Each pair of left and right boundaries represents the effective channel range of a particle hit event, which can be used for subsequent centroid calculation or amplitude accumulation.
[0074] Step 4: Double the channel number in each data set and add them together. Then, logically shift the result right or divide by 2 to obtain the center of gravity of the particle hit event response channel. After obtaining the actual center of gravity position, increment the counter corresponding to this channel number in the hardware logic, indicating that a hit event has occurred at that position. Store the counter result in a register.
[0075] The overall calculation process of steps 1-4 above is as follows: Figure 3 As shown. Figure 3 In this context, SEL represents selection, and Addr represents address; SEL Addr means selecting the address.
[0076] (ii) Calculation of the centroid of a two-dimensional digital signal.
[0077] Based on one-dimensional centroid calculation, the position encoding method provided in this application can be extended to two-dimensional digital signal centroid calculation. In this application, the two-dimensional readout logic is implemented by digital integrated circuit hardware. For an A×A two-dimensional design, channel numbers 0 to (A-1) are mapped to the X-axis, and A to (2A-1) are mapped to the Y-axis. The X-axis response channel and the Y-axis response channel are time-matched and calculated to match A. 2 Each pixel can be considered a readout channel. The encoding circuit assigns a separate counter to each pixel to track particle hits. The two-dimensional architecture is as follows: Figure 4 As shown.
[0078] The key to the 2D readout logic design lies in achieving temporal correlation and spatial matching of multi-channel impact events. Within the same clock cycle, if multiple channels respond simultaneously along the X and Y axes, the system needs to accurately establish correspondences among these channels to identify the true 2D impact location. This requires adjusting the data packet acquisition method, because processing multiple particle impact events simultaneously within a single data packet during 2D centroid calculation can lead to positioning errors. For example, if the X-axis response consists of channels 5 and 10, and the Y-axis response consists of channels A+7 and A+14, corresponding to readout data packets of 0000100001…10100…, it becomes impossible to determine whether channel 5 of the X-axis matches a pixel with channel A+7 or channel A+14. Therefore, the implementation process includes: Step 1: Based on the actual incident rate of the position-sensitive detector and the dead time of the readout electronics, set an appropriate time window (i.e., time window) for acquiring position information during a single event hit. For example, the incident rate is denoted as... λ Electronic dead time is recorded as t d Let the time window length be denoted as Δt. The time window length for a single acquisition event (time window) should be reasonably set so that it covers a complete physical event while minimizing the overlap of multiple hit events. Assuming that the probability of at most one event occurring within a single acquisition time window is greater than α, then according to the Poisson distribution formula, we can obtain: ; In the formula, P(N≤1) is the probability that the event occurs at most once, N is the Nth event, and α is the confidence level.
[0079] The time window and the event rate can be obtained from this formula. λ The relationship is determined based on actual application requirements, and the length of the time window Δt should be greater than [the required value]. t dThe channel response within a time window is recorded as a hit event. A high-level response from the digital signal indicates a hit event, while a low-level response indicates no hit event. In circuit logic, a hit event is represented by a stream of 1s and 0s of length n.
[0080] Step 2: A×A Two-Dimensional Design. Channel numbers 0 to (A-1) are mapped to the X-axis, and A to (2A-1) are mapped to the Y-axis. When a hit signal is generated first in either dimension, the digital integrated circuit hardware will activate a time window set by the host computer. The time difference between the two-dimensional channel signals is approximately on the picosecond scale, so the two-dimensional signals should arrive at the front-end electronics module within one clock cycle. Within this time window, the system performs centroid encoding calculations on the effective channels of both dimensions. The specific implementation in each dimension involves calculating and extracting the left and right boundaries in each dimension. The left and right boundaries of each dimension should be unique. If the left and right boundaries are not unique, it indicates a multi-particle hit event (i.e., a multi-particle aliasing event). In this case, accurate time synchronization calculations for the two-dimensional information are not possible, and the data should be discarded. Only when the left and right boundaries of each dimension are simultaneously unique is the hit event valid, and the data valid. The verification method is to judge the XOR result after the left and right displacements, i.e., the calculation formula... Where n represents the number of channels in each dimension. The sum can be the result of XORing the original bitstream data left-shifted with the original bitstream data and then XORing the original bitstream data right-shifted with the original bitstream data. A sum value of 2 indicates that the left and right boundaries are unique. If the sum value is greater than 2, it indicates that the left and right boundaries are not unique, meaning that the high-level response of the channel is discontinuous and multiple particles hit the channel during a single acquisition, in which case the hit event is invalidated.
[0081] Step 3: If the hit event is valid, first find the left boundary. Logically shift the original bitstream data right, extending the least significant bit by one bit to 0 to accommodate cases where the least significant bit is 1. This design ensures the least significant bit 1 is not lost during the right shift. Then, XOR the shifted data with the original data. Find the odd-numbered high-level 1 bits based on the XOR result. The channel corresponding to this high level is the left boundary of each particle hit event. Output the channel numbers corresponding to all odd-numbered high-level 1 bits. Next, find the even-numbered high-level 1 bits based on the XOR result. The channel number corresponding to this high level is the right boundary plus 1. Subtract one from this channel number to obtain the right boundary of the hit event. Similarly, left-shifting the data can be used to find the left and right boundaries, following the same principle.
[0082] Step 4: If the data is valid, further multiply the channel numbers corresponding to the left and right boundaries of the response data in each dimension, and add the two together. Then, perform a logical right shift or divide by 2 operation on the calculation result. The result obtained is the centroid of the response channel. Because of the multiplication process, the position resolution is doubled. At this point, the actual hit channel numbers for each of the two dimensions are obtained.
[0083] Step 5: Multiply the actual hit channel numbers in the two-dimensional model to obtain the corresponding channel response area positions. In the A×A two-dimensional design, after doubling, it is updated to (2A-1)×(2A-1), so the system now has (2A-1) channels. 2 Each pixel (readout channel) has its own counter and register. At this point, the actual two-dimensional channel number is multiplied to obtain the actual hit pixel. Then, the counter corresponding to the actual hit pixel is incremented by 1. The two-dimensional centroid calculation process ends, and the system returns to the idle state to wait for the next hit event to occur.
[0084] Furthermore, for both one-dimensional and two-dimensional digital signal centroid calculations, the processing flow of the centroid digital readout encoding circuit based on threshold time weighting can be described as follows: (I) Calculation of one-dimensional centroid.
[0085] Step 1: The charge signal output by the detector is converted into a digital pulse signal through the amplification, shaping, and threshold discrimination circuitry of the readout electronics. This digital pulse signal then enters an FPGA, ASIC, or other digital encoding circuit for calculating the location of a single-hit event.
[0086] Unlike encoding using only the high and low level states of the channels, this application can further statistically analyze the high-level duration of the digital pulses in each channel and use it as a measure of the channel's response strength to the hit event.
[0087] Step 2: Based on the actual event rate of the detector and the dead time of the front-end electronics, set an appropriate single-event acquisition time window to store multi-channel hit response and multi-channel time-over-threshold (TOT) values. Within a time window, whether each channel responds can still be represented as a bitstream of 1s and 0s. Simultaneously, for the responding channel, further record the clock count value of its pulse high level duration. Assume the system clock period is... Then the threshold time of the k-th channel within this time window can be expressed as: : .
[0088] In the formula, This represents the number of clock cycles during which the high-level pulse of this channel lasts. In digital circuit implementation, this can be directly used. The digital weight of this channel is used in subsequent calculations and does not need to be converted into actual time.
[0089] Step 3: Perform boundary extraction and existence test.
[0090] Boundary extraction is performed on the bitstream data within a single time window to obtain the left and right boundary channel numbers of each hit cluster. The boundary extraction method can follow the bit-shift and XOR-based boundary detection method described in steps 200-203 above. That is, by logically shifting the original bitstream data and XORing it with the original bitstream data, the high and low level transition positions are extracted, thereby obtaining the left and right boundaries of each hit cluster. This type of boundary extraction logic is characterized by its simple operation and suitability for digital hardware implementation.
[0091] The system checks if the left and right boundaries exist and are valid. If no valid left or right boundaries exist within the current time window, it indicates that there was no hit event within this time window, and the system returns to an idle state to wait for the next hit. If the left and right boundaries exist, the corresponding boundary channel numbers are paired one by one in sequence, and each group of left and right boundaries... For a candidate hit cluster, where, Indicates the first The left boundary channel number of the cluster hit. Indicates the first The right boundary channel number of the cluster that was hit.
[0092] Step 4: Perform peak finding within the boundaries. For each set of left and right boundaries... The corresponding cluster region is used for peak locating within its boundaries. Specifically, this is done at the left and right boundaries. Read the over-threshold time value of each channel one by one. Compare and find the maximum value; the corresponding channel number is recorded as the peak channel. The corresponding maximum overthreshold time is denoted as ,have: .
[0093] This peak channel The central reference channel used in this calculation of the centroid of the hit cluster differs from the location determined solely by the boundary midpoint. Therefore, the primary response channel is first located within the boundary constraints to avoid interference from distant noise channels or other hit clusters in the location calculation.
[0094] Step 5: Calculate the centroid of the three points and map the position interval.
[0095] (1) Using peak channel Centered on the data, extract the threshold time of one channel to its left and right, and construct a three-point local centroid calculation window. Let: .
[0096] In the formula, , , These represent the threshold time values of the left neighbor channel, the peak channel, and the right neighbor channel of the peak channel, respectively. , and These represent the time that the left neighbor, peak channel, and right neighbor of the peak channel exceed the threshold, respectively. If the peak channel is located at the boundary of the hit cluster or the edge of the total channel, the missing adjacent channels can be treated as 0, or the value of the corresponding boundary channel itself can be used as the replacement value. The specific implementation method can be determined according to the electronic design.
[0097] (2) Construct three local centroids based on the threshold times of the peak channel and its two adjacent channels. The position of this centroid can be represented as the peak channel number plus a position offset (i.e., subchannel offset), as follows: .
[0098] Among them, position offset We can calculate this using the three-point centroid formula: .
[0099] Therefore, the first The actual centroid location of a cluster hit can be represented as: : .
[0100] The calculated center of gravity position is the location of the impact event. Based on this formula, when the overthreshold times on both sides of the peak channel are equal, it indicates that the center of gravity is located at the center of the peak channel. When the overthreshold time on the right is greater than that on the left, it indicates that the actual impact position of the particle is shifted to the right relative to the center of the peak channel. Conversely, it is shifted to the left. This allows for the subdivision of subchannel intervals without increasing the number of physical channels.
[0101] (3) To adapt to digital hardware implementation, the offset expression in step (2) can be rewritten as a sum of differences and totals, defined as follows: .
[0102] .
[0103] Then we have: .
[0104] In the formula, The difference component determines the direction and trend of position offset. The normalization scale is determined by the total amount.
[0105] In FPGAs or ASICs, division operations are used directly for calculation. It consumes a large amount of look-up table (LUT) and digital signal processor (DSP) resources, while increasing computational latency, especially at high sampling precision.
[0106] To reduce hardware resource consumption and improve computing speed, this application employs a piecewise comparison or shift approximation method to calculate the position offset. The specific process includes: 1) Segmentation.
[0107] The ratio range is divided into several segments, such as 4 to 16 segments, each segment corresponding to a certain positional offset. Levels. Segment boundaries are available. The displacement form represents a right shift of S by m positions, without actually performing division.
[0108] 2) Shift approximation judgment.
[0109] Difference components With total amount The threshold values of each segment are compared step by step. Based on the difference components... The location offset is directly determined by which segment it falls on. The corresponding numerical values. The sign is determined by the difference component. The sign determines the direction of the offset. For example: S3 represents S / 8. S2 represents S / 4. S3+S2 represents 3S / 8. S1 represents S / 2.
[0110] Then the ratio range S can be divided into four segments: [0,S3), [S3,S2), [S2,S3+S2), and [S3+S2,S1).
[0111] If | | <S3,| |=0.
[0112] If | | <S2,| |=1.
[0113] If | | <S3+S2,| |=2.
[0114] If | | <S1,| |=3.
[0115] like >0, then Take a positive number. If <0, then Take the negative number.
[0116] (4) The actual center of gravity position The mapping is to the corresponding subdivided position encoding result. If the system adopts an integer channel counting structure, each physical channel can be pre-divided into several virtual sub-channels, and the position offset can be... After quantization, the values are superimposed onto the peak channel number to obtain the subdivided numerical position numbers. Each channel is divided into... Taking a sub-channel as an example, the subdivided position number can be represented as: .
[0117] in, For digital position encoding that is ultimately used for counting or imaging, This is a Round function. This allows for improved position coding resolution without changing the number of physical anode strips.
[0118] Step 6: Count the corresponding coordinates (increment by 1). The subdivided position encoding result of each hit cluster is sent to the corresponding counter, incremented by one, and stored in a register or memory, indicating that a particle hit event has occurred at the corresponding position. Repeating steps 2 to 5 for multiple hit clusters extracted within the same time window allows for independent localization and parallel counting of multiple particle hit events within a single time window.
[0119] In this one-dimensional centroid calculation (i.e., the one-dimensional case), the overall operation flow of steps 1-6 is as follows: Figure 5 As shown. Figure 5 In the diagram, the green boxes correspond to the operations of the signal acquisition module and the boundary detection module, while the purple-pink boxes correspond to the operations of the centroid calculation module and the output control module.
[0120] (ii) Calculation of the centroid of a two-dimensional digital signal.
[0121] Step 1: The induced charge signals output from the X and Y direction channels of the detector are converted into digital signals through the amplification, shaping, and threshold discrimination circuits of the readout electronics. Each channel operates independently, and its output digital pulse signals are processed by an FPGA, ASIC, or other digital encoding circuit. Simultaneously, the high-level duration of the digital pulses in each channel is statistically analyzed, serving as a measure of the channel's response intensity to the impact event.
[0122] Step 2: Based on the actual event rate of the detector and the dead time of the front-end electronics, set a uniform single-event acquisition time window to facilitate multi-channel hit response. Within this time window, the response of each channel in both the X and Y directions can be represented as a bitstream of 1s and 0s, while simultaneously recording the clock count value of the corresponding channel's sustained high-level pulse. Assume the system clock period is... Then the threshold crossing times of the k-th channel in the X and Y directions are respectively expressed as: and : .
[0123] In digital implementation, parameters can be used directly. and It is used as a channel weight in subsequent calculations.
[0124] Step 3: Perform boundary extraction and existence test.
[0125] Boundary extraction is performed on the bitstream data obtained in the X and Y directions within a single time window to obtain the left and right boundary channel numbers of each hit cluster in each direction. The boundary extraction method is the same as that in the one-dimensional case described above, that is, by performing a logical shift on the original bitstream and XORing it with the original data, the high and low level transition positions are extracted, thereby obtaining the left and right boundaries of each hit cluster.
[0126] Validity checks are performed on the boundaries in the X and Y directions. If no valid boundary exists in a certain direction, it indicates that there is no valid hit information in that direction within the current time window. If a boundary exists, the corresponding boundary channel numbers are paired in sequence to obtain multiple candidate hit clusters in the X and Y directions, respectively, and their boundaries are represented as follows: .in, This indicates the left and right boundary channel numbers of the m-th cluster hit in the X direction. This indicates the left and right boundary channel numbers of the nth cluster hit in the Y direction.
[0127] Step 4: Perform peak finding within the boundary. For each set of boundaries in the X and Y directions, perform peak finding within the boundary of the hit cluster region. Read the threshold time values channel by channel within each interval and compare them to obtain the peak channel number and its threshold time in the corresponding direction. .
[0128] In the formula, and These serve as reference channels for calculating the centroid in the X and Y directions, respectively.
[0129] Step 5: Calculation of the centroid of the three points and mapping of the position interval.
[0130] (1) Using the peak channels in the X and Y directions as centers, extract the threshold times of one channel to the left and one to the right of each peak channel, and construct a three-point local centroid calculation window. Let: .
[0131] .
[0132] In the formula, , and These are the threshold time values for the left neighbor channel, peak channel, and right neighbor channel of the peak channel in the X direction, respectively. , and These are the threshold time values for the left neighbor channel, peak channel, and right neighbor channel of the peak channel in the Y direction, respectively. , and These represent the time that the left neighbor, peak channel, and right neighbor of the peak channel exceed the threshold in the X direction, respectively. , and These represent the time that the left neighbor, peak channel, and right neighbor of the peak channel exceed the threshold, respectively, in the Y direction.
[0133] If the peak channel is located at the boundary or channel endpoint, the missing channel is treated as 0 or replaced by the boundary channel.
[0134] (2) Construct the local centroid position based on the threshold time of the three points in each direction. The corresponding two-dimensional positions are represented as follows: .
[0135] In the formula, Let X be the position of the center of gravity in the X direction. This represents the position offset in the X direction. The position of the center of gravity in the Y direction. This represents the position offset in the Y direction.
[0136] The position offsets in the X and Y directions are respectively: .
[0137] (3) To adapt to digital hardware implementation, the above position offset expression can be rewritten in the form of difference components and total quantity, as follows: .
[0138] .
[0139] In the formula, The difference component in the X direction. This represents the total amount in the X direction. The difference component in the Y direction. This represents the total amount in the Y direction.
[0140] Then we have: .
[0141] (3) Map the centroid positions in the X and Y directions to the subdivided position encoding results respectively. If each channel is divided into With virtual sub-channels, we have: .
[0142] .
[0143] In the formula, Digital position encoding for counting or imaging in the X direction. Digital position encoding for counting or imaging in the Y direction.
[0144] Thus, the two-dimensional position encoding result is obtained. : .
[0145] Step 6: Increment the corresponding coordinate memory count by 1. If multiple impact clusters exist within the same time window, match the impact clusters in the X and Y directions to obtain the corresponding two-dimensional impact event locations. The matched encoded results are sent to the corresponding two-dimensional counting unit for statistical analysis and stored in a register or memory, achieving independent localization and parallel counting of multiple particle events.
[0146] In an exemplary embodiment, to further demonstrate the engineering implementation advantages of this application, this application, based on the foregoing, can also provide a circuit implementation scheme for a unified digital readout framework that enables the two event centroid calculation methods to run simultaneously under the same hardware system, and allows the final output to be selected according to application requirements.
[0147] like Figure 6 As shown, the green box represents the shared module (corresponding to the signal acquisition module and boundary detection module in the aforementioned device), the yellow box represents the boundary center method module, and the purple box represents the TOT three-point weighted module. The two calculation methods operate in parallel and have independent storage and readout units. Based on this, in practical applications, this framework can include: 1. Charge amplification, shaping, and threshold discrimination circuit (corresponding to) Figure 6 The first green box in the image has the following main functions: (1) Responsible for amplifying and shaping the detector's sensed charge signal.
[0148] (2) The shaped signal is converted into an overthreshold digital pulse signal by a voltage comparator.
[0149] 2. Multi-channel hit response and boundary detection module (corresponding) Figure 6 The second and third green boxes in the image have the following main functions: (1) Acquire the channel digital pulses within each time window to form a bit stream of 1s and 0s.
[0150] (2) Extract the effective left and right boundaries of each hit cluster to complete the hit cluster identification and boundary validity verification.
[0151] (3) This module provides shared input for the two methods, providing a unified basis for subsequent centroid calculation.
[0152] 3. Two types of digital centroid calculation modules (corresponding) Figure 6 The yellow and purple boxes in the image run in parallel, including: (1) Boundary center method module (corresponding to) Figure 6 (The first yellow box in the image): Calculate the centroid position of the event using the midpoints of the left and right boundaries of the cluster.
[0153] (2) TOT three-point weighted module (corresponding to) Figure 6 (The second and third purple boxes in the text): Construct a local centroid based on the threshold time of the peak channel and its neighboring channels, and perform a three-point weighted calculation.
[0154] Two digital centroid calculation modules independently calculate their respective position coordinates and store the results in their respective memory for offline statistics or performance analysis.
[0155] 4. Two-to-one output selection module (corresponding to) Figure 6 The functions of the second yellow box and the fourth purple box in the image include: (1) Select the final output method by means of control signals according to the system design or experimental requirements.
[0156] (2) Output the event location code of the selected method and write it to the corresponding counter or memory.
[0157] In real-time applications, the system can maintain a stable acquisition cycle and response speed.
[0158] 5. Balancing analysis and optimization.
[0159] (1) The two digital centroid calculation results output in parallel can be used for offline analysis, such as calculating the root mean square error or comparing the deviations of different methods.
[0160] (2) Selection or weighted fusion can be performed in subsequent experiments or data analysis stages to achieve a flexible balance between case rate and positioning accuracy.
[0161] In summary, compared with the prior art, this application has the following advantages and positive effects: 1. Unified digital readout framework.
[0162] This application uniformly describes the particle event location reconstruction problem as the event centroid calculation problem, and completes time window acquisition, cluster identification, boundary extraction and location encoding processing under the same digital readout system. It achieves the unification and simplification of method modeling and circuit structure, which is beneficial to system design, hardware reuse and subsequent expansion.
[0163] 2. Supports parallel and optional implementations of multiple center of gravity calculation strategies.
[0164] Within a unified framework, this application provides two independent calculation strategies: the boundary center method and the three-point weighted method based on threshold time. Both can simultaneously output position results for offline analysis, and either strategy can be selected as the final output via control logic, enabling flexible method switching. The centroid calculation method based on channel spatial distribution has a simple structure and low computational cost, making it suitable for high-incident-rate scenarios. The centroid calculation method based on channel response intensity weighting can more accurately reflect charge distribution characteristics and improve position resolution, making it suitable for high-precision measurement scenarios.
[0165] 3. Achieve a flexible balance between case rate and positioning accuracy.
[0166] By providing multiple center of gravity calculation methods and a two-out-of-two output mechanism, this application can flexibly adjust between processing speed and position resolution, thereby adapting to different physical experimental conditions and application needs, and improving the applicability and versatility of the digital readout method.
[0167] 4. Make full use of channel response information to improve location resolution capabilities.
[0168] In the implementation of introducing channel response intensity information, this application uses parameters such as overthreshold time to weight the local channel response, making the position calculation result closer to the actual charge distribution center and effectively improving the position reconstruction accuracy.
[0169] 5. Hardware-friendly, facilitating high-speed implementation.
[0170] Each processing step in this application, including cluster hit identification, boundary extraction, peak search, and local centroid calculation, can be implemented through digital operations such as addition, subtraction, comparison, displacement, and table lookup. It does not require complex analog circuits or high-overhead computing units and is suitable for high-speed real-time implementation in FPGA or ASIC.
[0171] 6. Excellent scalability and compatibility.
[0172] The proposed unified digital readout framework supports expansion with different numbers of channels, different readout structures, and multiple centroid calculation methods. It can be flexibly configured according to specific application requirements, while being compatible with parallel computing and two-to-one output modes, and has good engineering adaptability and scalability.
[0173] In one exemplary embodiment, a hit event location encoding system (essentially a computer device) for a location-sensitive detector is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0174] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0175] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.
[0176] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0177] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (RRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0178] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0179] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0180] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for encoding the location of a hit event in a position-sensitive detector, characterized in that, include: Within a preset time window, digital response signals from each channel of the position-sensitive detector are acquired to generate bitstream data characterizing the channel response state. The bitstream data is subjected to boundary detection processing to extract at least one left boundary channel number and one right boundary channel number that hit the cluster, thus obtaining the left and right boundaries; Perform a validity check on the left and right boundaries; If the left and right boundaries are valid, the location coordinates of the hit event are determined by at least one centroid calculation strategy in the unified digital readout framework based on the channel response characteristics of the hit cluster; the centroid calculation strategy includes the boundary center method and the three-point weighted method based on the threshold time. The location coordinates of the hit event are mapped into a location encoding result and output to a counter or storage unit for statistical analysis; If the left and right boundaries are invalid, discard the data collected in the current time window and return to the idle state.
2. The method for encoding the location of a hit event for a position-sensitive detector according to claim 1, characterized in that, The bitstream data undergoes boundary detection processing to extract at least one left boundary channel number and one right boundary channel number that hit a cluster, thus obtaining the left and right boundaries, including: The bitstream data is then logically shifted right and logically shifted left, respectively. Perform an XOR operation between the logically right-shifted bitstream data or the logically left-shifted bitstream data and the bitstream data respectively to obtain the right-shift XOR result or the left-shift XOR result; In the right-shift XOR result, the odd-numbered high-level bits are retrieved, and the channel number corresponding to the odd-numbered high-level bits is the left boundary channel number of each hit cluster; the even-numbered high-level bits are retrieved, and the channel number corresponding to the even-numbered high-level bits minus 1 is the right boundary channel number of each hit cluster. Alternatively, in the left-shift XOR result, retrieve the even-numbered high-level bits, and the channel number corresponding to the even-numbered high-level bits is the right boundary channel number of each hit cluster; retrieve the odd-numbered high-level bits, and the channel number corresponding to the odd-numbered high-level bits minus 1 is the left boundary channel number of each hit cluster. The left and right boundaries are obtained based on the left boundary channel number and the right boundary channel number.
3. The method for encoding the location of a hit event for a position-sensitive detector according to claim 1, characterized in that, When the centroid calculation strategy used is the boundary center method, the process of determining the location coordinates of the impact event includes: Obtain the left and right boundary channel numbers of the same hit cluster, and multiply the left and right boundary channel numbers of the same hit cluster to obtain the multiplied values; Add the multiplied values together to obtain the sum; Perform a logical right shift or divide by 2 operation on the summed result to obtain the centroid channel number of the hit event; The location coordinates of the impact event are obtained based on the centroid channel number of the impact event.
4. The method for encoding the location of a hit event for a position-sensitive detector according to claim 1, characterized in that, When the centroid calculation strategy used is a three-point weighted method based on the threshold time, the process of determining the location coordinates of the hit event includes: Within the left and right boundaries, the threshold time value of each channel is read channel by channel, and the peak channel with the largest threshold time value is compared and determined, along with the threshold time corresponding to the peak channel. Extract the threshold times of the left and right neighboring channels of the peak channel; The position offset is determined based on the threshold time corresponding to the peak channel, the threshold time of the left neighbor channel, and the threshold time of the right neighbor channel; The position offset is calculated using hardware acceleration through segmented comparison or shift approximation, and then superimposed with the number of the peak channel to obtain the position coordinates of the hit event.
5. The method for encoding the location of a hit event for a position-sensitive detector according to claim 4, characterized in that, The process of performing hardware-accelerated calculation of the position offset using a shift approximation method includes: The difference component and the total amount are determined based on the threshold time corresponding to the peak channel, the threshold time of the left neighbor channel, and the threshold time of the right neighbor channel; The total amount is divided into multiple threshold intervals by a binary right shift operation. The absolute value of the difference component is compared with each threshold interval step by step. The absolute value of the position offset is obtained by mapping the threshold interval into which the absolute value of the difference component falls. The sign of the position offset is determined based on the sign of the difference component.
6. The method for encoding the location of a hit event for a position-sensitive detector according to claim 1, characterized in that, Also includes: Two-dimensional position coding extension; The two-dimensional position coding extension process includes: dividing the channel of the position-sensitive detector into two orthogonal dimensions, the X-axis and the Y-axis; Extract the left and right boundaries along the two orthogonal dimensions, the X-axis and the Y-axis, respectively; Determine whether the left and right boundaries extracted from the X-axis and Y-axis within the same time window are unique, and obtain the determination result; When the judgment result is yes, the hit clusters corresponding to the left and right boundaries are determined as valid two-dimensional single-particle hit events; Based on the channel response characteristics of the hit cluster, at least one centroid calculation strategy in the unified digital readout framework is used to determine the position coordinates of the hit event in the two orthogonal dimensions of the X-axis and Y-axis; the position coordinates of the hit event in the two orthogonal dimensions of the X-axis and Y-axis are mapped to X-axis centroid codes and Y-axis centroid codes respectively; the X-axis centroid codes and Y-axis centroid codes are combined or multiplied to obtain the position coding result; If the judgment result is negative, the clusters of hits corresponding to the left and right boundaries are identified as multi-particle aliasing events, the multi-particle aliasing events are invalidated, and the process returns to the idle state.
7. The method for encoding the location of a hit event for a position-sensitive detector according to claim 1, characterized in that, The unified digital readout framework supports the parallel operation of the boundary center method and the three-point weighted method.
8. A hit event location encoding system for a position-sensitive detector, characterized in that, Implemented based on programmable logic devices or application-specific integrated circuit chips; the hit event location encoding system includes: The signal acquisition module is used to acquire the digital response signals of each channel of the position-sensitive detector within a preset time window and generate bit stream data characterizing the channel response state. The boundary detection module is used to perform boundary detection processing on the bitstream data, extract at least one left boundary channel number and right boundary channel number that hit the cluster, and obtain the left and right boundaries; The centroid calculation module includes a boundary center calculation unit and a three-point weighted calculation unit based on threshold time, used to verify the validity of the left and right boundaries; if the left and right boundaries are valid, the location coordinates of the hit event are determined by at least one centroid calculation strategy in the unified digital readout framework based on the channel response characteristics of the hit cluster; the centroid calculation strategies include the boundary center method and the three-point weighted method based on threshold time; if the left and right boundaries are invalid, the data collected in the current time window is discarded and the system returns to an idle state; The output control module is used to map the location coordinates of the hit event into a location encoding result, and select the output path as a counter or a storage unit according to the configuration signal.
9. A hit event location encoding system for a position-sensitive detector, comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that, The processor executes the computer program to implement the hit event location encoding method for a position-sensitive detector as described in any one of claims 1-7.
10. The hit event location coding system for a position-sensitive detector according to claim 9, characterized in that, The memory is a computer-readable storage medium.