EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
radgen_event.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file radgen_event.f
1 
2  subroutine radgen_event
3 
4  implicit none
5 
6  include "mc_set.inc"
7  include "mconsp.inc"
8  include "phiout.inc"
9  include "tailcom.inc"
10  include "cmpcom.inc"
11  include "radgen.inc"
12  include "mcRadCor.inc"
13 
14  integer iphot
15  real phrad(4),q2true,nutrue,radweight
16  real nu,q2,phi,yys,xxs
17 
18 ! calculate radiative corrections
19  nu=sngl(gennu)
20  q2=sngl(genq2)
21  phi=sngl(genphi)
22  yys=sngl(geny)
23  xxs=sngl(genx)
24  call radgen(mcset_enebeam,q2,nu,yys,xxs,phi,phrad,q2true,nutrue,
25  + radweight)
26 
27 ! fill mcRadCor WCB with ...
28 
29  mcradcor_id=1
30 
31 ! ... true kinematics
32 
33 * by definition we calculate xbj using the proton mass
34 * ---> xbj for elastic events is A
35 * mcRadCor_XTrue=q2true/(2.0d0*amp*nutrue)
36  mcradcor_xtrue=q2true/(2.0d0*0.938272d0*nutrue)
37  mcradcor_ytrue=nutrue/mcset_enebeam
38  mcradcor_nutrue=nutrue
39  mcradcor_q2true=q2true
40  mcradcor_w2true=amp2 - q2true + 2.*amp*nutrue
41 * print *,amp,amp2,mcRadCor_XTrue,nutrue,q2true,mcRadCor_W2True
42 
43 ! ... kinematics of real photon
44 
45  mcradcor_ebrems=phrad(4)
46  mcradcor_thetabrems=0.
47  if(phrad(4).gt.0.)
48  + mcradcor_thetabrems = acos(phrad(3)/phrad(4))
49  mcradcor_phibrems=0.
50  if (.not.(phrad(1).eq.0..and.phrad(2).eq.0.)) then
51  mcradcor_phibrems = atan2(phrad(2),phrad(1))
52  if (mcradcor_phibrems.lt.0.)
53  + mcradcor_phibrems = mcradcor_phibrems + twopi
54  endif
55 
56 c...if we would like to have the TSAI system angles for the real gamma than
57 c mcRadCor_ThetaBrems = dthg
58 c mcRadCor_PhiBrems = dphig
59 
60 ! ... radiative contributions
61 
62  mcradcor_sigrad=sigrad
63  mcradcor_sigcor=sigcor
64  mcradcor_sigcorerr=0.
65  mcradcor_tailine=tine
66  mcradcor_tailela=tpro
67  mcradcor_tailcoh=tnuc
68  mcradcor_vacuum=vac
69  mcradcor_vertex=vertex
70  mcradcor_small=small
71  mcradcor_redfac=redfac
72 
73 ! ... radiative correction type
74 
75  if (ita.eq.2) then
76  mcradcor_ctype='elas'
77  else if (ita.eq.3) then
78  mcradcor_ctype='qela'
79  else
80  mcradcor_ctype='inel'
81  endif
82 
83  end