forked from jiangyi15/tf-pwa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sample.yml
224 lines (216 loc) · 7.4 KB
/
config.sample.yml
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
## configuration files
## using YAML format,see more: https://yaml.org/
## required PyYAML module
## this file use indentation to indicate hierarchy
## line starts with `##` is documnet.
## line starts with `#` is option.
## data entry is the data file name list used for fit
data:
## 4-momentum order of final particles in dat files [option]
## the `finals` in `particle` will be used by default.
## it is necessary when dat files has momentum out of final particles
dat_order: [B, C, D]
## The file path is grouped by `name[_tail]`
## Each tail correspanding to the valriable in a dataset
## basic data files, every line is `E px py pz` as 4-momentum of a particle,
## and every m lines group as m final particls
## support input multi data as [["data.dat"], ["data2.dat"]] to do simultaneous fit using the same model
data: ["data/data4600_new.dat"]
## The additional file is grouped by `name[_tail]`
## Each tail is corresponding to the valriables in a dataset `name`
## data weight file, each line for a weight
# data_weight: ["data/data_weight.dat"]
## phase space data for normalize amplitude
phsp: ["data/PHSP4600_new.dat"]
## phase space weight file, each line for a weight
# phsp_weight: ["data/phsp_weight.dat"]
## phase space without efficiencies, used for calculating fit fraction.
# phsp_noeff: ["data/PHSP4600_noeff.dat"]
## much more phase space, used for plotting
# phsp_plot: ["data/PHSP4600_plot.dat"]
## optional weight background data, need bg_weight
bg: ["data/bg4600_new.dat"]
## background weight
bg_weight: 0.731
## using total monumtum direction as initial axis (or labrary axis)
## set to False if the initial particle is e+e- direcly
# random_z: True
## cached data file
# cached_data: "data/all_data.npy"
## charge conjugation condition same as weight
# data_charge: ["data/data4600_cc.dat"]
# cp_trans: True # when used charge conjugation as above, this do p -> -p for charge conjugation process.
## Currently, addtion configuration for fit can also be put in here, some option might be changed frequrently.
## likehood formula, cfit, some model require other options (bg_frac)
# model: default
# bg_frac: 0.3
## use tf function to complite the amplitude model
# use_tf_function: Ture
## Pre-Proceesor and amplutude model for different way of amplitude calculation. ["default", "cached_amp","cached_shape", "p4_directly"]
# preprocessor: cached_shape
# amp_model: cached_shape
## use TensorFlow Dataset instead of loading all data to GPU directly.
# lazy_call: True
## caching preprocessor results in file_name
# cached_lazy_call: file_name
## use memmap instead of loading data to memory
# lazy_file: True
## using multi gpu (experimental), only support with `model: simple`
# multi_gpu: True
## `decay` describe the decay structure, each node can be a list of particle name
decay:
## each entry is a list of direct decay particle, or a list or the list.
## `dec_file` entry for loading `*.dec` files will be supported in the feature.
## `-` is often used for list in yaml
A:
## for example A -> R_CD + B, R_CD -> C + D
## the optional `key: value` mean option parameters of the decay
## note there, R1 is overrated by `particle` entry as R1 and R11
- [R_CD, B, model: default]
- - R_BD
- C
- model: "default"
- - R_BC
- D
## set l_list to allow only l=0
# - [ NR(BC)SP, D, curve_style: "g-", {has_barrier_factor: False, l_list: [0]}]
# - [B, C, D, curve_style: "darkgreen"]
# - [R_BC2, D, p_break: True] # allow P parity violate
# R_BC2: [B, C, c_break: False] # enable C parity select C=(-1)^(l+s)
R_CD:
- C
- D
R_BD: [B, D]
R_BC: [B, C]
## set l_list to allow only l=1
# NR(BC)SP: [B, C, {has_barrier_factor: False, l_list: [1]}]
## `particle` describe the particle included
## top, finals, include are used as keywords
particle:
## top decay particle
$top:
A:
J: 1 # spin, use 1/2 or 0.5 for half spin
P: -1 # parity, alias: `Par`
mass: 4.6
# spins: [-1, 1] # list of possible of spin-projected quantum numbers
# polarization: "vector" # possible polarization option
## final particles
$finals:
B:
J: 1
P: -1
mass: 2.1
C:
J: 1
P: -1
mass: 1.8
D:
J: 0
P: -1
mass: 0.1
## map for possible resonances in the same position
## each entry is a list of resonances id [option]
## include detailed parameters defined in `Resonances.yml`
$include: Resonances.sample.yml
R_BD:
- D2_2460p
- D1_2430p
- D1_2420p
R_BC: [Zc_4025, Zc_4160]
## set `[]` for particle which is not in real decays,
## just used for calculating angle data.
R_CD: []
## particle can be defined in here or included by `Resonances.yml`
## if both have the defination, defination in here will overtite defination in `Resonances.yml`
# NR(BC)SP: {J: 1, P: -1, model: one}
## The following config is used for DecayChain
# decay_chain:
# $all:
# is_cp: True
## constrains for params [WIP]
constrains:
# particle:
# equal:
# mass: [[D1_2430p, D1_2430]]
## fix the first decay chain total to 1.0
decay:
fix_chain_idx: 0
fix_chain_val: 1
# decay_d: 3.0 # support number or list of number
# fix_var:
# "A->Zc_4025.DZc_4025->B.C_total_0r": 1.0
# free_var:
# - "A->Zc_4025.DZc_4025->B.C_total_0r"
# var_range:
# "A->Zc_4025.DZc_4025->B.C_total_0r": [1.0, null]
# var_equal:
# - ["A->D2_2460p.CD2_2460p->B.D_total_0r", "A->D2_2460.BD2_2460->C.D_total_0r"]
## plot describe the configuration of plotting 1-d data distribution
plot:
## plot configuration TODO
config:
bins: 50
# legend_outside: True
## Make the legend outside the plot, default is False (inside)
## invariant mass
mass:
R_CD:
## label of display
## use `$$` for latex math
display: "$M_{CD}$"
# upper_ylim: 200
# trans: x*x
R_BD:
display: "$M_{BD}$"
R_BC:
display: "$M_{BC}$"
## helicity angle
angle:
## If it named as `[.../]A/R_BC`, it refer to the decay A -> R_BC ... in the decay chain has A and R_BC,
## the angle is determined by the last 2 particles, the other order is random.
## for example, D->E+F in [A->R_BC+D, D->E+F, R_BC->B+C] is `R_BC/D/E` or `A/R_BC/D/E` or `R_BC/A/D/E`
A/R_CD:
## include "alpha, cos(beta), gamma", # add `cos` for cos(beta)
alpha:
display: "$\\phi_{1}$"
cos(beta):
display: "$\\cos(\\theta_1)$"
bins: 50 # number of bins is 50
legend: False # do not plot the legend
range: [-1, 1] # range for plot
A/R_BD:
alpha:
display: "$\\phi_{2}$"
cos(beta):
display: "$\\cos(\\theta_2)$"
A/R_BC:
alpha:
display: "$\\phi_{3}$"
cos(beta):
display: "$\\cos(\\theta_3)$"
R_BC/B:
alpha:
display: "$\\phi_{11}$"
cos(beta):
display: "$\\cos(\\theta_{11})$"
R_CD/C:
alpha:
display: "$\\phi_{21}$"
cos(beta):
display: "$\\cos(\\theta_{21})$"
R_BD/B:
alpha:
display: "$\\phi_{31}$"
cos(beta):
display: "$\\cos(\\theta_{31})$"
## 2D plot
2Dplot:
m_R_CD & m_R_BC:
display: "$M_{CD}$ vs $M_{BC}$"
plot_figs: ["data", "sideband", "fitted"]
dalitz_12:
x: m_R_CD**2
y: m_R_BC**2
display: "$M_{CD}^2$ vs $M_{BC}^2$"
plot_figs: ["data", "sideband", "fitted", "pull"]