diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 1ee0ffb4..af4539e4 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -57,6 +57,7 @@ case $INPUT_CASE in INPUT_FILES="AODRun5.*.root" JSON="$JSONRUN5_HF" ISINPUTO2=1 + ISALICE3=1 ISMC=1;; 8) INPUT_LABEL="Run 5, p-p MC 14 TeV Inel, Scenario 3, onia analysis" @@ -64,6 +65,7 @@ case $INPUT_CASE in INPUT_FILES="AODRun5.*.root" JSON="$JSONRUN5_ONIAX" ISINPUTO2=1 + ISALICE3=1 ISMC=1;; 9) INPUT_LABEL="Run 5, p-p MC 14 TeV OniaX-enriched, Scenario 3, oniaX analysis" @@ -71,6 +73,7 @@ case $INPUT_CASE in INPUT_FILES="AODRun5.*.root" JSON="$JSONRUN5_ONIAX" ISINPUTO2=1 + ISALICE3=1 ISMC=1;; 10) INPUT_LABEL="Run 5, p-p MC 14 TeV LctopKpi-enriched, Scenario 3, HF analysis" @@ -78,6 +81,7 @@ case $INPUT_CASE in INPUT_FILES="AODRun5.*.root" JSON="$JSONRUN5_HF" ISINPUTO2=1 + ISALICE3=1 ISMC=1;; 11) INPUT_LABEL="Run 5, Kr-Kr MC 6.460 TeV Inel, Scenario 3, HF analysis" @@ -85,6 +89,7 @@ case $INPUT_CASE in INPUT_FILES="AODRun5.*.root" JSON="$JSONRUN5_HF" ISINPUTO2=1 + ISALICE3=1 ISMC=1;; 12) INPUT_LABEL="Run 5, p-p MC 14 TeV OniaX-enriched, Scenario 3, oniaX analysis MUON ID" @@ -92,5 +97,6 @@ case $INPUT_CASE in INPUT_FILES="AODRun5.*.root" JSON="$JSONRUN5_ONIAX" ISINPUTO2=1 + ISALICE3=1 ISMC=1;; esac diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 1fc131bd..f0a4dc8a 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -157,6 +157,8 @@ function MakeScriptO2 { [ $DOO2_CASC -eq 1 ] && SUFFIX_CASC="-v0" || SUFFIX_CASC="" # Event selection [ $DOO2_EVSEL -eq 1 ] && SUFFIX_EVSEL="-evsel" || SUFFIX_EVSEL="" + # ALICE 3 input + [ "$ISALICE3" -eq 1 ] && SUFFIX_ALICE3="-alice3" || SUFFIX_ALICE3="" WORKFLOWS="" # QA @@ -169,15 +171,16 @@ function MakeScriptO2 { [ $DOO2_PID_TOF -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tof-full" [ $DOO2_PID_TOF_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tof-qa-mc" # Vertexing - WF_SKIM="o2-analysis-hf-track-index-skims-creator${SUFFIX_EVSEL}${SUFFIX_CASC}" - [ $DOO2_SKIM -eq 1 ] && WORKFLOWS+=" $WF_SKIM" + WF_SKIM="o2-analysis-hf-track-index-skims-creator" + [ $DOO2_SKIM -eq 1 ] && WORKFLOWS+=" ${WF_SKIM}${SUFFIX_EVSEL}${SUFFIX_CASC}" [ $DOO2_CAND_2PRONG -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-2prong" [ $DOO2_CAND_3PRONG -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-3prong" [ $DOO2_CAND_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-x" [ $DOO2_CAND_CASC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-cascade" # Selectors [ $DOO2_SEL_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-d0-candidate-selector" - [ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-jpsi-candidate-selector" + WF_SEL_JPSI="o2-analysis-hf-jpsi-candidate-selector" + [ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" ${WF_SEL_JPSI}${SUFFIX_ALICE3}" [ $DOO2_SEL_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-dplus-topikpi-candidate-selector" [ $DOO2_SEL_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-lc-candidate-selector" [ $DOO2_SEL_XIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-xic-topkpi-candidate-selector" @@ -205,13 +208,20 @@ function MakeScriptO2 { # Make a copy of the default workflow database file before modifying it. DATABASE_O2_EDIT="" - if [[ $DOO2_EVSEL -eq 1 || $DOO2_CASC -eq 1 ]]; then + if [[ $DOO2_EVSEL -eq 1 || $DOO2_CASC -eq 1 || "$ISALICE3" -eq 1 ]]; then DATABASE_O2_EDIT="${DATABASE_O2/.yml/_edit.yml}" cp "$DATABASE_O2" "$DATABASE_O2_EDIT" || ErrExit "Failed to cp $DATABASE_O2 $DATABASE_O2_EDIT." DATABASE_O2="$DATABASE_O2_EDIT" + # Adjust workflow database in case of ALICE 3 input. + [ "$ISALICE3" -eq 1 ] && { + ReplaceString "- $WF_SEL_JPSI" "- ${WF_SEL_JPSI}${SUFFIX_ALICE3}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." + } + # Adjust workflow database in case of event selection or cascades enabled. - ReplaceString "- o2-analysis-hf-track-index-skims-creator" "- $WF_SKIM" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." + [[ $DOO2_EVSEL -eq 1 || $DOO2_CASC -eq 1 ]] && { + ReplaceString "- $WF_SKIM" "- ${WF_SKIM}${SUFFIX_EVSEL}${SUFFIX_CASC}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." + } fi # Generate the O2 command. diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 245ff11a..2d92d0bf 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -69,7 +69,8 @@ workflows: o2-analysis-hf-candidate-creator-x: <<: *cand_creator - dependencies: o2-analysis-hf-jpsi-candidate-selector + dependencies: + - o2-analysis-hf-jpsi-candidate-selector tables: default: [HFCANDXBASE, HFCANDXEXT] mc: [HFCANDXMCREC, HFCANDXMCGEN] @@ -80,10 +81,15 @@ workflows: dependencies: [o2-analysis-hf-candidate-creator-2prong, o2-analysis-pid-tpc-full, o2-analysis-pid-tof-full] tables: HFSELD0CAND - o2-analysis-hf-jpsi-candidate-selector: + o2-analysis-hf-jpsi-candidate-selector: &selector_jpsi <<: *selector_2prong + executable: o2-analysis-hf-jpsi-candidate-selector tables: HFSELJPSICAND + o2-analysis-hf-jpsi-candidate-selector-alice3: + <<: *selector_jpsi + options: --isAlice3 + o2-analysis-hf-dplus-topikpi-candidate-selector: &selector_3prong dependencies: [o2-analysis-hf-candidate-creator-3prong, o2-analysis-pid-tpc-full, o2-analysis-pid-tof-full] tables: HFSELDPLUSCAND @@ -112,7 +118,8 @@ workflows: o2-analysis-hf-task-jpsi: <<: *task - dependencies: o2-analysis-hf-jpsi-candidate-selector + dependencies: + - o2-analysis-hf-jpsi-candidate-selector o2-analysis-hf-task-dplus: <<: *task diff --git a/exec/runtest.sh b/exec/runtest.sh index c73f223f..465fb9d3 100644 --- a/exec/runtest.sh +++ b/exec/runtest.sh @@ -25,6 +25,7 @@ INPUT_FILES="AliESDs.root" # Input file pattern JSON="dpl-config.json" # Tasks parameters ISINPUTO2=0 # Input files are in O2 format. ISMC=0 # Input files are MC data. +ISALICE3=0 # Input data from the ALICE 3 detectors. TRIGGERSTRINGRUN2="" # Run 2 trigger (not used) TRIGGERBITRUN3=-1 # Run 3 trigger (not used) NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.)