Skip to content

Commit fd10c87

Browse files
AxelPuntkeAxel Puntke
andauthored
Json Config Implementation (#24)
* Add JSON support for PFSimple configuration * merge * Add new options * Add Omegastar config * Update configs * Bugfix * Update json configs * Add AnalysisTree post cuts in JSON implementation * Update readme * Addes Susannes corrections for Readme * Incorporate changes from zoom-session with Susanne * Update configs * Add signal-only option * Delete obsolete configs * Incorporate Susannes Change Requests * Update configs * Changed style of saving options in io block * Beautify template config * Update configs * Add root include directories to main_json * Clang format --------- Co-authored-by: Axel Puntke <axel.puntke@uni-muenster.de>
1 parent aaac3ce commit fd10c87

22 files changed

+1214
-262
lines changed

README.md

Lines changed: 144 additions & 144 deletions
Large diffs are not rendered by default.

at_interface/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ add_dependencies(main KFMan)
2626
add_target_property(main COMPILE_FLAGS "-DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS")
2727
target_link_libraries(main KFMan KFParticleSimple KFParticleInterface KFParticle Vc)
2828

29+
add_executable(main_json main_json.cpp)
30+
add_dependencies(main_json KFMan)
31+
add_target_property(main_json COMPILE_FLAGS "-DDO_TPCCATRACKER_EFF_PERFORMANCE -DNonhomogeneousField -DCBM -DUSE_TIMERS")
32+
target_include_directories(main_json PRIVATE ${ROOT_INCLUDE_DIRS})
33+
target_link_libraries(main_json KFMan KFParticleSimple KFParticleInterface KFParticle Vc)
34+
2935
install(TARGETS KFMan EXPORT KFManTargets
3036
LIBRARY DESTINATION lib
3137
ARCHIVE DESTINATION lib
@@ -49,4 +55,4 @@ install(
4955
lib
5056
OPTIONAL
5157
)
52-
install (TARGETS main RUNTIME DESTINATION bin)
58+
install (TARGETS main main_json RUNTIME DESTINATION bin)
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"io" : {
3+
"input_treename" : "pTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
4+
"rectracks_branchname" : "RecTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
5+
"n_events" : -1,
6+
"save_options": ["make_plain_tree"]
7+
},
8+
"pid_mode" : 1, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
9+
// for 2-4: Pid-framework needs to be applied first
10+
"decays" : [
11+
{
12+
"mother" : {
13+
"name" : "H3L",
14+
"pdg_code" : 3004,
15+
"cuts" : {
16+
"LdL" : 10.0,
17+
"dist" : 0.2,
18+
"distSV" : 0.2 //for 3-body decay
19+
}
20+
},
21+
"daughters" : [
22+
{
23+
"pdg_code" : [2212],
24+
"cuts" : {"chi2prim" : 18.42}
25+
},
26+
{
27+
"pdg_code" : [-211],
28+
"cuts" : {"chi2prim" : 18.42}
29+
},
30+
{
31+
"pdg_code" : [1000010020],
32+
"cuts" : {"chi2prim" : 10.0}
33+
}
34+
],
35+
"secondary_mother_cuts" : { // for 3-body decay
36+
// daugher 1 & 2, daughter 1 & 3, daughter 2 & 3
37+
"chi2geo" : [3.0],
38+
"chi2topo" : [2.0]
39+
}
40+
}
41+
]
42+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"io" : {
3+
"input_treename" : "pTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
4+
"rectracks_branchname" : "RecTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
5+
"n_events" : -1,
6+
"save_options": ["make_plain_tree"]
7+
},
8+
"pid_mode" : 4, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
9+
// for 2-4: Pid-framework needs to be applied first
10+
"pid_purity" : { // this block is only needed in pid_mode > 2
11+
"all_pdgs" : 0.5,
12+
"protons" : 0.7,
13+
"pions" : 0.7,
14+
"kaons" : 0.7,
15+
"deuterons" : 0.2,
16+
"background" : 0.7
17+
},
18+
"decays" : [
19+
{
20+
"mother" : {
21+
"name" : "H3L",
22+
"pdg_code" : 3004,
23+
"cuts" : {
24+
"LdL" : 10.0,
25+
"dist" : 0.2,
26+
"distSV" : 0.2 //for 3-body decay
27+
}
28+
},
29+
"daughters" : [
30+
{
31+
"pdg_code" : [2212],
32+
"cuts" : {"chi2prim" : 18.42}
33+
},
34+
{
35+
"pdg_code" : [-211],
36+
"cuts" : {"chi2prim" : 18.42}
37+
},
38+
{
39+
"pdg_code" : [1000010020],
40+
"cuts" : {"chi2prim" : 10.0}
41+
}
42+
],
43+
"secondary_mother_cuts" : { // for 3-body decay
44+
// daugher 1 & 2, daughter 1 & 3, daughter 2 & 3
45+
"chi2geo" : [3.0],
46+
"chi2topo" : [2.0]
47+
}
48+
}
49+
]
50+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"io" : {
3+
"input_treename" : "pTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
4+
"rectracks_branchname" : "RecTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
5+
"n_events" : -1,
6+
"save_options": ["make_plain_tree"]
7+
},
8+
"pid_mode" : 1, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
9+
// for 2-4: Pid-framework needs to be applied first
10+
"decays" : [
11+
{
12+
"mother" : {
13+
"name" : "He5L",
14+
"pdg_code" : 3007,
15+
"cuts" : {
16+
"LdL" : 5.0,
17+
"dist" : 1.0,
18+
"chi2geo" : 6.0,
19+
"chi2topo" : 5.0
20+
}
21+
},
22+
"daughters" : [
23+
{
24+
"pdg_code" : [1000020040],
25+
"cuts" : {"chi2prim" : 18.42}
26+
},
27+
{
28+
"pdg_code" : [-211],
29+
"cuts" : {"chi2prim" : 18.42}
30+
},
31+
{
32+
"pdg_code" : [2212],
33+
"cuts" : {"chi2prim" : 18.42}
34+
}
35+
],
36+
"secondary_mother_cuts" : { // for 3-body decay
37+
// daugher 1 & 2, daughter 1 & 3, daughter 2 & 3
38+
"chi2geo" : [3.0]
39+
}
40+
}
41+
]
42+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"io" : {
3+
"input_treename" : "rTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
4+
"rectracks_branchname" : "VtxTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
5+
"n_events" : -1
6+
},
7+
"pid_mode" : 1, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
8+
// for 2-4: Pid-framework needs to be applied first
9+
"decays" : [
10+
{
11+
"mother" : {
12+
"name" : "Lambda",
13+
"pdg_code" : 3122,
14+
"cuts" : {
15+
"dist" : 1,
16+
"chi2geo" : 3,
17+
"LdL" : 5
18+
}
19+
},
20+
"daughters" : [
21+
{
22+
"pdg_code" : [-211],
23+
"cuts" : {"chi2prim" : 18.42}
24+
},
25+
{
26+
"pdg_code" : [2212],
27+
"cuts" : {"chi2prim" : 18.42}
28+
}
29+
]
30+
},
31+
{
32+
"mother" : {
33+
"name" : "K0Short",
34+
"pdg_code" : 310,
35+
"cuts" : {
36+
"dist" : 1,
37+
"chi2geo" : 3,
38+
"LdL" : 5
39+
}
40+
},
41+
"daughters" : [
42+
{
43+
"pdg_code" : [-211],
44+
"cuts" : {"chi2prim" : 18.42}
45+
},
46+
{
47+
"pdg_code" : [211],
48+
"cuts" : {"chi2prim" : 18.42}
49+
}
50+
]
51+
}
52+
]
53+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"io" : {
3+
"input_treename" : "rTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
4+
"rectracks_branchname" : "VtxTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
5+
"n_events" : -1,
6+
"save_options": ["make_plain_tree"]
7+
},
8+
"pid_mode" : 0, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
9+
// for 2-4: Pid-framework needs to be applied first
10+
"decays" : [
11+
{
12+
"mother" : {
13+
"name" : "Lambda",
14+
"pdg_code" : 3122,
15+
"cuts" : {
16+
"LdL" : 5.0,
17+
"dist" : 1.0,
18+
"chi2geo" : 3.0
19+
}
20+
},
21+
"daughters" : [
22+
{
23+
"pdg_code" : [-211, -1],
24+
"cuts" : {"chi2prim" : 18.42}
25+
},
26+
{
27+
"pdg_code" : [2212, 1],
28+
"cuts" : {"chi2prim" : 18.42}
29+
}
30+
]
31+
}
32+
]
33+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//(Lambda pid 1, cuts from KFParticle)
2+
{
3+
"io" : {
4+
"input_treename" : "rTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
5+
"rectracks_branchname" : "VtxTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
6+
"n_events" : -1,
7+
"save_options": ["make_plain_tree"]
8+
},
9+
"pid_mode" : 1, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
10+
// for 2-4: Pid-framework needs to be applied first
11+
"decays" : [
12+
{
13+
"mother" : {
14+
"name" : "Lambda",
15+
"pdg_code" : 3122,
16+
"cuts" : {
17+
"LdL" : 5.0,
18+
"dist" : 1.0,
19+
"chi2geo" : 3.0
20+
}
21+
},
22+
"daughters" : [
23+
{
24+
"pdg_code" : [-211],
25+
"cuts" : {"chi2prim" : 18.42}
26+
},
27+
{
28+
"pdg_code" : [2212],
29+
"cuts" : {"chi2prim" : 18.42}
30+
}
31+
]
32+
}
33+
]
34+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//(Lambda pid 1, cuts optimized)
2+
{
3+
"io" : {
4+
"input_treename" : "rTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
5+
"rectracks_branchname" : "VtxTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
6+
"n_events" : -1,
7+
"save_options": ["make_plain_tree"]
8+
},
9+
"pid_mode" : 1, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
10+
// for 2-4: Pid-framework needs to be applied first
11+
"decays" : [
12+
{
13+
"mother" : {
14+
"name" : "Lambda",
15+
"pdg_code" : 3122,
16+
"cuts" : {
17+
"LdL" : 4.0,
18+
"dist" : 0.15,
19+
"chi2geo" : 11.0,
20+
"chi2topo" : 29.0
21+
}
22+
},
23+
"daughters" : [
24+
{
25+
"pdg_code" : [-211],
26+
"cuts" : {"chi2prim" : 110.00}
27+
},
28+
{
29+
"pdg_code" : [2212],
30+
"cuts" : {"chi2prim" : 26.00, "cos" : 0.99825}
31+
}
32+
]
33+
}
34+
]
35+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"io" : {
3+
"input_treename" : "rTree", // "rTree" for standard analysistree, "pTree" after running PID-framework (for pid_mode > 2)
4+
"rectracks_branchname" : "VtxTracks", // "VtxTracks" for standard analyistree, "RecParticles" after running Pid-framework (for pid_mode > 2)
5+
"n_events" : -1,
6+
"save_options": ["signal_only"]
7+
},
8+
"pid_mode" : 1, // pid mode: =0: no pid; =1: mc pid; =2: rec pid (default); =3: rec pid (max. purity & purity > min. purity); =4 (purity > min. purity)
9+
// for 2-4: Pid-framework needs to be applied first
10+
"decays" : [
11+
{
12+
"mother" : {
13+
"name" : "Lambda",
14+
"pdg_code" : 3122,
15+
"cuts" : {
16+
"dist" : 100.0,
17+
"chi2geo" : 1000.0
18+
}
19+
},
20+
"daughters" : [
21+
{
22+
"pdg_code" : [-211]
23+
},
24+
{
25+
"pdg_code" : [2212]
26+
}
27+
]
28+
}
29+
],
30+
"output_cuts" : [
31+
{"var" : "mass", "from" : 1.07, "to" : 1.2},
32+
{"var" : "x", "from" : -50, "to" : 50},
33+
{"var" : "y", "from" : -50, "to" : 50},
34+
{"var" : "distance", "from" : 0, "to" : 100},
35+
{"var" : "eta", "from" : 1, "to" : 6.5},
36+
{"var" : "chi2_topo", "from" : 0, "to" : 100000},
37+
{"var" : "chi2_geo", "from" : 0, "to" : 1000}
38+
]
39+
}

0 commit comments

Comments
 (0)