5.28. [ Counter ] section¶
In PHITS, each particle maintains an individual value called a Counter in addition to other information such as energy and position. The counter value can be updated whenever specific events occur, such as entering or exiting a certain region ( in, out ), scattering or nuclear reactions within that region ( coll ), or reflection at a boundary ( ref ). This allows users to investigate in detail the history and origin of how tallied particles reached their locations. Therefore, the counter serves as an event logger in PHITS simulations. To enable restrictions based on counters, the ctmin or ctmax parameters must be set in each tally section or the [Parameters] section. This allows you to either selectively tally only particles with specific counter values (gate function) or terminate the actual tracking of particles that satisfy certain conditions (cutoff function).
Three counters can be used in tally sections. The counter basically counts when
a particle enters a specified region, in [1]
a particle goes out of a specified region, out
a particle undergoes scattering or a nuclear reaction in a specified region, coll
a particle reflects back on a certain boundary of the region, ref
a yield value is tallied in [t-yield] or [t-dchain] with ndata=2,3, ndata
You can set one progress value of the counter from -9999 to 9999, or zero set, 10000. Counter values are attached to particles. Secondary particles produced in collisions inherit the counter value of their parent. The capacity of the counter is from -9999 to 9999. The counter changes only within this range. You can set the counter for each particle by using part= definition, and you can exclude some particles from counter actions by *part= definition.
[ Counter ]
counter = 1
part = neutron proton
reg in out coll ref
1 1 10000 0 0
11 1 10000 0 0
counter = 2
*part = proton deuteron triton 3he alpha nucleus
reg in out coll
( { 2 - 5 } 8 9 ) -1 0 1
counter = 3
part = 208Pb
reg coll
( 11 12 15 ) 5
( 6<10[1 0 0]<u=3 ) 100
.... ........
.... ........
If you want to change the order of region number, reg, in, out, coll, and ref, set it as reg coll in out ref. You can use the skip operator non. At least one must be defined among in, out, coll, and ref. If nothing is defined, it is assumed to be no counter. A numeric value gives one progress value of the counter. 10000 means zero set. The initial counter value of a source particle is zero.
You can use the format ( { 2 - 5 } 8 9 ), and you can use the lattice and universe style ( 6 < 10[1 0 0] < u=3 ). However, a value must be enclosed by ( ) if it is not a single numeric value. When you make the [Cell] section using a universe, specify the cell number defined in the universe instead of the cell number of the frame where the universe is inserted.
In the definition of part=, you can specify up to 20 particles. For nuclei, you can use expressions like 208Pb and Pb. In the latter case, Pb denotes all isotopes of Pb.
From version 2.90, more detailed classifications for coll are available. The opportunities shown in Table 5.28.1 can be used as keywords so that the counter counts. nucl, atom, and dcay, which are particular interactions, belong to coll. Furthermore, nucl and atom are classified into three and ten kinds, respectively. When you want to analyze the PHITS simulation in detail, set these keywords. Note that if you set coll and nucl at the same time, counting is duplicated when a nuclear reaction event occurs.
When fiss is specified, the counter is called when fission channels of the nuclear data library and the statistical decay model, GEM, are chosen.
Interaction |
Event |
Explanation |
|---|---|---|
nucl |
A particle undergoes nuclear interactions in a specified region. |
|
elst |
A particle undergoes elastic scattering in a specified region. |
|
iels |
A particle undergoes inelastic scattering in a specified region. |
|
fiss |
A particle undergoes fission in a specified region. |
|
atom |
A particle undergoes atomic interactions and generates a secondary particle in a specified region. |
|
delt |
A particle generates delta-rays in a specified region. |
|
knoe |
An electron or positron generates knock-on electrons in a specified region. |
|
fluo |
A particle generates atomic fluorescence X-rays in a specified region. |
|
auge |
A particle generates Auger electrons in a specified region. |
|
brem |
A particle undergoes bremsstrahlung in a specified region. |
|
phel |
A particle undergoes the photoelectric effect in a specified region. |
|
cmpt |
A particle undergoes Compton scattering in a specified region. |
|
pprd |
A particle generates an electron-positron pair in a specified region. |
|
anih |
A particle is annihilated in a specified region. |
|
rayl |
A particle undergoes Rayleigh scattering in a specified region. |
|
dcay |
A particle decays in a specified region. |
When in or out is specified, the counter value changes after particle information has been tallied in [t-cross]. Therefore, if the counter value before the change is not specified, the information at the moment of crossing the boundary plane will not be tallied. On the other hand, when coll or reaction events belonging to coll are specified, the counter value changes before particle information has been tallied in [t-yield], [t-product], [t-interact], and [t-point]. Therefore, to tally the information at the moment the reaction event occurs, specify the counter value after the change.
Specifying ndata in [counter] changes the counter value when a yield value in [t-yield] or [t-dchain] using ndata=3 is replaced with cross section data in a directory specified by file(27), with default file(1)/XS/yield/. This setting can avoid double-counting of tally yield. When you set the ndata option in [t-yield] or [t-dchain], a value based on cross section data is tallied instead of a result of nuclear reaction models. However, for example, if a secondary particle produced by a nuclear reaction model has an energy greater than emin, it will be counted twice, with the contribution of replacement at the time of the reaction event and the contribution at the time of energy cutoff after its transport. To avoid this double-counting, setting a value of ndata to +1 in [counter] and specifying ctmax(i)=0, i=1,2,3, in the tally section are useful, because the contribution of secondary particles is ignored.