Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyfcmp.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyfcmp.f
1 
2 C*********************************************************************
3 
4 C...PYFCMP: Auxiliary to PYPDFU and PYPTIS.
5 C...Giving the x*f pdf of a companion quark, with its partner at XS,
6 C...using an approximate gluon density like (1-X)^NPOW/X. The value
7 C...corresponds to an unrescaled range between 0 and 1-X.
8 
9  FUNCTION pyfcmp(XC,XS,NPOW)
10  IMPLICIT NONE
11  DOUBLE PRECISION xc, xs, y, pyfcmp,fac
12  INTEGER npow
13 
14  pyfcmp=0d0
15 C...Parent gluon momentum fraction
16  y=xc+xs
17  IF (y.GE.1d0) RETURN
18 C...Common factor (includes factor XC, since PYFCMP=x*f)
19  fac=3d0*xc*xs*(xc**2+xs**2)/(y**4)
20 C...Store normalized companion x*f distribution.
21  IF (npow.LE.0) THEN
22  pyfcmp=fac/(2d0-xs*(3d0-xs*(3d0-2d0*xs)))
23  ELSEIF (npow.EQ.1) THEN
24  pyfcmp=fac*(1d0-y)/(2d0+xs**2*(-3d0+xs)+3d0*xs*log(xs))
25  ELSEIF (npow.EQ.2) THEN
26  pyfcmp=fac*(1d0-y)**2/(2d0*((1d0-xs)*(1d0+xs*(4d0+xs))
27  & +3d0*xs*(1d0+xs)*log(xs)))
28  ELSEIF (npow.EQ.3) THEN
29  pyfcmp=fac*(1d0-y)**3*2d0/(4d0+27d0*xs-31d0*xs**3
30  & +6d0*xs*log(xs)*(3d0+2d0*xs*(3d0+xs)))
31  ELSEIF (npow.GE.4) THEN
32  pyfcmp=fac*(1d0-y)**4/(2d0*(1d0+2d0*xs)*((1d0-xs)*(1d0+
33  & xs*(10d0+xs))+6d0*xs*log(xs)*(1d0+xs)))
34  ENDIF
35  RETURN
36  END