Skip to content
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ megalinter-reports/
.DS_Store
.mypy_cache/
github_conf/
output_*
list_*.txt
script_*.sh
ListOutToMerge*.txt
dpl-config*_edit.json
workflows_edit.yml
14 changes: 14 additions & 0 deletions codeHF/RunHFTaskLocal.C
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@

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

#ifdef __CLING__
// Tell ROOT where to find AliRoot headers
R__ADD_INCLUDE_PATH($ALICE_ROOT)
// Tell ROOT where to find AliPhysics headers
R__ADD_INCLUDE_PATH($ALICE_PHYSICS)

#include "PWGPP/PilotTrain/AddTaskCDBconnect.C"

#endif

Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt",
TString jsonfilename = "dpl-config_std.json",
Bool_t isMC = kFALSE,
Expand Down Expand Up @@ -54,6 +64,10 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt",
mgr->SetMCtruthEventHandler(handler);
}

// CDBconnect task
AliTaskCDBconnect* taskCDB = AddTaskCDBconnect();
taskCDB->SetFallBackToRaw(kTRUE);

// Apply the event selection
AliPhysicsSelectionTask* physSelTask = reinterpret_cast<AliPhysicsSelectionTask*>(gInterpreter->ProcessLine(Form(".x %s(%d)", gSystem->ExpandPathName("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C"), isMC)));

Expand Down
6 changes: 3 additions & 3 deletions codeHF/config_input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ case $INPUT_CASE in
INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_1_2=1"
;;
17)
INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass7"
INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass7"
INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass4_minBias_small"
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_IS_MC=0
INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_1_2=1"
INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1"
;;
esac
86 changes: 16 additions & 70 deletions codeHF/config_tasks.sh

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions codeHF/config_tasks_run5.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
#!/bin/bash
# shellcheck disable=SC2034 # Ignore unused parameters.

DATABASE_O2="workflows_run5.yml" # Workflow specification database

# Activation of O2 workflows
DOO2_CAND_X=0 # hf-candidate-creator-x
DOO2_CAND_CHIC=0 # hf-candidate-creator-chic
DOO2_CAND_XICC=0 # hf-candidate-creator-xicc
# Selectors
DOO2_SEL_JPSI=0 # hf-candidate-selector-jpsi
DOO2_SEL_X=0 # hf-candidate-selector-x-to-jpsi-pi-pi
DOO2_SEL_CHIC=0 # hf-candidate-selector-chic-to-jpsi-gamma
DOO2_SEL_XICC=0 # hf-candidate-selector-xicc-to-p-k-pi-pi
# Analysis tasks
DOO2_TASK_JPSI=0 # hf-task-jpsi
DOO2_TASK_X=0 # hf-task-x
DOO2_TASK_CHIC=0 # hf-task-chic
DOO2_TASK_XICC=0 # hf-task-xicc
# Tree creators
DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi
DOO2_TREE_CHIC=0 # hf-tree-creator-chic-to-jpsi-gamma
DOO2_TREE_XICC=0 # hf-tree-creator-xicc-to-p-k-pi-pi
# QA
DOO2_REJ_ALICE3=0 # hf-task-qa-pid-rejection

# Selection cuts
APPLYCUTS_JPSI=0 # Apply J/ψ selection cuts.
APPLYCUTS_X=0 # Apply X selection cuts.
APPLYCUTS_CHIC=0 # Apply χc(1p) selection cuts.
APPLYCUTS_XICC=0 # Apply Ξcc selection cuts.

####################################################################################################

# Modify the JSON file.
function AdjustJson {
# Enable J/ψ selection.
if [ $APPLYCUTS_JPSI -eq 1 ]; then
MsgWarn "Using J/ψ selection cuts"
ReplaceString "\"selectionFlagJpsi\": \"0\"" "\"selectionFlagJpsi\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
fi

# Enable X(3872) selection.
if [ $APPLYCUTS_X -eq 1 ]; then
MsgWarn "Using X(3872) selection cuts"
ReplaceString "\"selectionFlagX\": \"0\"" "\"selectionFlagX\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
fi

# Enable χc(1p) selection.
if [ $APPLYCUTS_CHIC -eq 1 ]; then
MsgWarn "Using χc(1p) selection cuts"
ReplaceString "\"selectionFlagChic\": \"0\"" "\"selectionFlagChic\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
fi

# Enable Ξcc selection.
if [ $APPLYCUTS_XICC -eq 1 ]; then
MsgWarn "Using Ξcc selection cuts"
ReplaceString "\"selectionFlagXicc\": \"0\"" "\"selectionFlagXicc\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON."
fi
}

# Generate the O2 script containing the full workflow specification.
function MakeScriptO2 {
WORKFLOWS=""
# Vertexing
[ $DOO2_CAND_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-x"
[ $DOO2_CAND_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-chic"
[ $DOO2_CAND_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xicc"
# Selectors
[ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-jpsi${SUFFIX_RUN}"
[ $DOO2_SEL_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-x-to-jpsi-pi-pi"
[ $DOO2_SEL_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma"
[ $DOO2_SEL_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-xicc-to-p-k-pi-pi"
# Analysis tasks
[ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi"
[ $DOO2_TASK_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-x"
[ $DOO2_TASK_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-chic"
[ $DOO2_TASK_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-xicc"
# Tree creators
[ $DOO2_TREE_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-x-to-jpsi-pi-pi"
[ $DOO2_TREE_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-chic-to-jpsi-gamma"
[ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi"
# QA
[ $DOO2_REJ_ALICE3 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-qa-pid-rejection"
}

function MakeScriptPostprocess {
# Compare AliPhysics and O2 histograms.
[[ $DOALI -eq 1 && $DOO2 -eq 1 ]] && {
OPT_COMPARE=""
[ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi "
}
# Plot particle reconstruction efficiencies.
[[ $DOO2 -eq 1 && $INPUT_IS_MC -eq 1 ]] && {
PARTICLES=""
[ $DOO2_TASK_JPSI -eq 1 ] && PARTICLES+=" jpsi "
[ $DOO2_TASK_XICC -eq 1 ] && PARTICLES+=" xicc-mc "
}
}
Loading