diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 1aecfca8..f4ed34c6 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -25,31 +25,45 @@ JSONRUN5_ONIAX="dpl-config_run5_oniaX.json" JSON="$JSONRUN3" INPUT_FILES="AliESDs.root" # Input file pattern +INPUT_SYS="" +INPUT_RUN=2 case $INPUT_CASE in 1) INPUT_LABEL="Run 2, p-p real LHC17p" - INPUT_DIR="/mnt/data/Run2/LHC17p_pass1_CENT_woSDD/282341";; + INPUT_DIR="/mnt/data/Run2/LHC17p_pass1_CENT_woSDD/282341" + INPUT_SYS="pp" + INPUT_RUN=2;; 2) INPUT_LABEL="Run 2, p-p MC LHC17p" INPUT_DIR="/mnt/data/Run2/LHC18a4a2_cent/282099" + INPUT_SYS="pp" + INPUT_RUN=2 ISMC=1;; 3) INPUT_LABEL="Run 2, p-p MC LHC17p" INPUT_DIR="/mnt/data/Run2/LHC18a4a2_cent/282341" + INPUT_SYS="pp" + INPUT_RUN=2 ISMC=1;; 4) INPUT_LABEL="Run 2, Pb-Pb real LHC15o" INPUT_DIR="/mnt/data/Run2/LHC15o/246751/pass1" + INPUT_SYS="PbPb" + INPUT_RUN=2 TRIGGERSTRINGRUN2="CV0L7-B-NOPF-CENT" TRIGGERBITRUN3=5;; #FIXME 5) INPUT_LABEL="Run 2, Pb-Pb MC LHC15o" INPUT_DIR="/mnt/data/Run2/LHC15k1a3/246391" + INPUT_SYS="PbPb" + INPUT_RUN=2 ISMC=1;; 6) INPUT_LABEL="Run 2, p-p MC LHC16p, dedicated Ξc" INPUT_DIR="/mnt/data/Run2/LHC19g6f3/264347" + INPUT_SYS="pp" + INPUT_RUN=2 ISMC=1;; 7) INPUT_LABEL="Run 5, p-p MC 14 TeV MB, Layout v1, HF analysis" diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index e979ac23..1b4292de 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -125,6 +125,50 @@ function AdjustJson { JSON="$JSON_EDIT" fi + # Set Run2/3/5 and MC switches + if [ "$ISMC" -eq 1 ] + then + MsgWarn "\nEnabling MC" + ReplaceString "\"processMC\": \"false\"" "\"processMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"isMC\": \"false\"" "\"isMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + if [ "$INPUT_RUN" -eq 2 ] + then + ReplaceString "\"isRun2MC\": \"false\"" "\"isRun2MC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + else + MsgWarn "\nUsing data" + ReplaceString "\"processMC\": \"true\"" "\"processMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"isMC\": \"true\"" "\"isMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + if [ "$INPUT_RUN" -eq 2 ] + then + ReplaceString "\"isRun2MC\": \"true\"" "\"isRun2MC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + fi + if [ -n "$INPUT_SYS" ] + then + ReplaceString "\"syst\": \"pp\"" "\"syst\": \"$INPUT_SYS\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + if [ -n "$INPUT_RUN" ] + then + if [ "$INPUT_RUN" -eq 2 ] + then + MsgWarn "\nUsing Run 2" + ReplaceString "\"processRun2\": \"false\"" "\"processRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"true\"" "\"processRun3\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + if [ "$INPUT_RUN" -eq 3 ] + then + MsgWarn "\nUsing Run 3" + ReplaceString "\"processRun2\": \"true\"" "\"processRun2\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"false\"" "\"processRun3\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + # do not use trigger selection for Run 3 + ReplaceString "\"processTrigSel\": \"true\"" "\"processTrigSel\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processNoTrigSel\": \"false\"" "\"processNoTrigSel\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + # do not perform track quality cuts for Run 3 until they are updated + ReplaceString "\"doCutQuality\": \"true\"" "\"doCutQuality\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + fi + # Enable D0 selection. if [ $APPLYCUTS_D0 -eq 1 ]; then MsgWarn "\nUsing D0 selection cuts" diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 915b7d82..edfe0f2f 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -6,6 +6,24 @@ "step-value-enumeration": "1", "aod-file": "@list_o2.txt" }, + "timestamp-task": { + "isRun2MC": "true" + }, + "bc-selection-task": { + "processRun2": "true", + "processRun3": "false" + }, + "event-selection-task": { + "syst": "pp", + "muonSelection": "0", + "isMC": "true", + "processRun2": "true", + "processRun3": "false" + }, + "track-extension": { + "processRun2": "true", + "processRun3": "false" + }, "hf-tag-sel-collisions": { "fillHistograms": "true", "xVertexMin": "-100", @@ -16,7 +34,9 @@ "zVertexMax": "100", "nContribMin": "0", "chi2Max": "0", - "triggerClassName": "kINT7" + "triggerClassName": "kINT7", + "processTrigSel": "true", + "processNoTrigSel": "false" }, "hf-tag-sel-tracks": { "fillHistograms": "true", @@ -176,6 +196,9 @@ "d_minrelchi2change": "0.9", "b_dovalplots": "true" }, + "hf-cand-creator-2prong-expressions": { + "processMC": "true" + }, "hf-cand-creator-3prong": { "d_bz": "5.", "b_propdca": "true", @@ -185,6 +208,9 @@ "d_minrelchi2change": "0.9", "b_dovalplots": "true" }, + "hf-cand-creator-3prong-expressions": { + "processMC": "true" + }, "hf-d0-candidate-selector": { "d_pTCandMin": "0.", "d_pTCandMax": "50.", @@ -464,12 +490,8 @@ "50", "100" ] - } - }, - "hf-task-d0-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0" + }, + "processMC": "true" }, "hf-task-dplus": { "cutYCandMax": "0.8", @@ -620,116 +642,8 @@ "9.9", "10.0" ] - } - }, - "hf-task-lc-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagLc": "0", - "pTBins": { - "values": [ - "0.0", - "0.1", - "0.2", - "0.3", - "0.4", - "0.5", - "0.6", - "0.7", - "0.8", - "0.9", - "1.0", - "1.1", - "1.2", - "1.3", - "1.4", - "1.5", - "1.6", - "1.7", - "1.8", - "1.9", - "2.0", - "2.1", - "2.2", - "2.3", - "2.4", - "2.5", - "2.6", - "2.7", - "2.8", - "2.9", - "3.0", - "3.1", - "3.2", - "3.3", - "3.4", - "3.5", - "3.6", - "3.7", - "3.8", - "3.9", - "4.0", - "4.1", - "4.2", - "4.3", - "4.4", - "4.5", - "4.6", - "4.7", - "4.8", - "4.9", - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "5.7", - "5.8", - "5.9", - "6.0", - "6.1", - "6.2", - "6.3", - "6.4", - "6.5", - "6.6", - "6.7", - "6.8", - "6.9", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "7.5", - "7.6", - "7.7", - "7.8", - "7.9", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4", - "8.5", - "8.6", - "8.7", - "8.8", - "8.9", - "9.0", - "9.1", - "9.2", - "9.3", - "9.4", - "9.5", - "9.6", - "9.7", - "9.8", - "9.9", - "10.0" - ] - } + }, + "processMC": "true" }, "hf-task-xic": { "cutEtaCandMax": "0.8", diff --git a/codeHF/dpl-config_run5_hf.json b/codeHF/dpl-config_run5_hf.json index 18fdad19..edae0afd 100644 --- a/codeHF/dpl-config_run5_hf.json +++ b/codeHF/dpl-config_run5_hf.json @@ -6,6 +6,24 @@ "step-value-enumeration": "1", "aod-file": "@list_o2.txt" }, + "timestamp-task": { + "isRun2MC": "false" + }, + "bc-selection-task": { + "processRun2": "false", + "processRun3": "true" + }, + "event-selection-task": { + "syst": "pp", + "muonSelection": "0", + "isMC": "true", + "processRun2": "false", + "processRun3": "true" + }, + "track-extension": { + "processRun2": "false", + "processRun3": "true" + }, "hf-tag-sel-collisions": { "fillHistograms": "true", "xVertexMin": "-100", @@ -16,7 +34,9 @@ "zVertexMax": "100", "nContribMin": "0", "chi2Max": "0", - "triggerClassName": "" + "triggerClassName": "", + "processTrigSel": "false", + "processNoTrigSel": "true" }, "hf-tag-sel-tracks": { "fillHistograms": "true", @@ -176,6 +196,9 @@ "d_minrelchi2change": "0.9", "b_dovalplots": "true" }, + "hf-cand-creator-2prong-expressions": { + "processMC": "true" + }, "hf-cand-creator-3prong": { "d_bz": "5.", "b_propdca": "true", @@ -185,6 +208,9 @@ "d_minrelchi2change": "0.9", "b_dovalplots": "true" }, + "hf-cand-creator-3prong-expressions": { + "processMC": "true" + }, "hf-cand-creator-xicc": { "d_bz": "20", "b_propdca": "true", @@ -552,12 +578,8 @@ "50", "100" ] - } - }, - "hf-task-d0-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0" + }, + "processMC": "true" }, "hf-task-dplus": { "cutYCandMax": "0.8", @@ -618,26 +640,8 @@ "24", "36" ] - } - }, - "hf-task-lc-mc": { - "cutYCandMax": "2.0", - "d_selectionFlagLc": "0", - "pTBins": { - "values": [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "8", - "12", - "24", - "36" - ] - } + }, + "processMC": "true" }, "hf-task-xic": { "cutEtaCandMax": "-1", diff --git a/codeHF/dpl-config_run5_oniaX.json b/codeHF/dpl-config_run5_oniaX.json index 231ba327..0a77241b 100644 --- a/codeHF/dpl-config_run5_oniaX.json +++ b/codeHF/dpl-config_run5_oniaX.json @@ -6,6 +6,24 @@ "step-value-enumeration": "1", "aod-file": "@list_o2.txt" }, + "timestamp-task": { + "isRun2MC": "false" + }, + "bc-selection-task": { + "processRun2": "false", + "processRun3": "true" + }, + "event-selection-task": { + "syst": "pp", + "muonSelection": "0", + "isMC": "true", + "processRun2": "false", + "processRun3": "true" + }, + "track-extension": { + "processRun2": "false", + "processRun3": "true" + }, "hf-tag-sel-collisions": { "fillHistograms": "true", "xVertexMin": "-100", @@ -16,7 +34,9 @@ "zVertexMax": "100", "nContribMin": "0", "chi2Max": "0", - "triggerClassName": "" + "triggerClassName": "", + "processTrigSel": "false", + "processNoTrigSel": "true" }, "hf-tag-sel-tracks": { "fillHistograms": "true", @@ -176,6 +196,9 @@ "d_minrelchi2change": "0.9", "b_dovalplots": "true" }, + "hf-cand-creator-2prong-expressions": { + "processMC": "true" + }, "hf-cand-creator-3prong": { "d_bz": "20.", "b_propdca": "true", @@ -185,6 +208,9 @@ "d_minrelchi2change": "0.9", "b_dovalplots": "true" }, + "hf-cand-creator-3prong-expressions": { + "processMC": "true" + }, "hf-d0-candidate-selector": { "d_pTCandMin": "0.", "d_pTCandMax": "50.", @@ -473,12 +499,8 @@ "50", "100" ] - } - }, - "hf-task-d0-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0" + }, + "processMC": "true" }, "hf-task-dplus": { "cutYCandMax": "0.8", @@ -539,11 +561,8 @@ "24", "36" ] - } - }, - "hf-task-lc-mc": { - "cutYCandMax": "2.0", - "d_selectionFlagLc": "0" + }, + "processMC": "true" }, "hf-task-xic": { "cutEtaCandMax": "0.8", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index e2ad3695..27506ba2 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -12,17 +12,19 @@ workflows: # Event selection - o2-analysis-timestamp: - options: - mc: "--isMC 1" + o2-analysis-timestamp: {} - o2-analysis-event-selection: - options: - mc: "--isMC 1" + o2-analysis-event-selection: {} # Skimming o2-analysis-hf-track-index-skims-creator: &skim_creator + dependencies: o2-analysis-trackextension + executable: o2-analysis-hf-track-index-skims-creator + tables: [HFSELTRACK, HFTRACKIDXP2, HFTRACKIDXP3] + + o2-analysis-hf-track-index-skims-creator-alice3: &skim_creator_alice3 + dependencies: o2-analysis-alice3-trackextension executable: o2-analysis-hf-track-index-skims-creator tables: [HFSELTRACK, HFTRACKIDXP2, HFTRACKIDXP3] @@ -49,8 +51,6 @@ workflows: o2-analysis-hf-candidate-creator-2prong: &cand_creator dependencies: - o2-analysis-hf-track-index-skims-creator - options: - mc: "--doMC" tables: default: [HFCANDP2BASE, HFCANDP2EXT] mc: [HFCANDP2MCREC, HFCANDP2MCGEN] @@ -61,8 +61,17 @@ workflows: default: [HFCANDP3BASE, HFCANDP3EXT] mc: [HFCANDP3MCREC, HFCANDP3MCGEN] + o2-analysis-hf-candidate-creator-3prong-alice3: + dependencies: + - o2-analysis-hf-track-index-skims-creator-alice3 + tables: + default: [HFCANDP3BASE, HFCANDP3EXT] + mc: [HFCANDP3MCREC, HFCANDP3MCGEN] + o2-analysis-hf-candidate-creator-cascade: <<: *cand_creator + options: + mc: "--doMC" tables: default: [HFCANDCASCBASE, HFCANDCASCEXT] mc: [HFCANDCASCMCREC, HFCANDCASCMCGEN] @@ -126,6 +135,13 @@ workflows: <<: *selector_3prong tables: HFSELLCCAND + o2-analysis-hf-lc-candidate-selector-alice3: + dependencies: + - o2-analysis-hf-candidate-creator-3prong-alice3 + - o2-analysis-pid-tpc-full + - o2-analysis-pid-tof-full + tables: HFSELLCCAND + o2-analysis-hf-xic-topkpi-candidate-selector: <<: *selector_3prong tables: HFSELXICCAND @@ -157,11 +173,11 @@ workflows: o2-analysis-hf-task-d0: &task dependencies: o2-analysis-hf-d0-candidate-selector - options: - mc: "--doMC" o2-analysis-hf-task-jpsi: <<: *task + options: + mc: "--doMC" dependencies: - o2-analysis-hf-jpsi-candidate-selector @@ -170,31 +186,45 @@ workflows: dependencies: o2-analysis-hf-dplus-topikpi-candidate-selector o2-analysis-hf-task-lc: - <<: *task - dependencies: [o2-analysis-hf-lc-candidate-selector, o2-analysis-alice3-trackextension] + dependencies: o2-analysis-hf-lc-candidate-selector + + o2-analysis-hf-task-lc-alice3: + dependencies: o2-analysis-hf-lc-candidate-selector-alice3 o2-analysis-hf-task-xic: <<: *task + options: + mc: "--doMC" dependencies: o2-analysis-hf-xic-topkpi-candidate-selector o2-analysis-hf-task-bplus: <<: *task + options: + mc: "--doMC" dependencies: o2-analysis-hf-bplus-tod0pi-candidate-selector o2-analysis-hf-task-x: <<: *task + options: + mc: "--doMC" dependencies: o2-analysis-hf-x-tojpsipipi-candidate-selector o2-analysis-hf-task-lc-tok0sp: <<: *task + options: + mc: "--doMC" dependencies: o2-analysis-hf-lc-tok0sp-candidate-selector o2-analysis-hf-task-xicc: <<: *task + options: + mc: "--doMC" dependencies: o2-analysis-hf-xicc-topkpipi-candidate-selector o2-analysis-hf-task-chic: <<: *task + options: + mc: "--doMC" dependencies: o2-analysis-hf-chic-tojpsigamma-candidate-selector o2-analysis-hf-task-correlation-ddbar: &taskddbar