Skip to content

Commit 67da56d

Browse files
authored
Major configuration update (#513)
1 parent d22d36c commit 67da56d

File tree

13 files changed

+1300
-801
lines changed

13 files changed

+1300
-801
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,9 @@ megalinter-reports/
66
.DS_Store
77
.mypy_cache/
88
github_conf/
9+
output_*
10+
list_*.txt
11+
script_*.sh
12+
ListOutToMerge*.txt
13+
dpl-config*_edit.json
14+
workflows_edit.yml

codeHF/RunHFTaskLocal.C

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@
1313

1414
#include "../exec/utilitiesAli.h"
1515

16+
#ifdef __CLING__
17+
// Tell ROOT where to find AliRoot headers
18+
R__ADD_INCLUDE_PATH($ALICE_ROOT)
19+
// Tell ROOT where to find AliPhysics headers
20+
R__ADD_INCLUDE_PATH($ALICE_PHYSICS)
21+
22+
#include "PWGPP/PilotTrain/AddTaskCDBconnect.C"
23+
24+
#endif
25+
1626
Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt",
1727
TString jsonfilename = "dpl-config_std.json",
1828
Bool_t isMC = kFALSE,
@@ -54,6 +64,10 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt",
5464
mgr->SetMCtruthEventHandler(handler);
5565
}
5666

67+
// CDBconnect task
68+
AliTaskCDBconnect* taskCDB = AddTaskCDBconnect();
69+
taskCDB->SetFallBackToRaw(kTRUE);
70+
5771
// Apply the event selection
5872
AliPhysicsSelectionTask* physSelTask = reinterpret_cast<AliPhysicsSelectionTask*>(gInterpreter->ProcessLine(Form(".x %s(%d)", gSystem->ExpandPathName("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C"), isMC)));
5973

codeHF/config_input.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,12 +151,12 @@ case $INPUT_CASE in
151151
INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_1_2=1"
152152
;;
153153
17)
154-
INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass7"
155-
INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass7"
154+
INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass4_minBias_small"
155+
INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass4_minBias_small"
156156
INPUT_FILES="AO2D.root"
157157
INPUT_RUN=3
158158
INPUT_IS_O2=1
159159
INPUT_IS_MC=0
160-
INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_1_2=1"
160+
INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1"
161161
;;
162162
esac

codeHF/config_tasks.sh

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

codeHF/config_tasks_run5.sh

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#!/bin/bash
2+
# shellcheck disable=SC2034 # Ignore unused parameters.
3+
4+
DATABASE_O2="workflows_run5.yml" # Workflow specification database
5+
6+
# Activation of O2 workflows
7+
DOO2_CAND_X=0 # hf-candidate-creator-x
8+
DOO2_CAND_CHIC=0 # hf-candidate-creator-chic
9+
DOO2_CAND_XICC=0 # hf-candidate-creator-xicc
10+
# Selectors
11+
DOO2_SEL_JPSI=0 # hf-candidate-selector-jpsi
12+
DOO2_SEL_X=0 # hf-candidate-selector-x-to-jpsi-pi-pi
13+
DOO2_SEL_CHIC=0 # hf-candidate-selector-chic-to-jpsi-gamma
14+
DOO2_SEL_XICC=0 # hf-candidate-selector-xicc-to-p-k-pi-pi
15+
# Analysis tasks
16+
DOO2_TASK_JPSI=0 # hf-task-jpsi
17+
DOO2_TASK_X=0 # hf-task-x
18+
DOO2_TASK_CHIC=0 # hf-task-chic
19+
DOO2_TASK_XICC=0 # hf-task-xicc
20+
# Tree creators
21+
DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi
22+
DOO2_TREE_CHIC=0 # hf-tree-creator-chic-to-jpsi-gamma
23+
DOO2_TREE_XICC=0 # hf-tree-creator-xicc-to-p-k-pi-pi
24+
# QA
25+
DOO2_REJ_ALICE3=0 # hf-task-qa-pid-rejection
26+
27+
# Selection cuts
28+
APPLYCUTS_JPSI=0 # Apply J/ψ selection cuts.
29+
APPLYCUTS_X=0 # Apply X selection cuts.
30+
APPLYCUTS_CHIC=0 # Apply χc(1p) selection cuts.
31+
APPLYCUTS_XICC=0 # Apply Ξcc selection cuts.
32+
33+
####################################################################################################
34+
35+
# Modify the JSON file.
36+
function AdjustJson {
37+
# Enable J/ψ selection.
38+
if [ $APPLYCUTS_JPSI -eq 1 ]; then
39+
MsgWarn "Using J/ψ selection cuts"
40+
ReplaceString "\"selectionFlagJpsi\": \"0\"" "\"selectionFlagJpsi\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
41+
fi
42+
43+
# Enable X(3872) selection.
44+
if [ $APPLYCUTS_X -eq 1 ]; then
45+
MsgWarn "Using X(3872) selection cuts"
46+
ReplaceString "\"selectionFlagX\": \"0\"" "\"selectionFlagX\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
47+
fi
48+
49+
# Enable χc(1p) selection.
50+
if [ $APPLYCUTS_CHIC -eq 1 ]; then
51+
MsgWarn "Using χc(1p) selection cuts"
52+
ReplaceString "\"selectionFlagChic\": \"0\"" "\"selectionFlagChic\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
53+
fi
54+
55+
# Enable Ξcc selection.
56+
if [ $APPLYCUTS_XICC -eq 1 ]; then
57+
MsgWarn "Using Ξcc selection cuts"
58+
ReplaceString "\"selectionFlagXicc\": \"0\"" "\"selectionFlagXicc\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
59+
fi
60+
}
61+
62+
# Generate the O2 script containing the full workflow specification.
63+
function MakeScriptO2 {
64+
WORKFLOWS=""
65+
# Vertexing
66+
[ $DOO2_CAND_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-x"
67+
[ $DOO2_CAND_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-chic"
68+
[ $DOO2_CAND_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xicc"
69+
# Selectors
70+
[ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-jpsi${SUFFIX_RUN}"
71+
[ $DOO2_SEL_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-x-to-jpsi-pi-pi"
72+
[ $DOO2_SEL_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma"
73+
[ $DOO2_SEL_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-xicc-to-p-k-pi-pi"
74+
# Analysis tasks
75+
[ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi"
76+
[ $DOO2_TASK_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-x"
77+
[ $DOO2_TASK_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-chic"
78+
[ $DOO2_TASK_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-xicc"
79+
# Tree creators
80+
[ $DOO2_TREE_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-x-to-jpsi-pi-pi"
81+
[ $DOO2_TREE_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-chic-to-jpsi-gamma"
82+
[ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi"
83+
# QA
84+
[ $DOO2_REJ_ALICE3 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-qa-pid-rejection"
85+
}
86+
87+
function MakeScriptPostprocess {
88+
# Compare AliPhysics and O2 histograms.
89+
[[ $DOALI -eq 1 && $DOO2 -eq 1 ]] && {
90+
OPT_COMPARE=""
91+
[ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi "
92+
}
93+
# Plot particle reconstruction efficiencies.
94+
[[ $DOO2 -eq 1 && $INPUT_IS_MC -eq 1 ]] && {
95+
PARTICLES=""
96+
[ $DOO2_TASK_JPSI -eq 1 ] && PARTICLES+=" jpsi "
97+
[ $DOO2_TASK_XICC -eq 1 ] && PARTICLES+=" xicc-mc "
98+
}
99+
}

0 commit comments

Comments
 (0)