Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pycjdc.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pycjdc.f
1 
2 C*********************************************************************
3 
4 C...PYCJDC
5 C...Calculate decay widths for the charginos (admixtures of
6 C...charged Wino and charged Higgsino.
7 
8 C...Input: KCIN = KF code for particle
9 C...Output: XLAM = widths
10 C... IDLAM = KF codes for decay particles
11 C... IKNT = number of decay channels defined
12 C...AUTHOR: STEPHEN MRENNA
13 C...Last change:
14 C...10-16-95: force decay chi^+_1 -> chi^0_1 e+ nu_e
15 C...when CHIENU .NE. 0
16 
17  SUBROUTINE pycjdc(KFIN,XLAM,IDLAM,IKNT)
18 
19 C...Double precision and integer declarations.
20  IMPLICIT DOUBLE PRECISION(a-h, o-z)
21  IMPLICIT INTEGER(i-n)
22  INTEGER pyk,pychge,pycomp
23 C...Parameter statement to help give large particle numbers.
24  parameter(ksusy1=1000000,ksusy2=2000000,ktechn=3000000,
25  &kexcit=4000000,kdimen=5000000)
26 C...Commonblocks.
27  common/pydat1/mstu(200),paru(200),mstj(200),parj(200)
28  common/pydat2/kchg(500,4),pmas(500,4),parf(2000),vckm(4,4)
29  common/pymssm/imss(0:99),rmss(0:99)
30  common/pyssmt/zmix(4,4),umix(2,2),vmix(2,2),smz(4),smw(2),
31  &sfmix(16,4),zmixi(4,4),umixi(2,2),vmixi(2,2)
32 CC &SFMIX(16,4),
33 C COMMON/PYINTS/XXM(20)
34  COMPLEX*16 cxc
35  common/pyintc/xxc(10),cxc(8)
36  SAVE /pydat1/,/pydat2/,/pymssm/,/pyssmt/,/pyintc/
37 
38 C...Local variables
39  COMPLEX*16 zmixc(4,4),vmixc(2,2),umixc(2,2),olpp,orpp
40  COMPLEX*16 cal,cbl,car,cbr,ca,cb
41  INTEGER kfin,kcin
42  DOUBLE PRECISION xmi,xmj,xmf,xmsf1,xmsf2,xmw,xmw2,
43  &xmz,xmz2,axmj,axmi
44  DOUBLE PRECISION s12min,s12max
45  DOUBLE PRECISION xmi2,xmi3,xmj2,xmh,xmh2,xmhp,xma2,xmb2,xmk
46  DOUBLE PRECISION pylamf,xl
47  DOUBLE PRECISION tanw,xw,aem,c1,as,ei,t3i,beta,alfa
48  DOUBLE PRECISION pyx2xh,pyx2xg
49  DOUBLE PRECISION xlam(0:400)
50  INTEGER idlam(400,3)
51  INTEGER lknt,ix,ih,j,ij,i,iknt
52  INTEGER ith(3)
53  INTEGER ithc
54  DOUBLE PRECISION etah(3),dh(3),eh(3)
55  DOUBLE PRECISION sr2
56  DOUBLE PRECISION cbeta,sbeta,tanb
57 
58  DOUBLE PRECISION pyalem,pi,pyalps
59  DOUBLE PRECISION fcol
60  INTEGER kf1,kf2,isf
61  INTEGER kfnchi(4),kfcchi(2)
62 
63  DOUBLE PRECISION temp
64  EXTERNAL pygaus,pyxxz6
65  DOUBLE PRECISION pygaus,pyxxz6
66  DOUBLE PRECISION prec
67  DATA ith/25,35,36/
68  DATA ithc/37/
69  DATA etah/1d0,1d0,-1d0/
70  DATA sr2/1.4142136d0/
71  DATA pi/3.141592654d0/
72  DATA prec/1d-2/
73  DATA kfnchi/1000022,1000023,1000025,1000035/
74  DATA kfcchi/1000024,1000037/
75 
76 C...COUNT THE NUMBER OF DECAY MODES
77  lknt=0
78  xmw=pmas(24,1)
79  xmw2=xmw**2
80  xmz=pmas(23,1)
81  xmz2=xmz**2
82  xw=1d0-xmw2/xmz2
83  xw1=1d0-xw
84  tanw = sqrt(xw/xw1)
85 
86 C...1 OR 2 DEPENDING ON CHARGINO TYPE
87  ix=1
88  IF(kfin.EQ.kfcchi(2)) ix=2
89  kcin=pycomp(kfin)
90 
91  xmi=smw(ix)
92  xmi2=xmi**2
93  axmi=abs(xmi)
94  aem=pyalem(xmi2)
95  as =pyalps(xmi2)
96  c1=aem/xw
97  xmi3=abs(xmi**3)
98  tanb=rmss(5)
99  beta=atan(tanb)
100  cbeta=cos(beta)
101  sbeta=tanb*cbeta
102  alfa=rmss(18)
103 
104  DO 110 i=1,2
105  DO 100 j=1,2
106  vmixc(j,i)=dcmplx(vmix(j,i),vmixi(j,i))
107  umixc(j,i)=dcmplx(umix(j,i),umixi(j,i))
108  100 CONTINUE
109  110 CONTINUE
110 
111 C...GRAVITINO DECAY MODES
112 
113  IF(imss(11).EQ.1) THEN
114  xmp=rmss(29)
115  idg=39+ksusy1
116  xmgr=pmas(pycomp(idg),1)
117 C SINW=SQRT(XW)
118 C COSW=SQRT(1D0-XW)
119  xfac=(xmi2/(xmp*xmgr))**2*axmi/48d0/pi
120  IF(axmi.GT.xmgr+xmw) THEN
121  lknt=lknt+1
122  idlam(lknt,1)=idg
123  idlam(lknt,2)=24
124  idlam(lknt,3)=0
125  xlam(lknt)=xfac*(
126  & .5d0*(abs(vmixc(ix,1))**2+abs(umixc(ix,1))**2)+
127  & .5d0*((abs(vmixc(ix,2))*sbeta)**2+(abs(umixc(ix,2))*cbeta)**2))*
128  & (1d0-xmw2/xmi2)**4
129  ENDIF
130  IF(axmi.GT.xmgr+pmas(37,1)) THEN
131  lknt=lknt+1
132  idlam(lknt,1)=idg
133  idlam(lknt,2)=37
134  idlam(lknt,3)=0
135  xlam(lknt)=xfac*(.5d0*((abs(vmixc(ix,2))*cbeta)**2+
136  & (abs(umixc(ix,2))*sbeta)**2))
137  & *(1d0-pmas(37,1)**2/xmi2)**4
138  ENDIF
139  ENDIF
140 
141 C...CHECK ALL 2-BODY DECAYS TO GAUGE AND HIGGS BOSONS
142  IF(ix.EQ.1) goto 170
143  xmj=smw(1)
144  axmj=abs(xmj)
145  xmj2=xmj**2
146 
147 C...CHI_2+ -> CHI_1+ + Z0
148  IF(axmi.GE.axmj+xmz) THEN
149  lknt=lknt+1
150  ij=1
151  olpp=-vmixc(ij,1)*dconjg(vmixc(ix,1))-
152  & vmixc(ij,2)*dconjg(vmixc(ix,2))/2d0
153  orpp=-umixc(ix,1)*dconjg(umixc(ij,1))-
154  & umixc(ix,2)*dconjg(umixc(ij,2))/2d0
155  gx2=abs(olpp)**2+abs(orpp)**2
156  glr=dble(olpp*dconjg(orpp))
157  xlam(lknt)=pyx2xg(c1/xmw2,xmi,xmj,xmz,gx2,glr)
158  idlam(lknt,1)=kfcchi(1)
159  idlam(lknt,2)=23
160  idlam(lknt,3)=0
161 
162 C...CHARGED LEPTONS
163  ELSEIF(axmi.GE.axmj) THEN
164  s12min=0d0
165  s12max=(axmi-axmj)**2
166  ia=11
167  ja=12
168  ei=kchg(iabs(ia),1)/3d0
169  t3i=sign(1d0,ei+1d-6)/2d0
170  xxc(1)=0d0
171  xxc(2)=xmj
172  xxc(3)=0d0
173  xxc(4)=xmi
174  xxc(5)=pmas(pycomp(ksusy1+ja),1)
175  xxc(6)=1d6
176  xxc(9)=pmas(23,1)
177  xxc(10)=pmas(23,2)
178  ij=1
179  olpp=-vmixc(ij,1)*dconjg(vmixc(ix,1))-
180  & vmixc(ij,2)*dconjg(vmixc(ix,2))/2d0
181  orpp=-umixc(ix,1)*dconjg(umixc(ij,1))-
182  & umixc(ix,2)*dconjg(umixc(ij,2))/2d0
183  cxc(1)=dcmplx((t3i-xw*ei)/xw/xw1)*orpp
184  cxc(2)=dcmplx(0d0,0d0)
185  cxc(3)=dcmplx((t3i-xw*ei)/xw/xw1)*olpp
186  cxc(4)=-vmixc(ij,1)*dconjg(vmixc(ix,1))*dcmplx(t3i/xw)
187  cxc(5)=-dcmplx(ei/xw1)*orpp
188  cxc(6)=dcmplx(0d0,0d0)
189  cxc(7)=-dcmplx(ei/xw1)*olpp
190  cxc(8)=dcmplx(0d0,0d0)
191  IF( xxc(5).LT.axmi ) THEN
192  xxc(5)=1d6
193  ENDIF
194  xxc(7)=xxc(5)
195  xxc(8)=xxc(6)
196  IF(axmi.GE.axmj+2d0*pmas(11,1)) THEN
197  lknt=lknt+1
198  xlam(lknt)=c1**2/xmi3/(16d0*pi)*
199  & pygaus(pyxxz6,s12min,s12max,prec)
200  idlam(lknt,1)=kfcchi(1)
201  idlam(lknt,2)=11
202  idlam(lknt,3)=-11
203  IF(axmi.GE.axmj+2d0*pmas(13,1)) THEN
204  lknt=lknt+1
205  xlam(lknt)=xlam(lknt-1)
206  idlam(lknt,1)=kfcchi(1)
207  idlam(lknt,2)=13
208  idlam(lknt,3)=-13
209  ENDIF
210  IF(axmi.GE.axmj+2d0*pmas(15,1)) THEN
211  lknt=lknt+1
212  xlam(lknt)=xlam(lknt-1)
213  idlam(lknt,1)=kfcchi(1)
214  idlam(lknt,2)=15
215  idlam(lknt,3)=-15
216  ENDIF
217  ENDIF
218 
219 C...NEUTRINOS
220  120 CONTINUE
221  ia=12
222  ja=11
223  ei=kchg(iabs(ia),1)/3d0
224  t3i=sign(1d0,ei+1d-6)/2d0
225  xxc(5)=pmas(pycomp(ksusy1+ja),1)
226  xxc(6)=1d6
227  cxc(1)=dcmplx((t3i-xw*ei)/xw/xw1)*orpp
228  cxc(3)=dcmplx((t3i-xw*ei)/xw/xw1)*olpp
229  cxc(4)=-umixc(ij,1)*dconjg(umixc(ix,1))*dcmplx(t3i/xw)
230  cxc(5)=-dcmplx(ei/xw1)*orpp
231  cxc(7)=-dcmplx(ei/xw1)*olpp
232  IF( xxc(5).LT.axmi ) THEN
233  xxc(5)=1d6
234  ENDIF
235  xxc(7)=xxc(5)
236  xxc(8)=xxc(6)
237  IF(axmi.GE.axmj+2d0*pmas(12,1)) THEN
238  lknt=lknt+1
239  xlam(lknt)=c1**2/xmi3/(16d0*pi)*
240  & pygaus(pyxxz6,s12min,s12max,prec)
241  idlam(lknt,1)=kfcchi(1)
242  idlam(lknt,2)=12
243  idlam(lknt,3)=-12
244  lknt=lknt+1
245  xlam(lknt)=xlam(lknt-1)
246  idlam(lknt,1)=kfcchi(1)
247  idlam(lknt,2)=14
248  idlam(lknt,3)=-14
249  ENDIF
250  IF(axmi.GE.axmj+2d0*pmas(16,1)) THEN
251  IF(abs(sfmix(15,1)).GT.abs(sfmix(15,2))) THEN
252  xxc(5)=pmas(pycomp(ksusy1+15),1)
253  ELSE
254  xxc(5)=pmas(pycomp(ksusy2+15),1)
255  ENDIF
256  IF( xxc(5).LT.axmi ) THEN
257  xxc(5)=1d6
258  ENDIF
259  xxc(7)=xxc(5)
260  lknt=lknt+1
261  xlam(lknt)=c1**2/xmi3/(16d0*pi)*
262  & pygaus(pyxxz6,s12min,s12max,prec)
263  idlam(lknt,1)=kfcchi(1)
264  idlam(lknt,2)=16
265  idlam(lknt,3)=-16
266  ENDIF
267 
268 C...D-TYPE QUARKS
269  130 CONTINUE
270  ia=1
271  ja=2
272  ei=kchg(iabs(ia),1)/3d0
273  t3i=sign(1d0,ei+1d-6)/2d0
274  xxc(5)=pmas(pycomp(ksusy1+ja),1)
275  xxc(6)=1d6
276  cxc(1)=dcmplx((t3i-xw*ei)/xw/xw1)*orpp
277  cxc(2)=dcmplx(0d0,0d0)
278  cxc(3)=dcmplx((t3i-xw*ei)/xw/xw1)*olpp
279  cxc(4)=-vmixc(ij,1)*dconjg(vmixc(ix,1))*dcmplx(t3i/xw)
280  cxc(5)=-dcmplx(ei/xw1)*orpp
281  cxc(6)=dcmplx(0d0,0d0)
282  cxc(7)=-dcmplx(ei/xw1)*olpp
283  cxc(8)=dcmplx(0d0,0d0)
284  IF( xxc(5).LT.axmi ) THEN
285  xxc(5)=1d6
286  ENDIF
287  xxc(7)=xxc(5)
288  xxc(8)=xxc(6)
289  IF(axmi.GE.axmj+2d0*pmas(1,1)) THEN
290  lknt=lknt+1
291  xlam(lknt)=3d0*c1**2/xmi3/(16d0*pi)*
292  & pygaus(pyxxz6,s12min,s12max,prec)
293  idlam(lknt,1)=kfcchi(1)
294  idlam(lknt,2)=1
295  idlam(lknt,3)=-1
296  IF(axmi.GE.axmj+2d0*pmas(3,1)) THEN
297  lknt=lknt+1
298  xlam(lknt)=xlam(lknt-1)
299  idlam(lknt,1)=kfcchi(1)
300  idlam(lknt,2)=3
301  idlam(lknt,3)=-3
302  ENDIF
303  ENDIF
304  IF(axmi.GE.axmj+2d0*pmas(5,1)) THEN
305  IF(abs(sfmix(5,1)).GT.abs(sfmix(5,2))) THEN
306  xxc(5)=pmas(pycomp(ksusy1+5),1)
307  ELSE
308  xxc(5)=pmas(pycomp(ksusy2+5),1)
309  ENDIF
310  IF( xxc(5).LT.axmi ) THEN
311  xxc(5)=1d6
312  ENDIF
313  xxc(7)=xxc(5)
314  lknt=lknt+1
315  xlam(lknt)=3d0*c1**2/xmi3/(16d0*pi)*
316  & pygaus(pyxxz6,s12min,s12max,prec)
317  idlam(lknt,1)=kfcchi(1)
318  idlam(lknt,2)=5
319  idlam(lknt,3)=-5
320  ENDIF
321 
322 C...U-TYPE QUARKS
323  140 CONTINUE
324  ia=2
325  ja=1
326  ei=kchg(iabs(ia),1)/3d0
327  t3i=sign(1d0,ei+1d-6)/2d0
328  xxc(5)=pmas(pycomp(ksusy1+ja),1)
329  xxc(6)=1d6
330  cxc(1)=dcmplx((t3i-xw*ei)/xw/xw1)*orpp
331  cxc(2)=dcmplx(0d0,0d0)
332  cxc(3)=dcmplx((t3i-xw*ei)/xw/xw1)*olpp
333  cxc(4)=-umixc(ij,1)*dconjg(umixc(ix,1))*dcmplx(t3i/xw)
334  cxc(5)=-dcmplx(ei/xw1)*orpp
335  cxc(6)=dcmplx(0d0,0d0)
336  cxc(7)=-dcmplx(ei/xw1)*olpp
337  cxc(8)=dcmplx(0d0,0d0)
338  IF( xxc(5).LT.axmi ) THEN
339  xxc(5)=1d6
340  ENDIF
341  xxc(7)=xxc(5)
342  xxc(8)=xxc(6)
343  IF(axmi.GE.axmj+2d0*pmas(2,1)) THEN
344  lknt=lknt+1
345  xlam(lknt)=3d0*c1**2/xmi3/(16d0*pi)*
346  & pygaus(pyxxz6,s12min,s12max,prec)
347  idlam(lknt,1)=kfcchi(1)
348  idlam(lknt,2)=2
349  idlam(lknt,3)=-2
350  IF(axmi.GE.axmj+2d0*pmas(4,1)) THEN
351  lknt=lknt+1
352  xlam(lknt)=xlam(lknt-1)
353  idlam(lknt,1)=kfcchi(1)
354  idlam(lknt,2)=4
355  idlam(lknt,3)=-4
356  ENDIF
357  ENDIF
358  150 CONTINUE
359  ENDIF
360 
361 C...CHI_2+ -> CHI_1+ + H0_K
362  eh(2)=cos(alfa)
363  eh(1)=sin(alfa)
364  eh(3)=-sbeta
365  dh(2)=-sin(alfa)
366  dh(1)=cos(alfa)
367  dh(3)=cos(beta)
368  DO 160 ih=1,3
369  xmh=pmas(ith(ih),1)
370  xmh2=xmh**2
371 C...NO 3-BODY OPTION
372  IF(axmi.GE.axmj+xmh) THEN
373  lknt=lknt+1
374  xl=pylamf(xmi2,xmj2,xmh2)
375  olpp=(vmixc(2,1)*dconjg(umixc(1,2))*eh(ih) -
376  & vmixc(2,2)*dconjg(umixc(1,1))*dh(ih))/sr2
377  orpp=(dconjg(vmixc(1,1))*umixc(2,2)*eh(ih) -
378  & dconjg(vmixc(1,2))*umixc(2,1)*dh(ih))/sr2
379  xmk=xmj*etah(ih)
380  gx2=abs(olpp)**2+abs(orpp)**2
381  glr=dble(olpp*dconjg(orpp))
382  xlam(lknt)=pyx2xh(c1,xmi,xmk,xmh,gx2,glr)
383  idlam(lknt,1)=kfcchi(1)
384  idlam(lknt,2)=ith(ih)
385  idlam(lknt,3)=0
386  ENDIF
387  160 CONTINUE
388 
389 C...CHI1 JUMPS TO HERE
390  170 CONTINUE
391 
392 C...CHI+_I -> CHI0_J + W+
393  DO 220 ij=1,4
394  xmj=smz(ij)
395  axmj=abs(xmj)
396  xmj2=xmj**2
397  IF(axmi.GE.axmj+xmw) THEN
398  lknt=lknt+1
399  DO 180 i=1,4
400  zmixc(ij,i)=dcmplx(zmix(ij,i),zmixi(ij,i))
401  180 CONTINUE
402  cxc(1)=(dconjg(zmixc(ij,2))*vmixc(ix,1)-
403  & dconjg(zmixc(ij,4))*vmixc(ix,2)/sr2)
404  cxc(3)=(zmixc(ij,2)*dconjg(umixc(ix,1))+
405  & zmixc(ij,3)*dconjg(umixc(ix,2))/sr2)
406  gx2=abs(cxc(1))**2+abs(cxc(3))**2
407  glr=dble(cxc(1)*dconjg(cxc(3)))
408  xlam(lknt)=pyx2xg(c1/xmw2,xmi,xmj,xmw,gx2,glr)
409  idlam(lknt,1)=kfnchi(ij)
410  idlam(lknt,2)=24
411  idlam(lknt,3)=0
412 C...LEPTONS
413  ELSEIF(axmi.GE.axmj) THEN
414  s12min=0d0
415  s12max=(axmi-axmj)**2
416  DO 190 i=1,4
417  zmixc(ij,i)=dcmplx(zmix(ij,i),zmixi(ij,i))
418  190 CONTINUE
419  cxc(1)=(dconjg(zmixc(ij,2))*vmixc(ix,1)-
420  & dconjg(zmixc(ij,4))*vmixc(ix,2)/sr2)/sr2
421  cxc(3)=(zmixc(ij,2)*dconjg(umixc(ix,1))+
422  & zmixc(ij,3)*dconjg(umixc(ix,2))/sr2)/sr2
423  cxc(5)=dcmplx(0d0,0d0)
424  cxc(7)=dcmplx(0d0,0d0)
425  ia=11
426  ja=12
427  ei=kchg(ia,1)/3d0
428  t3i=sign(1d0,ei+1d-6)/2d0
429  ej=kchg(ja,1)/3d0
430  t3j=sign(1d0,ej+1d-6)/2d0
431  cxc(2)=vmixc(ix,1)*dconjg(zmixc(ij,1)*(ej-t3j)*
432  & tanw+zmixc(ij,2)*t3j)/sr2
433  cxc(4)=-dconjg(umixc(ix,1))*(
434  & zmixc(ij,1)*(ei-t3i)*tanw+zmixc(ij,2)*t3i)/sr2
435  cxc(6)=dcmplx(0d0,0d0)
436  cxc(8)=dcmplx(0d0,0d0)
437  xxc(1)=0d0
438  xxc(2)=xmj
439  xxc(3)=0d0
440  xxc(4)=xmi
441  xxc(5)=pmas(pycomp(ksusy1+ja),1)
442  xxc(6)=pmas(pycomp(ksusy1+ia),1)
443  xxc(9)=pmas(24,1)
444  xxc(10)=pmas(24,2)
445 CCC IF( XXC(5).LT.AXMI .AND. XXC(6).LT.AXMI ) GOTO 190
446  IF(xxc(5).LT.axmi) THEN
447  xxc(5)=1d6
448  ELSEIF(xxc(6).LT.axmi) THEN
449  xxc(6)=1d6
450  ENDIF
451  xxc(7)=xxc(6)
452  xxc(8)=xxc(5)
453 C...1/(2PI)**3*/(32*M**3)*G^4, G^2/(4*PI)= AEM/XW,
454 C...--> 1/(16PI)/M**3*(AEM/XW)**2
455  IF(axmi.GE.axmj+pmas(11,1)+pmas(12,1)) THEN
456  lknt=lknt+1
457  temp=pygaus(pyxxz6,s12min,s12max,prec)
458  xlam(lknt)=c1**2/xmi3/(16d0*pi)*temp
459  idlam(lknt,1)=kfnchi(ij)
460  idlam(lknt,2)=-11
461  idlam(lknt,3)=12
462 C...ONLY DECAY CHI+1 -> E+ NU_E
463  IF( imss(12).NE. 0 ) goto 260
464  IF(axmi.GE.axmj+pmas(13,1)+pmas(14,1)) THEN
465  lknt=lknt+1
466  xlam(lknt)=xlam(lknt-1)
467  idlam(lknt,1)=kfnchi(ij)
468  idlam(lknt,2)=-13
469  idlam(lknt,3)=14
470  ENDIF
471  ENDIF
472  IF(axmi.GE.axmj+pmas(15,1)+pmas(16,1)) THEN
473  lknt=lknt+1
474  IF(abs(sfmix(15,1)).GT.abs(sfmix(15,2))) THEN
475  xxc(6)=pmas(pycomp(ksusy1+15),1)
476  ELSE
477  xxc(6)=pmas(pycomp(ksusy2+15),1)
478  ENDIF
479  xxc(5)=pmas(pycomp(ksusy1+16),1)
480  IF(xxc(5).LT.axmi) THEN
481  xxc(5)=1d6
482  ELSEIF(xxc(6).LT.axmi) THEN
483  xxc(6)=1d6
484  ENDIF
485  xxc(7)=xxc(6)
486  xxc(8)=xxc(5)
487  temp=pygaus(pyxxz6,s12min,s12max,prec)
488  xlam(lknt)=c1**2/xmi3/(16d0*pi)*temp
489  idlam(lknt,1)=kfnchi(ij)
490  idlam(lknt,2)=-15
491  idlam(lknt,3)=16
492  ENDIF
493 
494 C...NOW, DO THE QUARKS
495  200 CONTINUE
496  ia=1
497  ja=2
498  ei=kchg(ia,1)/3d0
499  t3i=sign(1d0,ei+1d-6)/2d0
500  ej=kchg(ja,1)/3d0
501  t3j=sign(1d0,ej+1d-6)/2d0
502  cxc(2)=vmixc(ix,1)*dconjg(zmixc(ij,1)*(ej-t3j)*
503  & tanw+zmixc(ij,2)*t3j)
504  cxc(4)=-dconjg(umixc(ix,1))*(
505  & zmixc(ij,1)*(ei-t3i)*tanw+zmixc(ij,2)*t3i)
506  xxc(5)=pmas(pycomp(ksusy1+ja),1)
507  xxc(6)=pmas(pycomp(ksusy1+ia),1)
508  IF( xxc(5).LT.axmi .AND. xxc(6).LT.axmi ) goto 210
509  IF(xxc(5).LT.axmi) THEN
510  xxc(5)=1d6
511  ENDIF
512  IF(xxc(6).LT.axmi) THEN
513  xxc(6)=1d6
514  ENDIF
515  xxc(7)=xxc(6)
516  xxc(8)=xxc(5)
517  IF(axmi.GE.axmj+pmas(1,1)+pmas(2,1)) THEN
518  lknt=lknt+1
519  xlam(lknt)=3d0*c1**2/xmi3/(16d0*pi)*
520  & pygaus(pyxxz6,s12min,s12max,prec)
521  idlam(lknt,1)=kfnchi(ij)
522  idlam(lknt,2)=-1
523  idlam(lknt,3)=2
524  IF(axmi.GE.axmj+pmas(3,1)+pmas(4,1)) THEN
525  lknt=lknt+1
526  xlam(lknt)=xlam(lknt-1)
527  idlam(lknt,1)=kfnchi(ij)
528  idlam(lknt,2)=-3
529  idlam(lknt,3)=4
530  ENDIF
531  ENDIF
532  210 CONTINUE
533  ENDIF
534  220 CONTINUE
535 
536 C...CHI+_I -> CHI0_J + H+
537  DO 230 ij=1,4
538  xmj=smz(ij)
539  axmj=abs(xmj)
540  xmj2=xmj**2
541  xmhp=pmas(ithc,1)
542  IF(axmi.GE.axmj+xmhp) THEN
543  lknt=lknt+1
544  olpp=cbeta*(zmixc(ij,4)*dconjg(vmixc(ix,1))+(zmixc(ij,2)+
545  & zmixc(ij,1)*tanw)*dconjg(vmixc(ix,2))/sr2)
546  orpp=sbeta*(dconjg(zmixc(ij,3))*umixc(ix,1)-
547  & (dconjg(zmixc(ij,2))+dconjg(zmixc(ij,1))*tanw)*
548  & umixc(ix,2)/sr2)
549  gx2=abs(olpp)**2+abs(orpp)**2
550  glr=dble(olpp*dconjg(orpp))
551  xlam(lknt)=pyx2xh(c1,xmi,xmj,xmhp,gx2,glr)
552  idlam(lknt,1)=kfnchi(ij)
553  idlam(lknt,2)=ithc
554  idlam(lknt,3)=0
555  ELSE
556 
557  ENDIF
558  230 CONTINUE
559 
560 C...2-BODY DECAYS TO FERMION SFERMION
561  DO 240 j=1,16
562  IF(j.GE.7.AND.j.LE.10) goto 240
563  IF(mod(j,2).EQ.0) THEN
564  kf1=ksusy1+j-1
565  ELSE
566  kf1=ksusy1+j+1
567  ENDIF
568  kf2=kf1+ksusy1
569  xmsf1=pmas(pycomp(kf1),1)
570  xmsf2=pmas(pycomp(kf2),1)
571  xmf=pmas(j,1)
572  IF(j.LE.6) THEN
573  fcol=3d0
574  ELSE
575  fcol=1d0
576  ENDIF
577 
578 C...U~ D_L
579  IF(mod(j,2).EQ.0) THEN
580  xmfp=pmas(j-1,1)
581  cal=umixc(ix,1)
582  cbl=-xmf*vmixc(ix,2)/xmw/sbeta/sr2
583  car=-xmfp*umixc(ix,2)/xmw/cbeta/sr2
584  cbr=0d0
585  isf=j-1
586  ELSE
587  xmfp=pmas(j+1,1)
588  cal=vmixc(ix,1)
589  cbl=-xmf*umixc(ix,2)/xmw/cbeta/sr2
590  cbr=0d0
591  car=-xmfp*vmixc(ix,2)/xmw/sbeta/sr2
592  isf=j+1
593  ENDIF
594 
595 C...~U_L D
596  IF(axmi.GE.xmf+xmsf1) THEN
597  lknt=lknt+1
598  xma2=xmsf1**2
599  xmb2=xmf**2
600  xl=pylamf(xmi2,xma2,xmb2)
601  ca=cal*sfmix(isf,1)+car*sfmix(isf,2)
602  cb=cbl*sfmix(isf,1)+cbr*sfmix(isf,2)
603  xlam(lknt)=fcol*c1/8d0/xmi3*sqrt(xl)*( (xmi2+xmb2-xma2)*
604  & (abs(ca)**2+abs(cb)**2)+4d0*dble(ca*dconjg(cb))*xmf*xmi)
605  idlam(lknt,3)=0
606  IF(mod(j,2).EQ.0) THEN
607  idlam(lknt,1)=-kf1
608  idlam(lknt,2)=j
609  ELSE
610  idlam(lknt,1)=kf1
611  idlam(lknt,2)=-j
612  ENDIF
613  ENDIF
614 
615 C...U~ D_R
616  IF(axmi.GE.xmf+xmsf2) THEN
617  lknt=lknt+1
618  xma2=xmsf2**2
619  xmb2=xmf**2
620  ca=cal*sfmix(isf,3)+car*sfmix(isf,4)
621  cb=cbl*sfmix(isf,3)+cbr*sfmix(isf,4)
622  xl=pylamf(xmi2,xma2,xmb2)
623  xlam(lknt)=fcol*c1/8d0/xmi3*sqrt(xl)*( (xmi2+xmb2-xma2)*
624  & (abs(ca)**2+abs(cb)**2)+4d0*dble(ca*dconjg(cb))*xmf*xmi)
625  idlam(lknt,3)=0
626  IF(mod(j,2).EQ.0) THEN
627  idlam(lknt,1)=-kf2
628  idlam(lknt,2)=j
629  ELSE
630  idlam(lknt,1)=kf2
631  idlam(lknt,2)=-j
632  ENDIF
633  ENDIF
634  240 CONTINUE
635 
636 C...3-BODY DECAY TO Q Q~' GLUINO, ONLY IF IT CANNOT PROCEED THROUGH
637 C...A 2-BODY -- 2-BODY CHAIN
638  xmj=pmas(pycomp(ksusy1+21),1)
639  IF(axmi.GE.xmj) THEN
640  axmj=abs(xmj)
641  s12min=0d0
642  s12max=(axmi-axmj)**2
643  xxc(1)=0d0
644  xxc(2)=xmj
645  xxc(3)=0d0
646  xxc(4)=xmi
647  xxc(5)=pmas(pycomp(ksusy1+1),1)
648  xxc(6)=pmas(pycomp(ksusy1+2),1)
649  xxc(9)=1d6
650  xxc(10)=0d0
651  olpp=dcmplx(cos(rmss(32)),sin(rmss(32)))
652  orpp=dconjg(olpp)
653  cxc(1)=dcmplx(0d0,0d0)
654  cxc(3)=dcmplx(0d0,0d0)
655  cxc(5)=dcmplx(0d0,0d0)
656  cxc(7)=dcmplx(0d0,0d0)
657  cxc(2)=umixc(ix,1)*olpp/sr2
658  cxc(4)=-dconjg(vmixc(ix,1))*orpp/sr2
659  cxc(6)=dcmplx(0d0,0d0)
660  cxc(8)=dcmplx(0d0,0d0)
661  IF(xxc(5).LT.axmi) THEN
662  xxc(5)=1d6
663  ELSEIF(xxc(6).LT.axmi) THEN
664  xxc(6)=1d6
665  ENDIF
666  xxc(7)=xxc(6)
667  xxc(8)=xxc(5)
668  IF( xxc(5).LT.axmi .OR. xxc(6).LT.axmi ) goto 250
669  IF(axmi.GE.axmj+pmas(1,1)+pmas(2,1)) THEN
670  lknt=lknt+1
671  xlam(lknt)=4d0*c1*as/xmi3/(16d0*pi)*
672  & pygaus(pyxxz6,s12min,s12max,prec)
673  idlam(lknt,1)=ksusy1+21
674  idlam(lknt,2)=-1
675  idlam(lknt,3)=2
676  IF(axmi.GE.axmj+pmas(3,1)+pmas(4,1)) THEN
677  lknt=lknt+1
678  xlam(lknt)=xlam(lknt-1)
679  idlam(lknt,1)=ksusy1+21
680  idlam(lknt,2)=-3
681  idlam(lknt,3)=4
682  ENDIF
683  ENDIF
684  250 CONTINUE
685  ENDIF
686 
687 C...R-violating decay modes (SKANDS).
688  CALL pyrvch(kfin,xlam,idlam,lknt)
689 
690  260 iknt=lknt
691  xlam(0)=0d0
692  DO 270 i=1,iknt
693  xlam(0)=xlam(0)+xlam(i)
694  IF(xlam(i).LT.0d0) THEN
695  WRITE(mstu(11),*) ' XLAM(I) = ',xlam(i),kcin,
696  & (idlam(i,j),j=1,3)
697  xlam(i)=0d0
698  ENDIF
699  270 CONTINUE
700  IF(xlam(0).EQ.0d0) THEN
701  xlam(0)=1d-6
702  WRITE(mstu(11),*) ' XLAM(0) = ',xlam(0)
703  WRITE(mstu(11),*) lknt
704  WRITE(mstu(11),*) (xlam(j),j=1,lknt)
705  ENDIF
706 
707  RETURN
708  END