Skip to content

Commit 9fc4c12

Browse files
committed
Run fitter for BDT systematics
1 parent c297031 commit 9fc4c12

File tree

2 files changed

+96
-153
lines changed

2 files changed

+96
-153
lines changed

PWGHF/D2H/Macros/config_massfitter.json

Lines changed: 75 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44
"ReflFileName": "input reflection file directory",
55
"OutFileName": "%outdir%/fits.root",
66
"InputHistoName": [
7-
"hmassfPt0_1_0.01%sp01%%sf01%",
8-
"hmassfPt1_2_0.02%sp12%%sf12%",
9-
"hmassfPt2_3_0.03%sp23%%sf23%",
10-
"hmassfPt3_4_0.04%sp34%%sf34%",
11-
"hmassfPt4_5_0.07%sp45%%sf45%",
12-
"hmassfPt5_6_0.10%sp56%%sf56%",
13-
"hmassfPt6_7_0.11%sp67%%sf67%",
14-
"hmassfPt7_8_0.15%sp78%%sf78%",
15-
"hmassfPt8_10_0.18%sp810%%sf810%",
16-
"hmassfPt10_12_0.25%sp1012%%sf1012%",
17-
"hmassfPt12_16_0.35%sp1216%%sf1216%",
18-
"hmassfPt16_24_0.35%sp1624%%sf1624%"
7+
"hmassfPt1_2_0.020.00%sf12%",
8+
"hmassfPt2_3_0.030.00%sf23%",
9+
"hmassfPt3_4_0.040.00%sf34%",
10+
"hmassfPt4_5_0.070.00%sf45%",
11+
"hmassfPt5_6_0.090.00%sf56%",
12+
"hmassfPt6_7_0.110.00%sf67%",
13+
"hmassfPt7_8_0.150.00%sf78%",
14+
"hmassfPt8_10_0.180.00%sf810%",
15+
"hmassfPt10_12_0.250.00%sf1012%",
16+
"hmassfPt12_16_0.350.00%sf1216%",
17+
"hmassfPt16_24_0.350.00%sf1624%"
1918
],
2019
"PromptHistoName": [
2120
"MC prompt histogram name array"
@@ -45,72 +44,40 @@
4544
"SigmaFile": "",
4645
"_SigmaFile": "fix sigma from file",
4746
"FixSigmaManual": [
48-
0.0086,
49-
0.0086,
50-
0.0075,
51-
0.0086,
5247
0.0090,
53-
0.0121,
54-
0.0116,
55-
0.0124,
56-
0.0141,
57-
0.0159,
58-
0.0167,
59-
0.0174
60-
],
61-
"_FixSigmaForCut": [
62-
0.0097,
63-
0.0082,
6448
0.0092,
65-
0.0104,
66-
0.0116,
67-
0.0134,
68-
0.0145,
69-
0.0162,
70-
0.0182,
71-
0.0204,
72-
0.0230,
73-
0.0263
49+
0.0102,
50+
0.0117,
51+
0.0120,
52+
0.0140,
53+
0.0156,
54+
0.0177,
55+
0.0190,
56+
0.0220,
57+
0.0220
7458
],
7559
"_FixSigmaManual": "fix sigma mannually",
76-
"FixSecondSigma": true,
60+
"FixMean": false,
61+
"MeanFile": "",
62+
"_MeanFile": "fix mean from file",
63+
"FixSecondSigma": false,
7764
"SecondSigmaFile": "",
7865
"_SecondSigmaFile": "fix second sigma for double gauss from file",
7966
"FixSecondSigmaManual": [
80-
0.0088,
81-
0.0088,
82-
0.0118,
83-
0.0141,
84-
0.0150,
85-
0.0309,
86-
0.0212,
87-
0.0205,
88-
0.0172,
89-
0.0369,
90-
0.0418,
91-
0.0385
67+
0.0092,
68+
0.0039,
69+
0.0188,
70+
0.0146,
71+
0.0196,
72+
0.0135,
73+
0.0090,
74+
0.0220,
75+
0.0220,
76+
0.0220,
77+
0.0220
9278
],
9379
"_FixSecondSigmaManual": "fix second sigma for double gauss manually",
94-
"FixMean": false,
95-
"MeanFile": "",
96-
"_MeanFile": "fix mean from file",
97-
"FixMeanManual": [
98-
2.28646,
99-
2.28646,
100-
2.28646,
101-
2.28646,
102-
2.28646,
103-
2.28646,
104-
2.28646,
105-
2.28646,
106-
2.28646,
107-
2.28646,
108-
2.28646,
109-
2.28646
110-
],
111-
"_FixMeanManual": "fix mean mannually",
11280
"PtMin": [
113-
0.0,
11481
1.0,
11582
2.0,
11683
3.0,
@@ -124,7 +91,6 @@
12491
16.0
12592
],
12693
"PtMax": [
127-
1.0,
12894
2.0,
12995
3.0,
13096
4.0,
@@ -138,39 +104,36 @@
138104
24.0
139105
],
140106
"MassMin": [
141-
2.226,
142-
2.226,
143-
2.21,
107+
2.216,
144108
2.20,
145109
2.19,
146-
2.19,
147-
2.19,
148-
2.17,
149-
2.11,
150-
2.11,
151-
2.11,
152-
2.11
110+
2.18,
111+
2.18,
112+
2.18,
113+
2.16,
114+
2.10,
115+
2.10,
116+
2.10,
117+
2.10
153118
],
154119
"MassMax": [
155-
2.35,
156-
2.35,
157120
2.36,
158121
2.37,
159-
2.39,
160-
2.39,
161-
2.39,
162-
2.41,
163-
2.45,
164-
2.45,
165-
2.45,
166-
2.45
122+
2.38,
123+
2.40,
124+
2.40,
125+
2.40,
126+
2.42,
127+
2.46,
128+
2.46,
129+
2.46,
130+
2.46
167131
],
168132
"Rebin": [
169133
2,
170134
2,
171135
2,
172136
2,
173-
2,
174137
3,
175138
3,
176139
3,
@@ -190,18 +153,17 @@
190153
"false: chi2 fit"
191154
],
192155
"BkgFunc": [
193-
5,
194-
5,
195-
5,
196-
5,
197-
5,
198-
5,
199-
5,
200-
5,
201-
5,
202-
5,
203-
5,
204-
5
156+
2,
157+
6,
158+
6,
159+
6,
160+
6,
161+
6,
162+
6,
163+
6,
164+
6,
165+
6,
166+
6
205167
],
206168
"_BkgFuncs": [
207169
"0 for Expo",
@@ -214,18 +176,17 @@
214176
"7 for NoBkg"
215177
],
216178
"SgnFunc": [
217-
1,
218-
1,
219-
1,
220-
1,
221-
1,
222-
1,
223-
1,
224-
1,
225-
1,
226-
1,
227-
1,
228-
1
179+
0,
180+
0,
181+
0,
182+
0,
183+
0,
184+
0,
185+
0,
186+
0,
187+
0,
188+
0,
189+
0
229190
],
230191
"_SgnFuncs": [
231192
"0 for SingleGaus",

PWGHF/D2H/Macros/run-fitter-batch.sh

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
#!/bin/bash
22

33
INPUT_DIR="/data8/majak/MLHEP/input-d2h-fitter-012025"
4-
INPUT_PATTERN="${INPUT_DIR}/projections-"
4+
INPUT_PATTERN="${INPUT_DIR}/projections_"
55

6-
CONFIG="config_massfitter_prompt"
6+
CONFIG="config_massfitter"
77
CONFIG_EXT="${CONFIG}.json"
8-
PERM_PATTERN="prompt"
8+
PERM_PATTERN="fd_"
99

10-
#nprobs=(0.550 0.550 0.500 0.350 0.350 0.350 0.350 0.350 0.350 0.350 0.350 0.350)
11-
#pprobs=(0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00)
12-
nprobs=(0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000)
13-
pprobs=(0.40 0.40 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25)
14-
15-
RES_SUFFIX="-cheb"
10+
RES_SUFFIX="-mix-fixed-sigma-120-190"
1611
#RES_SUFFIX="-figure"
1712

18-
for dir in ${INPUT_PATTERN}${PERM_PATTERN}* ; do
13+
for dir in ${INPUT_PATTERN}${PERM_PATTERN}0.7[0-9][0-9]* ; do
1914
echo $dir
2015

2116
suffix=${dir##${INPUT_PATTERN}}
@@ -28,11 +23,11 @@ for dir in ${INPUT_PATTERN}${PERM_PATTERN}* ; do
2823
suffix_no_ext_ext=${suffix_no_ext##${PERM_PATTERN}}
2924
echo "sufix no ext ext ${suffix_no_ext_ext}"
3025

31-
#IFS='_' read -ra probs <<< "${suffix_no_ext_ext}"
32-
#echo "fd ${probs[0]}"
26+
IFS='_' read -ra probs <<< "${suffix_no_ext_ext}"
27+
echo "fd ${probs[0]}"
3328

3429
#echo "bkg ${probs[1]} ${probs[2]}"
35-
echo "fd ${nprobs[0]} ${nprobs[1]} ${nprobs[2]} ${nprobs[3]} ${nprobs[4]} ${nprobs[5]} ${nprobs[6]} ${nprobs[7]} ${nprobs[8]} ${nprobs[9]} ${nprobs[10]} ${nprobs[11]}"
30+
#echo "fd ${nprobs[0]} ${nprobs[1]} ${nprobs[2]} ${nprobs[3]} ${nprobs[4]} ${nprobs[5]} ${nprobs[6]} ${nprobs[7]} ${nprobs[8]} ${nprobs[9]} ${nprobs[10]} ${nprobs[11]}"
3631

3732
RESDIR="results_${suffix_no_ext}${RES_SUFFIX}"
3833
RESPATH="/data8/majak/d2h-fitter/0125/${RESDIR}"
@@ -42,34 +37,21 @@ for dir in ${INPUT_PATTERN}${PERM_PATTERN}* ; do
4237
cp "${CONFIG_EXT}" "${CUR_CFG}"
4338

4439
sed -i "s/%indir%/${INPUT_DIR//\//\\/}/g" "${CUR_CFG}" || exit 1
45-
sed -i "s/%infile%/projections-${suffix}/g" "${CUR_CFG}" || exit 1
40+
sed -i "s/%infile%/projections_${suffix}/g" "${CUR_CFG}" || exit 1
4641
sed -i "s/%outdir%/${RESPATH//\//\\/}/g" "${CUR_CFG}" || exit 1
4742

48-
sed -i "s/%sf01%/${nprobs[0]}/g" "${CUR_CFG}" || exit 1
49-
sed -i "s/%sf12%/${nprobs[1]}/g" "${CUR_CFG}" || exit 1
50-
sed -i "s/%sf23%/${nprobs[2]}/g" "${CUR_CFG}" || exit 1
51-
sed -i "s/%sf34%/${nprobs[3]}/g" "${CUR_CFG}" || exit 1
52-
sed -i "s/%sf45%/${nprobs[4]}/g" "${CUR_CFG}" || exit 1
53-
sed -i "s/%sf56%/${nprobs[5]}/g" "${CUR_CFG}" || exit 1
54-
sed -i "s/%sf67%/${nprobs[6]}/g" "${CUR_CFG}" || exit 1
55-
sed -i "s/%sf78%/${nprobs[7]}/g" "${CUR_CFG}" || exit 1
56-
sed -i "s/%sf810%/${nprobs[8]}/g" "${CUR_CFG}" || exit 1
57-
sed -i "s/%sf1012%/${nprobs[9]}/g" "${CUR_CFG}" || exit 1
58-
sed -i "s/%sf1216%/${nprobs[10]}/g" "${CUR_CFG}" || exit 1
59-
sed -i "s/%sf1624%/${nprobs[11]}/g" "${CUR_CFG}" || exit 1
60-
61-
sed -i "s/%sp01%/${pprobs[0]}/g" "${CUR_CFG}" || exit 1
62-
sed -i "s/%sp12%/${pprobs[1]}/g" "${CUR_CFG}" || exit 1
63-
sed -i "s/%sp23%/${pprobs[2]}/g" "${CUR_CFG}" || exit 1
64-
sed -i "s/%sp34%/${pprobs[3]}/g" "${CUR_CFG}" || exit 1
65-
sed -i "s/%sp45%/${pprobs[4]}/g" "${CUR_CFG}" || exit 1
66-
sed -i "s/%sp56%/${pprobs[5]}/g" "${CUR_CFG}" || exit 1
67-
sed -i "s/%sp67%/${pprobs[6]}/g" "${CUR_CFG}" || exit 1
68-
sed -i "s/%sp78%/${pprobs[7]}/g" "${CUR_CFG}" || exit 1
69-
sed -i "s/%sp810%/${pprobs[8]}/g" "${CUR_CFG}" || exit 1
70-
sed -i "s/%sp1012%/${pprobs[9]}/g" "${CUR_CFG}" || exit 1
71-
sed -i "s/%sp1216%/${pprobs[10]}/g" "${CUR_CFG}" || exit 1
72-
sed -i "s/%sp1624%/${pprobs[11]}/g" "${CUR_CFG}" || exit 1
43+
sed -i "s/%sf01%/${probs[0]}/g" "${CUR_CFG}" || exit 1
44+
sed -i "s/%sf12%/${probs[0]}/g" "${CUR_CFG}" || exit 1
45+
sed -i "s/%sf23%/${probs[0]}/g" "${CUR_CFG}" || exit 1
46+
sed -i "s/%sf34%/${probs[0]}/g" "${CUR_CFG}" || exit 1
47+
sed -i "s/%sf45%/${probs[0]}/g" "${CUR_CFG}" || exit 1
48+
sed -i "s/%sf56%/${probs[0]}/g" "${CUR_CFG}" || exit 1
49+
sed -i "s/%sf67%/${probs[0]}/g" "${CUR_CFG}" || exit 1
50+
sed -i "s/%sf78%/${probs[0]}/g" "${CUR_CFG}" || exit 1
51+
sed -i "s/%sf810%/${probs[0]}/g" "${CUR_CFG}" || exit 1
52+
sed -i "s/%sf1012%/${probs[0]}/g" "${CUR_CFG}" || exit 1
53+
sed -i "s/%sf1216%/${probs[0]}/g" "${CUR_CFG}" || exit 1
54+
sed -i "s/%sf1624%/${probs[0]}/g" "${CUR_CFG}" || exit 1
7355

7456
root -b -l -q -x "HFInvMassFitter.cxx" runMassFitter.C\(\"${CUR_CFG}\"\)
7557
done

0 commit comments

Comments
 (0)