Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LF cascade workflows. Disable selection flags. Update tables. Add missing V0 converter in input config. #462

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions codeHF/config_input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,54 +40,54 @@ case $INPUT_CASE in
1)
INPUT_LABEL="Run 2, p-p 5.02 TeV LHC17p, real"
INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/real/LHC17p_pass1_CENT_woSDD"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
2) # reference
INPUT_LABEL="Run 2, p-p 5.02 TeV LHC17p, MC LHC18a4a2_cent"
INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/sim/LHC18a4a2_cent/282099"
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
3)
INPUT_LABEL="Run 2, p-p 5.02 TeV LHC17p, MC LHC18a4a2_cent"
INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/sim/LHC18a4a2_cent/282341"
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
4)
INPUT_LABEL="Run 2, Pb-Pb 5.02 TeV LHC15o, real"
INPUT_DIR="$INPUT_BASE/Run2/PbPb_5.02TeV/real/LHC15o"
INPUT_SYS="PbPb"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
5)
INPUT_LABEL="Run 2, Pb-Pb 5.02 TeV LHC15o, MC LHC15k1a3"
INPUT_DIR="$INPUT_BASE/Run2/PbPb_5.02TeV/sim/LHC15k1a3"
INPUT_SYS="PbPb"
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
6)
INPUT_LABEL="Run 2, p-p 13 TeV LHC16p, MC LHC19g6f3, dedicated Ξc"
INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC19g6f3"
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
7)
INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o, real"
INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass4_minBias_small"
INPUT_FILES="AO2D.root"
INPUT_RUN=3
INPUT_IS_O2=1
INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
8)
INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22r, real, low interaction rate (100 kHz)"
INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22r"
INPUT_FILES="AO2D.root"
INPUT_RUN=3
INPUT_IS_O2=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1"
;;
9)
INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC21k6, general purpose"
Expand All @@ -96,28 +96,28 @@ case $INPUT_CASE in
INPUT_RUN=3
INPUT_IS_O2=1
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1"
;;
10)
INPUT_LABEL="Run 2, p-p 13 TeV LHC18f, MC LHC20f4a (ESD)"
INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC20f4a"
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
11)
INPUT_LABEL="Run 2, p-p 13 TeV LHC18f, MC LHC20f4a (AO2D)"
INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim_converted/LHC20f4a"
INPUT_FILES="AO2D.root"
INPUT_IS_O2=1
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1"
;;
12)
INPUT_LABEL="Run 2, p-p 13 TeV, LHC17j (AO2D)"
INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/real_converted/LHC17j_20220601" # converted good AO2Ds
INPUT_FILES="AO2D.root"
INPUT_IS_O2=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1"
;;
13)
INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC22b1b, D2H enriched"
Expand All @@ -126,7 +126,7 @@ case $INPUT_CASE in
INPUT_RUN=3
INPUT_IS_O2=1
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
14)
INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC23f4b2, general purpose"
Expand All @@ -135,7 +135,7 @@ case $INPUT_CASE in
INPUT_RUN=3
INPUT_IS_O2=1
INPUT_IS_MC=1
INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1"
INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_TRKEX=1 DOO2_CONV_V0=1"
;;
15)
INPUT_LABEL="Run 3, Pb-Pb 5.36 TeV LHC23zzi_pass2"
Expand Down
24 changes: 20 additions & 4 deletions codeHF/config_tasks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ DOO2_CAND_XICC=0 # hf-candidate-creator-xicc
DOO2_CAND_B0=0 # hf-candidate-creator-b0
DOO2_CAND_BPLUS=0 # hf-candidate-creator-bplus
DOO2_CAND_DSTAR=0 # hf-candidate-creator-dstar
DOO2_CAND_XIC0OC0=0 # hf-candidate-creator-xic0-omegac0
# Selectors
DOO2_SEL_D0=0 # hf-candidate-selector-d0
DOO2_SEL_DS=0 # hf-candidate-selector-ds-to-k-k-pi
Expand All @@ -63,6 +64,7 @@ DOO2_SEL_XICC=0 # hf-candidate-selector-xicc-to-p-k-pi-pi
DOO2_SEL_B0=0 # hf-candidate-selector-b0-to-d-pi
DOO2_SEL_BPLUS=0 # hf-candidate-selector-bplus-to-d0-pi
DOO2_SEL_DSTAR=0 # hf-candidate-selector-dstar
DOO2_SEL_TOXIPI=0 # hf-candidate-selector-to-xi-pi
# Analysis tasks
DOO2_TASK_D0=1 # hf-task-d0
DOO2_TASK_DS=0 # hf-task-ds
Expand All @@ -77,7 +79,7 @@ DOO2_TASK_LCK0SP=0 # hf-task-lc-to-k0s-p
DOO2_TASK_XICC=0 # hf-task-xicc
DOO2_TASK_B0=0 # hf-task-b0
DOO2_TASK_BPLUS=0 # hf-task-bplus
DOO2_TASK_DSTAR=1 # hf-task-dstar-to-d0-pi
DOO2_TASK_DSTAR=0 # hf-task-dstar-to-d0-pi
# Tree creators
DOO2_TREE_D0=0 # hf-tree-creator-d0-to-k-pi
DOO2_TREE_LC=0 # hf-tree-creator-lc-to-p-k-pi (only Run 3)
Expand All @@ -87,6 +89,7 @@ DOO2_TREE_XICC=0 # hf-tree-creator-xicc-to-p-k-pi-pi
DOO2_TREE_CHIC=0 # hf-tree-creator-chic-to-jpsi-gamma
DOO2_TREE_BPLUS=0 # hf-tree-creator-bplus-to-d0-pi
DOO2_TREE_LCK0SP=0 # hf-tree-creator-lc-to-k0s-p
DOO2_TREE_TOXIPI=0 # hf-tree-creator-to-xi-pi
# Derived-data creators
DOO2_DATA_D0=0 # hf-derived-data-creator-d0-to-k-pi
DOO2_DATA_LC=0 # hf-derived-data-creator-lc-to-p-k-pi
Expand Down Expand Up @@ -192,21 +195,23 @@ function AdjustJson {
# MC
if [ "$INPUT_IS_MC" -eq 1 ]; then
MsgWarn "Using MC data"
ReplaceString "\"isMC\": \"false\"" "\"isMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMc\": \"false\"" "\"processMc\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMcStd\": \"false\"" "\"processMcStd\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMcWithDCAFitterAll\": \"false\"" "\"processMcWithDCAFitterAll\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMcWithDCAFitterN\": \"false\"" "\"processMcWithDCAFitterN\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMC\": \"false\"" "\"processMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"isMC\": \"false\"" "\"isMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processData\": \"true\"" "\"processData\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processDataStd\": \"true\"" "\"processDataStd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processDataWithDCAFitterN\": \"true\"" "\"processDataWithDCAFitterN\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
else
MsgWarn "Using real data"
ReplaceString "\"isMC\": \"true\"" "\"isMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMc\": \"true\"" "\"processMc\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMcStd\": \"true\"" "\"processMcStd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMcWithDCAFitterAll\": \"true\"" "\"processMcWithDCAFitterAll\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMcWithDCAFitterN\": \"true\"" "\"processMcWithDCAFitterN\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processMC\": \"true\"" "\"processMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"isMC\": \"true\"" "\"isMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processData\": \"false\"" "\"processData\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processDataStd\": \"false\"" "\"processDataStd\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processDataWithDCAFitterN\": \"false\"" "\"processDataWithDCAFitterN\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
Expand All @@ -233,6 +238,12 @@ function AdjustJson {
ReplaceString "\"processNoCascades\": \"true\"" "\"processNoCascades\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
fi

# hf-track-index-skim-creator-lf-cascades
if [[ $DOO2_CAND_XIC0OC0 -eq 1 || $DOO2_SEL_TOXIPI -eq 1 || $DOO2_TREE_TOXIPI -eq 1 ]]; then
ReplaceString "\"processLfCascades\": \"false\"" "\"processLfCascades\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
ReplaceString "\"processNoLfCascades\": \"true\"" "\"processNoLfCascades\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON."
fi

# timestamp-task
if [[ "$INPUT_IS_MC" -eq 1 && "$INPUT_RUN" -eq 2 ]]; then
ReplaceString "\"isRun2MC\": \"false\"" "\"isRun2MC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON."
Expand Down Expand Up @@ -399,7 +410,9 @@ function MakeScriptO2 {
SUFFIX_SKIM_MASK="_skimX" # suffix mask to be replaced in the workflow names
SUFFIX_SKIM="" # the actual suffix to be used instead of the mask
# Λc → K0S p cascade reconstruction
[[ $DOO2_CAND_CASC -eq 1 || $DOO2_SEL_LCK0SP -eq 1 || $DOO2_TASK_LCK0SP -eq 1 || $DOO2_TREE_LCK0SP -eq 1 ]] && SUFFIX_SKIM+="_v0"
[[ $DOO2_CAND_CASC -eq 1 || $DOO2_SEL_LCK0SP -eq 1 || $DOO2_TASK_LCK0SP -eq 1 || $DOO2_TREE_LCK0SP -eq 1 ]] && SUFFIX_SKIM="_v0"
# Ξc0/Ωc0 → Ξ π LF cascade reconstruction
[[ $DOO2_CAND_XIC0OC0 -eq 1 || $DOO2_SEL_TOXIPI -eq 1 || $DOO2_TREE_TOXIPI -eq 1 ]] && SUFFIX_SKIM="_casc-lf"

# Suffix to distinguish versions of the same workflow for different runs in the workflow database
SUFFIX_RUN_MASK="_runX" # suffix mask to be replaced in the workflow names
Expand All @@ -424,6 +437,7 @@ function MakeScriptO2 {
[ $DOO2_CAND_B0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-b0"
[ $DOO2_CAND_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-bplus"
[ $DOO2_CAND_DSTAR -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-dstar"
[ $DOO2_CAND_XIC0OC0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xic0-omegac0"
# Selectors
[ $DOO2_SEL_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-d0"
[ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-jpsi${SUFFIX_RUN}"
Expand All @@ -439,6 +453,7 @@ function MakeScriptO2 {
[ $DOO2_SEL_B0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-b0-to-d-pi"
[ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi"
[ $DOO2_SEL_DSTAR -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-dstar-to-d0-pi"
[ $DOO2_SEL_TOXIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-to-xi-pi"
# Analysis tasks
[ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0"
[ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi"
Expand All @@ -463,6 +478,7 @@ function MakeScriptO2 {
[ $DOO2_TREE_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-chic-to-jpsi-gamma"
[ $DOO2_TREE_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-bplus-to-d0-pi"
[ $DOO2_TREE_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-lc-to-k0s-p"
[ $DOO2_TREE_TOXIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-to-xi-pi"
# Derive-data creators
[ $DOO2_DATA_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-d0-to-k-pi"
[ $DOO2_DATA_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-lc-to-p-k-pi"
Expand Down
Loading
Loading