diff --git a/codeHF/Compare.C b/codeHF/Compare.C index af1d20f4..0a64b549 100644 --- a/codeHF/Compare.C +++ b/codeHF/Compare.C @@ -218,6 +218,38 @@ Int_t Compare(TString fileO2 = "AnalysisResults_O2.root", TString fileAli = "Ana 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, "#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, "#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); + 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, "#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, "#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; @@ -254,6 +286,14 @@ Int_t Compare(TString fileO2 = "AnalysisResults_O2.root", TString fileAli = "Ana 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..ba1ea428 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 doJetMatching = 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(doJetMatching); + tasktr3->SetDoJetSubstructure(doJetSubstructure); mgr->InitAnalysis(); mgr->PrintStatus(); diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 79e06687..8a106383 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -96,22 +96,28 @@ 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 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=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 # 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. @@ -253,6 +259,37 @@ 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." + 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." + # Enable D0 selection. if [ $APPLYCUTS_D0 -eq 1 ]; then MsgWarn "Using D0 selection cuts" @@ -406,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" @@ -425,6 +462,19 @@ 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" + # 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 + [ $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" @@ -465,7 +515,7 @@ EOF } function MakeScriptAli { - ALIEXEC="root -b -q -l \"$DIR_TASKS/RunHFTaskLocal.C(\\\"\$FileIn\\\", \\\"\$JSON\\\", $INPUT_IS_MC, $USEO2VERTEXER, $USEALIEVCUTS)\"" + 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" @@ -488,6 +538,10 @@ 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 + [ "$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. diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json index 3f0e5614..0feedae9 100644 --- a/codeHF/dpl-config_run3.json +++ b/codeHF/dpl-config_run3.json @@ -2582,7 +2582,7 @@ }, "hf-dplus-selection": { "selectionFlagDplus": "1", - "yCandMax": "0.800000012", + "yCandMax": "0.8", "ptCandMin": "1", "processDplusSelectionData": "true", "processDplusSelectionMcRec": "false", @@ -2591,12 +2591,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", @@ -2640,6 +2640,236 @@ "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-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", + "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" + }, + "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", diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 5d4c2e0e..bf99ee31 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: @@ -316,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 @@ -330,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 @@ -343,6 +318,95 @@ 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 + 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-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 + tables: [D0JETMP2D, D0JETMD2P] + + 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: diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py index ad7d5244..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 @@ -267,7 +249,7 @@ def main(): string_wf = wf # Detect duplicate workflows. if string_wf + " " in command: - msg_fatal("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"] @@ -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()