TABLE OF CONTENTS
- 1. /twoBodyTools
- 1.1. twoBodyTools/pCM
- 1.2. twoBodyTools/velocity_correction
- 1.3. twoBodyTools/get_PInitial
- 1.4. twoBodyTools/sqrtS_Free
- 1.5. twoBodyTools/ranCharge
- 1.6. twoBodyTools/searchInInput
- 1.7. twoBodyTools/pCM_sqr
- 1.8. twoBodyTools/p_lab
- 1.9. twoBodyTools/MomentumTransfer2
- 1.10. twoBodyTools/convertToAntiParticles
- 1.11. twoBodyTools/IsChargeExchange(part1, part2, part3, part4)
/twoBodyTools [ Modules ]
NAME
module twoBodyTools
PURPOSE
This module contains some auxiliary routines for two-body collisions.
twoBodyTools/pCM [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
real function pCM(srts, mass1, mass2)
real function pCM(srts, mass1, mass2, flagOK)
PURPOSE
This routine evaluates the CM-momentum of two particles, asssuming vacuum kinematics.
The formula used here looks different than the standard formula given in PDG, but the are actually the same. In particular, pCM is of course invariant with respect to an exchange of 'mass1' and 'mass2'.
If the no logical 'falgOK' is given, the routine aims for performance, and does not check whether the argument of the sqrt is positive. If you need to check this, give this logical.
INPUTS
- real :: mass1, mass2 ! masses of both particles
- real :: srts ! SQRT(s)
OUTPUT
twoBodyTools/velocity_correction [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
real function velocity_correction(pair)
PURPOSE
Evaluates relative velocity/relative velocity in vacuum
INPUTS
- type(particle), dimension(1:2) :: pair
OUTPUT
function value
twoBodyTools/get_PInitial [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
real function get_PInitial(teilchenIn)
PURPOSE
return CM momentum of 2 particles
INPUTS
- type(particle),intent(in),dimension(1:2) :: teilchenIn
- integer, intent(in) :: mode
NOTES
Return value depends on mode:
- mode=0 : getP_Pinitial returns CM-momentum of two particles
- mode=1 : getP_Pinitial returns old ikodama=1 prescription [not yet implemented]
- mode=2 : getP_Pinitial returns old ikodama=2 prescription [not yet implemented]
twoBodyTools/sqrtS_Free [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
function sqrtS_Free(teilchen)
PURPOSE
return the "free" sqrt(s) of 2 particles
INPUTS
- type(particle),intent(in),dimension(1:2) :: teilchen
NOTES
The name "free Sqrt(s)" is according to standard BUU prescription the following: Transform everything to CM system and define there the sqrt(s) by neglecting the potentials. Therefore one wants to take care of the fact, that also the Xsections are measured in vacuum, therefore without potentials.
RESULT
- Real : The free Sqrt(s)
twoBodyTools/ranCharge [ Subroutines ]
[ Top ] [ twoBodyTools ] [ Subroutines ]
NAME
subroutine ranCharge(izmin,izmax,iztot,izout,flag)
PURPOSE
This subroutine distributes the charges randomly to a given total charge iztot
INPUTS
- integer, intent(in) :: izmin(:) ! Vector of minimal charges
- integer, intent(in) :: izmax(:) ! Vector of maximal charges
- integer, intent(in) :: iztot ! total charge
OUTPUT
- real, dimension(:) :: izout ! Random charge configuration
- logical, intent(out) :: flag ! =.false. if procedure failed
twoBodyTools/searchInInput [ Subroutines ]
[ Top ] [ twoBodyTools ] [ Subroutines ]
NAME
subroutine searchInInput(teilchenIn,id1,id2,particle_1,particle_2,failFlag)
PURPOSE
Given two IDs and a particleVector of dimension 2, this routine tries to find the given IDs in the particleVector.
INPUTS
- type(particle),dimension(1,2), intent(in) :: teilchenIn
- integer, intent(in) :: id1,id2
OUTPUT
- type(particle), intent(out) :: particle_1 ! copy of particle which has id1
- type(particle), intent(out) :: particle_2 ! copy of particle which has id2
- logical, intent(out) :: failFlag ! .true. if id1 or id2 could not be found in the particleVector
twoBodyTools/pCM_sqr [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
real function pCM_sqr(s, msqr1, msqr2)
PURPOSE
This routine evaluates the CM-momentum of two particles, asssuming vacuum kinematics.
Attention: Takes all arguments as squared quantities!!!
This routine does almost the same as 'pCM', but without taking the sqrt. Useful if a validity check is needed.
INPUTS
- real :: msqr1, msqr2 ! squared masses of both particles
- real :: s ! Mandelstam s
OUTPUT
twoBodyTools/p_lab [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
real function p_lab(srts, mass1, mass2)
PURPOSE
This routine evaluates the momentum of the 1-st particle in the rest frame of the 2-nd particle, asssuming vacuum kinematics.
INPUTS
- real :: mass1, mass2 ! masses of both particles
- real :: srts ! SQRT(s)
OUTPUT
- real :: p_lab ! laboratory momentum
twoBodyTools/MomentumTransfer2 [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
real function MomentumTransfer2(part1,part2)
PURPOSE
This routine evaluates the momentum transfer squared, i.e. -t=-(p1-p2)^2
INPUTS
OUTPUT
- function value
twoBodyTools/convertToAntiParticles [ Subroutines ]
[ Top ] [ twoBodyTools ] [ Subroutines ]
NAME
subroutine convertToAntiParticles(a)
PURPOSE
Converts a given preEvent to AntiParticles
INPUTS
OUTPUT
twoBodyTools/IsChargeExchange(part1, part2,
part3, part4) [ Functions ]
[ Top ] [ twoBodyTools ] [ Functions ]
NAME
logical function IsChargeExchange(part1,part2,part3,part4)
PURPOSE
Compare incoming particles part1, part2 with outgoing particles part3, part4 and return .TRUE., if this is a charge exchange reaction.
INPUTS
- type(particle), intent(in) :: part1,part2,part3,part4
OUTPUT
- function value