Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
c $Id: dectim.f,v 1.7 1999/01/18 09:56:59 ernst Exp $
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
real*8 function dectim(ind,iproc)
c
c Revision : 1.0
C
cinput ind : ID of particle
cinput iproc: process ID for resonance creation
couput dectim: time of decay
c
c This function computes a random choice for the time at which
c a resonance will decay and transformes it to the computational
c frame.
c
c
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
implicit none
include 'coms.f'
include 'options.f'
include 'colltab.f'
integer ind,iproc
real*8 gg,wid,tau,ranf,fwidth,widit,fbwnorm,mr,massit
real*8 tmp,factor
c
c first determine width of resonace
c
if(CTOption(1).eq.0.and.CTOption(34).ne.1) then
c mass dependent width
wid=fwidth(ityp(ind),iso3(ind),fmass(ind))*CTParam(1)
else
c fixed width
wid=widit(ityp(ind))*CTParam(1)
end if
C ... REST FRAME DECAY TIME
if(WID .GT. 1.d-10) then
if(CTOption(34).lt.2) then
c "normal" life time tau=1/gamma
TAU=-(dLOG(1.d0-RANF(0))/WID)
else
c use Danielewicz delay
if(iproc.ne.36.and.iproc.ne.37) then
c delay for scattering wave
TAU=-(dLOG(1.d0-RANF(0))*
& fbwnorm(fmass(ind),ityp(ind),iso3(ind))*pi/2.d0)
else
c delay for forward wave
if(CTOption(34).eq.2) then
factor=1.d0/CTParam(58)
elseif(CTOption(34).eq.3) then
factor=(ctsigtot(actcol)-CTParam(58))/CTParam(58)
elseif(CTOption(34).eq.4) then
tmp=dsqrt(2.d0/(wid*3.14d0*
& fbwnorm(fmass(ind),ityp(ind),iso3(ind))))
factor=1.d0/(CTParam(58)*tmp)
else
factor=1.d0
endif
mr=massit(ityp(ind))
TAU=-(dLOG(1.d0-RANF(0))*factor*
& 2.d0*pi*fbwnorm(fmass(ind),ityp(ind),iso3(ind))*
& (fmass(ind)-mr)**2/wid**2)
endif
endif
ELSE
c stable particle
DECTIM=1.d34
RETURN
END IF
C ... APPLY TIME DILATION
C ... GAMMA FOR THE RESONANCE RESTFRAME <-> COMP. FRAME TRAFO
gg=p0(ind)/fmass(ind)
DECTIM=TAU*GG*hqc
RETURN
END