3 SUBROUTINE PHOPRE(IPARR,WT,NEUDAU,NCHARB)
4 C.----------------------------------------------------------------------
6 C. PHOTOS: Photon radiation in decays
8 C. Purpose: Order (alpha) radiative corrections are generated in
9 C. the decay of the IPPAR-th particle in the HEP-like
10 C. common /PHOEVT/. Photon radiation takes place from one
11 C. of the charged daughters of the decaying particle IPPAR
12 C. WT is calculated, eventual rejection will be performed
13 C. later after inclusion of interference weight.
15 C. Input Parameter: IPPAR: Pointer to decaying particle in
16 C. /PHOEVT/ and the common itself,
18 C. Output Parameters: Common /PHOEVT/, either with or without a
20 C. WT weight of the configuration
22 C. Author(s): Z. Was, B. van Eijk Created at: 26/11/89
23 C. Last Update: 26/05/93
25 C.----------------------------------------------------------------------
27 DOUBLE PRECISION MINMAS,MPASQR,MCHREN
28 DOUBLE PRECISION BETA,EPS,DEL1,DEL2,DATA
29 REAL*8 PHOCHA,PHOSPI,PHORAN,PHOCOR,MASSUM
30 INTEGER IP,IPARR,IPPAR,I,J,ME,NCHARG,NEUPOI,NLAST,THEDUM
35 PARAMETER (NMXPHO=10000)
36 INTEGER IDPHO,ISTPHO,JDAPHO,JMOPHO,NEVPHO,NPHO
38 COMMON/PHOEVT/NEVPHO,NPHO,ISTPHO(NMXPHO),IDPHO(NMXPHO),
39 &JMOPHO(2,NMXPHO),JDAPHO(2,NMXPHO),PPHO(5,NMXPHO),VPHO(4,NMXPHO)
41 COMMON/PHOIF/CHKIF(NMXPHO)
42 INTEGER CHAPOI(NMXPHO)
43 DOUBLE PRECISION MCHSQR,MNESQR
45 COMMON/PHOMOM/MCHSQR,MNESQR,PNEUTR(5)
46 DOUBLE PRECISION COSTHG,SINTHG
48 COMMON/PHOPHS/XPHMAX,XPHOTO,COSTHG,SINTHG
50 COMMON/PHOCOP/ALPHA,XPHCUT
53 COMMON/PHOPRO/PROBH,CORWT,XF,IREP
56 C-- Store pointers for cascade treatement...
61 C-- Check decay multiplicity..
62 IF (JDAPHO(1,IP).EQ.0) RETURN
64 C-- Loop over daughters, determine charge multiplicity
69 DO 20 I=JDAPHO(1,IP),JDAPHO(2,IP)
72 C-- Exclude marked particles, quarks and gluons etc...
74 IF (CHKIF(I-JDAPHO(1,IP)+3)) THEN
75 IF (PHOCHA(IDPHO(I)).NE.0) THEN
77 IF (NCHARG.GT.NMXPHO) THEN
79 CALL PHOERR(1,'PHOTOS',DATA)
83 MINMAS=MINMAS+PPHO(5,I)**2
85 MASSUM=MASSUM+PPHO(5,I)
89 C-- Check that sum of daughter masses does not exceed parent mass
90 IF ((PPHO(5,IP)-MASSUM)/PPHO(5,IP).GT.2.D0*XPHCUT) THEN
92 C-- Order charged particles according to decreasing mass, this to
93 C-- increase efficiency (smallest mass is treated first).
94 IF (NCHARG.GT.1) CALL PHOOMA(1,NCHARG,CHAPOI)
98 70 PNEUTR(J)=-PPHO(J,CHAPOI(NCHARG))
99 PNEUTR(4)=PPHO(5,IP)-PPHO(4,CHAPOI(NCHARG))
101 C-- Calculate invariant mass of 'neutral' etc. systems
103 MCHSQR=PPHO(5,CHAPOI(NCHARG))**2
104 IF ((JDAPHO(2,IP)-JDAPHO(1,IP)).EQ.1) THEN
106 IF (NEUPOI.EQ.CHAPOI(NCHARG)) NEUPOI=JDAPHO(2,IP)
107 MNESQR=PPHO(5,NEUPOI)**2
108 PNEUTR(5)=PPHO(5,NEUPOI)
110 MNESQR=PNEUTR(4)**2-PNEUTR(1)**2-PNEUTR(2)**2-PNEUTR(3)**2
111 MNESQR=MAX(MNESQR,MINMAS-MCHSQR)
112 PNEUTR(5)=SQRT(MNESQR)
115 C-- Determine kinematical limit...
116 XPHMAX=(MPASQR-(PNEUTR(5)+PPHO(5,CHAPOI(NCHARG)))**2)/MPASQR
118 C-- Photon energy fraction...
119 CALL PHOENE(MPASQR,MCHREN,BETA,IDPHO(CHAPOI(NCHARG)))
121 C-- Energy fraction not too large (very seldom) ? Define angle.
122 IF ((XPHOTO.LT.XPHCUT).OR.(XPHOTO.GT.XPHMAX)) THEN
124 C-- No radiation was accepted, check for more daughters that may ra-
125 C-- diate and correct radiation probability...
127 IF (NCHARG.GT.0) THEN
133 C-- Angle is generated in the frame defined by charged vector and
134 C-- PNEUTR, distribution is taken in the infrared limit...
135 EPS=MCHREN/(1.D0+BETA)
137 C-- Calculate sin(theta) and cos(theta) from interval variables
138 DEL1=(2.D0-EPS)*(EPS/(2.D0-EPS))**PHORAN(THEDUM)
140 COSTHG=(1.D0-DEL1)/BETA
141 SINTHG=SQRT(DEL1*DEL2-MCHREN)/BETA
143 C-- Determine spin of particle and construct code for matrix element
144 ME=2.D0*PHOSPI(IDPHO(CHAPOI(NCHARG)))+1.D0
146 C-- Weighting procedure with 'exact' matrix element, reconstruct kine-
147 C-- matics for photon, neutral and charged system and update /PHOEVT/.
148 C-- Find pointer to the first component of 'neutral' system
149 DO I=JDAPHO(1,IP),JDAPHO(2,IP)
150 IF (I.NE.CHAPOI(NCHARG)) THEN
156 C-- Pointer not found...
158 CALL PHOERR(5,'PHOKIN',DATA)
160 NCHARB=CHAPOI(NCHARG)
161 NCHARB=NCHARB-JDAPHO(1,IP)+3
162 NEUDAU=NEUDAU-JDAPHO(1,IP)+3
163 WT=PHOCOR(MPASQR,MCHREN,ME)
167 DATA=PPHO(5,IP)-MASSUM
168 CALL PHOERR(10,'PHOTOS',DATA)