TABLE OF CONTENTS
- 1. /Insertion
- 1.1. Insertion/minimumEnergy
- 1.2. Insertion/propagateNoPhoton
- 1.3. Insertion/readInput
- 1.4. Insertion/insertion
- 1.5. Insertion/GarbageCollection
- 1.6. Insertion/FindLastUsed
- 1.7. Insertion/setIntoVector
- 1.8. Insertion/particlePropagated
- 1.9. Insertion/DumpPartVec
- 1.10. Insertion/FetchPartVec
/Insertion [ Modules ]
NAME
module Insertion
PURPOSE
This module collects routines for inserting particles into the particle vectors.
Insertion/minimumEnergy [ Global module-variables ]
[ Top ] [ Insertion ] [ Global module-variables ]
SOURCE
real, save, public :: minimumEnergy=0.005
PURPOSE
Minimal kinetic energy in GeV for produced perturbative nucleons. If their energy is below this threshold, then they are not propagated, i.e. they are not inserted in the particle vector.
Insertion/propagateNoPhoton [ Global module-variables ]
[ Top ] [ Insertion ] [ Global module-variables ]
SOURCE
logical, save :: propagateNoPhoton=.true.
PURPOSE
If .true. then we eliminate all photons, such that they are not propagated and do not show up in the particle vector. If .false. then photons are explicitly propagated.
Insertion/readInput [ Subroutines ]
[ Top ] [ Insertion ] [ Subroutines ]
NAME
subroutine Insertion_SetInitialized
PURPOSE
just set initflag to .true.
Insertion/insertion [ Namelists ]
[ Top ] [ Insertion ] [ Namelists ]
NAME
NAMELIST /insertion/
PURPOSE
Namelist for module Insertion includes:
Insertion/GarbageCollection [ Subroutines ]
[ Top ] [ Insertion ] [ Subroutines ]
NAME
subroutine GarbageCollection(partVec,DoCollHist,iiEns)
PURPOSE
Rearrange particles in the vector (per ensemble) in such a way, that there are no holes (i.e. entries with the special ID 'NOP') inbetween. In addition, all particles after the last one get the special ID 'EOV' in order to indicate, that no non-empty entries will follow.
INPUTS
- type(particle), dimension(:,:) :: partVec
- logical, OPTIONAL :: DoCollHist -- Flag whether to do additional rearrangements
- integer, OPTIONAL :: iiEns -- if given, do GC only for given ensemble
OUTPUT
- partVec changed
Insertion/FindLastUsed [ Functions ]
[ Top ] [ Insertion ] [ Functions ]
NAME
function FindLastUsed(particles)
PURPOSE
Returns the last (used) entry from particle vector particles. The particle with the next index has the special ID 'EOV'.
INPUTS
OUTPUT
- integer :: FindLastUsed -- number of last used entry
NOTES
Uses a (fast) bisection method! Therefore it relies on that "GarbageCollection" has been called.
Insertion/setIntoVector [ Subroutines ]
[ Top ] [ Insertion ] [ Subroutines ]
NAME
subroutine setIntoVector(finalState, partVec, flagOK,numberIsSet,numbers,positions)
PURPOSE
This subroutine tries to find empty spaces in "partVec" and sets the elements of "finalState" into these holes.
INPUTS
- type(particle),dimension(:,:) :: partVec
- type(particle),dimension(:) :: finalState
- logical, optional :: numberIsSet -- .true. if finalstate has already %number set, .false. if this still needs to be done
OUTPUT
- logical :: flagOK -- true, if all insertions were successful
- integer,dimension(:),optional :: numbers -- vector with value of %number assigned to each final state entry
- integer,dimension(2,:),optional :: positions -- vector with positions, where particles were inserted (iEns,iPart)
- partVec changed
NOTES
Only particles for which the function "particlePropagated" returns true are really considered.
Concerning the variables "lastEnsemble, lastIndex" : By saving the index of the last hole in the vector we try to save time when searching for the next hole. Unfortunately, this introduces a strong bias into the filling of the different ensembles: It tends to fill one ensemble up to its limit, until it switches to the next ensemble. Therefore we also allow for just using the "lastEnsemble" info, yielding that immediately for every particle the next ensemble will be tried.
Insertion/particlePropagated [ Functions ]
[ Top ] [ Insertion ] [ Functions ]
NAME
logical function particlePropagated(Part)
PURPOSE
Return .true. if "Part" is a particle which shall be propagated in the code: We do not propagate photons and very low-energetic perturbative nucleons (cf. minimumEnergy).
INPUTS
- type(particle) :: Part
OUTPUT
- function value
Insertion/DumpPartVec [ Subroutines ]
[ Top ] [ Insertion ] [ Subroutines ]
NAME
subroutine DumpPartVec(partVec, fileName)
PURPOSE
Dump the entries in the particle vector to the file in a binary format. This keeps all information in machine precision and allows to reread it for a new run.
INPUTS
- type(particle), dimension(:,:) :: partVec -- the particle vector
- character*(*) :: fileName -- name of the file
NOTES
- please ensure, that a "call GarbageCollection(partVec)" has been performed before calling this routine!
Insertion/FetchPartVec [ Subroutines ]
[ Top ] [ Insertion ] [ Subroutines ]
NAME
subroutine FetchPartVec(partVec, fileName)
PURPOSE
Read the particle vector from a dump file (all previous data will be deleted)
INPUTS
- character*(*) :: fileName -- name of the file
OUTPUT