Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
!!!!!!!!!!!!!!!!!!!!!
MODULE USER
!!!!!!!!!!!!!!!!!!!!!
use functions
implicit none
!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!
integer, parameter :: nr_q = 10
integer, parameter :: nr_bins =200
real, parameter :: &
min_val(nr_q) = (/ 25., 115., 0.6, 0.6, 25., 25.,25.,25., 4000., 4000. /)
real, parameter :: &
max_val(nr_q) = (/ 45., 155., 1., 1., 45., 45.,45., 45., 14000., 14000. /)
!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!
!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!
!! ============================================== !!
!! DO NOT EVEN THINK ABOUT CHANGING ANYTHING HERE !!
!! ============================================== !!
logical :: pass_cut(nr_q)
character (len = 10), dimension(nr_q) :: names
character(len=10) :: filenamesuffix
!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!
!! ----------------------------------------- !!
!! There are two versions of binning !!
!! One for computing d \sigma/ d Q !!
!! One for computing Q d \sigma/ d Q !!
!! choose by setting the variable bin_kind !!
!! ----------------------------------------- !!
integer :: bin_kind = 0 !! 0 for d \sig/dQ; +1 for Q d \sig/dQ;
contains
SUBROUTINE FIX_MU
!! ==== Specify the scale mu AND musq==mu**2 ==== !!
mu = Me
musq = mu**2
END SUBROUTINE FIX_MU
SUBROUTINE INITUSER
print*, "This is a MESA legacy run with the cuts:"
print*," 25 pi/180._prec< thetae < 45 pi/180._prec "
print*, " Ee(out) > 45 MeV "
END SUBROUTINE
FUNCTION QUANT(q1,q2,q3,q4,q5,q6,q7)
real (kind=prec), intent(in) :: q1(4),q2(4),q3(4),q4(4), q5(4),q6(4),q7(4)
real (kind=prec) :: q1lab(4),q2lab(4),q3lab(4),q4lab(4),q5lab(4),q6lab(4)
real (kind=prec) :: quant(nr_q)
real (kind=prec) :: thetae, cthetae, qsqE, qsqP, epsE, epsP
pol1 = (/ 0._prec, 0._prec, 0._prec, 0._prec /)
pass_cut = .true.
call fix_mu
q1lab = boost_rf(q2,q1) ! incoming electron
q2lab = boost_rf(q2,q2) ! proton at rest
q3lab = boost_rf(q2,q3) ! outgoing electron
q4lab = boost_rf(q2,q4) ! outgoing proton
q5lab = boost_rf(q2,q5) ! outgoing photon (if present)
q6lab = boost_rf(q2,q6) ! outgoing photon (if present)
cthetae = cos_th(q1lab,q3lab)
thetae = acos(cos_th(q1lab,q3lab))
qsqE = -sq(q1-q3)
qsqP = -sq(q2-q4)
epsE = 1./(1. + 2*(1 + qsqe/(4.*Mproton**2))*(tan(0.5*thetae))**2)
epsP = 1./(1. + 2*(1 + qsqp/(4.*Mproton**2))*(tan(0.5*thetae))**2)
if(thetae < 25*pi/180._prec) pass_cut=.false.
if(thetae > 45*pi/180._prec) pass_cut=.false.
if(q3lab(4) < 45.) pass_cut=.false.
if(abs(qsqE-8000) > 1000) pass_cut(5)=.false.
if(abs(qsqP-8000) > 1000) pass_cut(6)=.false.
if(abs(qsqE-8000) > 2000) pass_cut(7)=.false.
if(abs(qsqP-8000) > 2000) pass_cut(8)=.false.
names(1) = "thetae"
quant(1) = 180*thetae/pi
names(2) = "Ee"
quant(2) = q3lab(4)
names(3) = "epsE"
quant(3) = epse
names(4) = "epsP"
quant(4) = epsp
names(5) = "thetaeE1"
quant(5) = 180*thetae/pi
names(6) = "thetaeP1"
quant(6) = 180*thetae/pi
names(7) = "thetaeE2"
quant(7) = 180*thetae/pi
names(8) = "thetaeP2"
quant(8) = 180*thetae/pi
names(9) = "qsqE"
quant(9) = qsqe
names(10) = "qsqP"
quant(10) = qsqp
END FUNCTION QUANT
!!!!!!!!!!!!!!!!!!!!!!!
END MODULE USER
!!!!!!!!!!!!!!!!!!!!!!!