Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pymewt.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pymewt.f
1 
2 C*********************************************************************
3 
4 C...PYMEWT
5 C...Calculates actual ME weight in some initial-state showers.
6 C...Inparameter MECOR: kind of hard scattering process
7 C... IFLCB: flavour combination of branching,
8 C... 1 for fermion -> fermion,
9 C... 2 for gluon/photon -> fermion
10 C... 3 for fermion -> gluon/photon,
11 C... 4 for gluon -> gluon
12 C... Q2: Q2 value of shower branching
13 C... Z: Z value of branching
14 C...In+outparameter PHIBR: azimuthal angle of branching
15 C...Outparameter WTME: actual ME weight
16 
17  SUBROUTINE pymewt(MECOR,IFLCB,Q2,Z,PHIBR,WTME)
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...Commonblocks.
24  common/pyjets/n,npad,k(4000,5),p(4000,5),v(4000,5)
25  common/pydat1/mstu(200),paru(200),mstj(200),parj(200)
26  common/pypars/mstp(200),parp(200),msti(200),pari(200)
27  common/pyint1/mint(400),vint(400)
28  common/pyint2/iset(500),kfpr(500,2),coef(500,20),icol(40,4,2)
29  SAVE /pyjets/,/pydat1/,/pypars/,/pyint1/,/pyint2/
30 
31 C...Default output.
32  wtme=1d0
33 
34 C...Define kinematics of shower branching in Mandelstam variables.
35  sqm=vint(44)
36  sh=sqm/z
37  th=-q2
38  uh=q2-sqm*(1d0-z)/z
39 
40 C...Matrix-element corrections for f + fbar -> s-channel vector boson.
41  IF(mecor.EQ.1) THEN
42  IF(iflcb.EQ.1) THEN
43  wtme=(th**2+uh**2+2d0*sqm*sh)/(sh**2+sqm**2)
44  ELSEIF(iflcb.EQ.2) THEN
45  wtme=(sh**2+uh**2+2d0*sqm*th)/((sh-sqm)**2+sqm**2)
46  ENDIF
47 
48 C...Matrix-element corrections for g + g -> Higgs (h0, H0, A0).
49  ELSEIF(mecor.EQ.2) THEN
50  IF(iflcb.EQ.3) THEN
51  wtme=(sh**2+uh**2)/(sh**2+(sh-sqm)**2)
52  ELSEIF(iflcb.EQ.4) THEN
53  wtme=0.5d0*(sh**4+uh**4+th**4+sqm**4)/(sh**2-sqm*(sh-sqm))**2
54  ENDIF
55 
56 C...Matrix-element corrections for q + qbar -> Higgs (h0)
57  ELSEIF(mecor.EQ.3) THEN
58  IF(iflcb.EQ.2) THEN
59  wtme=(sh**2+th**2+2d0*(sqm-th)*(sqm-sh))/
60  1 (sh**2+2d0*sqm*(sqm-sh))
61  ENDIF
62  ENDIF
63 
64  RETURN
65  END