Skip to content

Commit

Permalink
Update digitizer_and_detector_modeling.rst
Browse files Browse the repository at this point in the history
Doc for buffer
  • Loading branch information
kochebina authored Dec 5, 2023
1 parent a1f0a36 commit 54111f0
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions docs/digitizer_and_detector_modeling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,17 @@ Thus, the output of *Singles_crystal2* should be used in the following analysis
/gate/digitizerMgr/CoincidenceSorter/Coincidences/setInputCollection Singles_crystal2


Memory buffers and bandwidth
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To mimic the effect of limited transfer rate, a module models the data loss due to an overflow of a memory buffer, read periodically, following a given reading frequency. This module uses two parameters, the reading frequency :math:`\nu ` and the memory depth :math:`D` . Moreover, two reading methods can be modelled, that is, in an event per event basis (an event is read at each reading clock tick), or in a full buffer reading basic (at each reading clock tick, the whole buffer is emptied out). In the first reading method, the data rate is then limited to :math:`\nu` , while in the second method, the data rate is limited to :math:`D\cdot\nu`. When the size limit is reached, any new pulse is rejected, until the next reading clock tick arrival which frees a part of the buffer. In such a case, a non null buffer depth allows to manage a local rise of the input data flow. To specify a buffer, read at 10 MHz, with a buffer depth of 64 events, in a mode where the whole buffer is read in one clock tick, one can use::

/gate/digitizerMgr/crystal/SinglesDigitizer/Singles/insert buffer
/gate/digitizerMgr/crystal/SinglesDigitizer/Singles/buffer/setBufferSize 64 B
/gate/digitizerMgr/crystal/SinglesDigitizer/Singles/buffer/setReadFrequency 10 MHz
/gate/digitizerMgr/crystal/SinglesDigitizer/Singles/buffer/setMode 1

The size of the buffer represents the number of elements, 64 Singles in this example, that the user can store in a buffer. To read the buffer in an event by event basis, one should replace the last line by **setMode = 0.**



Expand Down Expand Up @@ -948,21 +959,6 @@ In PET analysis, coincidence events provide the lines of response (LOR) needed f



Memory buffers and bandwidth
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

To mimic the effect of limited transfer rate, a module models the data loss due to an overflow of a memory buffer, read periodically, following a given reading frequency. This module uses two parameters, the reading frequency :math:`\nu ` and the memory depth :math:`D` . Moreover, two reading methods can be modelled, that is, in an event per event basis (an event is read at each reading clock tick), or in a full buffer reading basic (at each reading clock tick, the whole buffer is emptied out). In the first reading method, the data rate is then limited to :math:`\nu` , while in the second method, the data rate is limited to :math:`D\cdot\nu`. When the size limit is reached, any new pulse is rejected, until the next reading clock tick arrival which frees a part of the buffer. In such a case, a non null buffer depth allows to manage a local rise of the input data flow. To specify a buffer, read at 10 MHz, with a buffer depth of 64 events, in a mode where the whole buffer is read in one clock tick, one can use::

/gate/digitizer/Your_Single_chain/insert buffer
/gate/digitizer/Your_Single_chain/buffer/setBufferSize 64 B
/gate/digitizer/Your_Single_chain/buffer/setReadFrequency 10 MHz
/gate/digitizer/Your_Single_chain/buffer/setMode 1

The chain *Your_Single_chain* can be the default chain *Singles* or any of single chain that the user has defined. The size of the buffer represents the number of elements, 64 Singles in this example, that the user can store in a buffer. To read the buffer in an event by event basis, one should replace the last line by **setMode = 0.**




.. _digitizer_multiple_processor_chains-label:

Examples of multiple Single Digitizers
Expand Down

0 comments on commit 54111f0

Please sign in to comment.