.. _[t-deposit]: [ T-Deposit ] section ================================================== This tally can be used to obtain deposition energies (heat) in certain regions. After version 3.05, it tallies deposition energies not only by ionization of charged particles but also kerma of neutral particles. The necessity of the use of kerma approximation is automatically judged based on **[parameters]**: neutron kerma approximation is not used when **e-mode>=1**, while photon kerma approximation is not used when **negs=1,2**. Please see :numref:`sec-para-emode` for more details. Note that the neutron kerma approximation is available only for energies below **dmax(2)**, where usually 20 MeV is set. In the calculation of deposition energies by ionization of charged particles, any factor can be multiplied using the user-defined subroutines ``usrdfn1.f`` and ``usrdfn2.f``. As examples, the default program of ``usrdfn1.f`` returns the dose equivalent calculated from the product of the deposit energy with the Q(L) relationship defined in the ICRP60, while that of ``usrdfn2.f`` estimates biological dose on the basis of the Microdosimetric Kinetic Model. Any factor can be changed and added using this routine. Note that **letmat** should be set to water when these default programs are used. See ``ParticleTherapy`` in the recommendation setting for more details. It should also be noted that this function cannot be applied to deposition energy calculation by kerma approximation and track structure mode. The event generator mode as well as EGS mode should be used in the case of **output=deposit**, since deposition energies calculated by kerma approximation are not included in this option. In addition, this option cannot be used when weights of particles depositing energy change within a history, such as the cases where **[weight window]** or **[importance]** is defined. .. rst-class:: no-caption-number .. list-table:: **mesh** :header-rows: 0 * - value - explanation * - **reg, r-z, xyz, tet** - Mesh type. A mesh type subsection is required below this option. .. rst-class:: no-caption-number .. list-table:: **part** :header-rows: 0 * - value - explanation * - **all** (default), particle name - Tally particle. When **output=deposit** and **deposit=0**, **all** is necessary and only a maximum of 5 particles can be set. Deposition energies calculated by kerma approximation for neutrons and photons are scored in **part=neutron** and **part=photon**, respectively, as well as **part=all**. .. include:: ./commontally/material.rst .. rst-class:: no-caption-number .. list-table:: **letmat** :header-rows: 0 * - value - explanation * - | (optional) - | Material id for LET(:math:`dE/dx`). | If not defined, a real material is assumed. | If a material not used in the geometry is selected, its material density must be defined in **[material]**. To calculate LET in water, define water with 1 :math:`{\rm g/cm^3}` in **[material]**. | When **letmat<0** is set, PHITS automatically calculates :math:`dE/dx` for water with 1 :math:`{\rm g/cm^3}` for electrons and positrons: please see ``ParticleTherapy`` in the recommendation setting for more details. .. rst-class:: no-caption-number .. list-table:: **dedxfnc** :header-rows: 0 * - value - explanation * - (optional, **D=0**) - 0: without. 1: use ``usrdfn1.f``. 2: use ``usrdfn2.f``. As examples, the default program of ``usrdfn1.f`` returns the dose equivalent calculated from deposit energy multiplied by the Q(L) relationship defined in the ICRP60, while that of ``usrdfn2.f`` estimates biological dose on the basis of Microdosimetric Kinetic Model. .. include:: ./commontally/e-type.rst .. include:: ./commontally/t-type.rst .. rst-class:: no-caption-number .. list-table:: **output** :header-rows: 0 * - value - explanation * - **dose** - Score the energy loss of charged particles and nuclei. * - **deposit** - Score the variance of deposition energies by individual history. An **e-type** subsection is required. .. rst-class:: no-caption-number .. list-table:: **unit** :header-rows: 0 * - value - explanation * - 0, 1, 2, 3, 4, 5 - 0: Dose [Gy/source], only for **output=dose**. 1: Dose [MeV/cm^3/source], only for **output=dose**. 2: Dose [MeV/source], only for **output=dose**. 3: Number [1/source], only for **output=deposit**. 4: Number [1/nsec/source], only for **output=deposit**. 5: Dose [J/m^3/source], only for **output=dose**. .. rst-class:: no-caption-number .. list-table:: **deposit** :header-rows: 0 * - value - explanation * - 0 (default), 1 - Option for deposit energy plot when **output=deposit**. 0: Distribution of total deposit energy with contribution of each particle. Please use this setting normally. 1: Distribution of deposit energy by each particle. This was the default setting until ver. 2.81. .. rst-class:: no-caption-number .. list-table:: **mother** :header-rows: 0 * - value - explanation * - (optional) - Specify mother nuclei for which kerma factors are calculated. * - **all** - **all** is the default, the same as no definition. * - number of mother nuclei - When setting the number of mother nuclei, define the mothers in the next line. The number of **mother** can be set as a negative value, in which case the specified mothers are not included for scoring. This parameter is effective only for dose calculations using the kerma approximation for neutrons and photons, because energy deposition from charged particles cannot be distinguished for each mother nucleus. .. rst-class:: no-caption-number .. list-table:: **axis** :header-rows: 0 * - value - explanation * - **eng, reg, x, y, z, r, t** - x axis value of output data. * - **tet** - x axis value of output data, only active with **mesh=tet**. * - **xy, yz, xz, rz** - 2-dimensional. * - **t-eng, eng-t** - 2-dimensional energy-time representation. .. rst-class:: no-caption-number .. list-table:: **samepage** :header-rows: 0 * - value - explanation * - (optional, **D=part**) - The type of data to be displayed on the same page of the image output file. Parameters that can be defined in **axis** can be specified. .. include:: ./commontally/file.rst .. include:: ./commontally/resfile.rst .. include:: ./commontally/factor.rst .. include:: ./commontally/title.rst .. include:: ./commontally/angel.rst .. include:: ./commontally/sangel.rst .. include:: ./commontally/2d-type.rst .. include:: ./commontally/x-txt.rst .. include:: ./commontally/y-txt.rst .. include:: ./commontally/z-txt.rst When **unit=0** with **output=dose**, results can be obtained in units of [Gy/source]. When **mesh=reg**, the volumes of each cell should be defined in **[volume]** or set as **volume** parameters of **[t-deposit]**. Because absorbed dose is an intensive variable, PHITS does not output a sum over in output files for **unit=0**. Note that, in a region including more than two materials, the dose in the region does not equal the average value of the region. For example, when there are two materials with masses :math:`M_1` and :math:`M_2`, and absorption energies :math:`E_1` and :math:`E_2`, respectively, PHITS gives :math:`\frac{E_1}{M_1}\frac{V_1}{V_1+V_2}+\frac{E_2}{M_2}\frac{V_2}{V_1+V_2}` in this tally, even though its average dose is :math:`\frac{E_1+E_2}{M_1+M_2}`. Here, :math:`V_1` and :math:`V_2` are volumes of the two materials. By setting **output=deposit**, this tally can also be used for calculating the probability density of deposition energies by each history. This mode is useful for estimating detector responses and soft-error rates of semiconductor devices. When **output=deposit** and **deposit=0**, the contribution of each type of particle set in **part** can be obtained from the result of **all**. In this case, if **all** is not set in **part**, **part=all** is automatically set. By setting **output=deposit** and **deposit=1**, the distribution of energies deposited by each type of particle set in **part** can be obtained. Thus, the sum of results obtained by setting **part=** individual particle does not equal the distribution of energies deposited by **all** particles. In the case of **output=deposit** and **deposit=0**, the statistical uncertainties of all results except for the values of **part=all** are calculated independently of **istdev** as standard deviations using history variance mode. .. include:: ./commontally/gshow.rst .. include:: ./commontally/rshow.rst .. include:: ./commontally/resol.rst .. include:: ./commontally/width.rst .. include:: ./commontally/volume.rst .. include:: ./commontally/iechrl.rst .. include:: ./commontally/volmat.rst .. include:: ./commontally/epsout.rst .. include:: ./commontally/bmpout.rst .. include:: ./commontally/vtkout.rst .. include:: ./commontally/vtkfmt.rst .. include:: ./commontally/foamout.rst .. include:: ./commontally/ph5out.rst .. include:: ./commontally/maxangel.rst .. include:: ./commontally/ctmin.rst .. include:: ./commontally/ctmax.rst .. include:: ./commontally/chmin.rst .. include:: ./commontally/chmax.rst .. include:: ./commontally/trcl.rst .. include:: ./commontally/gslat.rst .. rst-class:: no-caption-number .. list-table:: **dresol** :header-rows: 0 * - value - explanation * - (optional, **D=0.0**) - Parameter for representing detector resolution. This is valid only for **output=deposit**. When **dresol** = :math:`\sigma_r` and **dfano** = :math:`F`, the deposition energy :math:`E` of each event fluctuates following a Gaussian distribution with standard deviation :math:`\sqrt{\sigma_r^2 + FE}`. If **dresol<0**, the energy resolutions, energy dependencies and spectral peak shapes, are overwritten by those defined in ``usrresol.f``. .. rst-class:: no-caption-number .. list-table:: **dfano** :header-rows: 0 * - value - explanation * - (optional, **D=0.0**) - Parameter for representing detector resolution. Valid only for **output=deposit**. When **dresol** = :math:`\sigma_r` and **dfano** = :math:`F`, the deposition energy :math:`E` of each event fluctuates following a Gaussian distribution with standard deviation :math:`\sqrt{\sigma_r^2 + FE}`. .. include:: ./commontally/stdcut.rst .. rst-class:: no-caption-number .. list-table:: **nlatcel** :header-rows: 0 * - value - explanation * - (optional) - By setting a cell number that has a LAT parameter, deposit energies in cells that have the same cell number but are placed in different lattice coordinates are processed as different cells. This works only for **output=deposit**. .. rst-class:: no-caption-number .. list-table:: **nlatmem** :header-rows: 0 * - value - explanation * - (optional, **D=1000**) - The maximum number of cells dealt with separately in one history. Although the fano factor is generally defined as a dimensionless quantity, **dfano** is defined as a quantity with the dimension of energy. For example, **dfano** should be set to 3.62E-07 = 3.62E-06 * 0.1, when the fano factor is 0.1 and the average energy to create an electron-hole pair is 3.62 eV for a silicon detector. As an extension of summing up deposit energies such as **reg = (100 200 300 ...)**, a weighted summation option is added. Using this option in this tally, energies deposited in specified i-th regions for each history, :math:`E_{\rm history,i}`, are multiplied by specified coefficients, :math:`\alpha_i(N_{\rm list})`, and then summed up as written by: .. math:: E_{\rm history} = \sum_i \alpha_i(N_{\rm list}) \times E_{\rm history,i}. This option weights depending on deposited energies in each history, and it can be applied to simulation, for example soft errors in semiconductor devices. If you want to weight depending on the condition for each particle, please use user-defined subroutine, ``usrdfn1.f`` or ``usrdfn2.f``, and set **dedxfnc=1** or **dedxfnc=2**. This option can be used only with **mesh=reg**, and it can be executed when you specify **reg** convolution. Formats and examples are shown below. .. code-block:: text :caption: Example of weighted summation option in **[t-deposit]**. mesh = reg reg = weightsum ncond = 4 no cell operator ethres list 1 100 ge 0.1 1 2 100 gt 0.2 1 3 100 eq 0.0 2 and 200 lt 0.4 2 4 100 le 0.5 3 ncell = 5 cell list01 list02 list03 list00 100 0.0 0.5 1.0 1.0 200 0.1 0.6 2.0 1.0 300 0.2 0.7 3.0 1.0 400 0.3 0.8 4.0 1.0 500 0.4 0.9 5.0 1.0 First, define the number of conditions. The next line defines the order of data, condition number **no**, cell number **cell**, operator **operator**, threshold energy **ethres**, and list number **list**. In the next lines, conditions are described as many as the value of **ncond**. These lines mean that a list number is used when the energy deposited in the specified cell satisfies the greater or smaller relation with the threshold energy. The condition written first is preferred when the history satisfies some conditions. If the history does not satisfy all conditions, coefficients of **list00** are used. You can set several conditions by writing **and** in the **no** column. In the **cell** column, you can use the format **( 2 -5 8 9 )** and the lattice and universe style **( 6 < 10[1 0 0] < u=3 )**. However, you need to enclose a value by **( )** if it is not a single numeric value. In the **operator** column, you can use greater than **gt**, greater or equal **ge**, equal **eq**, less or equal **le**, and less than **lt**. The unit of **ethres** is MeV. Next, define the number of convoluted cells. The next line defines the order of data, cell number **cell**, and list number **listxxxx**. In the next lines, convoluted cell numbers and coefficients are described. In the **cell** column, you can use the format **( 2 -5 8 9 )** and the lattice and universe style **( 6 < 10[1 0 0] < u=3 )**. However, you need to enclose a value by **( )** if it is not a single numeric value. It should be noted that the same deposited energy is added many times when you set the same cell number many times. If you do not define **list00**, coefficients of **list00** are set to zero.