-
Notifications
You must be signed in to change notification settings - Fork 94
/
Copy pathstructures.inc
349 lines (287 loc) · 7.79 KB
/
structures.inc
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
! STRUCTURES.INC
! (note that all initializations of fields have been moved
! into the file "structures_init.inc")
! Define some BASIC record structures and associated parameters
! ... generic cut --> initialized with MAX large and MIN small
type cutstype
sequence
real*8 min, max
end type
! ... generic range (rather than a cut) --> initialized with HI small and LO large
type rangetype
sequence
real*8 lo, hi
end type
! ... generic Cartesian vector
integer*4 nCartesianfields
parameter (nCartesianfields = 3)
type Cartesian
sequence
real*8 x,y,z
end type
! ... minimal description of scattered particles, or cuts/ranges on these qties
! declare structures arm and arm2 first
type arm
sequence
real*8 delta, yptar, xptar, z
end type
type arm2
sequence
real*8 delta, yptar, xptar, z
end type
type double_arm
sequence
type(arm)::e
type(arm2)::p
end type
type arm_cuts
sequence
type(cutstype):: delta, yptar, xptar, z
end type
type arm_cuts2
sequence
type(cutstype):: delta, yptar, xptar, z
end type
type double_arm_cuts
sequence
type(arm_cuts)::e
type (arm_cuts2)::p
end type
type arm_range
sequence
type(rangetype):: delta,xptar,yptar,z
end type
type arm_range2
sequence
type(rangetype):: delta,xptar,yptar,z
end type
type double_arm_range
sequence
type(arm_range)::e
type(arm_range2)::p
end type
! ... generic focal plane vectors (transport convention, in both spectrometers)
type arm_FP
sequence
real*8 x, dx, y, dy, path
end type
type arm_FP2
sequence
real*8 x, dx, y, dy, path
end type
type double_arm_FP
sequence
type(arm_FP)::e
type(arm_FP2)::p
end type
! ... full description of a given particle
integer*4 narm_fullfields
parameter (narm_fullfields = 8)
type arm_full
sequence
real*8 delta,xptar,yptar,z
real*8 theta,phi,E,P
end type
type cuts_true
sequence
type(cutstype):: Em, Pm
end type
! EVENT structures
! ... description of event -- both actual and reconstructed (measured) versions calculated
! NEVENTFIELDS is used to copy from one /event/ record into another.
! IF YOU MODIFY THIS STRUCTURE, YOU MUST MAKE SURETHAT NEVENTFIELDS
! IS UPDATED ACCORDINGLY, OR BAD THINGS CAN HAPPEN.
integer*4 neventfields
parameter (neventfields = 28 + 2*narm_fullfields + 3*nCartesianfields)
type event
sequence
real*8 Ein
real*8 Em, Pm
real*8 Emiss, Pmiss
real*8 Pmx, Pmy, Pmz
real*8 PmPar, PmPer, PmOop
real*8 nu, q, Q2, Trec, W, Mrec
real*8 epsilon, theta_pq, theta_tarq,phi_pq,phi_targ
real*8 beta, phi_s, phi_c
real*8 zhad,pt2,xbj
type (arm_full):: e, p
type (Cartesian):: ue, up, uq
end type
! ... target-specific event quantities
type event_target
sequence
real*8 x, y, z, rasterx, rastery
real*8 teff(3), Eloss(3), Coulomb
end type
! ... quantities that are determined only once per event
type event_main
sequence
real*8 weight, SF_weight, gen_weight, jacobian
real*8 Ein_shift, Ee_shift
real*8 sigcc, sigcc_recon, sigcent
real*8 epsilon,theta_pq,theta_tarq,phi_pq,phi_targ,beta
real*8 w,t,tmin,q2
real*8 pcm,thetacm,phicm,wcm
real*8 davejac,johnjac
type(event_target)::target
type(double_arm):: SP, RECON
type(double_arm_FP)::FP
real*8 Trec
end type
! ... a gross structure that serves merely to catch all interesting qties for a 'central' event
type event_central_rad
sequence
real*8 hardcorfac, etatzai, frac(3), lambda(3), bt(2)
real*8 c_int(0:3), c_ext(0:3), c(0:3), g_int, g_ext, g(0:3)
end type
type event_central
sequence
real*8 sigcc, nu, q, Q2
real*8 Em, Pm, W, MM
type(event_central_rad)::rad
type (arm_full):: e, p
end type
! OTHER stuff
! ... spectrometer settings and specifications
type spec_offset
sequence
real*8 x,y,z,xptar,yptar
end type
type spec_offset2
sequence
real*8 x,y,z,xptar,yptar
end type
type spectrometer
sequence
real*8 P,theta,cos_th,sin_th,phi
type(spec_offset)::offset
end type
type spectrometer2
sequence
real*8 P,theta,cos_th,sin_th,phi
type(spec_offset2)::offset
end type
type both_spec
sequence
type(spectrometer)::e
type(spectrometer2)::p
end type
! ... acceptance edges for TRUE and VERTEX quantities, both BEFORE reconstruction
type edge_arm
sequence
type(cutstype):: E, yptar, xptar
end type
type edge_arm2
sequence
type(cutstype):: E, yptar, xptar
end type
type edge_true
sequence
type(edge_arm)::e
type(edge_arm2)::p
type (cutstype):: Em, Pm, Mrec, Trec, Trec_struck
end type
! ... pieces of the EXP dbase field that we'll need
type EXP_field
sequence
real*8 charge
end type
! ... generic description of a histogram axis
type axis
sequence
real*8 min,max,bin
integer n
end type
! ... ranges for the quantities that are generated randomly for each event / edges on quantities at the GENERATE stage
type arm_limits
sequence
type (cutstype):: delta, yptar, xptar, E
end type
type arm_limits2
sequence
type (cutstype):: delta, yptar, xptar, E
end type
type gen_limits
sequence
type(arm_limits)::e
type(arm_limits2)::p
type (cutstype):: sumEgen, Trec
real*8 xwid, ywid
end type
! ... ranges of event qties which actually contributed
type contrib_gen
sequence
type (arm_range):: e, p
type (rangetype):: Trec, sumEgen
end type
type contrib_arm
sequence
type (rangetype):: E, yptar, xptar
end type
type contrib_arm2
sequence
type (rangetype):: E, yptar, xptar
end type
type contrib_true
sequence
type(contrib_arm)::e
type(contrib_arm2)::p
type (rangetype):: Em, Pm, Trec
end type
type contrib_vertex
sequence
type (rangetype):: Trec, Em, Pm
end type
type contrib_rad
sequence
type (rangetype):: Egamma(3), Egamma_total
end type
type contribtype
sequence
type(contrib_gen)::gen
type(contrib_true)::tru
type(double_arm_range)::SP
type(contrib_vertex)::vertex
type(contrib_rad)::rad
end type
! ... values, and ranges of values which actually contributed, for useful slops (some are local to limits_init)
type slop_item
sequence
real*8 lo, hi, used
end type
type slop_total
sequence
type (slop_item):: Em, Pm
end type
type slop_MC_arm
sequence
type (slop_item):: delta, yptar, xptar
end type
type slop_MC_arm2
sequence
type (slop_item):: delta, yptar, xptar
end type
type slop_MC
sequence
type(slop_MC_arm)::e
type(slop_MC_arm2)::p
end type
type sloptype
sequence
type(slop_total)::total
type(slop_MC)::MC
end type
! ... sum and sum**2 of reconstruction errors (needed to get resolutions)
type sums_electron
sequence
real*8 delta,xptar,yptar,ytar
end type
type sums_proton
sequence
real*8 delta,xptar,yptar,ytar
end type
type sums_twoarm
sequence
type(sums_electron)::e
type(sums_proton)::p
end type