Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyrvsb.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyrvsb.f
1 
2 C*********************************************************************
3 
4 C...PYRVSB
5 C...Auxiliary function to PYRVSF for calculating R-Violating
6 C...sfermion widths. Though the decay products are most often treated
7 C...as massless in the calculation, the kinematical boundary of phase
8 C...space is tested using the true masses.
9 C...MODE = 1: All decay products massive
10 C...MODE = 2: Decay product 1 massless
11 C...MODE = 3: Decay product 2 massless
12 C...MODE = 4: All decay products massless
13 
14  FUNCTION pyrvsb(KFIN,ID1,ID2,RM2,MODE)
15 
16  IMPLICIT DOUBLE PRECISION (a-h,o-z)
17  IMPLICIT integer(i-n)
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  SAVE /pydat1/,/pydat2/
21  DOUBLE PRECISION sm(3)
22  INTEGER pycomp, kc(3)
23  kc(1)=pycomp(kfin)
24  kc(2)=pycomp(id1)
25  kc(3)=pycomp(id2)
26  sm(1)=pmas(kc(1),1)**2
27  sm(2)=pmas(kc(2),1)**2
28  sm(3)=pmas(kc(3),1)**2
29 C...Kinematics check
30  IF ((sm(1)-(pmas(kc(2),1)+pmas(kc(3),1))**2).LE.0d0) THEN
31  pyrvsb=0d0
32  RETURN
33  ENDIF
34 C...CM momenta squared
35  IF (mode.EQ.1) THEN
36  p2cm=1./(4*sm(1))*(sm(1)-(pmas(kc(2),1)+pmas(kc(3),1))**2)
37  & * (sm(1)-(pmas(kc(2),1)-pmas(kc(3),1))**2)
38  ELSE IF (mode.EQ.2) THEN
39  p2cm=1./(4*sm(1))*(sm(1)-(pmas(kc(3),1))**2)**2
40  ELSE IF (mode.EQ.3) THEN
41  p2cm=1./(4*sm(1))*(sm(1)-(pmas(kc(2),1))**2)**2
42  ELSE
43  p2cm=sm(1)/4.
44  ENDIF
45 C...Calculate Width
46  pyrvsb=rm2*sqrt(max(0d0,p2cm))/(8*paru(1)*sm(1))
47  RETURN
48  END