-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.json
442 lines (442 loc) · 16.4 KB
/
schema.json
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Amplitude Model Serialization Format",
"description": "This schema describes the serialization format of an amplitude model for hadron physics.",
"additionalProperties": false,
"definitions": {
"AngularMomentum": {
"anyOf": [
{ "type": "integer", "minimum": 0 },
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$"
}
]
},
"ComplexNumber": {
"anyOf": [
{ "type": "number" },
{
"type": "string",
"pattern": "^-?\\d+(\\.\\d+)?(e[-+]?\\d+)? *[+-] *\\d+(\\.\\d+)?(e[-+]?\\d+)?i$"
}
],
"examples": ["1", "1.0", "1.0 + 2.0i", "1.0-2.0i"]
},
"DecayChain": {
"type": "object",
"properties": {
"name": {
"description": "A label for the decay chain, used for clarity and not as a standardized identifier.",
"type": "string"
},
"propagators": {
"description": "List of the lineshape descriptors.",
"type": "array",
"items": {
"type": "object",
"properties": {
"spin": {
"$ref": "#/definitions/Spin"
},
"node": {
"description": "Defines a node in the topology graph by specifying the particles involved in the interaction.",
"$ref": "#/definitions/Topology"
},
"parametrization": {
"type": "string",
"description": "Lineshape parametrization. Should match the \"name\" of one of the function definitions under the \"functions\" section."
}
},
"required": ["spin", "node", "parametrization"],
"additionalProperties": false
},
"uniqueItems": true
},
"topology": {
"description": "Structure of this decay chain represented as nested particle grouping into intermediate subsystems.",
"$ref": "#/definitions/Topology"
},
"vertices": {
"description": "Vertices define the nodes in the decay graphs denoted by grouping of particle indices.",
"type": "array",
"items": { "$ref": "#/definitions/Vertex" },
"uniqueItems": true
},
"weight": {
"description": "The weight in each chain gives the complex coefficient that multiplies the decay matrix element of the chain’s specific sequence of interactions and propagations. It influences the probability of the chain’s occurrence and interference with other decay chains. The weight is a complex number.",
"$ref": "#/definitions/ComplexNumber"
}
},
"required": ["name", "propagators", "topology", "vertices", "weight"],
"additionalProperties": false
},
"Function": {
"type": "object",
"properties": {
"name": {
"description": "Identifier that can be used elsewhere to reference this function.",
"type": "string"
},
"type": {
"description": "Common type defines mathematical expression of the object.",
"type": "string"
},
"channels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"gsq": { "type": "number" },
"ma": { "type": "number" },
"mb": { "type": "number" },
"l": {
"description": "Orbital angular momentum between particles in the decay.",
"$ref": "#/definitions/AngularMomentum"
},
"d": {
"description": "Size of the potential well for Blatt-Weisskopf factor.",
"type": "number"
}
},
"required": ["gsq", "ma", "mb", "l", "d"],
"additionalProperties": false
},
"uniqueItems": true
},
"expression": {
"description": "Expression for the function. Use this for custom functions.",
"type": "string"
},
"l": {
"description": "Orbital angular momentum of the decay.",
"$ref": "#/definitions/AngularMomentum"
},
"mass": {
"description": "Nominal mass of the resonance in GeV.",
"type": "number",
"minimum": 0
},
"width": {
"description": "Nominal width of the resonance in GeV.",
"type": "number",
"minimum": 0
},
"ma": { "type": "number", "minimum": 0 },
"mb": { "type": "number", "minimum": 0 }
},
"required": ["name", "type"],
"allOf": [
{
"if": { "properties": { "type": { "const": "custom" } } },
"then": { "required": ["expression"] }
},
{
"if": { "properties": { "type": { "const": "BlattWeisskopf" } } },
"then": { "required": ["radius", "l"] }
},
{
"if": { "properties": { "type": { "const": "MomentumPower" } } },
"then": { "required": ["l"] }
},
{
"if": { "properties": { "type": { "const": "BreitWigner" } } },
"then": { "required": ["mass", "width", "ma", "mb", "l", "d"] }
},
{
"if": {
"properties": { "type": { "const": "MultichannelBreitWigner" } }
},
"then": { "required": ["channels", "mass"] }
}
]
},
"Parameter": {
"type": "object",
"properties": {
"name": { "type": "string" },
"value": { "type": "number" }
},
"additionalProperties": false
},
"Spin": {
"description": "The spin of the particle, described as a fraction in string format. If the particle is a fermion, the spin is an integer or half-integer. If the particle is a boson, the spin is an integer.",
"examples": ["0", "1/2", "1", "-3/2"],
"pattern": "^(?![-+]0)[-+]?\\d+(/2)?$",
"type": "string"
},
"State": {
"type": "object",
"properties": {
"index": {
"type": "integer",
"description": "A unique identifier for each particle, with 0 reserved for the initial state particle.",
"minimum": 0
},
"mass": {
"anyOf": [{ "type": "number" }, { "type": "string" }],
"description": "Mass of the particle in GeV. Can be a constant value or a parametrization described under \"functions\" section."
},
"name": {
"type": "string",
"description": "A label for each particle, used for clarity and not as a standardized identifier."
},
"spin": {
"description": "The spin quantum number of the particle, represented in string format",
"$ref": "#/definitions/Spin"
}
},
"required": ["index", "name", "spin", "mass"]
},
"Topology": {
"type": "array",
"items": {
"anyOf": [
{ "type": "integer", "minimum": 1 },
{ "$ref": "#/definitions/Topology" }
]
},
"uniqueItems": true
},
"Vertex": {
"type": "object",
"required": ["type", "node"],
"properties": {
"type": {
"description": "Specifies how the helicity recoupling factor H_{lam1,lam2} is computed. Each option reflects different ways of relating combinations of the helicity indices to a real-valued factor, the recoupling coefficient.",
"enum": ["helicity", "ls", "parity"],
"enumDescriptions": [
"Recoupling with LS computes the value of the recoupling functions using Clebsch-Gordan coefficients.",
"Parity` recoupling is controlled by the parity factor and gives a non-zero value for two combination of the helicity pair, the selected one and the opposite.",
"No recoupling. The factor is 1 for a pair of selected helicities and zero for other combinations."
]
},
"helicities": {
"type": "array",
"description": "Spin projections of the two decay products in the vertex.",
"items": { "$ref": "#/definitions/Spin" },
"minItems": 2,
"maxItems": 2
},
"node": {
"$ref": "#/definitions/Topology",
"description": "Description of the position of the vertex within the decay topology."
},
"parity_factor": {
"description": "Factor that is is required for parity couplings and LS couplings. Gives a non-zero value for two combination of the helicity pair, the selected one and the opposite.",
"enum": ["-", "+"]
},
"l": {
"description": "Orbital angular momentum of particles in the decay the vertex.",
"$ref": "#/definitions/AngularMomentum"
},
"s": {
"description": "Coupled spin of the vertex.",
"$ref": "#/definitions/Spin"
},
"formfactor": {
"description": "Optional form-factor for the vertex. The form-factor is a function of three arguments, (mX^2, mA^2, mB^2) for X->[A,B] vertex, that is defined under \"functions\" section.",
"default": "",
"type": "string"
}
},
"additionalProperties": false,
"allOf": [
{
"if": { "properties": { "type": { "const": "helicity" } } },
"then": { "required": ["helicities"] }
},
{
"if": { "properties": { "type": { "const": "ls" } } },
"then": { "required": ["l", "s"] }
},
{
"if": { "properties": { "type": { "const": "parity" } } },
"then": { "required": ["helicities", "parity_factor"] }
}
]
}
},
"properties": {
"distributions": {
"type": "array",
"description": "List of amplitude model PDF descriptions.",
"items": {
"properties": {
"decay_description": {
"type": "object",
"description": "Description of the decay that underlies the PDF.",
"properties": {
"chains": {
"type": "array",
"description": "List with definitions of the decay chains and their corresponding amplitudes that contribute to the PDF.",
"items": { "$ref": "#/definitions/DecayChain" },
"minItems": 1
},
"kinematics": {
"type": "object",
"description": "Definition of the initial and final state of the decay.",
"properties": {
"initial_state": {
"description": "Initial state of the decay.",
"$ref": "#/definitions/State"
},
"final_state": {
"type": "array",
"description": "List of states that form the final state.",
"items": { "$ref": "#/definitions/State" },
"minItems": 1,
"uniqueItems": true
}
},
"additionalProperties": false
},
"reference_topology": {
"$ref": "#/definitions/Topology",
"description": "Definition of the basic decay structure (topology) of the model, which is used to define 1) parametrization of the decay kinematics, and 2) reference quantization axes. It outlines the decay chain for which the amplitude is written without a need for the alignment rotations. All other chains that have different decay topology must be aligned to this reference topology."
},
"appendix": { "type": "object" }
},
"additionalProperties": false
},
"name": { "type": "string" },
"parameters": {
"type": "array",
"items": { "$ref": "#/definitions/Parameter" },
"uniqueItems": true
},
"type": {
"description": "The type of the distribution. See https://rub-ep1.github.io/amplitude-serialization/description.html#amplitude-model-and-observables",
"markdownDescription": "The type of the distribution. For more info, see [here](https://rub-ep1.github.io/amplitude-serialization/description.html#amplitude-model-and-observables).",
"enum": [
"HadronicUnpolarizedIntensity",
"HadronicPolarizedIntensity"
],
"enumDescriptions": [
"Amplitude model distribution that sums over the polarization of the initial state.",
"Amplitude model distribution that takes the polarization of the initial state into account."
]
}
},
"type": "object"
},
"minItems": 1,
"uniqueItems": true
},
"domains": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Identifier for the distribution. Can be referred to from elsewhere in the model description.",
"type": "string"
},
"type": {
"enum": ["product_domain"],
"enumDescriptions": [
"Box-shaped domain defined by min-max values over each variable."
]
},
"parameters": {
"type": "array",
"description": "List of parameters and their values that together describe a domain in phase space.",
"items": { "$ref": "#/definitions/Parameter" },
"uniqueItems": true
},
"axes": {
"type": "array",
"description": "List of variables and their ranges.",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "Name of the variable."
},
"min": { "type": "number" },
"max": { "type": "number" }
},
"required": ["name"]
},
"uniqueItems": true
}
},
"required": ["name", "type"],
"allOf": [
{
"if": { "properties": { "type": { "const": "product_domain" } } },
"then": { "required": ["axes"] }
}
],
"additionalProperties": false
},
"uniqueItems": true
},
"functions": {
"type": "array",
"description": "Definitions of functions that are used in the model.",
"items": { "$ref": "#/definitions/Function" },
"uniqueItems": true
},
"misc": {
"type": "object",
"description": "Any additional information about the model.",
"properties": {
"amplitude_model_checksums": {
"type": "array",
"description": "A list of checksums that can be used to validate whether the computational implementation of the serialized amplitude model is correct.",
"items": {
"properties": {
"point": {
"description": "Parameter point over which to evaluate the distribution.",
"type": "string"
},
"distribution": {
"type": "string",
"description": "The name of the distribution for which the checksum is calculated."
},
"value": {
"description": "The resulting checksum value ('non-normalized intensity').",
"minimum": 0,
"$ref": "#/definitions/ComplexNumber"
}
},
"uniqueItems": true
}
}
}
},
"parameter_points": {
"type": "array",
"description": "Definition of points in parameter space over which the model can be evaluated.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifier for the parameter point. Can be referred to from elsewhere in the model description."
},
"parameters": {
"type": "array",
"description": "List of parameters and their values that together describe a point in phase space.",
"items": { "$ref": "#/definitions/Parameter" },
"uniqueItems": true
}
},
"required": ["name"],
"additionalProperties": false
},
"uniqueItems": true
}
},
"required": [
"distributions",
"domains",
"functions",
"misc",
"parameter_points"
],
"type": "object"
}