From a9831e93d61cc9e9f3423db8ed4232d406aa2979 Mon Sep 17 00:00:00 2001 From: Jochen Klein Date: Sat, 2 Jul 2022 00:43:29 +0200 Subject: [PATCH 01/24] Add first version of HF jet finding and matching --- codeHF/config_input.sh | 2 +- codeHF/config_tasks.sh | 8 +++++++- codeHF/workflows.yml | 20 ++++++++++++++++++++ exec/make_command_o2.py | 3 ++- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 98d5608a..b04a8789 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -4,7 +4,7 @@ # Input specification for runtest.sh # (Modifies input parameters.) -INPUT_CASE=2 # Input case +INPUT_CASE=9 # Input case NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 2a34101b..53025cfa 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -80,6 +80,8 @@ 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 +DOJETS=1 # je-jet-finder-hf +DOJETMATCHINGHF=1 # je-jet-matching-hf (needs jets) # 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 @@ -371,6 +373,10 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" + [[ $DOO2_TASK_D0 -eq 1 && $DOJETS -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf" + [[ $DOJETS -eq 1 && $DOJETMATCHINGHF -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd" + [[ $DOJETS -eq 1 && $DOJETMATCHINGHF -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcp" + [[ $DOJETS -eq 1 && $DOJETMATCHINGHF -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-matching-hf" [ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi" [ $DOO2_TASK_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-ds" [ $DOO2_TASK_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-dplus" @@ -409,7 +415,7 @@ function MakeScriptO2 { [ $DOO2_COLLCONV -eq 1 ] && WORKFLOWS+=" o2-analysis-collision-converter" # Translate options into arguments of the generating script. - OPT_MAKECMD="" + OPT_MAKECMD="-d" [ "$ISMC" -eq 1 ] && OPT_MAKECMD+=" --mc" [ "$DEBUG" -eq 1 ] && OPT_MAKECMD+=" -d" [ $SAVETREES -eq 1 ] && OPT_MAKECMD+=" -t" diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 9a4db400..b1ecbde9 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -227,13 +227,33 @@ workflows: <<: *taskddbar requires_mc: yes +<<<<<<< HEAD o2-analysis-hf-task-correlation-d0-hadrons: dependencies: o2-analysis-hf-correlator-d0-hadrons +======= +>>>>>>> Add first version of HF jet finding and matching o2-analysis-hf-task-flow: dependencies: - o2-analysis-hf-candidate-selector-d0 + o2-analysis-je-jet-finder-hf: &jethf + executable: o2-analysis-je-jet-finder-hf + + o2-analysis-je-jet-finder-hf-mcp: + <<: *jethf + options: "--hfjetMode mcp" + requires_mc: yes + + o2-analysis-je-jet-finder-hf-mcd: + <<: *jethf + options: "--hfjetMode mcd" + requires_mc: yes + + o2-analysis-hf-jet-matching-hf: + requires_mc: yes + dependencies: [o2-analysis-je-jet-finder-hf-mcd, o2-analysis-je-jet-finder-hf-mcp] + # Tree creators o2-analysis-hf-tree-creator-d0-to-k-pi: diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py index b9d87904..b3d4e2db 100644 --- a/exec/make_command_o2.py +++ b/exec/make_command_o2.py @@ -264,7 +264,8 @@ def main(): string_wf = wf # Detect duplicate workflows. if string_wf + " " in command: - msg_fatal("Workflow %s is already present." % string_wf) + msg_err("Workflow %s is already present." % string_wf) + # sys.exit(1) # Process options. if "options" in dic_wf_single: opt_wf = dic_wf_single["options"] From aead5e57003c3e48fbab0d8740f6df0288713789 Mon Sep 17 00:00:00 2001 From: Jochen Klein Date: Mon, 4 Jul 2022 21:29:03 +0200 Subject: [PATCH 02/24] Fix bugs and improve task logic --- codeHF/config_tasks.sh | 6 ++---- codeHF/workflows.yml | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 53025cfa..3ce53533 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -373,10 +373,8 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - [[ $DOO2_TASK_D0 -eq 1 && $DOJETS -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf" - [[ $DOJETS -eq 1 && $DOJETMATCHINGHF -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd" - [[ $DOJETS -eq 1 && $DOJETMATCHINGHF -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcp" - [[ $DOJETS -eq 1 && $DOJETMATCHINGHF -eq 1 ]] && WORKFLOWS+=" o2-analysis-je-jet-matching-hf" + [ $DOJETS -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf" + [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" [ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi" [ $DOO2_TASK_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-ds" [ $DOO2_TASK_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-dplus" diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index b1ecbde9..0f59922e 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -239,6 +239,7 @@ workflows: o2-analysis-je-jet-finder-hf: &jethf executable: o2-analysis-je-jet-finder-hf + dependencies: o2-analysis-hf-task-d0 o2-analysis-je-jet-finder-hf-mcp: <<: *jethf @@ -250,7 +251,7 @@ workflows: options: "--hfjetMode mcd" requires_mc: yes - o2-analysis-hf-jet-matching-hf: + o2-analysis-je-jet-matching-hf: requires_mc: yes dependencies: [o2-analysis-je-jet-finder-hf-mcd, o2-analysis-je-jet-finder-hf-mcp] From 01645ef3928ea74cc55b3403bbbfa5cce2f753e0 Mon Sep 17 00:00:00 2001 From: Nima Zardoshti Date: Thu, 21 Jul 2022 18:33:32 +0200 Subject: [PATCH 03/24] adding jets to Run 3 Validation adding hf-jets pre-rebase commit adding HF-jet comparisons intermdeiate Adding Jets to the HF framework --- codeHF/Compare.C | 40 ++++++++++++++++++ codeHF/RunHFTaskLocal.C | 8 +++- codeHF/config_input.sh | 2 +- codeHF/config_tasks.sh | 12 ++++-- codeHF/dpl-config_run3.json | 84 +++++++++++++++++++++++++++++++++++++ codeHF/workflows.yml | 21 ++++++++-- 6 files changed, 157 insertions(+), 10 deletions(-) diff --git a/codeHF/Compare.C b/codeHF/Compare.C index fe5fc7f9..55218721 100644 --- a/codeHF/Compare.C +++ b/codeHF/Compare.C @@ -207,6 +207,38 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " AddHistogram(vecHisJpsi, "decay length error (cm)", "hDecLenErrJpsi", "hf-task-jpsi/hDecLenErr", 1, 1, 0); AddHistogram(vecHisJpsi, "decay length XY error (cm)", "hDecLenXYErrJpsi", "hf-task-jpsi/hDecLenXYErr", 1, 1, 0); + VecSpecHis vecHisJets; + AddHistogram(vecHisJets, "#it{p}_{T}^{jet} (GeV/#it{c})", "fHistJetPt", "jet-finder-hf-data/h_jet_pt", 1, 1, 0); + AddHistogram(vecHisJets, "#phi", "fHistJetPhi", "jet-finder-hf-data/h_jet_phi", 1, 1, 0); + AddHistogram(vecHisJets, "#eta", "fHistJetEta", "jet-finder-hf-data/h_jet_eta", 1, 1, 0); + AddHistogram(vecHisJets, "N_{tracks}", "fHistJetNConstituents", "jet-finder-hf-data/h_jet_ntracks", 1, 1, 0); + AddHistogram(vecHisJets, "#it{p}_{T}^{cand} (GeV/#it{c})", "fHistJetCandPt", "jet-finder-hf-data/h_D0_pt", 1, 1, 0); + + VecSpecHis vecHisJetSubstructure; + AddHistogram(vecHisJetSubstructure, "z_{g}", "fHistJetZg", "jet-substructure-hf-data/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "R_{g}", "fHistJetRg", "jet-substructure-hf-data/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "n_{SD}", "fHistJetNsd", "jet-substructure-hf-data/h_jet_nsd", 1, 0, 0); + + VecSpecHis vecHisJetsMC; + AddHistogram(vecHisJetsMC, "#it{p}_{T,det}^{jet} (GeV/#it{c})", "fHistJetPt", "jet-finder-hf-mcd/h_jet_pt", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#it{p}_{T,gen}^{jet} (GeV/#it{c})", "fHistJetPt_Part", "jet-finder-hf-mcp/h_jet_pt", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#phi_{det}", "fHistJetPhi", "jet-finder-hf-mcd/h_jet_phi", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#phi_{gen}", "fHistJetPhi_Part", "jet-finder-hf-mcp/h_jet_phi", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#eta_{det}", "fHistJetEta", "jet-finder-hf-mcd/h_jet_eta", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#eta_{gen}", "fHistJetEta_Part", "jet-finder-hf-mcp/h_jet_eta", 1, 1, 0); + AddHistogram(vecHisJetsMC, "N_{tracks,det}", "fHistJetNConstituents", "jet-finder-hf-mcd/h_jet_ntracks", 1, 1, 0); + AddHistogram(vecHisJetsMC, "N_{tracks,gen}", "fHistJetNConstituents_Part", "jet-finder-hf-mcp/h_jet_ntracks", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#it{p}_{T,det}^{cand} (GeV/#it{c})", "fHistJetCandPt", "jet-finder-hf-mcd/h_D0_pt", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#it{p}_{T,gen}^{cand} (GeV/#it{c})", "fHistJetCandPt_Part", "jet-finder-hf-mcp/h_D0_pt", 1, 1, 0); + + VecSpecHis vecHisJetSubstructureMC; + AddHistogram(vecHisJetSubstructureMC, "z_{g,det}", "fHistJetZg", "jet-substructure-hf-mcd/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "z_{g,gen}", "fHistJetZg_Part", "jet-substructure-hf-mcp/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "R_{g,det}", "fHistJetRg", "jet-substructure-hf-mcd/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "R_{g,gen}", "fHistJetRg_Part", "jet-substructure-hf-mcp/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "n_{SD,det}", "fHistJetNsd", "jet-substructure-hf-mcd/h_jet_nsd", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "n_{SD,gen}", "fHistJetNsd_Part", "jet-substructure-hf-mcp/h_jet_nsd", 1, 0, 0); + // vector of specifications of vectors: name, VecSpecHis, pads X, pads Y std::vector> vecSpecVecSpec; @@ -243,6 +275,14 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " vecSpecVecSpec.push_back(std::make_tuple("lc-mc-nonprompt", vecHisLcMCNonPrompt, 5, 3)); if (options.Contains(" jpsi ")) vecSpecVecSpec.push_back(std::make_tuple("jpsi", vecHisJpsi, 5, 3)); + if (options.Contains(" jets-data ")) + vecSpecVecSpec.push_back(std::make_tuple("jets-data", vecHisJets, 5, 3)); + if (options.Contains(" jets-mc ")) + vecSpecVecSpec.push_back(std::make_tuple("jets-mc", vecHisJetsMC, 5, 3)); + if (options.Contains(" jets-substructure-data ")) + vecSpecVecSpec.push_back(std::make_tuple("jets-substructure-data", vecHisJetSubstructure, 5, 3)); + if (options.Contains(" jets-substructure-mc ")) + vecSpecVecSpec.push_back(std::make_tuple("jets-substructure-mc", vecHisJetSubstructureMC, 5, 3)); // Histogram plot vertical margins Float_t marginHigh = 0.05; diff --git a/codeHF/RunHFTaskLocal.C b/codeHF/RunHFTaskLocal.C index fee7ea87..ec6f22a9 100644 --- a/codeHF/RunHFTaskLocal.C +++ b/codeHF/RunHFTaskLocal.C @@ -4,7 +4,10 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt", TString jsonfilename = "dpl-config_std.json", Bool_t isMC = kFALSE, Bool_t useO2Vertexer = kFALSE, - Bool_t useAliEventCuts = kFALSE) + Bool_t useAliEventCuts = kFALSE, + Bool_t DoJets = kFALSE, + Bool_t DOJETMATCHINGHF = kFALSE, + Bool_t DOJETSUBSTRUCTURE = kFALSE) { // Load common libraries gSystem->Load("libCore.so"); @@ -47,6 +50,9 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt", tasktr3->SetUseO2Vertexer(); } tasktr3->SetUseCandidateAnalysisCuts(); + tasktr3->SetDoJetFinding(DoJets); + tasktr3->SetJetMatching(DOJETMATCHINGHF); + tasktr3->SetDoJetSubstructure(DOJETSUBSTRUCTURE); mgr->InitAnalysis(); mgr->PrintStatus(); diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index b04a8789..98d5608a 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -4,7 +4,7 @@ # Input specification for runtest.sh # (Modifies input parameters.) -INPUT_CASE=9 # Input case +INPUT_CASE=2 # Input case NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 3ce53533..622a9268 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -81,7 +81,8 @@ DOO2_TASK_XICC=0 # hf-task-xicc DOO2_TASK_B0=0 # hf-task-b0 DOO2_TASK_BPLUS=0 # hf-task-bplus DOJETS=1 # je-jet-finder-hf -DOJETMATCHINGHF=1 # je-jet-matching-hf (needs jets) +DOJETMATCHINGHF=0 # je-jet-matching-hf (needs jets) +DOJETSUBSTRUCTURE=1 # je-jet-substructure-hf (needs jets) # 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 @@ -373,8 +374,9 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - [ $DOJETS -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf" - [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" + [ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp"; } + [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" + [ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp"; } [ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi" [ $DOO2_TASK_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-ds" [ $DOO2_TASK_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-dplus" @@ -444,7 +446,7 @@ EOF } function MakeScriptAli { - ALIEXEC="root -b -q -l \"$DIR_TASKS/RunHFTaskLocal.C(\\\"\$FileIn\\\", \\\"\$JSON\\\", $ISMC, $USEO2VERTEXER, $USEALIEVCUTS)\"" + ALIEXEC="root -b -q -l \"$DIR_TASKS/RunHFTaskLocal.C(\\\"\$FileIn\\\", \\\"\$JSON\\\", $ISMC, $USEO2VERTEXER, $USEALIEVCUTS, $DOJETS, $DOJETMATCHINGHF, $DOJETSUBSTRUCTURE)\"" cat << EOF > "$SCRIPT_ALI" #!/bin/bash FileIn="\$1" @@ -467,6 +469,8 @@ function MakeScriptPostprocess { [ $DOO2_TASK_LC -eq 1 ] && { OPT_COMPARE+=" lc "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" lc-mc-pt lc-mc-prompt lc-mc-nonprompt lc-mc-eta lc-mc-phi "; } [ $DOO2_TASK_XIC -eq 1 ] && OPT_COMPARE+=" xic " [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " + [ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-mc "; } + [ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-substructure-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-substructure-mc "; } [ "$OPT_COMPARE" ] && POSTEXEC+=" && root -b -q -l \"$DIR_TASKS/Compare.C(\\\"\$FileO2\\\", \\\"\$FileAli\\\", \\\"$OPT_COMPARE\\\", $DORATIO)\"" } # Plot particle reconstruction efficiencies. diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index e6e6132b..778c4686 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -1056,6 +1056,90 @@ ] } }, + "jet-finder-hf-data": { + "jetR": "0.4", + "jetPtMin": "0.0", + "jetPtMax": "1000.0", + "trackPtMin": "0.15", + "trackPtMax": "1000.0", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "candPtMin": "0", + "candPtMax": "100", + "candYMin": "-0.8", + "candYMax": "0.8", + "d_selectionFlagD0": "0", + "d_selectionFlagD0bar": "0", + "processData": "true", + "processMCD": "false", + "processMCP": "false" + }, + "jet-finder-hf-mcd": { + "jetR": "0.4", + "jetPtMin": "0.0", + "jetPtMax": "1000.0", + "trackPtMin": "0.15", + "trackPtMax": "1000.0", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "candPtMin": "0.0", + "candPtMax": "100.0", + "candYMin": "-0.8", + "candYMax": "0.8", + "d_selectionFlagD0": "0", + "d_selectionFlagD0bar": "0", + "processData": "false", + "processMCD": "true", + "processMCP": "false" + }, + "jet-finder-hf-mcp": { + "jetR": "0.4", + "jetPtMin": "0.0", + "jetPtMax": "1000.0", + "trackPtMin": "0.15", + "trackPtMax": "1000.0", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "candPtMin": "0.0", + "candPtMax": "100.0", + "candYMin": "-0.8", + "candYMax": "0.8", + "d_selectionFlagD0": "0", + "d_selectionFlagD0bar": "0", + "processData": "false", + "processMCD": "false", + "processMCP": "true" + }, + "jet-substructure-hf-data": { + "jetPtMin": "0.0", + "zCut": "0.1", + "beta": "0.0", + "jetR": "0.4", + "doConstSub": "false", + "processData": "true", + "processMCD": "false", + "processMCP": "false" + }, + "jet-substructure-hf-mcd": { + "jetPtMin": "0.0", + "zCut": "0.1", + "beta": "0.0", + "jetR": "0.4", + "doConstSub": "false", + "processData": "false", + "processMCD": "true", + "processMCP": "false" + }, + "jet-substructure-hf-mcp": { + "jetPtMin": "0.0", + "zCut": "0.1", + "beta": "0.0", + "jetR": "0.4", + "doConstSub": "false", + "processData": "false", + "processMCD": "false", + "processMCP": "true" + }, "hf-task-d0": { "selectionFlagD0": "0", "selectionFlagD0bar": "0", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 0f59922e..9c4daf35 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -227,17 +227,14 @@ workflows: <<: *taskddbar requires_mc: yes -<<<<<<< HEAD o2-analysis-hf-task-correlation-d0-hadrons: dependencies: o2-analysis-hf-correlator-d0-hadrons -======= ->>>>>>> Add first version of HF jet finding and matching o2-analysis-hf-task-flow: dependencies: - o2-analysis-hf-candidate-selector-d0 - o2-analysis-je-jet-finder-hf: &jethf + o2-analysis-je-jet-finder-hf-data: &jethf executable: o2-analysis-je-jet-finder-hf dependencies: o2-analysis-hf-task-d0 @@ -255,6 +252,22 @@ workflows: requires_mc: yes dependencies: [o2-analysis-je-jet-finder-hf-mcd, o2-analysis-je-jet-finder-hf-mcp] + o2-analysis-je-jet-substructure-hf-data: + executable: o2-analysis-je-jet-substructure-hf + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-data] + + o2-analysis-je-jet-substructure-hf-mcd: + executable: o2-analysis-je-jet-substructure-hf + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcd] + options: "--hfjetsubstructureMode mcd" + requires_mc: yes + + o2-analysis-je-jet-substructure-hf-mcp: + executable: o2-analysis-je-jet-substructure-hf + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcp] + options: "--hfjetsubstructureMode mcp" + requires_mc: yes + # Tree creators o2-analysis-hf-tree-creator-d0-to-k-pi: From 835a51be52c952226802e278ddc68a04d11a6f0f Mon Sep 17 00:00:00 2001 From: Nima Zardoshti Date: Wed, 8 Feb 2023 14:11:52 +0100 Subject: [PATCH 04/24] adding tree output for HF substructure task --- codeHF/Compare.C | 24 +++++++-------- codeHF/RunHFTaskLocal.C | 12 ++++---- codeHF/config_input.sh | 4 +-- codeHF/config_tasks.sh | 61 +++++++++++++++++++++++++++++-------- codeHF/dpl-config_run3.json | 12 ++++---- codeHF/workflows.yml | 30 +++++++++++++++--- exec/make_command_o2.py | 1 - 7 files changed, 101 insertions(+), 43 deletions(-) diff --git a/codeHF/Compare.C b/codeHF/Compare.C index 55218721..ceb0a3f2 100644 --- a/codeHF/Compare.C +++ b/codeHF/Compare.C @@ -211,13 +211,13 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " AddHistogram(vecHisJets, "#it{p}_{T}^{jet} (GeV/#it{c})", "fHistJetPt", "jet-finder-hf-data/h_jet_pt", 1, 1, 0); AddHistogram(vecHisJets, "#phi", "fHistJetPhi", "jet-finder-hf-data/h_jet_phi", 1, 1, 0); AddHistogram(vecHisJets, "#eta", "fHistJetEta", "jet-finder-hf-data/h_jet_eta", 1, 1, 0); - AddHistogram(vecHisJets, "N_{tracks}", "fHistJetNConstituents", "jet-finder-hf-data/h_jet_ntracks", 1, 1, 0); + AddHistogram(vecHisJets, "#it{N}_{tracks}", "fHistJetNConstituents", "jet-finder-hf-data/h_jet_ntracks", 1, 1, 0); AddHistogram(vecHisJets, "#it{p}_{T}^{cand} (GeV/#it{c})", "fHistJetCandPt", "jet-finder-hf-data/h_D0_pt", 1, 1, 0); VecSpecHis vecHisJetSubstructure; - AddHistogram(vecHisJetSubstructure, "z_{g}", "fHistJetZg", "jet-substructure-hf-data/h_jet_zg", 1, 0, 0); - AddHistogram(vecHisJetSubstructure, "R_{g}", "fHistJetRg", "jet-substructure-hf-data/h_jet_rg", 1, 0, 0); - AddHistogram(vecHisJetSubstructure, "n_{SD}", "fHistJetNsd", "jet-substructure-hf-data/h_jet_nsd", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "#it{z}_{g}", "fHistJetZg", "jet-substructure-hf-data/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "#it{R}_{g}", "fHistJetRg", "jet-substructure-hf-data/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "#it{n}_{SD}", "fHistJetNsd", "jet-substructure-hf-data/h_jet_nsd", 1, 0, 0); VecSpecHis vecHisJetsMC; AddHistogram(vecHisJetsMC, "#it{p}_{T,det}^{jet} (GeV/#it{c})", "fHistJetPt", "jet-finder-hf-mcd/h_jet_pt", 1, 1, 0); @@ -226,18 +226,18 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " AddHistogram(vecHisJetsMC, "#phi_{gen}", "fHistJetPhi_Part", "jet-finder-hf-mcp/h_jet_phi", 1, 1, 0); AddHistogram(vecHisJetsMC, "#eta_{det}", "fHistJetEta", "jet-finder-hf-mcd/h_jet_eta", 1, 1, 0); AddHistogram(vecHisJetsMC, "#eta_{gen}", "fHistJetEta_Part", "jet-finder-hf-mcp/h_jet_eta", 1, 1, 0); - AddHistogram(vecHisJetsMC, "N_{tracks,det}", "fHistJetNConstituents", "jet-finder-hf-mcd/h_jet_ntracks", 1, 1, 0); - AddHistogram(vecHisJetsMC, "N_{tracks,gen}", "fHistJetNConstituents_Part", "jet-finder-hf-mcp/h_jet_ntracks", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#it{N}_{tracks,det}", "fHistJetNConstituents", "jet-finder-hf-mcd/h_jet_ntracks", 1, 1, 0); + AddHistogram(vecHisJetsMC, "#it{N}_{tracks,gen}", "fHistJetNConstituents_Part", "jet-finder-hf-mcp/h_jet_ntracks", 1, 1, 0); AddHistogram(vecHisJetsMC, "#it{p}_{T,det}^{cand} (GeV/#it{c})", "fHistJetCandPt", "jet-finder-hf-mcd/h_D0_pt", 1, 1, 0); AddHistogram(vecHisJetsMC, "#it{p}_{T,gen}^{cand} (GeV/#it{c})", "fHistJetCandPt_Part", "jet-finder-hf-mcp/h_D0_pt", 1, 1, 0); VecSpecHis vecHisJetSubstructureMC; - AddHistogram(vecHisJetSubstructureMC, "z_{g,det}", "fHistJetZg", "jet-substructure-hf-mcd/h_jet_zg", 1, 0, 0); - AddHistogram(vecHisJetSubstructureMC, "z_{g,gen}", "fHistJetZg_Part", "jet-substructure-hf-mcp/h_jet_zg", 1, 0, 0); - AddHistogram(vecHisJetSubstructureMC, "R_{g,det}", "fHistJetRg", "jet-substructure-hf-mcd/h_jet_rg", 1, 0, 0); - AddHistogram(vecHisJetSubstructureMC, "R_{g,gen}", "fHistJetRg_Part", "jet-substructure-hf-mcp/h_jet_rg", 1, 0, 0); - AddHistogram(vecHisJetSubstructureMC, "n_{SD,det}", "fHistJetNsd", "jet-substructure-hf-mcd/h_jet_nsd", 1, 0, 0); - AddHistogram(vecHisJetSubstructureMC, "n_{SD,gen}", "fHistJetNsd_Part", "jet-substructure-hf-mcp/h_jet_nsd", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{z}_{g,det}", "fHistJetZg", "jet-substructure-hf-mcd/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{z}_{g,gen}", "fHistJetZg_Part", "jet-substructure-hf-mcp/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{R}_{g,det}", "fHistJetRg", "jet-substructure-hf-mcd/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{R}_{g,gen}", "fHistJetRg_Part", "jet-substructure-hf-mcp/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{n}_{SD,det}", "fHistJetNsd", "jet-substructure-hf-mcd/h_jet_nsd", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{n}_{SD,gen}", "fHistJetNsd_Part", "jet-substructure-hf-mcp/h_jet_nsd", 1, 0, 0); // vector of specifications of vectors: name, VecSpecHis, pads X, pads Y std::vector> vecSpecVecSpec; diff --git a/codeHF/RunHFTaskLocal.C b/codeHF/RunHFTaskLocal.C index ec6f22a9..ba1ea428 100644 --- a/codeHF/RunHFTaskLocal.C +++ b/codeHF/RunHFTaskLocal.C @@ -5,9 +5,9 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt", Bool_t isMC = kFALSE, Bool_t useO2Vertexer = kFALSE, Bool_t useAliEventCuts = kFALSE, - Bool_t DoJets = kFALSE, - Bool_t DOJETMATCHINGHF = kFALSE, - Bool_t DOJETSUBSTRUCTURE = kFALSE) + Bool_t doJets = kFALSE, + Bool_t doJetMatching = kFALSE, + Bool_t doJetSubstructure = kFALSE) { // Load common libraries gSystem->Load("libCore.so"); @@ -50,9 +50,9 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt", tasktr3->SetUseO2Vertexer(); } tasktr3->SetUseCandidateAnalysisCuts(); - tasktr3->SetDoJetFinding(DoJets); - tasktr3->SetJetMatching(DOJETMATCHINGHF); - tasktr3->SetDoJetSubstructure(DOJETSUBSTRUCTURE); + tasktr3->SetDoJetFinding(doJets); + tasktr3->SetJetMatching(doJetMatching); + tasktr3->SetDoJetSubstructure(doJetSubstructure); mgr->InitAnalysis(); mgr->PrintStatus(); diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 98d5608a..749ca89c 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -4,9 +4,9 @@ # Input specification for runtest.sh # (Modifies input parameters.) -INPUT_CASE=2 # Input case +INPUT_CASE=3 # Input case -NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) +NFILESMAX=50 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) # Number of input files per job (Automatic optimisation on if < 1.) NFILESPERJOB_CONVERT=0 # Conversion diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 622a9268..60135316 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -43,7 +43,7 @@ DOO2_PID_BAYES=0 # pid-bayes # Vertexing DOO2_SKIM=1 # hf-track-index-skim-creator DOO2_CAND_2PRONG=1 # hf-candidate-creator-2prong -DOO2_CAND_3PRONG=1 # hf-candidate-creator-3prong +DOO2_CAND_3PRONG=0 # hf-candidate-creator-3prong DOO2_CAND_CASC=0 # hf-candidate-creator-cascade DOO2_CAND_LB=0 # hf-candidate-creator-lb DOO2_CAND_X=0 # hf-candidate-creator-x @@ -53,7 +53,7 @@ DOO2_CAND_B0=0 # hf-candidate-creator-b0 DOO2_CAND_BPLUS=0 # hf-candidate-creator-bplus DOO2_CAND_DSTAR=0 # hf-candidate-creator-dstar # Selectors -DOO2_SEL_D0=0 # hf-candidate-selector-d0 +DOO2_SEL_D0=1 # hf-candidate-selector-d0 DOO2_SEL_DS=0 # hf-candidate-selector-ds-to-k-k-pi DOO2_SEL_DPLUS=0 # hf-candidate-selector-dplus-to-pi-k-pi DOO2_SEL_LC=0 # hf-candidate-selector-lc @@ -70,7 +70,7 @@ DOO2_SEL_BPLUS=0 # hf-candidate-selector-bplus-to-d0-pi DOO2_TASK_D0=1 # hf-task-d0 DOO2_TASK_DS=0 # hf-task-ds DOO2_TASK_DPLUS=0 # hf-task-dplus -DOO2_TASK_LC=1 # hf-task-lc +DOO2_TASK_LC=0 # hf-task-lc DOO2_TASK_LB=0 # hf-task-lb DOO2_TASK_XIC=0 # hf-task-xic DOO2_TASK_JPSI=0 # hf-task-jpsi @@ -80,9 +80,9 @@ 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 -DOJETS=1 # je-jet-finder-hf +DOJETS=0 # je-jet-finder-hf DOJETMATCHINGHF=0 # je-jet-matching-hf (needs jets) -DOJETSUBSTRUCTURE=1 # je-jet-substructure-hf (needs jets) +DOJETSUBSTRUCTURE=0 # je-jet-substructure-hf (needs jets) # 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 @@ -91,6 +91,7 @@ DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi 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_JETSUBSTRUCTURE=0 # jet-substructure-hf-output (needs jets and jet substructure) # Correlations DOO2_D0D0BAR_DATA=0 # hf-correlator-d0-d0bar DOO2_D0D0BAR_MCREC=0 # hf-correlator-d0-d0bar-mc-rec @@ -110,7 +111,7 @@ DOO2_COLLCONV=0 # collision-converter APPLYCUTS_D0=1 # Apply D0 selection cuts. APPLYCUTS_DS=0 # Apply Ds selection cuts. APPLYCUTS_DPLUS=0 # Apply D+ selection cuts. -APPLYCUTS_LC=1 # Apply Λc selection cuts. +APPLYCUTS_LC=0 # Apply Λc selection cuts. APPLYCUTS_LB=0 # Apply Λb selection cuts. APPLYCUTS_XIC=0 # Apply Ξc selection cuts. APPLYCUTS_JPSI=0 # Apply J/ψ selection cuts. @@ -374,9 +375,23 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - [ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp"; } - [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" - [ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp"; } + #[ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp"; } + if [ $DOJETS -eq 1 ]; then + if [ "$ISMC" -eq 0 ]; then + WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" + else + WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" + fi + fi + [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" + #[ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp"; } + if [ $DOJETSUBSTRUCTURE -eq 1 ]; then + if [ "$ISMC" -eq 0 ]; then + WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" + else + WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" + fi + fi [ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi" [ $DOO2_TASK_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-ds" [ $DOO2_TASK_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-dplus" @@ -409,13 +424,21 @@ function MakeScriptO2 { [ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi" [ $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_JETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp"; } + if [ $DOO2_TREE_JETSUBSTRUCTURE -eq 1 ]; then + if [ "$ISMC" -eq 0 ]; then + WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" + else + WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" + fi + fi # Other [ $DOO2_MCCONV -eq 1 ] && WORKFLOWS+=" o2-analysis-mc-converter" [ $DOO2_FDDCONV -eq 1 ] && WORKFLOWS+=" o2-analysis-fdd-converter" [ $DOO2_COLLCONV -eq 1 ] && WORKFLOWS+=" o2-analysis-collision-converter" # Translate options into arguments of the generating script. - OPT_MAKECMD="-d" + OPT_MAKECMD="" [ "$ISMC" -eq 1 ] && OPT_MAKECMD+=" --mc" [ "$DEBUG" -eq 1 ] && OPT_MAKECMD+=" -d" [ $SAVETREES -eq 1 ] && OPT_MAKECMD+=" -t" @@ -469,8 +492,22 @@ function MakeScriptPostprocess { [ $DOO2_TASK_LC -eq 1 ] && { OPT_COMPARE+=" lc "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" lc-mc-pt lc-mc-prompt lc-mc-nonprompt lc-mc-eta lc-mc-phi "; } [ $DOO2_TASK_XIC -eq 1 ] && OPT_COMPARE+=" xic " [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " - [ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-mc "; } - [ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-substructure-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-substructure-mc "; } + #[ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-mc "; } + if [ $DOJETS -eq 1 ]; then + if [ "$ISMC" -eq 0 ]; then + OPT_COMPARE+=" jets-data " + else + OPT_COMPARE+=" jets-mc " + fi + fi + #[ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-substructure-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-substructure-mc "; } + if [ $DOJETSUBSTRUCTURE -eq 1 ]; then + if [ "$ISMC" -eq 0 ]; then + OPT_COMPARE+=" jets-substructure-data " + else + OPT_COMPARE+=" jets-substructure-mc " + fi + fi [ "$OPT_COMPARE" ] && POSTEXEC+=" && root -b -q -l \"$DIR_TASKS/Compare.C(\\\"\$FileO2\\\", \\\"\$FileAli\\\", \\\"$OPT_COMPARE\\\", $DORATIO)\"" } # Plot particle reconstruction efficiencies. diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 778c4686..6bd76443 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -1068,8 +1068,8 @@ "candPtMax": "100", "candYMin": "-0.8", "candYMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", "processData": "true", "processMCD": "false", "processMCP": "false" @@ -1086,8 +1086,8 @@ "candPtMax": "100.0", "candYMin": "-0.8", "candYMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", "processData": "false", "processMCD": "true", "processMCP": "false" @@ -1104,8 +1104,8 @@ "candPtMax": "100.0", "candYMin": "-0.8", "candYMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", "processData": "false", "processMCD": "false", "processMCP": "true" diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 9c4daf35..e3ec90f1 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -235,8 +235,9 @@ workflows: - o2-analysis-hf-candidate-selector-d0 o2-analysis-je-jet-finder-hf-data: &jethf + options: "--hfjetMode data" executable: o2-analysis-je-jet-finder-hf - dependencies: o2-analysis-hf-task-d0 + dependencies: [o2-analysis-event-selection, o2-analysis-hf-candidate-selector-d0] o2-analysis-je-jet-finder-hf-mcp: <<: *jethf @@ -254,17 +255,18 @@ workflows: o2-analysis-je-jet-substructure-hf-data: executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-data] + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-hf-data] + options: "--hfjetsubstructureMode data" o2-analysis-je-jet-substructure-hf-mcd: executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcd] + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-hf-mcd] options: "--hfjetsubstructureMode mcd" requires_mc: yes o2-analysis-je-jet-substructure-hf-mcp: executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcp] + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-hf-mcp] options: "--hfjetsubstructureMode mcp" requires_mc: yes @@ -305,6 +307,26 @@ workflows: dependencies: o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma tables: [HFCANDChicFull, HFCANDChicFullE, HFCANDChicFullP] + o2-analysis-je-jet-substructure-hf-output-data: + executable: o2-analysis-je-jet-substructure-hf-output + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-data, o2-analysis-je-jet-substructure-hf-data] + options: "--hfjetsubstructureoutputMode data" + tables: [JETSUBOutData] + + o2-analysis-je-jet-substructure-hf-output-mcd: + executable: o2-analysis-je-jet-substructure-hf-output + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcd, o2-analysis-je-jet-substructure-hf-mcd] + options: "--hfjetsubstructureoutputMode mcd" + requires_mc: yes + tables: [JETSUBOutMCD] + + o2-analysis-je-jet-substructure-hf-output-mcp: + executable: o2-analysis-je-jet-substructure-hf-output + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcp, o2-analysis-je-jet-substructure-hf-mcp] + options: "--hfjetsubstructureoutputMode mcp" + requires_mc: yes + tables: [JETSUBOutMCP] + # D meson correlations o2-analysis-hf-correlator-d0-d0bar: &d0d0barcorr diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py index b3d4e2db..3c2849ff 100644 --- a/exec/make_command_o2.py +++ b/exec/make_command_o2.py @@ -265,7 +265,6 @@ def main(): # Detect duplicate workflows. if string_wf + " " in command: msg_err("Workflow %s is already present." % string_wf) - # sys.exit(1) # Process options. if "options" in dic_wf_single: opt_wf = dic_wf_single["options"] From 19cc985b8245d0abe4857e5c86e681ad6f5e8501 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 11:56:40 +0200 Subject: [PATCH 05/24] Fix configuration for jets --- codeHF/config_input.sh | 4 ++-- codeHF/config_tasks.sh | 21 ++++++++------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 754343cd..0c5959bc 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -4,9 +4,9 @@ # Input specification for runtest.sh # (Modifies input parameters.) -INPUT_CASE=3 # Input case +INPUT_CASE=2 # Input case -NFILESMAX=50 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) +NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) # Number of input files per job (Automatic optimisation on if < 1.) NFILESPERJOB_CONVERT=0 # Conversion diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 09499bc0..9b33aed7 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -87,8 +87,8 @@ DOO2_TASK_XICC=0 # hf-task-xicc DOO2_TASK_B0=0 # hf-task-b0 DOO2_TASK_BPLUS=0 # hf-task-bplus DOJETS=0 # je-jet-finder-hf -DOJETMATCHINGHF=0 # je-jet-matching-hf (needs jets) -DOJETSUBSTRUCTURE=0 # je-jet-substructure-hf (needs jets) +DOJETMATCHINGHF=0 # je-jet-matching-hf +DOJETSUBSTRUCTURE=0 # je-jet-substructure-hf # 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 @@ -97,7 +97,7 @@ DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi 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_JETSUBSTRUCTURE=0 # jet-substructure-hf-output (needs jets and jet substructure) +DOO2_TREE_JETSUBSTRUCTURE=0 # jet-substructure-hf-output # Correlations DOO2_CORR_D0D0BAR_DATA=0 # hf-correlator-d0-d0bar DOO2_CORR_D0D0BAR_MCREC=0 # hf-correlator-d0-d0bar-mc-rec @@ -395,18 +395,16 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - #[ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp"; } if [ $DOJETS -eq 1 ]; then - if [ "$ISMC" -eq 0 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" else WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" fi fi [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" - #[ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp"; } if [ $DOJETSUBSTRUCTURE -eq 1 ]; then - if [ "$ISMC" -eq 0 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" else WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" @@ -446,9 +444,8 @@ function MakeScriptO2 { [ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi" [ $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_JETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data"; [ "$ISMC" -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp"; } if [ $DOO2_TREE_JETSUBSTRUCTURE -eq 1 ]; then - if [ "$ISMC" -eq 0 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" else WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" @@ -517,17 +514,15 @@ function MakeScriptPostprocess { [ $DOO2_TASK_LC -eq 1 ] && { OPT_COMPARE+=" lc "; [ "$INPUT_IS_MC" -eq 1 ] && OPT_COMPARE+=" lc-mc-pt lc-mc-prompt lc-mc-nonprompt lc-mc-eta lc-mc-phi "; } [ $DOO2_TASK_XIC -eq 1 ] && OPT_COMPARE+=" xic " [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " - #[ $DOJETS -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-mc "; } if [ $DOJETS -eq 1 ]; then - if [ "$ISMC" -eq 0 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then OPT_COMPARE+=" jets-data " else OPT_COMPARE+=" jets-mc " fi fi - #[ $DOJETSUBSTRUCTURE -eq 1 ] && { [ "$ISMC" -eq 0 ] && OPT_COMPARE+=" jets-substructure-data "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" jets-substructure-mc "; } if [ $DOJETSUBSTRUCTURE -eq 1 ]; then - if [ "$ISMC" -eq 0 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then OPT_COMPARE+=" jets-substructure-data " else OPT_COMPARE+=" jets-substructure-mc " From beb9a01820fbd752ffad22da53a6fcbba9950cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 12:13:16 +0200 Subject: [PATCH 06/24] Rename jet variables --- codeHF/config_tasks.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 9b33aed7..1d27a691 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -86,9 +86,9 @@ 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 -DOJETS=0 # je-jet-finder-hf -DOJETMATCHINGHF=0 # je-jet-matching-hf -DOJETSUBSTRUCTURE=0 # je-jet-substructure-hf +DOO2_JET_FIND=0 # je-jet-finder-hf +DOO2_JET_MATCH=0 # je-jet-matching-hf +DOO2_JET_SUB=0 # je-jet-substructure-hf # 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 @@ -97,7 +97,7 @@ DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi 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_JETSUBSTRUCTURE=0 # jet-substructure-hf-output +DOO2_TREE_JET_SUB=0 # jet-substructure-hf-output # Correlations DOO2_CORR_D0D0BAR_DATA=0 # hf-correlator-d0-d0bar DOO2_CORR_D0D0BAR_MCREC=0 # hf-correlator-d0-d0bar-mc-rec @@ -395,15 +395,15 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - if [ $DOJETS -eq 1 ]; then + if [ $DOO2_JET_FIND -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" else WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" fi fi - [ $DOJETMATCHINGHF -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" - if [ $DOJETSUBSTRUCTURE -eq 1 ]; then + [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" + if [ $DOO2_JET_SUB -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" else @@ -444,7 +444,7 @@ function MakeScriptO2 { [ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi" [ $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" - if [ $DOO2_TREE_JETSUBSTRUCTURE -eq 1 ]; then + if [ $DOO2_TREE_JET_SUB -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" else @@ -491,7 +491,7 @@ EOF } function MakeScriptAli { - ALIEXEC="root -b -q -l \"$DIR_TASKS/RunHFTaskLocal.C(\\\"\$FileIn\\\", \\\"\$JSON\\\", $INPUT_IS_MC, $USEO2VERTEXER, $USEALIEVCUTS, $DOJETS, $DOJETMATCHINGHF, $DOJETSUBSTRUCTURE)\"" + ALIEXEC="root -b -q -l \"$DIR_TASKS/RunHFTaskLocal.C(\\\"\$FileIn\\\", \\\"\$JSON\\\", $INPUT_IS_MC, $USEO2VERTEXER, $USEALIEVCUTS, $DOO2_JET_FIND, $DOO2_JET_MATCH, $DOO2_JET_SUB)\"" cat << EOF > "$SCRIPT_ALI" #!/bin/bash FileIn="\$1" @@ -514,14 +514,14 @@ function MakeScriptPostprocess { [ $DOO2_TASK_LC -eq 1 ] && { OPT_COMPARE+=" lc "; [ "$INPUT_IS_MC" -eq 1 ] && OPT_COMPARE+=" lc-mc-pt lc-mc-prompt lc-mc-nonprompt lc-mc-eta lc-mc-phi "; } [ $DOO2_TASK_XIC -eq 1 ] && OPT_COMPARE+=" xic " [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " - if [ $DOJETS -eq 1 ]; then + if [ $DOO2_JET_FIND -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then OPT_COMPARE+=" jets-data " else OPT_COMPARE+=" jets-mc " fi fi - if [ $DOJETSUBSTRUCTURE -eq 1 ]; then + if [ $DOO2_JET_SUB -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then OPT_COMPARE+=" jets-substructure-data " else From 1766dcc321410c91b955203bab2ef0c31396c981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 14:36:39 +0200 Subject: [PATCH 07/24] Move jets to a separate group --- codeHF/config_tasks.sh | 43 ++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 1d27a691..fe9d415d 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -86,9 +86,6 @@ 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_JET_FIND=0 # je-jet-finder-hf -DOO2_JET_MATCH=0 # je-jet-matching-hf -DOO2_JET_SUB=0 # je-jet-substructure-hf # 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 @@ -97,7 +94,6 @@ DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi 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_JET_SUB=0 # jet-substructure-hf-output # Correlations DOO2_CORR_D0D0BAR_DATA=0 # hf-correlator-d0-d0bar DOO2_CORR_D0D0BAR_MCREC=0 # hf-correlator-d0-d0bar-mc-rec @@ -110,6 +106,11 @@ DOO2_CORR_DPLUSHADRON=0 # hf-correlator-dplus-hadrons DOO2_CORR_DSHADRON=0 # hf-correlator-ds-hadrons DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow +# Jets +DOO2_JET_FIND=0 # je-jet-finder-hf +DOO2_JET_MATCH=0 # je-jet-matching-hf +DOO2_JET_SUB=0 # je-jet-substructure-hf +DOO2_JET_SUB_TREE=0 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter DOO2_CONV_FDD=0 # fdd-converter @@ -395,21 +396,6 @@ function MakeScriptO2 { [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" # User tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - if [ $DOO2_JET_FIND -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" - else - WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" - fi - fi - [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" - if [ $DOO2_JET_SUB -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" - else - WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" - fi - fi [ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi" [ $DOO2_TASK_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-ds" [ $DOO2_TASK_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-dplus" @@ -444,7 +430,23 @@ function MakeScriptO2 { [ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi" [ $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" - if [ $DOO2_TREE_JET_SUB -eq 1 ]; then + # Jets + if [ $DOO2_JET_FIND -eq 1 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then + WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" + else + WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" + fi + fi + [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" + if [ $DOO2_JET_SUB -eq 1 ]; then + if [ "$INPUT_IS_MC" -eq 0 ]; then + WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" + else + WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" + fi + fi + if [ $DOO2_JET_SUB_TREE -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" else @@ -514,6 +516,7 @@ function MakeScriptPostprocess { [ $DOO2_TASK_LC -eq 1 ] && { OPT_COMPARE+=" lc "; [ "$INPUT_IS_MC" -eq 1 ] && OPT_COMPARE+=" lc-mc-pt lc-mc-prompt lc-mc-nonprompt lc-mc-eta lc-mc-phi "; } [ $DOO2_TASK_XIC -eq 1 ] && OPT_COMPARE+=" xic " [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " + # Jets if [ $DOO2_JET_FIND -eq 1 ]; then if [ "$INPUT_IS_MC" -eq 0 ]; then OPT_COMPARE+=" jets-data " From 5d4f2b04b549b01adb0ccfa00ac0307bc0dae93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 14:48:48 +0200 Subject: [PATCH 08/24] Simplify jet options --- codeHF/config_tasks.sh | 45 +++++++++++------------------------------- 1 file changed, 11 insertions(+), 34 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index fe9d415d..660d9563 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -431,28 +431,16 @@ 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" # Jets - if [ $DOO2_JET_FIND -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" - else - WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" - fi + if [ "$INPUT_IS_MC" -eq 1 ]; then + [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" + [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" + [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" + else + [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" + [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" + [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" fi [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" - if [ $DOO2_JET_SUB -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" - else - WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" - fi - fi - if [ $DOO2_JET_SUB_TREE -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" - else - WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" - fi - fi # Converters [ $DOO2_CONV_MC -eq 1 ] && WORKFLOWS+=" o2-analysis-mc-converter" [ $DOO2_CONV_FDD -eq 1 ] && WORKFLOWS+=" o2-analysis-fdd-converter" @@ -517,20 +505,9 @@ function MakeScriptPostprocess { [ $DOO2_TASK_XIC -eq 1 ] && OPT_COMPARE+=" xic " [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " # Jets - if [ $DOO2_JET_FIND -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - OPT_COMPARE+=" jets-data " - else - OPT_COMPARE+=" jets-mc " - fi - fi - if [ $DOO2_JET_SUB -eq 1 ]; then - if [ "$INPUT_IS_MC" -eq 0 ]; then - OPT_COMPARE+=" jets-substructure-data " - else - OPT_COMPARE+=" jets-substructure-mc " - fi - fi + [ "$INPUT_IS_MC" -eq 1 ] && SUFFIX_JET="mc" || SUFFIX_JET="data" + [ $DOO2_JET_FIND -eq 1 ] && OPT_COMPARE+=" jets-${SUFFIX_JET} " + [ $DOO2_JET_SUB -eq 1 ] && OPT_COMPARE+=" jets-substructure-${SUFFIX_JET} " [ "$OPT_COMPARE" ] && POSTEXEC+=" && root -b -q -l \"$DIR_TASKS/Compare.C(\\\"\$FileO2\\\", \\\"\$FileAli\\\", \\\"$OPT_COMPARE\\\", $DORATIO)\"" } # Plot particle reconstruction efficiencies. From 7ae8707702ba75702d7d7b1a709aeaaee5362ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 15:33:21 +0200 Subject: [PATCH 09/24] Fix jet finders --- codeHF/config_tasks.sh | 20 ++-- codeHF/dpl-config_run3.json | 179 +++++++++++++++++++++++++++--------- codeHF/workflows.yml | 24 ++--- 3 files changed, 153 insertions(+), 70 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 660d9563..cd214100 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -31,7 +31,7 @@ DOPOSTPROCESS=1 # Run output postprocessing. (Comparison plots. Requires DOA # O2 database DATABASE_O2="workflows.yml" -MAKE_GRAPH=0 # Make topology graph. +MAKE_GRAPH=1 # Make topology graph. # Activation of O2 workflows # Trigger selection @@ -47,9 +47,9 @@ DOO2_PID_TOF=0 # pid-tof-full/alice3-pid-tof DOO2_PID_TOF_QA=0 # pid-tof-qa-mc DOO2_PID_BAYES=0 # pid-bayes # Vertexing -DOO2_SKIM=1 # hf-track-index-skim-creator -DOO2_CAND_2PRONG=1 # hf-candidate-creator-2prong -DOO2_CAND_3PRONG=1 # hf-candidate-creator-3prong +DOO2_SKIM=0 # hf-track-index-skim-creator +DOO2_CAND_2PRONG=0 # hf-candidate-creator-2prong +DOO2_CAND_3PRONG=0 # hf-candidate-creator-3prong DOO2_CAND_CASC=0 # hf-candidate-creator-cascade DOO2_CAND_LB=0 # hf-candidate-creator-lb DOO2_CAND_X=0 # hf-candidate-creator-x @@ -73,10 +73,10 @@ 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 # User tasks -DOO2_TASK_D0=1 # hf-task-d0 +DOO2_TASK_D0=0 # hf-task-d0 DOO2_TASK_DS=0 # hf-task-ds DOO2_TASK_DPLUS=0 # hf-task-dplus -DOO2_TASK_LC=1 # hf-task-lc +DOO2_TASK_LC=0 # hf-task-lc DOO2_TASK_LB=0 # hf-task-lb DOO2_TASK_XIC=0 # hf-task-xic DOO2_TASK_JPSI=0 # hf-task-jpsi @@ -107,7 +107,7 @@ DOO2_CORR_DSHADRON=0 # hf-correlator-ds-hadrons DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets -DOO2_JET_FIND=0 # je-jet-finder-hf +DOO2_JET_FIND=1 # je-jet-finder-d0 DOO2_JET_MATCH=0 # je-jet-matching-hf DOO2_JET_SUB=0 # je-jet-substructure-hf DOO2_JET_SUB_TREE=0 # je-jet-substructure-hf-output @@ -432,15 +432,15 @@ function MakeScriptO2 { [ $DOO2_TREE_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-bplus-to-d0-pi" # Jets if [ "$INPUT_IS_MC" -eq 1 ]; then - [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp" + [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-mcd-charged o2-analysis-je-jet-finder-d0-mcp-charged" [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" else - [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-data" + [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-data-charged" [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" fi - [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-mcd o2-analysis-je-jet-finder-hf-mcp o2-analysis-je-jet-matching-hf" + [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-mcd-charged o2-analysis-je-jet-finder-d0-mcp-charged o2-analysis-je-jet-matching-hf" # Converters [ $DOO2_CONV_MC -eq 1 ] && WORKFLOWS+=" o2-analysis-mc-converter" [ $DOO2_CONV_FDD -eq 1 ] && WORKFLOWS+=" o2-analysis-fdd-converter" diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 768d7c23..8e5e558f 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -1963,59 +1963,146 @@ ] } }, - "jet-finder-hf-data": { - "jetR": "0.4", - "jetPtMin": "0.0", - "jetPtMax": "1000.0", + "jet-finder-d0-data-charged": { + "vertexZCut": "10", "trackPtMin": "0.15", - "trackPtMax": "1000.0", - "trackEtaMin": "-0.8", - "trackEtaMax": "0.8", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", "candPtMin": "0", "candPtMax": "100", "candYMin": "-0.8", "candYMax": "0.8", - "selectionFlagD0": "0", - "selectionFlagD0bar": "0", - "processData": "true", - "processMCD": "false", - "processMCP": "false" - }, - "jet-finder-hf-mcd": { - "jetR": "0.4", - "jetPtMin": "0.0", - "jetPtMax": "1000.0", + "rejectBackgroundMCCandidates": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetTypeParticleLevel": "1", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoRhoAreaSub": "false", + "DoConstSub": "false", + "processDummy": "false", + "processChargedJetsData": "true", + "processChargedJetsMCD": "false", + "processChargedJetsMCP": "false" + }, + "jet-finder-d0-mcd-charged": { + "vertexZCut": "10", "trackPtMin": "0.15", - "trackPtMax": "1000.0", - "trackEtaMin": "-0.8", - "trackEtaMax": "0.8", - "candPtMin": "0.0", - "candPtMax": "100.0", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "candPtMin": "0", + "candPtMax": "100", "candYMin": "-0.8", "candYMax": "0.8", - "selectionFlagD0": "0", - "selectionFlagD0bar": "0", - "processData": "false", - "processMCD": "true", - "processMCP": "false" - }, - "jet-finder-hf-mcp": { - "jetR": "0.4", - "jetPtMin": "0.0", - "jetPtMax": "1000.0", + "rejectBackgroundMCCandidates": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetTypeParticleLevel": "1", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoRhoAreaSub": "false", + "DoConstSub": "false", + "processDummy": "false", + "processChargedJetsData": "false", + "processChargedJetsMCD": "true", + "processChargedJetsMCP": "false" + }, + "jet-finder-d0-mcp-charged": { + "vertexZCut": "10", "trackPtMin": "0.15", - "trackPtMax": "1000.0", - "trackEtaMin": "-0.8", - "trackEtaMax": "0.8", - "candPtMin": "0.0", - "candPtMax": "100.0", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "candPtMin": "0", + "candPtMax": "100", "candYMin": "-0.8", "candYMax": "0.8", - "selectionFlagD0": "0", - "selectionFlagD0bar": "0", - "processData": "false", - "processMCD": "false", - "processMCP": "true" + "rejectBackgroundMCCandidates": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetTypeParticleLevel": "1", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoRhoAreaSub": "false", + "DoConstSub": "false", + "processDummy": "false", + "processChargedJetsData": "false", + "processChargedJetsMCD": "false", + "processChargedJetsMCP": "true" }, "jet-substructure-hf-data": { "jetPtMin": "0.0", @@ -2666,7 +2753,7 @@ }, "hf-dplus-selection": { "selectionFlagDplus": "1", - "yCandMax": "0.800000012", + "yCandMax": "0.8", "ptCandMin": "1", "processDplusSelectionData": "true", "processDplusSelectionMcRec": "false", @@ -2675,12 +2762,12 @@ "hf-correlator-dplus-hadrons": { "selectionFlagDplus": "1", "applyEfficiency": "1", - "yCandMax": "0.800000012", - "etaTrackMax": "0.800000012", + "yCandMax": "0.8", + "etaTrackMax": "0.8", "dcaXYTrackMax": "1", "dcaZTrackMax": "1", "ptCandMin": "1", - "ptTrackMin": "0.300000012", + "ptTrackMin": "0.3", "ptTrackMax": "50", "multMin": "0", "multMax": "10000", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index f5d38b43..b87de526 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -270,39 +270,35 @@ workflows: o2-analysis-hf-correlator-ds-hadrons: dependencies: o2-analysis-hf-candidate-selector-ds-to-k-k-pi - o2-analysis-je-jet-finder-hf-data: &jethf - options: "--hfjetMode data" - executable: o2-analysis-je-jet-finder-hf + o2-analysis-je-jet-finder-d0-data-charged: &jethf dependencies: [o2-analysis-event-selection, o2-analysis-hf-candidate-selector-d0] - o2-analysis-je-jet-finder-hf-mcp: + o2-analysis-je-jet-finder-d0-mcp-charged: <<: *jethf - options: "--hfjetMode mcp" requires_mc: yes - o2-analysis-je-jet-finder-hf-mcd: + o2-analysis-je-jet-finder-d0-mcd-charged: <<: *jethf - options: "--hfjetMode mcd" requires_mc: yes o2-analysis-je-jet-matching-hf: requires_mc: yes - dependencies: [o2-analysis-je-jet-finder-hf-mcd, o2-analysis-je-jet-finder-hf-mcp] + dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] o2-analysis-je-jet-substructure-hf-data: executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-hf-data] + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] options: "--hfjetsubstructureMode data" o2-analysis-je-jet-substructure-hf-mcd: executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-hf-mcd] + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged] options: "--hfjetsubstructureMode mcd" requires_mc: yes o2-analysis-je-jet-substructure-hf-mcp: executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-hf-mcp] + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcp-charged] options: "--hfjetsubstructureMode mcp" requires_mc: yes @@ -347,20 +343,20 @@ workflows: o2-analysis-je-jet-substructure-hf-output-data: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-data, o2-analysis-je-jet-substructure-hf-data] + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-d0-data-charged, o2-analysis-je-jet-substructure-hf-data] options: "--hfjetsubstructureoutputMode data" tables: [JETSUBOutData] o2-analysis-je-jet-substructure-hf-output-mcd: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcd, o2-analysis-je-jet-substructure-hf-mcd] + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-substructure-hf-mcd] options: "--hfjetsubstructureoutputMode mcd" requires_mc: yes tables: [JETSUBOutMCD] o2-analysis-je-jet-substructure-hf-output-mcp: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-hf-mcp, o2-analysis-je-jet-substructure-hf-mcp] + dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-d0-mcp-charged, o2-analysis-je-jet-substructure-hf-mcp] options: "--hfjetsubstructureoutputMode mcp" requires_mc: yes tables: [JETSUBOutMCP] From e7580bf9f79f7f5278219153d4341c1f5c78637d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 16:39:38 +0200 Subject: [PATCH 10/24] Fix jet matching --- codeHF/config_tasks.sh | 6 +++--- codeHF/dpl-config_run3.json | 9 +++++++++ codeHF/workflows.yml | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index cd214100..669c5759 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -107,8 +107,8 @@ DOO2_CORR_DSHADRON=0 # hf-correlator-ds-hadrons DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets -DOO2_JET_FIND=1 # je-jet-finder-d0 -DOO2_JET_MATCH=0 # je-jet-matching-hf +DOO2_JET_FIND=0 # je-jet-finder-d0 +DOO2_JET_MATCH=1 # je-jet-matching DOO2_JET_SUB=0 # je-jet-substructure-hf DOO2_JET_SUB_TREE=0 # je-jet-substructure-hf-output # Converters @@ -440,7 +440,7 @@ function MakeScriptO2 { [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" fi - [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-mcd-charged o2-analysis-je-jet-finder-d0-mcp-charged o2-analysis-je-jet-matching-hf" + [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-matching" # Converters [ $DOO2_CONV_MC -eq 1 ] && WORKFLOWS+=" o2-analysis-mc-converter" [ $DOO2_CONV_FDD -eq 1 ] && WORKFLOWS+=" o2-analysis-fdd-converter" diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 8e5e558f..ca23dac6 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -2104,6 +2104,15 @@ "processChargedJetsMCD": "false", "processChargedJetsMCP": "true" }, + "jet-matching-d0-ch": { + "doMatchingGeo": "true", + "doMatchingPt": "true", + "doMatchingHf": "true", + "maxMatchingDistance": "0.4", + "minPtFraction": "0", + "processDummy": "false", + "processJets": "true" + }, "jet-substructure-hf-data": { "jetPtMin": "0.0", "zCut": "0.1", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index b87de526..afacdb0e 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -281,7 +281,7 @@ workflows: <<: *jethf requires_mc: yes - o2-analysis-je-jet-matching-hf: + o2-analysis-je-jet-matching: requires_mc: yes dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] From 1da831a7b23b19641ac75f14c353a294e9ed19cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 18:23:24 +0200 Subject: [PATCH 11/24] Fix jet substructure --- codeHF/config_tasks.sh | 4 ++-- codeHF/dpl-config_run3.json | 41 +++++++++++++++---------------------- codeHF/workflows.yml | 3 --- 3 files changed, 18 insertions(+), 30 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 669c5759..15372942 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -108,8 +108,8 @@ DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 -DOO2_JET_MATCH=1 # je-jet-matching -DOO2_JET_SUB=0 # je-jet-substructure-hf +DOO2_JET_MATCH=0 # je-jet-matching +DOO2_JET_SUB=1 # je-jet-substructure-hf DOO2_JET_SUB_TREE=0 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index ca23dac6..0a034a3e 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -2113,35 +2113,26 @@ "processDummy": "false", "processJets": "true" }, - "jet-substructure-hf-data": { - "jetPtMin": "0.0", + "jet-substructure-D0-data": { "zCut": "0.1", - "beta": "0.0", - "jetR": "0.4", - "doConstSub": "false", - "processData": "true", - "processMCD": "false", - "processMCP": "false" + "beta": "0", + "processDummy": "true", + "processChargedJetsHF": "false", + "processChargedJetsHFMCP": "false" }, - "jet-substructure-hf-mcd": { - "jetPtMin": "0.0", + "jet-substructure-D0-mcd": { "zCut": "0.1", - "beta": "0.0", - "jetR": "0.4", - "doConstSub": "false", - "processData": "false", - "processMCD": "true", - "processMCP": "false" - }, - "jet-substructure-hf-mcp": { - "jetPtMin": "0.0", + "beta": "0", + "processDummy": "false", + "processChargedJetsHF": "true", + "processChargedJetsHFMCP": "false" + }, + "jet-substructure-D0-mcp": { "zCut": "0.1", - "beta": "0.0", - "jetR": "0.4", - "doConstSub": "false", - "processData": "false", - "processMCD": "false", - "processMCP": "true" + "beta": "0", + "processDummy": "false", + "processChargedJetsHF": "false", + "processChargedJetsHFMCP": "true" }, "hf-task-d0": { "selectionFlagD0": "0", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index afacdb0e..10d4d8ae 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -288,18 +288,15 @@ workflows: o2-analysis-je-jet-substructure-hf-data: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] - options: "--hfjetsubstructureMode data" o2-analysis-je-jet-substructure-hf-mcd: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged] - options: "--hfjetsubstructureMode mcd" requires_mc: yes o2-analysis-je-jet-substructure-hf-mcp: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcp-charged] - options: "--hfjetsubstructureMode mcp" requires_mc: yes # Tree creators From 294eee77c575e3b1cb15dc284198961e090bd352 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 22:16:36 +0200 Subject: [PATCH 12/24] Fix jet substructure output --- codeHF/config_tasks.sh | 6 +++--- codeHF/workflows.yml | 21 ++++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 15372942..0e65ec07 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -109,8 +109,8 @@ DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 DOO2_JET_MATCH=0 # je-jet-matching -DOO2_JET_SUB=1 # je-jet-substructure-hf -DOO2_JET_SUB_TREE=0 # je-jet-substructure-hf-output +DOO2_JET_SUB=0 # je-jet-substructure-hf +DOO2_JET_SUB_TREE=1 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter DOO2_CONV_FDD=0 # fdd-converter @@ -133,7 +133,7 @@ APPLYCUTS_XICC=0 # Apply Ξcc selection cuts. APPLYCUTS_B0=0 # Apply B0 selection cuts. APPLYCUTS_BPLUS=0 # Apply B+ selection cuts. -SAVETREES=0 # Save O2 tables to trees. +SAVETREES=1 # Save O2 tables to trees. USEO2VERTEXER=1 # Use the O2 vertexer in AliPhysics. USEALIEVCUTS=1 # Use AliEventCuts in AliPhysics (as used by conversion task) DORATIO=1 # Plot histogram ratios in comparison. diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 10d4d8ae..bca1c9a4 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -272,14 +272,17 @@ workflows: o2-analysis-je-jet-finder-d0-data-charged: &jethf dependencies: [o2-analysis-event-selection, o2-analysis-hf-candidate-selector-d0] + tables: [D0JET, D0JETCONSTS, D0JETCONSTSUB] o2-analysis-je-jet-finder-d0-mcp-charged: <<: *jethf requires_mc: yes + tables: [D0PJET, D0PJETCONSTS, D0PJETCONSTSUB] o2-analysis-je-jet-finder-d0-mcd-charged: <<: *jethf requires_mc: yes + tables: [D0DJET, D0DJETCONSTS, D0DJETCONSTSUB] o2-analysis-je-jet-matching: requires_mc: yes @@ -288,16 +291,19 @@ workflows: o2-analysis-je-jet-substructure-hf-data: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] + tables: D0SS o2-analysis-je-jet-substructure-hf-mcd: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged] requires_mc: yes + tables: D0MCDSS o2-analysis-je-jet-substructure-hf-mcp: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcp-charged] requires_mc: yes + tables: D0MCPSS # Tree creators @@ -340,23 +346,20 @@ workflows: o2-analysis-je-jet-substructure-hf-output-data: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-d0-data-charged, o2-analysis-je-jet-substructure-hf-data] - options: "--hfjetsubstructureoutputMode data" - tables: [JETSUBOutData] + dependencies: o2-analysis-je-jet-substructure-hf-data + tables: [D0O, D0SSO] o2-analysis-je-jet-substructure-hf-output-mcd: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-substructure-hf-mcd] - options: "--hfjetsubstructureoutputMode mcd" + dependencies: o2-analysis-je-jet-substructure-hf-mcd requires_mc: yes - tables: [JETSUBOutMCD] + tables: [D0MCDO, D0MCDSSO] o2-analysis-je-jet-substructure-hf-output-mcp: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: [o2-analysis-hf-task-d0, o2-analysis-je-jet-finder-d0-mcp-charged, o2-analysis-je-jet-substructure-hf-mcp] - options: "--hfjetsubstructureoutputMode mcp" + dependencies: o2-analysis-je-jet-substructure-hf-mcp requires_mc: yes - tables: [JETSUBOutMCP] + tables: [D0MCPO, D0MCPSSO] # D meson correlations From ca46497190089fd98981f8abbcfa1c6b7efeabc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 22:37:26 +0200 Subject: [PATCH 13/24] Organise jet workflows --- codeHF/config_tasks.sh | 16 +++---- codeHF/workflows.yml | 106 +++++++++++++++++++++-------------------- 2 files changed, 62 insertions(+), 60 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 0e65ec07..5d43db13 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -110,13 +110,13 @@ DOO2_TASK_FLOW=0 # hf-task-flow DOO2_JET_FIND=0 # je-jet-finder-d0 DOO2_JET_MATCH=0 # je-jet-matching DOO2_JET_SUB=0 # je-jet-substructure-hf -DOO2_JET_SUB_TREE=1 # je-jet-substructure-hf-output +DOO2_JET_SUB_OUT=1 # je-jet-substructure-hf-output # Converters -DOO2_CONV_MC=0 # mc-converter -DOO2_CONV_FDD=0 # fdd-converter -DOO2_CONV_COLL=0 # collision-converter -DOO2_CONV_ZDC=1 # zdc-converter -DOO2_CONV_BC=1 # bc-converter +DOO2_CONV_MC=0 # mc-converter +DOO2_CONV_FDD=0 # fdd-converter +DOO2_CONV_COLL=0 # collision-converter +DOO2_CONV_ZDC=1 # zdc-converter +DOO2_CONV_BC=1 # bc-converter # Selection cuts APPLYCUTS_D0=1 # Apply D0 selection cuts. @@ -434,11 +434,11 @@ function MakeScriptO2 { if [ "$INPUT_IS_MC" -eq 1 ]; then [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-mcd-charged o2-analysis-je-jet-finder-d0-mcp-charged" [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" - [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" + [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" else [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-data-charged" [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" - [ $DOO2_JET_SUB_TREE -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" + [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" fi [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-matching" # Converters diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index bca1c9a4..6a880f30 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -270,41 +270,6 @@ workflows: o2-analysis-hf-correlator-ds-hadrons: dependencies: o2-analysis-hf-candidate-selector-ds-to-k-k-pi - o2-analysis-je-jet-finder-d0-data-charged: &jethf - dependencies: [o2-analysis-event-selection, o2-analysis-hf-candidate-selector-d0] - tables: [D0JET, D0JETCONSTS, D0JETCONSTSUB] - - o2-analysis-je-jet-finder-d0-mcp-charged: - <<: *jethf - requires_mc: yes - tables: [D0PJET, D0PJETCONSTS, D0PJETCONSTSUB] - - o2-analysis-je-jet-finder-d0-mcd-charged: - <<: *jethf - requires_mc: yes - tables: [D0DJET, D0DJETCONSTS, D0DJETCONSTSUB] - - o2-analysis-je-jet-matching: - requires_mc: yes - dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] - - o2-analysis-je-jet-substructure-hf-data: - executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] - tables: D0SS - - o2-analysis-je-jet-substructure-hf-mcd: - executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged] - requires_mc: yes - tables: D0MCDSS - - o2-analysis-je-jet-substructure-hf-mcp: - executable: o2-analysis-je-jet-substructure-hf - dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcp-charged] - requires_mc: yes - tables: D0MCPSS - # Tree creators o2-analysis-hf-tree-creator-d0-to-k-pi: @@ -344,23 +309,6 @@ workflows: dependencies: o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma tables: [HFCANDChicFull, HFCANDChicFullE, HFCANDChicFullP] - o2-analysis-je-jet-substructure-hf-output-data: - executable: o2-analysis-je-jet-substructure-hf-output - dependencies: o2-analysis-je-jet-substructure-hf-data - tables: [D0O, D0SSO] - - o2-analysis-je-jet-substructure-hf-output-mcd: - executable: o2-analysis-je-jet-substructure-hf-output - dependencies: o2-analysis-je-jet-substructure-hf-mcd - requires_mc: yes - tables: [D0MCDO, D0MCDSSO] - - o2-analysis-je-jet-substructure-hf-output-mcp: - executable: o2-analysis-je-jet-substructure-hf-output - dependencies: o2-analysis-je-jet-substructure-hf-mcp - requires_mc: yes - tables: [D0MCPO, D0MCPSSO] - # D meson correlations o2-analysis-hf-correlator-d0-d0bar: &d0d0barcorr @@ -395,6 +343,60 @@ workflows: dependencies: o2-analysis-hf-candidate-selector-d0 tables: [DHADRONPAIR, DHADRONRECOINFO] + # Jets + + o2-analysis-je-jet-finder-d0-data-charged: &jethf + dependencies: [o2-analysis-event-selection, o2-analysis-hf-candidate-selector-d0] + tables: [D0JET, D0JETCONSTS, D0JETCONSTSUB] + + o2-analysis-je-jet-finder-d0-mcd-charged: + <<: *jethf + requires_mc: yes + tables: [D0DJET, D0DJETCONSTS, D0DJETCONSTSUB] + + o2-analysis-je-jet-finder-d0-mcp-charged: + <<: *jethf + requires_mc: yes + tables: [D0PJET, D0PJETCONSTS, D0PJETCONSTSUB] + + o2-analysis-je-jet-matching: + dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] + requires_mc: yes + + o2-analysis-je-jet-substructure-hf-data: + executable: o2-analysis-je-jet-substructure-hf + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] + tables: D0SS + + o2-analysis-je-jet-substructure-hf-mcd: + executable: o2-analysis-je-jet-substructure-hf + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged] + requires_mc: yes + tables: D0MCDSS + + o2-analysis-je-jet-substructure-hf-mcp: + executable: o2-analysis-je-jet-substructure-hf + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcp-charged] + requires_mc: yes + tables: D0MCPSS + + o2-analysis-je-jet-substructure-hf-output-data: + executable: o2-analysis-je-jet-substructure-hf-output + dependencies: o2-analysis-je-jet-substructure-hf-data + tables: [D0O, D0SSO] + + o2-analysis-je-jet-substructure-hf-output-mcd: + executable: o2-analysis-je-jet-substructure-hf-output + dependencies: o2-analysis-je-jet-substructure-hf-mcd + requires_mc: yes + tables: [D0MCDO, D0MCDSSO] + + o2-analysis-je-jet-substructure-hf-output-mcp: + executable: o2-analysis-je-jet-substructure-hf-output + dependencies: o2-analysis-je-jet-substructure-hf-mcp + requires_mc: yes + tables: [D0MCPO, D0MCPSSO] + # QA o2-analysis-qa-efficiency: From d8e5489cdc112c1a4382012099a9c9594bbe389b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 22:43:03 +0200 Subject: [PATCH 14/24] Add matching tables --- codeHF/config_tasks.sh | 4 ++-- codeHF/workflows.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 5d43db13..ebe1badb 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -108,9 +108,9 @@ DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 -DOO2_JET_MATCH=0 # je-jet-matching +DOO2_JET_MATCH=1 # je-jet-matching DOO2_JET_SUB=0 # je-jet-substructure-hf -DOO2_JET_SUB_OUT=1 # je-jet-substructure-hf-output +DOO2_JET_SUB_OUT=0 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter DOO2_CONV_FDD=0 # fdd-converter diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 6a880f30..3d05a408 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -362,6 +362,7 @@ workflows: o2-analysis-je-jet-matching: dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] requires_mc: yes + tables: [D0JETMP2D, D0JETMD2P] o2-analysis-je-jet-substructure-hf-data: executable: o2-analysis-je-jet-substructure-hf From b7a13b665bdba6ef880cabb4b5c56b340a436928 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 22:45:24 +0200 Subject: [PATCH 15/24] Only warn for duplicate workflows --- exec/make_command_o2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py index 38aee8a7..3e5d4286 100644 --- a/exec/make_command_o2.py +++ b/exec/make_command_o2.py @@ -267,7 +267,7 @@ def main(): string_wf = wf # Detect duplicate workflows. if string_wf + " " in command: - msg_err("Workflow %s is already present." % string_wf) + msg_warn("Workflow %s is already present." % string_wf) # Process options. if "options" in dic_wf_single: opt_wf = dic_wf_single["options"] From ce0180c0013bce82452bcfff30a8d5f0d7b7b968 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 23:50:54 +0200 Subject: [PATCH 16/24] Set process function switches for jet substructure --- codeHF/config_tasks.sh | 23 ++++++++++++++++++++--- codeHF/dpl-config_run3.json | 12 ++++++------ 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index ebe1badb..420dbefe 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -108,8 +108,8 @@ DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 -DOO2_JET_MATCH=1 # je-jet-matching -DOO2_JET_SUB=0 # je-jet-substructure-hf +DOO2_JET_MATCH=0 # je-jet-matching +DOO2_JET_SUB=1 # je-jet-substructure-hf DOO2_JET_SUB_OUT=0 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter @@ -133,7 +133,7 @@ APPLYCUTS_XICC=0 # Apply Ξcc selection cuts. APPLYCUTS_B0=0 # Apply B0 selection cuts. APPLYCUTS_BPLUS=0 # Apply B+ selection cuts. -SAVETREES=1 # Save O2 tables to trees. +SAVETREES=0 # Save O2 tables to trees. USEO2VERTEXER=1 # Use the O2 vertexer in AliPhysics. USEALIEVCUTS=1 # Use AliEventCuts in AliPhysics (as used by conversion task) DORATIO=1 # Plot histogram ratios in comparison. @@ -258,6 +258,23 @@ function AdjustJson { ReplaceString "\"processSameRun2\": \"false\"" "\"processSameRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." fi + # jet-substructure... + if [ "$INPUT_IS_MC" -eq 1 ]; then + ReplaceString "\"processChargedJetsHF_data\": \"true\"" "\"processChargedJetsHF_data\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDummy_data\": \"false\"" "\"processDummy_data\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + else + ReplaceString "\"processChargedJetsHF_mcd\": \"true\"" "\"processChargedJetsHF_mcd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processChargedJetsHFMCP_mcp\": \"true\"" "\"processChargedJetsHFMCP_mcp\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDummy_mcd\": \"false\"" "\"processDummy_mcd\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDummy_mcp\": \"false\"" "\"processDummy_mcp\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + ReplaceString "\"processChargedJetsHF_data\"" "\"processChargedJetsHF\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processChargedJetsHF_mcd\"" "\"processChargedJetsHF\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processChargedJetsHFMCP_mcp\"" "\"processChargedJetsHFMCP\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDummy_data\"" "\"processDummy\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDummy_mcd\"" "\"processDummy\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDummy_mcp\"" "\"processDummy\"" "$JSON" || ErrExit "Failed to edit $JSON." + # Enable D0 selection. if [ $APPLYCUTS_D0 -eq 1 ]; then MsgWarn "Using D0 selection cuts" diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 0a034a3e..e85689e7 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -2116,23 +2116,23 @@ "jet-substructure-D0-data": { "zCut": "0.1", "beta": "0", - "processDummy": "true", - "processChargedJetsHF": "false", + "processDummy_data": "false", + "processChargedJetsHF_data": "true", "processChargedJetsHFMCP": "false" }, "jet-substructure-D0-mcd": { "zCut": "0.1", "beta": "0", - "processDummy": "false", - "processChargedJetsHF": "true", + "processDummy_mcd": "false", + "processChargedJetsHF_mcd": "true", "processChargedJetsHFMCP": "false" }, "jet-substructure-D0-mcp": { "zCut": "0.1", "beta": "0", - "processDummy": "false", + "processDummy_mcp": "false", "processChargedJetsHF": "false", - "processChargedJetsHFMCP": "true" + "processChargedJetsHFMCP_mcp": "true" }, "hf-task-d0": { "selectionFlagD0": "0", From 13ed884c89aac8e77f9113a6bd7651793a6615ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Fri, 8 Sep 2023 23:54:13 +0200 Subject: [PATCH 17/24] Move jet json block --- codeHF/dpl-config_run3.json | 342 ++++++++++++++++++------------------ 1 file changed, 171 insertions(+), 171 deletions(-) diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index e85689e7..ca536956 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -1963,177 +1963,6 @@ ] } }, - "jet-finder-d0-data-charged": { - "vertexZCut": "10", - "trackPtMin": "0.15", - "trackPtMax": "1000", - "trackEtaMin": "-0.9", - "trackEtaMax": "0.9", - "trackPhiMin": "-999", - "trackPhiMax": "999", - "trackSelections": "globalTracks", - "eventSelections": "sel8", - "particleSelections": "PhysicalPrimary", - "clusterDefinition": "kV3Default", - "clusterEtaMin": "-0.7", - "clusterEtaMax": "0.7", - "clusterPhiMin": "-999", - "clusterPhiMax": "999", - "candPtMin": "0", - "candPtMax": "100", - "candYMin": "-0.8", - "candYMax": "0.8", - "rejectBackgroundMCCandidates": "true", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "selectionFlagLcToPKPi": "1", - "selectionFlagLcToPiPK": "1", - "selectionFlagBplus": "1", - "jetRadius": { - "values": [ - "0.4" - ] - }, - "jetPtMin": "0", - "jetPtMax": "1000", - "jetEtaMin": "-99", - "jetEtaMax": "99", - "jetTypeParticleLevel": "1", - "jetAlgorithm": "2", - "jetRecombScheme": "0", - "jetGhostArea": "0.005", - "ghostRepeat": "1", - "DoRhoAreaSub": "false", - "DoConstSub": "false", - "processDummy": "false", - "processChargedJetsData": "true", - "processChargedJetsMCD": "false", - "processChargedJetsMCP": "false" - }, - "jet-finder-d0-mcd-charged": { - "vertexZCut": "10", - "trackPtMin": "0.15", - "trackPtMax": "1000", - "trackEtaMin": "-0.9", - "trackEtaMax": "0.9", - "trackPhiMin": "-999", - "trackPhiMax": "999", - "trackSelections": "globalTracks", - "eventSelections": "sel8", - "particleSelections": "PhysicalPrimary", - "clusterDefinition": "kV3Default", - "clusterEtaMin": "-0.7", - "clusterEtaMax": "0.7", - "clusterPhiMin": "-999", - "clusterPhiMax": "999", - "candPtMin": "0", - "candPtMax": "100", - "candYMin": "-0.8", - "candYMax": "0.8", - "rejectBackgroundMCCandidates": "true", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "selectionFlagLcToPKPi": "1", - "selectionFlagLcToPiPK": "1", - "selectionFlagBplus": "1", - "jetRadius": { - "values": [ - "0.4" - ] - }, - "jetPtMin": "0", - "jetPtMax": "1000", - "jetEtaMin": "-99", - "jetEtaMax": "99", - "jetTypeParticleLevel": "1", - "jetAlgorithm": "2", - "jetRecombScheme": "0", - "jetGhostArea": "0.005", - "ghostRepeat": "1", - "DoRhoAreaSub": "false", - "DoConstSub": "false", - "processDummy": "false", - "processChargedJetsData": "false", - "processChargedJetsMCD": "true", - "processChargedJetsMCP": "false" - }, - "jet-finder-d0-mcp-charged": { - "vertexZCut": "10", - "trackPtMin": "0.15", - "trackPtMax": "1000", - "trackEtaMin": "-0.9", - "trackEtaMax": "0.9", - "trackPhiMin": "-999", - "trackPhiMax": "999", - "trackSelections": "globalTracks", - "eventSelections": "sel8", - "particleSelections": "PhysicalPrimary", - "clusterDefinition": "kV3Default", - "clusterEtaMin": "-0.7", - "clusterEtaMax": "0.7", - "clusterPhiMin": "-999", - "clusterPhiMax": "999", - "candPtMin": "0", - "candPtMax": "100", - "candYMin": "-0.8", - "candYMax": "0.8", - "rejectBackgroundMCCandidates": "true", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "selectionFlagLcToPKPi": "1", - "selectionFlagLcToPiPK": "1", - "selectionFlagBplus": "1", - "jetRadius": { - "values": [ - "0.4" - ] - }, - "jetPtMin": "0", - "jetPtMax": "1000", - "jetEtaMin": "-99", - "jetEtaMax": "99", - "jetTypeParticleLevel": "1", - "jetAlgorithm": "2", - "jetRecombScheme": "0", - "jetGhostArea": "0.005", - "ghostRepeat": "1", - "DoRhoAreaSub": "false", - "DoConstSub": "false", - "processDummy": "false", - "processChargedJetsData": "false", - "processChargedJetsMCD": "false", - "processChargedJetsMCP": "true" - }, - "jet-matching-d0-ch": { - "doMatchingGeo": "true", - "doMatchingPt": "true", - "doMatchingHf": "true", - "maxMatchingDistance": "0.4", - "minPtFraction": "0", - "processDummy": "false", - "processJets": "true" - }, - "jet-substructure-D0-data": { - "zCut": "0.1", - "beta": "0", - "processDummy_data": "false", - "processChargedJetsHF_data": "true", - "processChargedJetsHFMCP": "false" - }, - "jet-substructure-D0-mcd": { - "zCut": "0.1", - "beta": "0", - "processDummy_mcd": "false", - "processChargedJetsHF_mcd": "true", - "processChargedJetsHFMCP": "false" - }, - "jet-substructure-D0-mcp": { - "zCut": "0.1", - "beta": "0", - "processDummy_mcp": "false", - "processChargedJetsHF": "false", - "processChargedJetsHFMCP_mcp": "true" - }, "hf-task-d0": { "selectionFlagD0": "0", "selectionFlagD0bar": "0", @@ -2811,6 +2640,177 @@ "processMcRecMixedEvent": "false", "processMcGenMixedEvent": "false" }, + "jet-finder-d0-data-charged": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "candPtMin": "0", + "candPtMax": "100", + "candYMin": "-0.8", + "candYMax": "0.8", + "rejectBackgroundMCCandidates": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetTypeParticleLevel": "1", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoRhoAreaSub": "false", + "DoConstSub": "false", + "processDummy": "false", + "processChargedJetsData": "true", + "processChargedJetsMCD": "false", + "processChargedJetsMCP": "false" + }, + "jet-finder-d0-mcd-charged": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "candPtMin": "0", + "candPtMax": "100", + "candYMin": "-0.8", + "candYMax": "0.8", + "rejectBackgroundMCCandidates": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetTypeParticleLevel": "1", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoRhoAreaSub": "false", + "DoConstSub": "false", + "processDummy": "false", + "processChargedJetsData": "false", + "processChargedJetsMCD": "true", + "processChargedJetsMCP": "false" + }, + "jet-finder-d0-mcp-charged": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "candPtMin": "0", + "candPtMax": "100", + "candYMin": "-0.8", + "candYMax": "0.8", + "rejectBackgroundMCCandidates": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetTypeParticleLevel": "1", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoRhoAreaSub": "false", + "DoConstSub": "false", + "processDummy": "false", + "processChargedJetsData": "false", + "processChargedJetsMCD": "false", + "processChargedJetsMCP": "true" + }, + "jet-matching-d0-ch": { + "doMatchingGeo": "true", + "doMatchingPt": "true", + "doMatchingHf": "true", + "maxMatchingDistance": "0.4", + "minPtFraction": "0", + "processDummy": "false", + "processJets": "true" + }, + "jet-substructure-D0-data": { + "zCut": "0.1", + "beta": "0", + "processDummy_data": "false", + "processChargedJetsHF_data": "true", + "processChargedJetsHFMCP": "false" + }, + "jet-substructure-D0-mcd": { + "zCut": "0.1", + "beta": "0", + "processDummy_mcd": "false", + "processChargedJetsHF_mcd": "true", + "processChargedJetsHFMCP": "false" + }, + "jet-substructure-D0-mcp": { + "zCut": "0.1", + "beta": "0", + "processDummy_mcp": "false", + "processChargedJetsHF": "false", + "processChargedJetsHFMCP_mcp": "true" + }, "collision-converter": { "doNotSwap": "false", "debug": "false", From d5757a10f96db39c71a4b983bdc06e3ac4d491ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Sat, 9 Sep 2023 00:17:37 +0200 Subject: [PATCH 18/24] Add configuration for jet substructure output --- codeHF/config_input.sh | 2 +- codeHF/config_tasks.sh | 10 ++++++++-- codeHF/dpl-config_run3.json | 30 ++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 0c5959bc..dc093c7b 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -4,7 +4,7 @@ # Input specification for runtest.sh # (Modifies input parameters.) -INPUT_CASE=2 # Input case +INPUT_CASE=1 # Input case NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 420dbefe..e0e3fe9f 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -109,8 +109,8 @@ DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 DOO2_JET_MATCH=0 # je-jet-matching -DOO2_JET_SUB=1 # je-jet-substructure-hf -DOO2_JET_SUB_OUT=0 # je-jet-substructure-hf-output +DOO2_JET_SUB=0 # je-jet-substructure-hf +DOO2_JET_SUB_OUT=1 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter DOO2_CONV_FDD=0 # fdd-converter @@ -261,16 +261,22 @@ function AdjustJson { # jet-substructure... if [ "$INPUT_IS_MC" -eq 1 ]; then ReplaceString "\"processChargedJetsHF_data\": \"true\"" "\"processChargedJetsHF_data\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processOutput_data\": \"true\"" "\"processOutput_data\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processDummy_data\": \"false\"" "\"processDummy_data\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." else ReplaceString "\"processChargedJetsHF_mcd\": \"true\"" "\"processChargedJetsHF_mcd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processChargedJetsHFMCP_mcp\": \"true\"" "\"processChargedJetsHFMCP_mcp\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processOutput_mcd\": \"true\"" "\"processOutput_mcd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processOutput_mcp\": \"true\"" "\"processOutput_mcp\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processDummy_mcd\": \"false\"" "\"processDummy_mcd\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processDummy_mcp\": \"false\"" "\"processDummy_mcp\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." fi ReplaceString "\"processChargedJetsHF_data\"" "\"processChargedJetsHF\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processChargedJetsHF_mcd\"" "\"processChargedJetsHF\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processChargedJetsHFMCP_mcp\"" "\"processChargedJetsHFMCP\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processOutput_data\"" "\"processOutput\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processOutput_mcd\"" "\"processOutput\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processOutput_mcp\"" "\"processOutput\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processDummy_data\"" "\"processDummy\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processDummy_mcd\"" "\"processDummy\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processDummy_mcp\"" "\"processDummy\"" "$JSON" || ErrExit "Failed to edit $JSON." diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index ca536956..16b598b5 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -2811,6 +2811,36 @@ "processChargedJetsHF": "false", "processChargedJetsHFMCP_mcp": "true" }, + "jet-substructure-output-D0-data": { + "jetPtMin": "0", + "jetRadii": { + "values": [ + "0.4" + ] + }, + "processDummy_data": "false", + "processOutput_data": "true" + }, + "jet-substructure-output-D0-mcd": { + "jetPtMin": "0", + "jetRadii": { + "values": [ + "0.4" + ] + }, + "processDummy_mcd": "false", + "processOutput_mcd": "true" + }, + "jet-substructure-output-D0-mcp": { + "jetPtMin": "0", + "jetRadii": { + "values": [ + "0.4" + ] + }, + "processDummy_mcp": "false", + "processOutput_mcp": "true" + }, "collision-converter": { "doNotSwap": "false", "debug": "false", From bf491997b8a7225bf7b8dc8328d250ad0d262f9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Sat, 9 Sep 2023 01:19:03 +0200 Subject: [PATCH 19/24] Add jet finder QA --- codeHF/config_input.sh | 2 +- codeHF/config_tasks.sh | 15 +++++++++++++-- codeHF/dpl-config_run3.json | 29 +++++++++++++++++++++++++++++ codeHF/workflows.yml | 9 +++++++++ 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index dc093c7b..0c5959bc 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -4,7 +4,7 @@ # Input specification for runtest.sh # (Modifies input parameters.) -INPUT_CASE=1 # Input case +INPUT_CASE=2 # Input case NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index e0e3fe9f..0eed62f5 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -31,7 +31,7 @@ DOPOSTPROCESS=1 # Run output postprocessing. (Comparison plots. Requires DOA # O2 database DATABASE_O2="workflows.yml" -MAKE_GRAPH=1 # Make topology graph. +MAKE_GRAPH=0 # Make topology graph. # Activation of O2 workflows # Trigger selection @@ -108,9 +108,10 @@ DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 +DOO2_JET_FIND_QA=1 # je-jet-finder-hf-qa DOO2_JET_MATCH=0 # je-jet-matching DOO2_JET_SUB=0 # je-jet-substructure-hf -DOO2_JET_SUB_OUT=1 # je-jet-substructure-hf-output +DOO2_JET_SUB_OUT=0 # je-jet-substructure-hf-output # Converters DOO2_CONV_MC=0 # mc-converter DOO2_CONV_FDD=0 # fdd-converter @@ -258,6 +259,14 @@ function AdjustJson { ReplaceString "\"processSameRun2\": \"false\"" "\"processSameRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." fi + # jet-finder-charged-d0-qa + if [ "$INPUT_IS_MC" -eq 1 ]; then + ReplaceString "\"processJetsData\": \"true\"" "\"processJetsData\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + else + ReplaceString "\"processJetsMCD\": \"true\"" "\"processJetsMCD\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processJetsMCP\": \"true\"" "\"processJetsMCP\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + # jet-substructure... if [ "$INPUT_IS_MC" -eq 1 ]; then ReplaceString "\"processChargedJetsHF_data\": \"true\"" "\"processChargedJetsHF_data\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." @@ -456,10 +465,12 @@ function MakeScriptO2 { # Jets if [ "$INPUT_IS_MC" -eq 1 ]; then [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-mcd-charged o2-analysis-je-jet-finder-d0-mcp-charged" + [ $DOO2_JET_FIND_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-qa_mc" [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" else [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-data-charged" + [ $DOO2_JET_FIND_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-qa_data" [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" fi diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 16b598b5..0feedae9 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -2781,6 +2781,35 @@ "processChargedJetsMCD": "false", "processChargedJetsMCP": "true" }, + "jet-finder-charged-d0-qa": { + "selectedJetsRadius": "0.4", + "vertexZCut": "10", + "jetRadii": { + "values": [ + "0.4" + ] + }, + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPtMin": "0.15", + "trackPtMax": "100", + "trackSelections": "globalTracks", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "selectionFlagLcToPKPi": "1", + "selectionFlagLcToPiPK": "1", + "selectionFlagBplus": "1", + "processDummy": "false", + "processJetsData": "true", + "processJetsMCD": "true", + "processJetsMCDWeighted": "false", + "processJetsMCP": "true", + "processJetsMCPWeighted": "false", + "processJetsMCPMCDMatched": "false", + "processJetsMCPMCDMatchedWeighted": "false", + "processMCCollisionsWeighted": "false", + "processTriggeredData": "false" + }, "jet-matching-d0-ch": { "doMatchingGeo": "true", "doMatchingPt": "true", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 3d05a408..91a157b0 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -359,6 +359,15 @@ workflows: requires_mc: yes tables: [D0PJET, D0PJETCONSTS, D0PJETCONSTSUB] + o2-analysis-je-jet-finder-hf-qa_data: + executable: o2-analysis-je-jet-finder-hf-qa + dependencies: o2-analysis-je-jet-finder-d0-data-charged + + o2-analysis-je-jet-finder-hf-qa_mc: + executable: o2-analysis-je-jet-finder-hf-qa + dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] + requires_mc: yes + o2-analysis-je-jet-matching: dependencies: [o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] requires_mc: yes From ff40798657841d488f9f4d03248142325c2e2c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Sat, 9 Sep 2023 01:26:22 +0200 Subject: [PATCH 20/24] Fix workflow suffixes --- codeHF/config_tasks.sh | 8 ++++---- codeHF/workflows.yml | 18 +++++++++--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 0eed62f5..95ce757f 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -466,13 +466,13 @@ function MakeScriptO2 { if [ "$INPUT_IS_MC" -eq 1 ]; then [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-mcd-charged o2-analysis-je-jet-finder-d0-mcp-charged" [ $DOO2_JET_FIND_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-qa_mc" - [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-mcd o2-analysis-je-jet-substructure-hf-mcp" - [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-mcd o2-analysis-je-jet-substructure-hf-output-mcp" + [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf_mcd o2-analysis-je-jet-substructure-hf_mcp" + [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output_mcd o2-analysis-je-jet-substructure-hf-output_mcp" else [ $DOO2_JET_FIND -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-d0-data-charged" [ $DOO2_JET_FIND_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder-hf-qa_data" - [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-data" - [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output-data" + [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf_data" + [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-hf-output_data" fi [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-matching" # Converters diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 91a157b0..c3e2a0d0 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -373,37 +373,37 @@ workflows: requires_mc: yes tables: [D0JETMP2D, D0JETMD2P] - o2-analysis-je-jet-substructure-hf-data: + o2-analysis-je-jet-substructure-hf_data: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] tables: D0SS - o2-analysis-je-jet-substructure-hf-mcd: + o2-analysis-je-jet-substructure-hf_mcd: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged] requires_mc: yes tables: D0MCDSS - o2-analysis-je-jet-substructure-hf-mcp: + o2-analysis-je-jet-substructure-hf_mcp: executable: o2-analysis-je-jet-substructure-hf dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcp-charged] requires_mc: yes tables: D0MCPSS - o2-analysis-je-jet-substructure-hf-output-data: + o2-analysis-je-jet-substructure-hf-output_data: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: o2-analysis-je-jet-substructure-hf-data + dependencies: o2-analysis-je-jet-substructure-hf_data tables: [D0O, D0SSO] - o2-analysis-je-jet-substructure-hf-output-mcd: + o2-analysis-je-jet-substructure-hf-output_mcd: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: o2-analysis-je-jet-substructure-hf-mcd + dependencies: o2-analysis-je-jet-substructure-hf_mcd requires_mc: yes tables: [D0MCDO, D0MCDSSO] - o2-analysis-je-jet-substructure-hf-output-mcp: + o2-analysis-je-jet-substructure-hf-output_mcp: executable: o2-analysis-je-jet-substructure-hf-output - dependencies: o2-analysis-je-jet-substructure-hf-mcp + dependencies: o2-analysis-je-jet-substructure-hf_mcp requires_mc: yes tables: [D0MCPO, D0MCPSSO] From 2483cd6d312fbba60d2379a979a7f63064f30048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Sat, 9 Sep 2023 01:35:15 +0200 Subject: [PATCH 21/24] Move correlation json block --- codeHF/workflows.yml | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index c3e2a0d0..7c4c289d 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -245,31 +245,6 @@ workflows: mc: "--doMC" dependencies: o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma - o2-analysis-hf-task-correlation-d-dbar: &taskddbar - executable: o2-analysis-hf-task-correlation-d-dbar - - o2-analysis-hf-task-correlation-d-dbar-mc-rec: - <<: *taskddbar - requires_mc: yes - - o2-analysis-hf-task-correlation-d-dbar-mc-gen: - <<: *taskddbar - requires_mc: yes - - o2-analysis-hf-task-correlation-d0-hadrons: - dependencies: o2-analysis-hf-correlator-d0-hadrons - - o2-analysis-hf-task-flow: - dependencies: - - o2-analysis-hf-candidate-selector-d0 - - o2-analysis-multiplicity-table_runX - - o2-analysis-hf-correlator-dplus-hadrons: - dependencies: o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi - - o2-analysis-hf-correlator-ds-hadrons: - dependencies: o2-analysis-hf-candidate-selector-ds-to-k-k-pi - # Tree creators o2-analysis-hf-tree-creator-d0-to-k-pi: @@ -343,6 +318,31 @@ workflows: dependencies: o2-analysis-hf-candidate-selector-d0 tables: [DHADRONPAIR, DHADRONRECOINFO] + o2-analysis-hf-correlator-dplus-hadrons: + dependencies: o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi + + o2-analysis-hf-correlator-ds-hadrons: + dependencies: o2-analysis-hf-candidate-selector-ds-to-k-k-pi + + o2-analysis-hf-task-correlation-d-dbar: &taskddbar + executable: o2-analysis-hf-task-correlation-d-dbar + + o2-analysis-hf-task-correlation-d-dbar-mc-rec: + <<: *taskddbar + requires_mc: yes + + o2-analysis-hf-task-correlation-d-dbar-mc-gen: + <<: *taskddbar + requires_mc: yes + + o2-analysis-hf-task-correlation-d0-hadrons: + dependencies: o2-analysis-hf-correlator-d0-hadrons + + o2-analysis-hf-task-flow: + dependencies: + - o2-analysis-hf-candidate-selector-d0 + - o2-analysis-multiplicity-table_runX + # Jets o2-analysis-je-jet-finder-d0-data-charged: &jethf From 01c78d83e3a3b22ed032c59b58dfbc5c73fec40d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Sat, 9 Sep 2023 01:41:46 +0200 Subject: [PATCH 22/24] Fix workflow suffixes --- codeHF/config_tasks.sh | 16 ++++++++-------- codeHF/workflows.yml | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 95ce757f..887316ed 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -96,11 +96,11 @@ DOO2_TREE_CHIC=0 # hf-tree-creator-chic-to-jpsi-gamma DOO2_TREE_BPLUS=0 # hf-tree-creator-bplus-to-d0-pi # Correlations DOO2_CORR_D0D0BAR_DATA=0 # hf-correlator-d0-d0bar -DOO2_CORR_D0D0BAR_MCREC=0 # hf-correlator-d0-d0bar-mc-rec -DOO2_CORR_D0D0BAR_MCGEN=0 # hf-correlator-d0-d0bar-mc-gen +DOO2_CORR_D0D0BAR_MCREC=0 # hf-correlator-d0-d0bar_mc-rec +DOO2_CORR_D0D0BAR_MCGEN=0 # hf-correlator-d0-d0bar_mc-gen DOO2_CORR_DPLUSDMINUS_DATA=0 # hf-correlator-dplus-dminus -DOO2_CORR_DPLUSDMINUS_MCREC=0 # hf-correlator-dplus-dminus-mc-rec -DOO2_CORR_DPLUSDMINUS_MCGEN=0 # hf-correlator-dplus-dminus-mc-gen +DOO2_CORR_DPLUSDMINUS_MCREC=0 # hf-correlator-dplus-dminus_mc-rec +DOO2_CORR_DPLUSDMINUS_MCGEN=0 # hf-correlator-dplus-dminus_mc-gen DOO2_CORR_D0HADRON=0 # hf-correlator-d0-hadrons DOO2_CORR_DPLUSHADRON=0 # hf-correlator-dplus-hadrons DOO2_CORR_DSHADRON=0 # hf-correlator-ds-hadrons @@ -443,11 +443,11 @@ function MakeScriptO2 { # Correlations WF_CORR="" [ $DOO2_CORR_D0D0BAR_DATA -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0-d0bar o2-analysis-hf-task-correlation-d-dbar" - [ $DOO2_CORR_D0D0BAR_MCREC -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0-d0bar-mc-rec o2-analysis-hf-task-correlation-d-dbar-mc-rec" - [ $DOO2_CORR_D0D0BAR_MCGEN -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0-d0bar-mc-gen o2-analysis-hf-task-correlation-d-dbar-mc-gen" + [ $DOO2_CORR_D0D0BAR_MCREC -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0-d0bar_mc-rec o2-analysis-hf-task-correlation-d-dbar_mc-rec" + [ $DOO2_CORR_D0D0BAR_MCGEN -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0-d0bar_mc-gen o2-analysis-hf-task-correlation-d-dbar_mc-gen" [ $DOO2_CORR_DPLUSDMINUS_DATA -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplus-dminus o2-analysis-hf-task-correlation-d-dbar" - [ $DOO2_CORR_DPLUSDMINUS_MCREC -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplus-dminus-mc-rec o2-analysis-hf-task-correlation-d-dbar-mc-rec" - [ $DOO2_CORR_DPLUSDMINUS_MCGEN -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplus-dminus-mc-gen o2-analysis-hf-task-correlation-d-dbar-mc-gen" + [ $DOO2_CORR_DPLUSDMINUS_MCREC -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplus-dminus_mc-rec o2-analysis-hf-task-correlation-d-dbar_mc-rec" + [ $DOO2_CORR_DPLUSDMINUS_MCGEN -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplus-dminus_mc-gen o2-analysis-hf-task-correlation-d-dbar_mc-gen" [ "$WF_CORR" ] && WORKFLOWS+=" $WF_CORR" [ $DOO2_CORR_D0HADRON -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-correlator-d0-hadrons" [ $DOO2_CORR_DPLUSHADRON -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-correlator-dplus-hadrons" diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 7c4c289d..bf99ee31 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -291,11 +291,11 @@ workflows: dependencies: o2-analysis-hf-candidate-selector-d0 tables: [DDBARPAIR, DDBARRECOINFO] - o2-analysis-hf-correlator-d0-d0bar-mc-rec: + o2-analysis-hf-correlator-d0-d0bar_mc-rec: <<: *d0d0barcorr options: "--doMCRec" - o2-analysis-hf-correlator-d0-d0bar-mc-gen: + o2-analysis-hf-correlator-d0-d0bar_mc-gen: <<: *d0d0barcorr options: "--doMCGen" tables: DDBARPAIR @@ -305,11 +305,11 @@ workflows: dependencies: o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi tables: [DDBARPAIR, DDBARRECOINFO] - o2-analysis-hf-correlator-dplus-dminus-mc-rec: + o2-analysis-hf-correlator-dplus-dminus_mc-rec: <<: *dplusdminus requires_mc: yes - o2-analysis-hf-correlator-dplus-dminus-mc-gen: + o2-analysis-hf-correlator-dplus-dminus_mc-gen: <<: *dplusdminus requires_mc: yes tables: DDBARPAIR @@ -327,11 +327,11 @@ workflows: o2-analysis-hf-task-correlation-d-dbar: &taskddbar executable: o2-analysis-hf-task-correlation-d-dbar - o2-analysis-hf-task-correlation-d-dbar-mc-rec: + o2-analysis-hf-task-correlation-d-dbar_mc-rec: <<: *taskddbar requires_mc: yes - o2-analysis-hf-task-correlation-d-dbar-mc-gen: + o2-analysis-hf-task-correlation-d-dbar_mc-gen: <<: *taskddbar requires_mc: yes From 36c0b8bb65994d0a84fb51e53b73085aa0bd9594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ku=C4=8Dera?= Date: Sat, 9 Sep 2023 01:43:51 +0200 Subject: [PATCH 23/24] Restore default settings --- codeHF/config_tasks.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 887316ed..8a106383 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -47,9 +47,9 @@ DOO2_PID_TOF=0 # pid-tof-full/alice3-pid-tof DOO2_PID_TOF_QA=0 # pid-tof-qa-mc DOO2_PID_BAYES=0 # pid-bayes # Vertexing -DOO2_SKIM=0 # hf-track-index-skim-creator -DOO2_CAND_2PRONG=0 # hf-candidate-creator-2prong -DOO2_CAND_3PRONG=0 # hf-candidate-creator-3prong +DOO2_SKIM=1 # hf-track-index-skim-creator +DOO2_CAND_2PRONG=1 # hf-candidate-creator-2prong +DOO2_CAND_3PRONG=1 # hf-candidate-creator-3prong DOO2_CAND_CASC=0 # hf-candidate-creator-cascade DOO2_CAND_LB=0 # hf-candidate-creator-lb DOO2_CAND_X=0 # hf-candidate-creator-x @@ -73,10 +73,10 @@ 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 # User tasks -DOO2_TASK_D0=0 # hf-task-d0 +DOO2_TASK_D0=1 # hf-task-d0 DOO2_TASK_DS=0 # hf-task-ds DOO2_TASK_DPLUS=0 # hf-task-dplus -DOO2_TASK_LC=0 # hf-task-lc +DOO2_TASK_LC=1 # hf-task-lc DOO2_TASK_LB=0 # hf-task-lb DOO2_TASK_XIC=0 # hf-task-xic DOO2_TASK_JPSI=0 # hf-task-jpsi @@ -108,7 +108,7 @@ DOO2_TASK_D0HADRON=0 # hf-task-correlation-d0-hadrons DOO2_TASK_FLOW=0 # hf-task-flow # Jets DOO2_JET_FIND=0 # je-jet-finder-d0 -DOO2_JET_FIND_QA=1 # je-jet-finder-hf-qa +DOO2_JET_FIND_QA=0 # je-jet-finder-hf-qa DOO2_JET_MATCH=0 # je-jet-matching DOO2_JET_SUB=0 # je-jet-substructure-hf DOO2_JET_SUB_OUT=0 # je-jet-substructure-hf-output From 8769db4de2251a00b6da51bb25ee12a31bb1f673 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Sep 2023 01:55:19 +0200 Subject: [PATCH 24/24] [MegaLinter] Apply linters automatic fixes (#11) Co-authored-by: vkucera --- exec/make_command_o2.py | 50 ++++++++++------------------------------- 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py index 3e5d4286..2d8a8b8a 100644 --- a/exec/make_command_o2.py +++ b/exec/make_command_o2.py @@ -100,9 +100,7 @@ def healthy_structure(dic_full: dict): if not isinstance(dic_wf_single, dict): msg_err("%s is not a dictionary." % wf) return False - if "activate" in dic_wf_single and not isinstance( - dic_wf_single["activate"], bool - ): + if "activate" in dic_wf_single and not isinstance(dic_wf_single["activate"], bool): msg_err('"activate" in workflow %s is not a boolean.' % wf) return False return True @@ -140,23 +138,14 @@ def activate_workflow(wf: str, dic_wf: dict, mc=False, level=0, debug=False): def main(): """Main function""" parser = argparse.ArgumentParser( - description="Generates full O2 command based on a YAML " - "database of workflows and options." + description="Generates full O2 command based on a YAML " "database of workflows and options." ) parser.add_argument("database", help="database with workflows and options") - parser.add_argument( - "-w", "--workflows", type=str, help="explicitly requested workflows" - ) + parser.add_argument("-w", "--workflows", type=str, help="explicitly requested workflows") parser.add_argument("--mc", action="store_true", help="Monte Carlo mode") - parser.add_argument( - "-t", "--tables", action="store_true", help="save table into trees" - ) - parser.add_argument( - "-g", "--graph", action="store_true", help="make topology graph" - ) - parser.add_argument( - "-d", "--debug", action="store_true", help="print debugging info" - ) + parser.add_argument("-t", "--tables", action="store_true", help="save table into trees") + parser.add_argument("-g", "--graph", action="store_true", help="make topology graph") + parser.add_argument("-d", "--debug", action="store_true", help="print debugging info") args = parser.parse_args() path_file_database = args.database debug = args.debug @@ -195,9 +184,7 @@ def main(): # Get list of primary workflows to run. # already activated in the database - list_wf_activated = [ - wf for wf in dic_wf if "activate" in dic_wf[wf] and dic_wf[wf]["activate"] - ] + list_wf_activated = [wf for wf in dic_wf if "activate" in dic_wf[wf] and dic_wf[wf]["activate"]] if debug and list_wf_activated: eprint("\nWorkflows activated in the database:") eprint("\n".join(" " + wf for wf in list_wf_activated)) @@ -238,15 +225,10 @@ def main(): if mc_mode and "mc" in tab_wf: 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)) - ) + 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(str_before + t + ("" if "/" in t else str_after) for t in tables) if string_tables: opt_local += " --aod-writer-keep " + string_tables @@ -281,10 +263,7 @@ def main(): if mc_mode and "mc" in opt_wf: string_wf += " " + join_strings(opt_wf["mc"]) else: - msg_fatal( - '"options" in %s must be str, list or dict, is %s' - % (wf, type(opt_wf)) - ) + msg_fatal('"options" in %s must be str, list or dict, is %s' % (wf, type(opt_wf))) if opt_local: string_wf += " " + opt_local command += "| \\\n" + string_wf + " " @@ -321,9 +300,7 @@ def main(): label_wf = label_wf.replace("-", "\\n") dot += ' %s [label="%s"]\n' % (node_wf, label_wf) if "dependencies" in dic_wf_single: - nodes_dep = join_strings(dic_wf_single["dependencies"]).replace( - "-", "_" - ) + nodes_dep = join_strings(dic_wf_single["dependencies"]).replace("-", "_") dot += " %s -> {%s}\n" % (node_wf, nodes_dep) dot += "}\n" try: @@ -331,10 +308,7 @@ def main(): file_dot.write(dot) except IOError: msg_fatal("Failed to open file " + path_file_dot) - eprint( - "Produce graph with Graphviz: dot -T%s %s -o %s" - % (ext_graph, path_file_dot, path_file_graph) - ) + eprint("Produce graph with Graphviz: dot -T%s %s -o %s" % (ext_graph, path_file_dot, path_file_graph)) main()