From a3a728ec797a0c7a5287f09c43d81596425e0364 Mon Sep 17 00:00:00 2001 From: Archita-Dash <91664849+Archita-Dash@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:56:34 +0100 Subject: [PATCH] Add JE validation (#424) --- codeJE/Compare.C | 214 +++++++++++++++ codeJE/RunJetTaskLocal.C | 101 +++++++ codeJE/clean.sh | 12 + codeJE/config_input.sh | 107 ++++++++ codeJE/config_tasks.sh | 210 +++++++++++++++ codeJE/dpl-config.json | 558 +++++++++++++++++++++++++++++++++++++++ codeJE/runtest.sh | 1 + codeJE/utils_plot.h | 1 + codeJE/workflows.yml | 76 ++++++ 9 files changed, 1280 insertions(+) create mode 100644 codeJE/Compare.C create mode 100644 codeJE/RunJetTaskLocal.C create mode 100644 codeJE/clean.sh create mode 100644 codeJE/config_input.sh create mode 100755 codeJE/config_tasks.sh create mode 100644 codeJE/dpl-config.json create mode 120000 codeJE/runtest.sh create mode 120000 codeJE/utils_plot.h create mode 100644 codeJE/workflows.yml diff --git a/codeJE/Compare.C b/codeJE/Compare.C new file mode 100644 index 00000000..f681a132 --- /dev/null +++ b/codeJE/Compare.C @@ -0,0 +1,214 @@ +// Comparison of AliPhysics and O2 histograms + +#include "utils_plot.h" + +// vectors of histogram specifications +using VecSpecHis = std::vector>; + +// Add histogram specification in the vector. +void AddHistogram(VecSpecHis& vec, TString label, TString nameRun2, TString nameRun3, int rebin, bool logH, bool logR, TString proj = "x") +{ + vec.push_back(std::make_tuple(label, nameRun2, nameRun3, rebin, logH, logR, proj)); +} + +Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = "AnalysisResults_ALI.root", TString options = "jets", bool doRatio = true) +{ + gStyle->SetOptStat(0); + gStyle->SetPalette(0); + gStyle->SetCanvasColor(0); + gStyle->SetFrameFillColor(0); + + TFile* fRun3 = new TFile(filerun3.Data()); + if (fRun3->IsZombie()) { + printf("Failed to open file %s\n", filerun3.Data()); + return 1; + } + TFile* fRun2 = new TFile(filerun2.Data()); + if (fRun2->IsZombie()) { + printf("Failed to open file %s\n", filerun2.Data()); + return 1; + } + + TString pathListRun2 = Form("ChJetSpectraAliAnalysisTaskEmcalJetValidation/AliAnalysisTaskEmcalJetValidation"); // + TList* lRun2 = nullptr; + fRun2->GetObject(pathListRun2.Data(), lRun2); + if (!lRun2) { + printf("Failed to load list %s from %s\n", pathListRun2.Data(), filerun2.Data()); + return 1; + } + + // Histogram specification: axis label, AliPhysics name, O2Physics path/name, rebin, log scale histogram, log scale ratio, projection axis + + VecSpecHis vecHisEvents; + + VecSpecHis vecHisJets; //X axis , Hist Name Run2, Hist Name in Run3, rebin, logScaleH , logScaleR + AddHistogram(vecHisJets, "#it{p}_{T,ch jet} (GeV/#it{c}", "jetPt", "jet-validation-track-collision-qa/jetPt", 1, 1, 0); // + AddHistogram(vecHisJets, "#varphi_{jet}", "jetPhi", "jet-validation-track-collision-qa/jetPhi", 1, 0, 0); + AddHistogram(vecHisJets, "#eta_{jet}", "jetEta", "jet-validation-track-collision-qa/jetEta", 1, 0, 0); + AddHistogram(vecHisJets, "#it{p}_{T,track} (GeV/#it{c}", "jetTrackPt", "jet-validation-track-collision-qa/selectedTrackPt", 1, 1, 0); // + AddHistogram(vecHisJets, "#varphi_{track}", "jetTrackPhi", "jet-validation-track-collision-qa/selectedTrackPhi", 1, 0, 0); + AddHistogram(vecHisJets, "#eta_{track}", "jetTrackEta", "jet-validation-track-collision-qa/selectedTrackEta", 1, 0, 0); + + // vector of specifications of vectors: name, VecSpecHis, pads X, pads Y + std::vector> vecSpecVecSpec; + + // Add vector specifications in the vector. + // if (options.Contains(" events ")) + // vecSpecVecSpec.push_back(std::make_tuple("events", vecHisEvents, 4, 2)); + if (options.Contains("jets")) + vecSpecVecSpec.push_back(std::make_tuple("jets", vecHisJets, 3, 2)); + // if (options.Contains(" skim ")) + // vecSpecVecSpec.push_back(std::make_tuple("skim", vecHisSkim, 5, 3)); + + // Histogram plot vertical margins + Float_t marginHigh = 0.05; + Float_t marginLow = 0.05; + bool logScaleH = false; + // Ratio plot vertical margins + Float_t marginRHigh = 0.05; + Float_t marginRLow = 0.05; + bool logScaleR = false; + Float_t yMin, yMax; + Int_t nRun2, nRun3, rebin; + + TH1F* hRun2 = nullptr; + TH1D* hRun3 = nullptr; + TH1F* hRatio = nullptr; + TString labelAxis = ""; + TString nameHisRun2 = ""; + TString nameHisRun3 = ""; + TString projAx = ""; + TCanvas* canHis = nullptr; + TCanvas* canRat = nullptr; + + // loop over lists + for (const auto& specVecSpec : vecSpecVecSpec) { + auto nameSpec = std::get<0>(specVecSpec); // list name + auto vecSpec = std::get<1>(specVecSpec); // list of histogram specs. + int nPadsX = std::get<2>(specVecSpec); // number of horizontal pads + int nPadsY = std::get<3>(specVecSpec); // number of vertical pads + Printf("\nProcessing histogram list: %s (%d)", nameSpec.Data(), (int)vecSpec.size()); + if (nPadsX * nPadsY < vecSpec.size()) { + Printf("Not enough pads (%d)", nPadsX * nPadsY); + return 1; + } + + canHis = new TCanvas(Form("canHis_%s", nameSpec.Data()), Form("Histos_%s", nameSpec.Data()), 3000, 1600); + SetCanvas(canHis, nPadsX, nPadsY); + if (doRatio) { + canRat = new TCanvas(Form("canRat_%s", nameSpec.Data()), Form("Ratios_%s", nameSpec.Data()), 3000, 1600); + SetCanvas(canRat, nPadsX, nPadsY); + } + + // loop over histograms + for (int index = 0; index < vecSpec.size(); index++) { + auto spec = vecSpec[index]; + labelAxis = std::get<0>(spec); + nameHisRun2 = std::get<1>(spec); + nameHisRun3 = std::get<2>(spec); + rebin = std::get<3>(spec); + logScaleH = std::get<4>(spec); + logScaleR = std::get<5>(spec); + projAx = std::get<6>(spec); + + // Get AliPhysics histogram. + hRun2 = (TH1F*)lRun2->FindObject(nameHisRun2.Data()); + if (!hRun2) { + printf("Failed to load %s from %s\n", nameHisRun2.Data(), filerun2.Data()); + return 1; + } + + // Get O2 histogram. + auto oRun3 = fRun3->Get(nameHisRun3.Data()); + if (!oRun3) { + printf("Failed to load %s from %s\n", nameHisRun3.Data(), filerun3.Data()); + return 1; + } + + if (oRun3->InheritsFrom("TH3")) { + if (projAx == "x") { + hRun3 = ((TH3D*)oRun3)->ProjectionX(); + } else if (projAx == "y") { + hRun3 = ((TH3D*)oRun3)->ProjectionY(); + } + } else if (oRun3->InheritsFrom("TH2")) { + if (projAx == "x") { + hRun3 = ((TH2D*)oRun3)->ProjectionX(); + } else if (projAx == "y") { + hRun3 = ((TH2D*)oRun3)->ProjectionY(); + } + } else { + hRun3 = (TH1D*)oRun3; + } + + Printf("%d (%s, %s): bins: %d, %d, ranges: %g-%g, %g-%g", + index, nameHisRun2.Data(), nameHisRun3.Data(), + hRun2->GetNbinsX(), hRun3->GetNbinsX(), + hRun2->GetXaxis()->GetBinLowEdge(1), hRun2->GetXaxis()->GetBinUpEdge(hRun2->GetNbinsX()), + hRun3->GetXaxis()->GetBinLowEdge(1), hRun3->GetXaxis()->GetBinUpEdge(hRun3->GetNbinsX())); + + nRun2 = hRun2->GetEntries(); + nRun3 = hRun3->GetEntries(); + // Histograms + auto padH = canHis->cd(index + 1); + + Printf("histo name: %s", hRun2->GetName()); + hRun2->Rebin(rebin); + hRun3->Rebin(rebin); + hRun2->SetLineColor(1); + hRun2->SetLineWidth(2); + hRun2->SetMarkerStyle(22); + hRun2->SetMarkerColor(1); + hRun3->SetLineColor(2); + hRun3->SetLineWidth(2); + hRun3->SetMarkerStyle(22); + hRun3->SetMarkerColor(2); + hRun2->SetTitle(" "); + hRun2->GetYaxis()->SetTitle("number of entries"); + hRun2->GetYaxis()->SetMaxDigits(3); + yMin = TMath::Min(hRun3->GetMinimum(0), hRun2->GetMinimum(0)); + yMax = TMath::Max(hRun3->GetMaximum(), hRun2->GetMaximum()); + SetHistogram(hRun2, yMin, yMax, marginLow, marginHigh, logScaleH); + SetPad(padH, logScaleH); + hRun2->Draw(""); + hRun3->Draw("Esame"); + + if (std::string(hRun2->GetName()) == "jetPt" || std::string(hRun2->GetName()) == "jetTrackPt") { + TLegend* legend = new TLegend(0.2, 0.84, 0.82, 0.92); + legend->SetNColumns(2); + legend->AddEntry(hRun2, Form("AliPhysics: %d", nRun2), "L"); + legend->AddEntry(hRun3, Form("O2Physics: %d", nRun3), "L"); + legend->Draw(); + } else { + TLegend* legend = new TLegend(0.2, 0.92, 0.82, 1.0); + legend->SetNColumns(2); + legend->SetBorderSize(0); + legend->AddEntry(hRun2, Form("AliPhysics: %d", nRun2), "L"); + legend->AddEntry(hRun3, Form("O2Physics: %d", nRun3), "L"); + legend->Draw(); + } + + // Ratio + if (doRatio) { + auto padR = canRat->cd(index + 1); + hRatio = (TH1F*)hRun3->Clone(Form("hRatio%d", index)); + hRatio->Divide(hRun2); + hRatio->SetTitle(""); + hRatio->GetYaxis()->SetTitle("O2Physics/AliPhysics"); + yMin = hRatio->GetMinimum(0) * 0.3; + yMax = hRatio->GetMaximum() * 1.3; + SetHistogram(hRatio, yMin, yMax, marginRLow, marginRHigh, logScaleR); + SetPad(padR, logScaleR); + hRatio->Draw(); + } + } + canHis->SaveAs(Form("comparison_histos_%s.png", nameSpec.Data())); + if (doRatio) { + canRat->SaveAs(Form("comparison_ratios_%s.png", nameSpec.Data())); + } + // delete canHis; + delete canRat; + } + + return 0; +} diff --git a/codeJE/RunJetTaskLocal.C b/codeJE/RunJetTaskLocal.C new file mode 100644 index 00000000..a8a1e983 --- /dev/null +++ b/codeJE/RunJetTaskLocal.C @@ -0,0 +1,101 @@ +#ifdef __CLING__ +// Tell ROOT where to find AliRoot headers +R__ADD_INCLUDE_PATH($ALICE_ROOT) +// Tell ROOT where to find AliPhysics headers +R__ADD_INCLUDE_PATH($ALICE_PHYSICS) + +#include "PWGPP/PilotTrain/AddTaskCDBconnect.C" + +#endif + +TChain* CreateLocalChain(const char* txtfile); + +Long64_t RunJetTaskLocal(TString txtfile = "./list_ali.txt", + TString jsonfilename = "dpl-config_std.json", + Bool_t isMC = kFALSE, + Bool_t useO2Vertexer = kFALSE, + Bool_t useAliEventCuts = kFALSE) +{ + // Load common libraries + gSystem->Load("libCore.so"); + gSystem->Load("libTree.so"); + gSystem->Load("libGeom.so"); + gSystem->Load("libVMC.so"); + gSystem->Load("libPhysics.so"); + gSystem->Load("libSTEERBase"); + gSystem->Load("libESD"); + gSystem->Load("libAOD"); + gSystem->Load("libANALYSIS"); + gSystem->Load("libANALYSISalice"); + gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER/STEER -I$ALICE_ROOT/STEER/STEERBase -I$ALICE_ROOT/STEER/ESD -I$ALICE_ROOT/STEER/CDB -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS -I$ALICE_PHYSICS -I$ALICE_PHYSICS/include -g"); + + AliAnalysisManager* mgr = new AliAnalysisManager("testAnalysis"); + + TChain* chainESD = CreateLocalChain(txtfile.Data()); + if (!chainESD) { + Error("CreateLocalChain", "Failed to create chain from file %s", txtfile.Data()); + return -1; + } + + // Create and configure the alien handler plugin + AliESDInputHandler* esdH = new AliESDInputHandler(); + // esdH->SetNeedField(kTRUE); + mgr->SetInputEventHandler(esdH); + + AliMCEventHandler* handler = NULL; + if (isMC) { + handler = new AliMCEventHandler; + handler->SetReadTR(kFALSE); + mgr->SetMCtruthEventHandler(handler); + } + + // CDBconnect task + AliTaskCDBconnect* taskCDB = AddTaskCDBconnect(); + taskCDB->SetFallBackToRaw(kTRUE); + + // Apply the event selection + AliPhysicsSelectionTask* physSelTask = reinterpret_cast(gInterpreter->ProcessLine(Form(".x %s(%d)", gSystem->ExpandPathName("$ALICE_PHYSICS/OADB/macros/AddTaskPhysicsSelection.C"), isMC))); + + AliAnalysisTaskEmcalJetValidation* taskJet = reinterpret_cast(gInterpreter->ProcessLine(Form(".x %s(\"\",\"%s\",%d)", gSystem->ExpandPathName("$ALICE_PHYSICS/PWGJE/EMCALJetTasks/macros/AddTaskEmcalJetValidation.C"), jsonfilename.Data(), isMC))); + if (useAliEventCuts) { + taskJet->SetUseAliEventCuts(useAliEventCuts); + } + // if (useO2Vertexer) { + // taskJet->SetUseO2Vertexer(); + // } + + mgr->InitAnalysis(); + mgr->PrintStatus(); + return mgr->StartAnalysis("local", chainESD); +}; + +TChain* CreateLocalChain(const char* txtfile) +{ + // Open the file + ifstream in; + in.open(txtfile); + Int_t count = 0; + // Read the input list of files and add them to the chain + TString line; + TChain* chain = new TChain("esdTree"); + while (in.good()) { + in >> line; + if (line.IsNull() || line.BeginsWith("#")) + continue; + TString esdFile(line); + TFile* file = TFile::Open(esdFile); + if (file && !file->IsZombie()) { + chain->Add(esdFile); + file->Close(); + } else { + Error("CreateLocalChain", "Skipping un-openable file: %s", esdFile.Data()); + } + } + in.close(); + if (!chain->GetListOfFiles()->GetEntries()) { + Error("CreateLocalChain", "No file from %s could be opened", txtfile); + delete chain; + return nullptr; + } + return chain; +} diff --git a/codeJE/clean.sh b/codeJE/clean.sh new file mode 100644 index 00000000..bb95e062 --- /dev/null +++ b/codeJE/clean.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Script to delete created files + +rm -rf \ +AnalysisResults_ALI.root AnalysisResults_O2.root \ +comparison_histos_jets.* comparison_ratios_jets.* \ +./*.log \ +output_* \ +|| { echo "Error: Failed to delete files."; exit 1; } + +exit 0 diff --git a/codeJE/config_input.sh b/codeJE/config_input.sh new file mode 100644 index 00000000..f45cf822 --- /dev/null +++ b/codeJE/config_input.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# shellcheck disable=SC2034 # Ignore unused parameters. + +# Input specification for runtest.sh +# (Modifies input parameters.) + +INPUT_CASE=13 # 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.) + +# Number of input files per job (Automatic optimisation on if < 1.) +NFILESPERJOB_CONVERT=0 # Conversion +NFILESPERJOB_ALI=0 # AliPhysics +NFILESPERJOB_O2=1 # O2 + +# Maximum number of simultaneously running O2 jobs +NJOBSPARALLEL_O2=$(python3 -c "print(min(10, round($(nproc) / 2)))") + +JSONRUN3="dpl-config.json" # Run 3 tasks parameters +JSON="$JSONRUN3" + +# Default settings: +# INPUT_FILES="AliESDs.root" +# INPUT_SYS="pp" +# INPUT_RUN=2 +# INPUT_IS_O2=0 +# INPUT_IS_MC=0 +# JSON="$JSONRUN3" + +INPUT_BASE="/data2/data" # alicecerno2 + +case $INPUT_CASE in + 1) + INPUT_LABEL="Run 2, p-p 5.02 TeV LHC17p, real" + INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/real/LHC17p_pass1_CENT_woSDD" + ;; + 2) # reference + INPUT_LABEL="Run 2, p-p 5.02 TeV LHC17p, MC LHC18a4a2_cent" + INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/sim/LHC18a4a2_cent/282099" + INPUT_IS_MC=1 + ;; + 3) + INPUT_LABEL="Run 2, p-p 5.02 TeV LHC17p, MC LHC18a4a2_cent" + INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/sim/LHC18a4a2_cent/282341" + INPUT_IS_MC=1 + ;; + 4) + INPUT_LABEL="Run 2, Pb-Pb 5.02 TeV LHC15o, real" + INPUT_DIR="$INPUT_BASE/Run2/PbPb_5.02TeV/real/LHC15o" + INPUT_SYS="PbPb" + ;; + 5) + INPUT_LABEL="Run 2, Pb-Pb 5.02 TeV LHC15o, MC LHC15k1a3" + INPUT_DIR="$INPUT_BASE/Run2/PbPb_5.02TeV/sim/LHC15k1a3" + INPUT_SYS="PbPb" + INPUT_IS_MC=1 + ;; + 6) + INPUT_LABEL="Run 2, p-p 13 TeV LHC16p, MC LHC19g6f3, dedicated Ξc" + INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC19g6f3" + INPUT_IS_MC=1 + ;; + 7) + INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o, real" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o" + INPUT_FILES="AO2D.root" + INPUT_IS_O2=1 + INPUT_RUN=3 + ;; + 8) + INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22r, real, low interaction rate (100 kHz)" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22r" + INPUT_FILES="AO2D.root" + INPUT_IS_O2=1 + INPUT_RUN=3 + ;; + 9) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC21k6, general purpose" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC21k6" + INPUT_FILES="AO2D.root" + INPUT_IS_O2=1 + INPUT_RUN=3 + INPUT_IS_MC=1 + ;; + 10) + INPUT_LABEL="Run 2, p-p 13 TeV LHC18f, MC LHC20f4a (ESD)" + INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC20f4a" + INPUT_IS_MC=1 + ;; + 11) + INPUT_LABEL="Run 2, p-p 13 TeV LHC18f, MC LHC20f4a (AO2D)" + INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim_converted/LHC20f4a" + INPUT_FILES="AO2D.root" + INPUT_IS_O2=1 + INPUT_IS_MC=1 + ;; + 12) + INPUT_LABEL="Run 2, p-p 13 TeV, LHC17j (AO2D)" + INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/real_converted/LHC17j_20220601" # converted good AO2Ds + INPUT_FILES="AO2D.root" + INPUT_IS_O2=1 + ;; + 13) + INPUT_LABEL="Run 2, p-p 13 TeV, LHC18p, real" + INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/real/LHC18p/294009" + ;; + esac diff --git a/codeJE/config_tasks.sh b/codeJE/config_tasks.sh new file mode 100755 index 00000000..1266835f --- /dev/null +++ b/codeJE/config_tasks.sh @@ -0,0 +1,210 @@ +#!/bin/bash +# shellcheck disable=SC2034 # Ignore unused parameters. + +# Configuration of tasks for runtest.sh +# (Cleans directory, modifies step activation, modifies JSON, generates step scripts.) + +# Mandatory functions: +# Clean Performs cleanup before (argument=1) and after (argument=2) running. +# AdjustJson Modifies the JSON file. +# MakeScriptAli Generates the AliPhysics script. +# MakeScriptO2 Generates the O2 script. +# MakeScriptPostprocess Generates the postprocessing script. + +#################################################################################################### + +# Steps +DOCLEAN=1 # Delete created files (before and after running tasks). +DOCONVERT=1 # Convert AliESDs.root to AO2D.root. +DOALI=1 # Run AliPhysics tasks. +DOO2=1 # Run O2 tasks. +DOPOSTPROCESS=1 # Run output postprocessing. (Comparison plots. Requires DOALI=1 and/or DOO2=1) + +# Disable incompatible steps. +[ "$INPUT_IS_O2" -eq 1 ] && { DOCONVERT=0; DOALI=0; } + +# O2 database +DATABASE_O2="workflows.yml" +MAKE_GRAPH=0 # Make topology graph. + +# Activation of O2 workflows +# Trigger selection +DOO2_TRIGSEL=1 # event-selection +# QA +DOO2_QA_EVTRK=0 # qa-event-track +DOO2_TASK_JETVALID=1 # je-jet-validation-qa +# Table producers +DOO2_JET_DERIVED=0 # je-jet-deriveddata-producer +DOO2_JET_FINDER=0 # je-jet-finder +# 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_TRKEX=1 # tracks-extra-converter + +SAVETREES=0 # Save O2 tables to trees. +USEO2VERTEXER=0 # Use the O2 vertexer in AliPhysics. +USEALIEVCUTS=1 # Use AliEventCuts in AliPhysics (as used by conversion task) +DORATIO=1 # Plot histogram ratios in comparison. + +#################################################################################################### + +# Clean before (argument=1) and after (argument=2) running. +function Clean { + # Cleanup before running + [ "$1" -eq 1 ] && { bash "$DIR_TASKS/clean.sh" || ErrExit; } + + # Cleanup after running + [ "$1" -eq 2 ] && { + rm -f "$LISTFILES_ALI" "$LISTFILES_O2" "$SCRIPT_ALI" "$SCRIPT_O2" "$SCRIPT_POSTPROCESS" || ErrExit "Failed to rm created files." + [ "$JSON_EDIT" ] && { rm "$JSON_EDIT" || ErrExit "Failed to rm $JSON_EDIT."; } + [ "$DATABASE_O2_EDIT" ] && { rm "$DATABASE_O2_EDIT" || ErrExit "Failed to rm $DATABASE_O2_EDIT."; } + } + + return 0 +} + +# Modify the JSON file. +function AdjustJson { + # Make a copy of the default JSON file to modify it. + JSON_EDIT="${JSON/.json/_edit.json}" + cp "$JSON" "$JSON_EDIT" || ErrExit "Failed to cp $JSON $JSON_EDIT." + JSON="$JSON_EDIT" + + # Collision system + MsgWarn "Setting collision system $INPUT_SYS" + + # Run 2/3/5 + MsgWarn "Using Run $INPUT_RUN" + if [ "$INPUT_RUN" -eq 2 ]; then + ReplaceString "\"processRun2\": \"false\"" "\"processRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"true\"" "\"processRun3\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + elif [ "$INPUT_RUN" -eq 3 ]; then + ReplaceString "\"processRun2\": \"true\"" "\"processRun2\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"false\"" "\"processRun3\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # MC + if [ "$INPUT_IS_MC" -eq 1 ]; then + MsgWarn "Using MC data" + ReplaceString "\"processMc\": \"false\"" "\"processMc\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMC\": \"false\"" "\"processMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"isMC\": \"false\"" "\"isMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + else + MsgWarn "Using real data" + ReplaceString "\"processMc\": \"true\"" "\"processMc\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMC\": \"true\"" "\"processMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"isMC\": \"true\"" "\"isMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processData\": \"false\"" "\"processData\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # event-selection + ReplaceString "\"syst\": \"pp\"" "\"syst\": \"$INPUT_SYS\"" "$JSON" || ErrExit "Failed to edit $JSON." + + if [ $DOO2_TRIGSEL -eq 1 ]; then + # trigger selection + ReplaceString "\"processTrigSel\": \"false\"" "\"processTrigSel\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processNoTrigSel\": \"true\"" "\"processNoTrigSel\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + if [ "$INPUT_RUN" -eq 3 ]; then + # do not use trigger selection for Run 3 + ReplaceString "\"processTrigSel\": \"true\"" "\"processTrigSel\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processNoTrigSel\": \"false\"" "\"processNoTrigSel\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # timestamp-task + if [[ "$INPUT_IS_MC" -eq 1 && "$INPUT_RUN" -eq 2 ]]; then + ReplaceString "\"isRun2MC\": \"false\"" "\"isRun2MC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + else + ReplaceString "\"isRun2MC\": \"true\"" "\"isRun2MC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # track-selection + if [ "$INPUT_RUN" -eq 3 ]; then + ReplaceString "\"isRun3\": \"false\"" "\"isRun3\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + else + ReplaceString "\"isRun3\": \"true\"" "\"isRun3\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + +} + +# Generate the O2 script containing the full workflow specification. +function MakeScriptO2 { + # Suffix to distinguish versions of the same workflow for different runs in the workflow database + SUFFIX_RUN_MASK="_runX" # suffix mask to be replaced in the workflow names + SUFFIX_RUN="_run${INPUT_RUN}" # the actual suffix to be used instead of the mask + + WORKFLOWS="" + # Trigger selection + [ $DOO2_TRIGSEL -eq 1 ] && WORKFLOWS+=" o2-analysis-event-selection" + # QA + [ $DOO2_QA_EVTRK -eq 1 ] && WORKFLOWS+=" o2-analysis-qa-event-track" + [ $DOO2_TASK_JETVALID -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-validation-qa" + # Table producers + [ $DOO2_JET_DERIVED -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-deriveddata-producer" + [ $DOO2_JET_FINDER -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-finder" + # Converters + [ $DOO2_CONV_MC -eq 1 ] && WORKFLOWS+=" o2-analysis-mc-converter" + [ $DOO2_CONV_FDD -eq 1 ] && WORKFLOWS+=" o2-analysis-fdd-converter" + [ $DOO2_CONV_COLL -eq 1 ] && WORKFLOWS+=" o2-analysis-collision-converter" + [ $DOO2_CONV_ZDC -eq 1 ] && WORKFLOWS+=" o2-analysis-zdc-converter" + [ $DOO2_CONV_BC -eq 1 ] && WORKFLOWS+=" o2-analysis-bc-converter" + [ $DOO2_CONV_TRKEX -eq 1 ] && WORKFLOWS+=" o2-analysis-tracks-extra-converter" + + # Translate options into arguments of the generating script. + OPT_MAKECMD="" + [ "$INPUT_IS_MC" -eq 1 ] && OPT_MAKECMD+=" --mc" + [ "$DEBUG" -eq 1 ] && OPT_MAKECMD+=" -d" + [ $SAVETREES -eq 1 ] && OPT_MAKECMD+=" -t" + [ $MAKE_GRAPH -eq 1 ] && OPT_MAKECMD+=" -g" + + # Make a copy of the default workflow database file before modifying it. + DATABASE_O2_EDIT="${DATABASE_O2/.yml/_edit.yml}" + cp "$DATABASE_O2" "$DATABASE_O2_EDIT" || ErrExit "Failed to cp $DATABASE_O2 $DATABASE_O2_EDIT." + DATABASE_O2="$DATABASE_O2_EDIT" + + # Replace the workflow version masks with the actual values in the workflow database. + ReplaceString "$SUFFIX_RUN_MASK" "$SUFFIX_RUN" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." + + # Generate the O2 command. + MAKECMD="python3 $DIR_EXEC/make_command_o2.py $DATABASE_O2 $OPT_MAKECMD" + O2EXEC=$($MAKECMD -w "$WORKFLOWS") + $MAKECMD -w "$WORKFLOWS" 1> /dev/null 2> /dev/null || ErrExit "Generating of O2 command failed." + [ "$O2EXEC" ] || ErrExit "Nothing to do!" + + # Create the script with the full O2 command. + cat << EOF > "$SCRIPT_O2" +#!/bin/bash +FileIn="\$1" +JSON="\$2" +$O2EXEC +EOF +} + +function MakeScriptAli { + ALIEXEC="root -b -q -l \"$DIR_TASKS/RunJetTaskLocal.C(\\\"\$FileIn\\\", \\\"\$JSON\\\", $INPUT_IS_MC, $USEO2VERTEXER, $USEALIEVCUTS)\"" + cat << EOF > "$SCRIPT_ALI" +#!/bin/bash +FileIn="\$1" +JSON="\$2" +$ALIEXEC +EOF +} + +function MakeScriptPostprocess { + POSTEXEC="echo Postprocessing" + # Compare AliPhysics and O2 histograms. + [[ $DOALI -eq 1 && $DOO2 -eq 1 ]] && { + OPT_COMPARE="" + [ $DOO2_TASK_JETVALID -eq 1 ] && OPT_COMPARE+=" jets " + [ "$OPT_COMPARE" ] && POSTEXEC+=" && root -b -q -l \"$DIR_TASKS/Compare.C(\\\"\$FileO2\\\", \\\"\$FileAli\\\", \\\"$OPT_COMPARE\\\", $DORATIO)\"" + } + cat << EOF > "$SCRIPT_POSTPROCESS" +#!/bin/bash +FileO2="\$1" +FileAli="\$2" +$POSTEXEC +EOF +} diff --git a/codeJE/dpl-config.json b/codeJE/dpl-config.json new file mode 100644 index 00000000..57e9d829 --- /dev/null +++ b/codeJE/dpl-config.json @@ -0,0 +1,558 @@ +{ + "internal-dpl-clock": "", + "internal-dpl-aod-reader": { + "time-limit": "0", + "orbit-offset-enumeration": "0", + "orbit-multiplier-enumeration": "0", + "start-value-enumeration": "0", + "end-value-enumeration": "-1", + "step-value-enumeration": "1", + "aod-file": "@list_o2.txt" + }, + "internal-dpl-aod-spawner": "", + "bc-converter": "", + "timestamp-task": { + "verbose": "false", + "rct-path": "RCT/Info/RunInformation", + "orbit-reset-path": "CTP/Calib/OrbitReset", + "ccdb-url": "http://alice-ccdb.cern.ch", + "isRun2MC": "false" + }, + "tracks-extra-converter": "", + "zdc-converter": "", + "internal-dpl-aod-index-builder": "", + "tracks-extra-spawner": "", + "bc-selection-task": { + "triggerBcShift": "999", + "ITSROFrameBorderMargin": "30", + "processRun2": "true", + "processRun3": "false" + }, + "track-extension": { + "compatibilityIU": "false", + "processRun2": "true", + "processRun3": "false" + }, + "event-selection-task": { + "syst": "pp", + "muonSelection": "0", + "customDeltaBC": "300", + "isMC": "false", + "processRun2": "true", + "processRun3": "false" + }, + "track-selection": { + "isRun3": "false", + "produceTable": "-1", + "produceFBextendedTable": "-1", + "compatibilityIU": "false", + "itsMatching": "0", + "dcaSetup": "0", + "ptMin": "0.1", + "ptMax": "1e+10", + "etaMin": "-0.8", + "etaMax": "0.8" + }, + "jet-deriveddata-producer": { + "processBunchCossings": "true", + "processCollisions": "true", + "processMcCollisionLabels": "false", + "processMcCollisions": "false", + "processTracks": "true", + "processMcTrackLabels": "false", + "processParticles": "false", + "processClusters": "false" + }, + "jet-finder-data-charged": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.9", + "trackEtaMax": "0.9", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "hybridTracksJE", + "eventSelections": "sel7", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "false", + "processChargedJets": "true", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-data-full": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel7", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-data-neutral": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-mcd-charged": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-mcd-full": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-mcd-neutral": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-mcp-charged": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-mcp-full": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-finder-mcp-neutral": { + "vertexZCut": "10", + "trackPtMin": "0.15", + "trackPtMax": "1000", + "trackEtaMin": "-0.8", + "trackEtaMax": "0.8", + "trackPhiMin": "-999", + "trackPhiMax": "999", + "trackSelections": "globalTracks", + "eventSelections": "sel8", + "particleSelections": "PhysicalPrimary", + "clusterDefinition": "kV3Default", + "clusterEtaMin": "-0.7", + "clusterEtaMax": "0.7", + "clusterPhiMin": "-999", + "clusterPhiMax": "999", + "clusterEnergyMin": "0.5", + "clusterTimeMin": "-999", + "clusterTimeMax": "999", + "clusterRejectExotics": "true", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetPtMin": "0", + "jetPtMax": "1000", + "jetEtaMin": "-99", + "jetEtaMax": "99", + "jetAlgorithm": "2", + "jetRecombScheme": "0", + "jetGhostArea": "0.005", + "ghostRepeat": "1", + "DoTriggering": "false", + "processDummy": "true", + "processChargedJets": "false", + "processNeutralJets": "false", + "processFullJets": "false", + "processParticleLevelChargedJets": "false", + "processParticleLevelNeutralJets": "false", + "processParticleLevelFullJets": "false" + }, + "jet-validation-track-collision-qa": { + "ptLow": "0.15", + "ptUp": "100", + "etaLow": "-0.9", + "etaUp": "0.9", + "evSel": "true", + "nBins": "200", + "BinsPhi": { + "values": [ + "180", + "0", + "6.4" + ] + }, + "BinsEta": { + "values": [ + "200", + "-0.9", + "0.9" + ] + }, + "BinsPt": { + "values": [ + "200", + "0", + "100" + ] + }, + "trackSelections": "hybridTracksJE", + "processESD": "true", + "processRun3AOD": "false", + "processDummy": "false" + }, + "mc-jet-validation-track-collision-qa": { + "ptLow": "0.15", + "ptUp": "100", + "etaLow": "-0.9", + "etaUp": "0.9", + "nBins": "200", + "BinsPhi": { + "values": [ + "200", + "-3.2", + "6.4" + ] + }, + "BinsEta": { + "values": [ + "200", + "-0.9", + "0.9" + ] + }, + "BinsPt": { + "values": [ + "0", + "0", + "0.1", + "0.12", + "0.14", + "0.16", + "0.18", + "0.2", + "0.25", + "0.3", + "0.35", + "0.4", + "0.45", + "0.5", + "0.55", + "0.6", + "0.65", + "0.7", + "0.75", + "0.8", + "0.85", + "0.9", + "0.95", + "1", + "1.1", + "1.2", + "1.3", + "1.4", + "1.5", + "1.6", + "1.7", + "1.8", + "1.9", + "2", + "2.2", + "2.4", + "2.6", + "2.8", + "3", + "3.2", + "3.4", + "3.6", + "3.8", + "4", + "4.2", + "4.4", + "4.6", + "4.8", + "5" + ] + }, + "trackSelections": "hybridTracksJE", + "processMcRun2": "false", + "processMcRun3": "false", + "processDummy": "true" + }, + "internal-dpl-aod-writer": "", + "internal-dpl-aod-global-analysis-file-sink": "", + "internal-dpl-injected-dummy-sink": "" +} diff --git a/codeJE/runtest.sh b/codeJE/runtest.sh new file mode 120000 index 00000000..09762e57 --- /dev/null +++ b/codeJE/runtest.sh @@ -0,0 +1 @@ +../exec/runtest.sh \ No newline at end of file diff --git a/codeJE/utils_plot.h b/codeJE/utils_plot.h new file mode 120000 index 00000000..04a6f997 --- /dev/null +++ b/codeJE/utils_plot.h @@ -0,0 +1 @@ +../codeHF/utils_plot.h \ No newline at end of file diff --git a/codeJE/workflows.yml b/codeJE/workflows.yml new file mode 100644 index 00000000..baad3f8b --- /dev/null +++ b/codeJE/workflows.yml @@ -0,0 +1,76 @@ +--- +options: + global: "" + local: + - "-b" + - "--configuration json://$JSON" + - "--aod-memory-rate-limit 2000000000" + - "--shm-segment-size 16000000000" + - "--min-failure-level error" + +workflows: + + # Analysis tasks + + # Table producers + + o2-analysis-je-emcal-correction-task: + dependencies: [o2-analysis-event-selection, o2-analysis-trackselection_runX] + + o2-analysis-je-jet-deriveddata-producer: + dependencies: [o2-analysis-je-emcal-correction-task] + + o2-analysis-je-jet-finder: + dependencies: [o2-analysis-je-jet-deriveddata-producer] + + # QA + + o2-analysis-je-jet-validation-qa: + dependencies: [o2-analysis-je-jet-finder, o2-analysis-je-jet-deriveddata-producer, o2-analysis-trackselection_runX] + + o2-analysis-qa-efficiency: + requires_mc: yes + dependencies: [o2-analysis-event-selection, o2-analysis-trackselection_runX] + + o2-analysis-qa-event-track: + requires_mc: yes + dependencies: [o2-analysis-event-selection, o2-analysis-trackselection_runX, o2-analysis-pid-tof-base] + + # Helper tasks + + o2-analysis-timestamp: {} + + o2-analysis-trackselection_run2: + executable: o2-analysis-trackselection + dependencies: o2-analysis-track-dca_run2 + + o2-analysis-trackselection_run3: + executable: o2-analysis-trackselection + dependencies: o2-analysis-track-dca_run3 + + o2-analysis-track-dca_run2: + executable: o2-analysis-trackextension + dependencies: o2-analysis-timestamp + + o2-analysis-track-dca_run3: + executable: o2-analysis-track-propagation + dependencies: o2-analysis-timestamp + + o2-analysis-event-selection: + dependencies: o2-analysis-timestamp + +# Converters + + o2-analysis-mc-converter: {} + + o2-analysis-fdd-converter: {} + + o2-analysis-collision-converter: {} + + o2-analysis-zdc-converter: {} + + o2-analysis-bc-converter: {} + + o2-analysis-tracks-extra-converter: {} + + o2-analysis-calo-label-converter: {}