Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pywidx.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pywidx.f
1 
2 C***********************************************************************
3 
4 C...PYWIDX
5 C...Calculates full and partial widths of resonances.
6 C....copy of PYWIDT, used for techniparticle widths
7 
8  SUBROUTINE pywidx(KFLR,SH,WDTP,WDTE)
9 
10 C...Double precision and integer declarations.
11  IMPLICIT DOUBLE PRECISION(a-h, o-z)
12  IMPLICIT INTEGER(i-n)
13  INTEGER pyk,pychge,pycomp
14 C...Parameter statement to help give large particle numbers.
15  parameter(ksusy1=1000000,ksusy2=2000000,ktechn=3000000,
16  &kexcit=4000000,kdimen=5000000)
17 C...Commonblocks.
18  common/pydat1/mstu(200),paru(200),mstj(200),parj(200)
19  common/pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
20  common/pydat3/mdcy(500,3),mdme(8000,2),brat(8000),kfdp(8000,5)
21  common/pysubs/msel,mselpd,msub(500),kfin(2,-40:40),ckin(200)
22  common/pypars/mstp(200),parp(200),msti(200),pari(200)
23  common/pyint1/mint(400),vint(400)
24  common/pyint4/mwid(500),wids(500,5)
25  common/pymssm/imss(0:99),rmss(0:99)
26  common/pytcsm/itcm(0:99),rtcm(0:99)
27  SAVE /pydat1/,/pydat2/,/pydat3/,/pysubs/,/pypars/,/pyint1/,
28  &/pyint4/,/pymssm/,/pytcsm/
29 C...Local arrays and saved variables.
30  dimension wdtp(0:400),wdte(0:400,0:5),mofsv(3,2),widwsv(3,2),
31  &wid2sv(3,2)
32  SAVE mofsv,widwsv,wid2sv
33  DATA mofsv/6*0/,widwsv/6*0d0/,wid2sv/6*0d0/
34 
35 C...Compressed code and sign; mass.
36  kfla=iabs(kflr)
37  kfls=isign(1,kflr)
38  kc=pycomp(kfla)
39  shr=sqrt(sh)
40  pmr=pmas(kc,1)
41 
42 C...Reset width information.
43  DO 110 i=0,200
44  wdtp(i)=0d0
45  DO 100 j=0,5
46  wdte(i,j)=0d0
47  100 CONTINUE
48  110 CONTINUE
49 
50 C...Common electroweak and strong constants.
51  xw=paru(102)
52  xwv=xw
53  IF(mstp(8).GE.2) xw=1d0-(pmas(24,1)/pmas(23,1))**2
54  xw1=1d0-xw
55  aem=pyalem(sh)
56  IF(mstp(8).GE.1) aem=sqrt(2d0)*paru(105)*pmas(24,1)**2*xw/paru(1)
57  as=pyalps(sh)
58  radc=1d0+as/paru(1)
59 
60  IF(kfla.EQ.23) THEN
61 C...Z0:
62  icase=1
63  xwc=1d0/(16d0*xw*xw1)
64  fac=(aem*xwc/3d0)*shr
65  120 CONTINUE
66  DO 130 i=1,mdcy(kc,3)
67  idc=i+mdcy(kc,2)-1
68  IF(mdme(idc,1).LT.0) goto 130
69  rm1=pmas(iabs(kfdp(idc,1)),1)**2/sh
70  rm2=pmas(iabs(kfdp(idc,2)),1)**2/sh
71  IF(sqrt(rm1)+sqrt(rm2).GT.1d0) goto 130
72  wid2=1d0
73  IF(i.LE.8) THEN
74 C...Z0 -> q + qbar
75  ef=kchg(i,1)/3d0
76  af=sign(1d0,ef+0.1d0)
77  vf=af-4d0*ef*xwv
78  fcof=3d0*radc
79  IF(i.GE.6.AND.mstp(35).GE.1) fcof=fcof*pyhfth(sh,sh*rm1,1d0)
80  IF(i.EQ.6) wid2=wids(6,1)
81  IF((i.EQ.7.OR.i.EQ.8)) wid2=wids(i,1)
82  ELSEIF(i.LE.16) THEN
83 C...Z0 -> l+ + l-, nu + nubar
84  ef=kchg(i+2,1)/3d0
85  af=sign(1d0,ef+0.1d0)
86  vf=af-4d0*ef*xwv
87  fcof=1d0
88  IF((i.EQ.15.OR.i.EQ.16)) wid2=wids(2+i,1)
89  ENDIF
90  be34=sqrt(max(0d0,1d0-4d0*rm1))
91  wdtp(i)=fac*fcof*(vf**2*(1d0+2d0*rm1)+af**2*(1d0-4d0*rm1))*
92  & be34
93  wdtp(0)=wdtp(0)+wdtp(i)
94  IF(mdme(idc,1).GT.0) THEN
95  wdte(i,mdme(idc,1))=wdtp(i)*wid2
96  wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+
97  & wdte(i,mdme(idc,1))
98  wdte(i,0)=wdte(i,mdme(idc,1))
99  wdte(0,0)=wdte(0,0)+wdte(i,0)
100  ENDIF
101  130 CONTINUE
102 
103 
104  ELSEIF(kfla.EQ.24) THEN
105 C...W+/-:
106  fac=(aem/(24d0*xw))*shr
107  DO 140 i=1,mdcy(kc,3)
108  idc=i+mdcy(kc,2)-1
109  IF(mdme(idc,1).LT.0) goto 140
110  rm1=pmas(iabs(kfdp(idc,1)),1)**2/sh
111  rm2=pmas(iabs(kfdp(idc,2)),1)**2/sh
112  IF(sqrt(rm1)+sqrt(rm2).GT.1d0) goto 140
113  wid2=1d0
114  IF(i.LE.16) THEN
115 C...W+/- -> q + qbar'
116  fcof=3d0*radc*vckm((i-1)/4+1,mod(i-1,4)+1)
117  IF(kflr.GT.0) THEN
118  IF(mod(i,4).EQ.3) wid2=wids(6,2)
119  IF(mod(i,4).EQ.0) wid2=wids(8,2)
120  IF(i.GE.13) wid2=wid2*wids(7,3)
121  ELSE
122  IF(mod(i,4).EQ.3) wid2=wids(6,3)
123  IF(mod(i,4).EQ.0) wid2=wids(8,3)
124  IF(i.GE.13) wid2=wid2*wids(7,2)
125  ENDIF
126  ELSEIF(i.LE.20) THEN
127 C...W+/- -> l+/- + nu
128  fcof=1d0
129  IF(kflr.GT.0) THEN
130  IF(i.EQ.20) wid2=wids(17,3)*wids(18,2)
131  ELSE
132  IF(i.EQ.20) wid2=wids(17,2)*wids(18,3)
133  ENDIF
134  ENDIF
135  wdtp(i)=fac*fcof*(2d0-rm1-rm2-(rm1-rm2)**2)*
136  & sqrt(max(0d0,(1d0-rm1-rm2)**2-4d0*rm1*rm2))
137  wdtp(0)=wdtp(0)+wdtp(i)
138  IF(mdme(idc,1).GT.0) THEN
139  wdte(i,mdme(idc,1))=wdtp(i)*wid2
140  wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
141  wdte(i,0)=wdte(i,mdme(idc,1))
142  wdte(0,0)=wdte(0,0)+wdte(i,0)
143  ENDIF
144  140 CONTINUE
145 
146 C.....V8 -> quark anti-quark
147  ELSEIF(kfla.EQ.ktechn+100021) THEN
148  fac=as/6d0*shr
149  tant3=rtcm(21)
150  IF(itcm(2).EQ.0) THEN
151  imdl=1
152  ELSEIF(itcm(2).EQ.1) THEN
153  imdl=2
154  ENDIF
155  DO 150 i=1,mdcy(kc,3)
156  idc=i+mdcy(kc,2)-1
157  IF(mdme(idc,1).LT.0) goto 150
158  pm1=pmas(pycomp(kfdp(idc,1)),1)
159  rm1=pm1**2/sh
160  IF(rm1.GT.0.25d0) goto 150
161  wid2=1d0
162  IF(i.EQ.5.OR.i.EQ.6.OR.imdl.EQ.2) THEN
163  fmix=1d0/tant3**2
164  ELSE
165  fmix=tant3**2
166  ENDIF
167  wdtp(i)=fac*(1d0+2d0*rm1)*sqrt(1d0-4d0*rm1)*fmix
168  IF(i.EQ.6) wid2=wids(6,1)
169  wdtp(0)=wdtp(0)+wdtp(i)
170  IF(mdme(idc,1).GT.0) THEN
171  wdte(i,mdme(idc,1))=wdtp(i)*wid2
172  wdte(0,mdme(idc,1))=wdte(0,mdme(idc,1))+wdte(i,mdme(idc,1))
173  wdte(i,0)=wdte(i,mdme(idc,1))
174  wdte(0,0)=wdte(0,0)+wdte(i,0)
175  ENDIF
176  150 CONTINUE
177  ENDIF
178 
179  RETURN
180  END