]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TEvtGen/PHOTOS/phofac.F
Updated version.
[u/mrichter/AliRoot.git] / TEvtGen / PHOTOS / phofac.F
CommitLineData
da0e9ce3 1 FUNCTION PHOFAC(MODE)
2C.----------------------------------------------------------------------
3C.
4C. PHOTOS: PHOton radiation in decays control FACtor
5C.
6C. Purpose: This is the control function for the photon spectrum and
7C. final weighting. It is called from PHOENE for genera-
8C. ting the raw photon energy spectrum (MODE=0) and in PHO-
9C. COR to scale the final weight (MODE=1). The factor con-
10C. sists of 3 terms. Addition of the factor FF which mul-
11C. tiplies PHOFAC for MODE=0 and divides PHOFAC for MODE=1,
12C. does not affect the results for the MC generation. An
13C. appropriate choice for FF can speed up the calculation.
14C. Note that a too small value of FF may cause weight over-
15C. flow in PHOCOR and will generate a warning, halting the
16C. execution. PRX should be included for repeated calls
17C. for the same event, allowing more particles to radiate
18C. photons. At the first call IREP=0, for more than 1
19C. charged decay products, IREP >= 1. Thus, PRSOFT (no
20C. photon radiation probability in the previous calls)
21C. appropriately scales the strength of the bremsstrahlung.
22C.
23C. Input Parameters: MODE, PROBH, XF
24C.
25C. Output Parameter: Function value
26C.
27C. Author(s): S. Jadach, Z. Was Created at: 01/01/89
28C. B. van Eijk Last Update: 13/02/90
29C.
30C.----------------------------------------------------------------------
31 IMPLICIT NONE
32 REAL*8 PHOFAC,FF,PRX
33 INTEGER MODE
34 INTEGER IREP
35 REAL*8 PROBH,CORWT,XF
36 COMMON/PHOPRO/PROBH,CORWT,XF,IREP
37 SAVE PRX,FF
38 DATA PRX,FF/ 0.D0, 0.D0/
39 IF (MODE.EQ.0) THEN
40 IF (IREP.EQ.0) PRX=1.D0
41 PRX=PRX/(1.D0-PROBH)
42 FF=1.D0
43C--
44C-- Following options are not considered for the time being...
45C-- (1) Good choice, but does not save very much time:
46C-- FF=(1.0D0-SQRT(XF)/2.0D0)/(1.0+SQRT(XF)/2.0D0)
47C-- (2) Taken from the blue, but works without weight overflows...
48C-- FF=(1.D0-XF/(1-(1-SQRT(XF))**2))*(1+(1-SQRT(XF))/SQRT(1-XF))/2
49 PHOFAC=FF*PRX
50 ELSE
51 PHOFAC=1.D0/FF
52 ENDIF
53 END