From d4596de6fa516e6e6450c09651afb44e62656628 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Mon, 28 Oct 2024 17:32:43 +0100 Subject: [PATCH 1/2] Support different table origins and versions --- codeHF/workflows.yml | 20 ++++++++++---------- exec/make_command_o2.py | 19 ++++++++++++++++--- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 68b05a8c..5f8de8d4 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -62,7 +62,7 @@ workflows: executable: o2-analysis-hf-candidate-creator-2prong dependencies: o2-analysis-hf-track-index-skim-creator_skimX tables: - default: [HFCAND2PBASE, HFCAND2PEXT] + default: [HFCAND2PBASE, DYN/HFCAND2PEXT] mc: [HFCAND2PMCREC, HFCAND2PMCGEN] o2-analysis-hf-candidate-creator-2prong_derived: @@ -73,7 +73,7 @@ workflows: executable: o2-analysis-hf-candidate-creator-3prong dependencies: o2-analysis-hf-track-index-skim-creator_skimX tables: - default: [HFCAND3PBASE, HFCAND3PEXT] + default: [HFCAND3PBASE, DYN/HFCAND3PEXT] mc: [HFCAND3PMCREC, HFCAND3PMCGEN] o2-analysis-hf-candidate-creator-3prong_derived: @@ -84,7 +84,7 @@ workflows: executable: o2-analysis-hf-candidate-creator-dstar dependencies: o2-analysis-hf-track-index-skim-creator_skimX tables: - default: [HFDSTARCANDBASE, HFDSTAREXT, HFD0FROMDSTAR, HFD0FRMDSTREXT] + default: [HFDSTARCANDBASE, DYN/HFDSTAREXT, HFD0FROMDSTAR, DYN/HFD0FRMDSTREXT] mc: [HFDSTARMCREC, HFDSTARMCGEN] o2-analysis-hf-candidate-creator-dstar_derived: @@ -96,13 +96,13 @@ workflows: - o2-analysis-hf-track-index-skim-creator_skimX - o2-analysis-event-selection tables: - default: [HFCANDCASCBASE, HFCANDCASCEXT] + default: [HFCANDCASCBASE, DYN/HFCANDCASCEXT] mc: [HFCANDCASCMCREC, HFCANDCASCMCGEN] o2-analysis-hf-candidate-creator-x: dependencies: o2-analysis-hf-candidate-selector-jpsi_runX tables: - default: [HFCANDXBASE, HFCANDXEXT] + default: [HFCANDXBASE, DYN/HFCANDXEXT] mc: [HFCANDXMCREC, HFCANDXMCGEN] o2-analysis-hf-candidate-creator-xicc: @@ -111,31 +111,31 @@ workflows: options: mc: "--doMC" tables: - default: [HFCANDXICCBASE, HFCANDXICCEXT] + default: [HFCANDXICCBASE, DYN/HFCANDXICCEXT] mc: [HFCANDXICCMCREC, HFCANDXICCMCGEN] o2-analysis-hf-candidate-creator-chic: dependencies: o2-analysis-hf-candidate-selector-jpsi_runX tables: - default: [HFCANDCHICBASE, HFCANDCHICEXT] + default: [HFCANDCHICBASE, DYN/HFCANDCHICEXT] mc: [HFCANDCHICMCREC, HFCANDCHICMCGEN] o2-analysis-hf-candidate-creator-b0: dependencies: o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi tables: - default: [HFCANDB0BASE, HFCANDB0EXT] + default: [HFCANDB0BASE, DYN/HFCANDB0EXT] mc: [HFCANDB0MCREC, HFCANDB0MCGEN] o2-analysis-hf-candidate-creator-bplus: dependencies: o2-analysis-hf-candidate-selector-d0 tables: - default: [HFCANDBPLUSBASE, HFCANDBPLUSEXT] + default: [HFCANDBPLUSBASE, DYN/HFCANDBPLUSEXT] mc: [HFCANDBPMCREC, HFCANDBPMCGEN] o2-analysis-hf-candidate-creator-lb: dependencies: o2-analysis-hf-candidate-selector-lc tables: - default: [HFCANDLB, HFCANDLBEXT] + default: [HFCANDLB, DYN/HFCANDLBEXT] mc: [HFCANDLBMCREC, HFCANDLBMCGEN] o2-analysis-hf-candidate-creator-xic0-omegac0: diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py index 6f8fe0d0..61b4eb63 100644 --- a/exec/make_command_o2.py +++ b/exec/make_command_o2.py @@ -60,6 +60,21 @@ def join_to_list(obj, list_out: list): msg_fatal("Cannot convert %s into a string" % type(obj)) +def make_table_output(spec: str) -> str: + """Format the output table descriptor.""" + words = spec.split("/") + if len(words) > 2: + return spec + if len(words) == 1: + return f"AOD/{spec}/0" + if len(words) == 2: + if words[0] in ("AOD", "AOD1", "DYN"): + return f"{spec}/0" + if words[1].isdigit(): + return f"AOD/{spec}" + return spec + + def healthy_structure(dic_full: dict): """Check correct structure of the database.""" if not isinstance(dic_full, dict): @@ -235,9 +250,7 @@ def main(): join_to_list(tab_wf["mc"], tables) else: msg_fatal('"tables" in %s must be str, list or dict, is %s' % (wf, type(tab_wf))) - str_before = "AOD/" - str_after = "/0" - string_tables = ",".join(str_before + t + ("" if "/" in t else str_after) for t in tables) + string_tables = ",".join(make_table_output(t) for t in tables) if string_tables: opt_local += " --aod-writer-keep " + string_tables From 5152a64d877e09169b233ee925eb9f65d4aae617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 4 Oct 2024 14:40:54 +0200 Subject: [PATCH 2/2] Update configuration --- codeHF/config_tasks.sh | 6 ++ codeHF/dpl-config_run3.json | 135 +++++++++++++++++++++++------------- codeHF/workflows.yml | 13 +++- 3 files changed, 101 insertions(+), 53 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 28995cab..069167e7 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -192,9 +192,13 @@ function AdjustJson { if [ "$INPUT_RUN" -eq 2 ]; then ReplaceString "\"processRun2\": \"false\"" "\"processRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processRun3\": \"true\"" "\"processRun3\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun2\": \"0\"" "\"processRun2\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"1\"" "\"processRun3\": \"0\"" "$JSON" || ErrExit "Failed to edit $JSON." elif [ "$INPUT_RUN" -eq 3 ]; then ReplaceString "\"processRun2\": \"true\"" "\"processRun2\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processRun3\": \"false\"" "\"processRun3\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun2\": \"1\"" "\"processRun2\": \"0\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"0\"" "\"processRun3\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # MC @@ -206,6 +210,7 @@ function AdjustJson { 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 "\"processMC\": \"0\"" "\"processMC\": \"1\"" "$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." @@ -217,6 +222,7 @@ function AdjustJson { 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 "\"processMC\": \"1\"" "\"processMC\": \"0\"" "$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." diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index d847cd72..533872aa 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -19,7 +19,9 @@ "centralityMax": "100", "useSel8Trigger": "true", "triggerClass": "-1", + "useTvxTrigger": "true", "useTimeFrameBorderCut": "true", + "useItsRofBorderCut": "true", "useIsGoodZvtxFT0vsPV": "false", "useNoSameBunchPileup": "false", "useNumTracksInTimeRange": "false", @@ -28,7 +30,10 @@ "nPvContributorsMin": "0", "chi2PvMax": "-1", "zPvPosMin": "-10", - "zPvPosMax": "10" + "zPvPosMax": "10", + "softwareTrigger": "", + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/" }, "processTrigAndCentFT0ASel": "false", "processTrigAndCentFT0CSel": "false", @@ -791,6 +796,7 @@ "hf-track-index-skim-creator-cascades": { "isRun2": "true", "fillHistograms": "true", + "useDCAFitter": "true", "propagateToPCA": "true", "maxR": "200", "maxDZIni": "4", @@ -798,11 +804,6 @@ "minRelChi2Change": "0.9", "useAbsDCA": "true", "useWeightedFinalPCA": "false", - "doCutQuality": "true", - "tpcRefitBach": "false", - "nCrossedRowsMinBach": "50", - "tpcRefitV0Daugh": "false", - "nCrossedRowsMinV0Daugh": "50", "etaMinV0Daugh": "-99999", "etaMaxV0Daugh": "1.1", "ptMinV0Daugh": "0.05", @@ -2380,6 +2381,38 @@ }, "timestampCCDB": "-1", "loadModelsFromCCDB": "false", + "useTriggerMassCut": "false", + "hfTrigger2ProngCuts": { + "nSigmaMax": "2", + "ptDeltaMassMax": "10", + "ptMassCutMax": "9999", + "deltaMassPars": { + "labels_rows": "", + "labels_cols": [ + "constant", + "linear" + ], + "values": [ + [ + "-0.0025", + "9.99999975e-05" + ] + ] + }, + "sigmaPars": { + "labels_rows": "", + "labels_cols": [ + "constant", + "linear" + ], + "values": [ + [ + "0.0142400004", + "0.00178000005" + ] + ] + } + }, "processWithDCAFitterN": "true", "processWithKFParticle": "false" }, @@ -5876,6 +5909,13 @@ "1" ] }, + "thnConfigAxisPromptScore": { + "values": [ + "50", + "0", + "1" + ] + }, "thnConfigAxisMass": { "values": [ "120", @@ -6182,11 +6222,11 @@ "20" ] }, - "thnConfigAxisMultiplicity": { + "thnConfigAxisCentrality": { "values": [ "100", "0", - "1000" + "100" ] }, "thnConfigAxisChi2PCA": { @@ -6233,8 +6273,16 @@ }, "processDataStd": "true", "processDataWithMl": "false", + "processDataStdWithFT0C": "false", + "processDataWithMlWithFT0C": "false", + "processDataStdWithFT0M": "false", + "processDataWithMlWithFT0M": "false", "processMcStd": "false", - "processMcWithMl": "false" + "processMcWithMl": "false", + "processMcStdWithFT0C": "false", + "processMcWithMlWithFT0C": "false", + "processMcStdWithFT0M": "false", + "processMcWithMlWithFT0M": "false" }, "hf-task-lc-to-k0s-p": { "selectionFlagLcToK0sP": "0", @@ -7308,80 +7356,67 @@ "processRun3FT0": "false" }, "multiplicity-table": { - "doVertexZeq": "1", - "fractionOfEvents": "2", + "processRun3": "0", + "processRun2": "1", "enabledTables": { - "labels_rows": [ - "FV0Mults", - "FT0Mults", - "FDDMults", - "ZDCMults", - "TrackletMults", - "TPCMults", - "PVMults", - "MultsExtra", - "MultSelections", - "FV0MultZeqs", - "FT0MultZeqs", - "FDDMultZeqs", - "PVMultZeqs", - "MultsExtraMC" - ], - "labels_cols": [ - "Enable" - ], "values": [ [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ], [ - "-1" + -1 ] ] }, - "ccdburl": "http://alice-ccdb.cern.ch", + "fractionOfEvents": "2", + "processMC2Mults": "0", + "min_pt_globaltrack": "0.15", + "min_ncluster_its_globaltrack": "5", + "max_pt_globaltrack": "1e+10", + "processGlobalTrackingCounters": "0", + "min_ncluster_itsib_globaltrack": "1", + "doVertexZeq": "1", + "produceHistograms": "0", + "reconstructionPass": " ", "ccdbpath": "Centrality/Calibration", - "produceHistograms": "false", - "processRun2": "true", - "processRun3": "false", - "processGlobalTrackingCounters": "false", - "processMC": "true" + "ccdburl": "http://alice-ccdb.cern.ch", + "processMC": "1" }, "pid-multiplicity": { "processIU": "false", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 5f8de8d4..191ac87f 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -60,7 +60,14 @@ workflows: o2-analysis-hf-candidate-creator-2prong: &cand_creator_2p executable: o2-analysis-hf-candidate-creator-2prong - dependencies: o2-analysis-hf-track-index-skim-creator_skimX + dependencies: + - o2-analysis-hf-track-index-skim-creator_skimX + - o2-analysis-track-dca_runX + - o2-analysis-event-selection + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof-full_runX + - o2-analysis-pid-tpc + tables: default: [HFCAND2PBASE, DYN/HFCAND2PEXT] mc: [HFCAND2PMCREC, HFCAND2PMCGEN] @@ -70,8 +77,8 @@ workflows: dependencies: o2-analysis-track-dca_runX o2-analysis-hf-candidate-creator-3prong: &cand_creator_3p + <<: *cand_creator_2p executable: o2-analysis-hf-candidate-creator-3prong - dependencies: o2-analysis-hf-track-index-skim-creator_skimX tables: default: [HFCAND3PBASE, DYN/HFCAND3PEXT] mc: [HFCAND3PMCREC, HFCAND3PMCGEN] @@ -81,8 +88,8 @@ workflows: dependencies: o2-analysis-track-dca_runX o2-analysis-hf-candidate-creator-dstar: &cand_creator_dstar + <<: *cand_creator_2p executable: o2-analysis-hf-candidate-creator-dstar - dependencies: o2-analysis-hf-track-index-skim-creator_skimX tables: default: [HFDSTARCANDBASE, DYN/HFDSTAREXT, HFD0FROMDSTAR, DYN/HFD0FRMDSTREXT] mc: [HFDSTARMCREC, HFDSTARMCGEN]