diff --git a/.clang-format b/.clang-format index 93ba0f7b..28aa5691 100644 --- a/.clang-format +++ b/.clang-format @@ -1,3 +1,4 @@ +--- BasedOnStyle: Google AccessModifierOffset: -1 AlignEscapedNewlinesLeft: true @@ -14,7 +15,7 @@ BreakBeforeBraces: Linux BreakBeforeTernaryOperators: true BreakConstructorInitializersBeforeComma: false ColumnLimit: 0 -CommentPragmas: '^ IWYU pragma:' +CommentPragmas: '^ IWYU pragma:' ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 @@ -23,10 +24,10 @@ DerivePointerBinding: false ExperimentalAutoDetectBinPacking: false IndentCaseLabels: true IndentFunctionDeclarationAfterType: true -IndentWidth: 2 +IndentWidth: 2 # It is broken on windows. Breaks all #include "header.h" --- -Language: Cpp +Language: Cpp MaxEmptyLinesToKeep: 1 KeepEmptyLinesAtTheStartOfBlocks: true NamespaceIndentation: None @@ -43,14 +44,18 @@ SpaceBeforeAssignmentOperators: true SpaceBeforeParens: ControlStatements SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 1 -SpacesInAngles: false +SpacesInAngles: false SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false -Standard: Cpp11 -TabWidth: 2 -UseTab: Never +Standard: Cpp11 +TabWidth: 2 +UseTab: Never --- # Do not format protobuf files Language: Proto DisableFormat: true +--- +Language: Json +# O2 dumps JSON files with 4-space indents. +IndentWidth: 4 diff --git a/.cspell.json b/.cspell.json index b957f45c..e4538cf5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -7,7 +7,7 @@ "**/.git/**", ".vscode", "package-lock.json", - "report" + "megalinter-reports" ], "words": [] } diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..30ad6d8f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +--- +# Dependabot configuration +# Reference: https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file + +version: 2 +updates: + - package-ecosystem: "github-actions" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" diff --git a/.github/workflows/clang-format-lint.yml b/.github/workflows/clang-format-lint.yml index aa40d7ce..95f661e6 100644 --- a/.github/workflows/clang-format-lint.yml +++ b/.github/workflows/clang-format-lint.yml @@ -1,18 +1,70 @@ +--- # https://github.com/marketplace/actions/clang-format-lint -name: Clang Format Linter +name: ClangFormat on: [push, pull_request] +permissions: + # Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR + # Remove the ones you do not need + contents: write + issues: write + pull-requests: write +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true jobs: - build: - name: Clang Format Linter + clang-format: + name: Clang Format runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v6 + - name: Clang Format - uses: DoozyX/clang-format-lint-action@v0.11 + id: clang + uses: DoozyX/clang-format-lint-action@v0.20 with: #source: '.' #exclude: './third_party ./external' - #extensions: 'h,cpp,cxx,C' - clangFormatVersion: 11 + extensions: 'C,c,c++,cc,cl,cpp,cu,cuh,cxx,cxx.in,h,h++,hh,h.in,hpp,hxx,inc,inl,macro' + # clangFormatVersion: 18 style: file + inplace: true + + # Set a results status = 0 if no changes, = 1 if formatted + - name: Set result status + id: clang-result + run: | + status=0 + if ! git diff --quiet; then + status=1 + fi + echo "status=$status" >> "$GITHUB_OUTPUT" + + # Create pull request if applicable (for now works only on PR from same repository, not from forks) + - name: Print PR condition + run: | + # Print the condition + echo "${{ github.event_name }} == 'push'" + - name: Create Pull Request with applied fixes + id: cpr + if: github.event_name == 'push' + uses: peter-evans/create-pull-request@v8 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + commit-message: "[Clang format] Apply linters automatic fixes" + title: "[Clang format] Apply linters automatic fixes" + body: "Please merge this pull request to apply automatic fixes by Clang format." + labels: bot + branch: patch-${{ github.workflow }}-${{ github.ref_name }} + delete-branch: true + - name: Create PR output + if: steps.clang-result.outputs.status == 1 + run: |- + echo "::error::Files need formatting." + if [ ${{ github.event_name }} == 'push' ]; then + echo "::error::Merge pull request ${{ steps.cpr.outputs.pull-request-url }} to apply automatic fixes." + elif [ ${{ github.event_name }} == 'pull_request' ]; then + echo "::error::Check ${{ github.event.pull_request.head.repo.html_url }}/pulls to apply automatic fixes." + echo "::notice::Actions must be allowed in your repository. See ${{ github.event.pull_request.head.repo.html_url }}/settings/actions" + fi + exit 1 diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 4ea196d1..cbe110eb 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -1,6 +1,6 @@ --- # MegaLinter GitHub Action configuration file -# More info at https://megalinter.github.io +# More info at https://megalinter.io name: MegaLinter on: @@ -9,37 +9,44 @@ on: pull_request: branches: [master, main] -env: # Comment env block if you do not want to apply fixes +permissions: + # Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR + # Remove the ones you do not need + contents: write + issues: write + pull-requests: write + +env: # Comment env block if you don't want to apply fixes # Apply linter fixes configuration APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) - APPLY_FIXES_EVENT: all # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) - APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) + APPLY_FIXES_EVENT: push # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) + APPLY_FIXES_MODE: pull_request # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) concurrency: group: ${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true jobs: - build: + megalinter: name: MegaLinter runs-on: ubuntu-latest steps: # Git Checkout - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} - fetch-depth: 0 + fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances # MegaLinter - name: MegaLinter id: ml # You can override MegaLinter flavor used to have faster performances - # More info at https://megalinter.github.io/flavors/ - uses: megalinter/megalinter@v5 + # More info at https://megalinter.io/flavors/ + uses: oxsecurity/megalinter@v9.4.0 env: # All available variables are described in documentation - # https://megalinter.github.io/configuration/ + # https://megalinter.io/configuration/ VALIDATE_ALL_CODEBASE: false # ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} # Validates all source when push on master, else just the git diff with master. Override with true if you always want to lint all sources GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # ADD YOUR CUSTOM ENV VARIABLES HERE OR DEFINE THEM IN A FILE .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY @@ -47,33 +54,42 @@ jobs: # Upload MegaLinter artifacts - name: Archive production artifacts - if: ${{ success() }} || ${{ failure() }} - uses: actions/upload-artifact@v2 + if: success() || failure() + uses: actions/upload-artifact@v7 with: name: MegaLinter reports path: | - report + megalinter-reports mega-linter.log # Create pull request if applicable (for now works only on PR from same repository, not from forks) - name: Print PR condition run: | # Print the condition - echo "${{ steps.ml.outputs.has_updated_sources }} == 1 && (${{ env.APPLY_FIXES_EVENT }} == 'all' || ${{ env.APPLY_FIXES_EVENT }} == ${{ github.event_name }}) && ${{ env.APPLY_FIXES_MODE }} == 'pull_request' && (${{ github.event_name }} == 'push' || ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }})" + echo "(${{ env.APPLY_FIXES_EVENT }} == 'all' || ${{ env.APPLY_FIXES_EVENT }} == ${{ github.event_name }}) && ${{ env.APPLY_FIXES_MODE }} == 'pull_request' && (${{ github.event_name }} == 'push' || ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }})" - name: Create Pull Request with applied fixes id: cpr - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) - uses: peter-evans/create-pull-request@v3 + if: (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) + uses: peter-evans/create-pull-request@v8 with: token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} commit-message: "[MegaLinter] Apply linters automatic fixes" title: "[MegaLinter] Apply linters automatic fixes" + body: "Please merge this pull request to apply automatic fixes by MegaLinter." labels: bot + branch: patch-${{ github.workflow }}-${{ github.ref_name }} + delete-branch: true - name: Create PR output - if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) + if: steps.ml.outputs.has_updated_sources == 1 run: | - echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" - echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + echo "::error::MegaLinter has fixed some files." + if [ ${{ github.event_name }} == 'push' ]; then + echo "::error::Merge pull request ${{ steps.cpr.outputs.pull-request-url }} to apply automatic fixes." + elif [ ${{ github.event_name }} == 'pull_request' ]; then + echo "::error::Check ${{ github.event.pull_request.head.repo.html_url }}/pulls to apply automatic fixes." + echo "::notice::Actions must be allowed in your repository. See ${{ github.event.pull_request.head.repo.html_url }}/settings/actions" + fi + exit 1 # Push new commit if applicable (for now works only on PR from same repository, not from forks) - name: Print commit condition @@ -85,7 +101,9 @@ jobs: run: sudo chown -Rc $UID .git/ - name: Commit and push applied linter fixes if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/master' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v7 with: branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} commit_message: "[MegaLinter] Apply linters fixes" + commit_user_name: megalinter-bot + commit_user_email: nicolas.vuillamy@ox.security diff --git a/.github/workflows/space-checker.yml b/.github/workflows/space-checker.yml index 5ba51524..f292afaa 100644 --- a/.github/workflows/space-checker.yml +++ b/.github/workflows/space-checker.yml @@ -1,6 +1,8 @@ +--- # Find bad spacing in modified text files name: Space checker on: [push, pull_request] +permissions: {} env: MAIN_BRANCH: master jobs: @@ -9,25 +11,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v6 with: fetch-depth: 0 # needed to get the full history - - name: Fetch upstream - run: | - # Fetch the main upstream branch to find the common ancestor - git config --global user.name "Nemo" # required on some servers - git remote add upstream https://github.com/AliceO2Group/Run3Analysisvalidation.git || exit 1 - git fetch upstream ${{ env.MAIN_BRANCH }} || exit 1 - name: Find bad spacing - run: | + run: |- # Find tabs and trailing whitespaces in modified text files and show where they are status_tab=0 status_trail=0 - # Get the common ancestor of the current branch and the main upstream branch - BASE_COMMIT=$(git merge-base HEAD upstream/${{ env.MAIN_BRANCH }}) - echo "Diffing against: $BASE_COMMIT" # loop over changed files - for f in $(git diff --diff-filter d --name-only "$BASE_COMMIT"); do + # Diff against the common ancestor of the source branch and the main branch. + for f in $(git diff --diff-filter d --name-only origin/${{ env.MAIN_BRANCH }}...); do # ignore binary files file -bi "$f" | grep -q "charset=binary" && continue echo "Scanning file: $f" @@ -52,7 +46,7 @@ jobs: # shellcheck disable=2028 echo "::warning::Fix the errors in your editor (or with a command) Command tips: - - Get list of files you changed: git diff --diff-filter d --name-only \$(git merge-base HEAD upstream/${{ env.MAIN_BRANCH }}) + - Get list of files you changed: git diff --diff-filter d --name-only ${{ env.MAIN_BRANCH }}... - Replace each tab with two spaces: sed -i 's/\\t/ /g' - Remove trailing whitespaces: sed -i 's/[[:space:]]*$//' " echo "::warning::To avoid these errors, configure your editor to: diff --git a/.gitignore b/.gitignore index bff3430a..4a771ae2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,14 @@ *.root *.pdf +*.png *.log -report/ -.DS_Store \ No newline at end of file +megalinter-reports/ +.DS_Store +.mypy_cache/ +github_conf/ +output_* +list_*.txt +script_*.sh +ListOutToMerge*.txt +dpl-config*_edit.json +workflows_edit.yml diff --git a/.isort.cfg b/.isort.cfg deleted file mode 100644 index b9fb3f3e..00000000 --- a/.isort.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[settings] -profile=black diff --git a/.jscpd.json b/.jscpd.json index f54123b4..0f739bf2 100644 --- a/.jscpd.json +++ b/.jscpd.json @@ -12,6 +12,6 @@ "**/*cache*/**", "**/.github/**", "**/.idea/**", - "**/report/**" + "**/megalinter-reports/**" ] } diff --git a/.mega-linter.yml b/.mega-linter.yml index 14f76bdf..dca1d8c4 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -1,5 +1,6 @@ +--- # Configuration file for Mega-Linter -# See all available variables at https://megalinter.github.io/configuration/ and in linters documentation +# See all available variables at https://oxsecurity.github.io/megalinter/configuration/ and in linters documentation APPLY_FIXES: all # all, none, or list of linter keys DEFAULT_BRANCH: master # Usually master or main @@ -10,14 +11,30 @@ DISABLE: - COPYPASTE # abusive copy-pastes - SPELL # spelling mistakes DISABLE_LINTERS: - - CPP_CPPLINT - BASH_EXEC - BASH_SHFMT - JSON_PRETTIER - - YAML_V8R + - PYTHON_BLACK + - PYTHON_FLAKE8 + - PYTHON_ISORT + - REPOSITORY_DEVSKIM + - REPOSITORY_KICS + - REPOSITORY_SECRETLINT + - REPOSITORY_TRIVY - YAML_PRETTIER + - YAML_V8R +DISABLE_ERRORS_LINTERS: # If errors are found by these linters, they will be considered as non blocking. + - PYTHON_BANDIT # The bandit check is overly broad and complains about subprocess usage. SHOW_ELAPSED_TIME: true FILEIO_REPORTER: false GITHUB_COMMENT_REPORTER: false UPDATED_SOURCES_REPORTER: true PRINT_ALPACA: false # Don't print ASCII alpaca in the log +PRINT_ALL_FILES: true # Print all processed files +FLAVOR_SUGGESTIONS: false # Don't show suggestions about different MegaLinter flavors +PYTHON_ISORT_CONFIG_FILE: pyproject.toml +PYTHON_PYRIGHT_CONFIG_FILE: pyproject.toml +PYTHON_RUFF_CONFIG_FILE: pyproject.toml +CPP_CPPLINT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"] +CPP_CLANG_FORMAT_FILE_EXTENSIONS: [".C", ".c", ".c++", ".cc", ".cl", ".cpp", ".cu", ".cuh", ".cxx", ".cxx.in", ".h", ".h++", ".hh", ".h.in", ".hpp", ".hxx", ".inc", ".inl", ".macro"] +FILTER_REGEX_EXCLUDE: (codeQA/|Upgrade/) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..3efd3a59 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,58 @@ +--- +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: check-added-large-files + - id: check-ast + - id: check-builtin-literals + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-json + - id: check-merge-conflict + - id: check-symlinks + - id: check-toml + - id: check-yaml + args: [--allow-multiple-documents] + - id: debug-statements + - id: end-of-file-fixer + - id: mixed-line-ending + - id: name-tests-test + - id: pretty-format-json + args: [--autofix, --no-ensure-ascii, --indent, "4"] + - id: requirements-txt-fixer + - id: trailing-whitespace + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.15.0 # ruff version + hooks: + - id: ruff-check # linter + args: ["--fix"] + - id: ruff-format # formatter + - repo: https://github.com/asottile/pyupgrade + rev: v3.21.2 + hooks: + - id: pyupgrade + args: ["--py310-plus"] + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.11.0.1 + hooks: + - id: shellcheck + - repo: https://github.com/google/yamlfmt + rev: v0.21.0 + hooks: + - id: yamlfmt + - repo: https://github.com/adrienverge/yamllint + rev: v1.38.0 + hooks: + - id: yamllint + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v21.1.8 # clang-format version + hooks: + - id: clang-format + - repo: https://github.com/cpplint/cpplint + rev: 2.0.2 + hooks: + - id: cpplint diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 00000000..fd8806b4 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,34 @@ +[FORMAT] +indent-string=' ' +max-line-length=120 + +[BASIC] +variable-rgx=(?:(?P[a-z_]+)) + +[TYPECHECK] +generated-members=RdBu + +[DESIGN] +max-args=10 +max-locals=40 + +[MESSAGES CONTROL] +disable= + useless-suppression, + too-few-public-methods, + too-many-arguments, + too-many-branches, + too-many-instance-attributes, + too-many-lines, + too-many-locals, + too-many-nested-blocks, + too-many-positional-arguments, + too-many-public-methods, + too-many-return-statements, + too-many-statements + +[MISCELLANEOUS] +notes=FIXME,XXX + +[IMPORTS] +ignored-modules=ROOT,yaml,pandas,numpy,shap,uproot diff --git a/.yamlfmt.yml b/.yamlfmt.yml new file mode 100644 index 00000000..3553080f --- /dev/null +++ b/.yamlfmt.yml @@ -0,0 +1,15 @@ +--- +# yamlfmt configuration +# Reference: https://github.com/google/yamlfmt/blob/main/docs/config-file.md#configuration-1 + +formatter: + type: basic + indent: 2 + include_document_start: true + line_ending: lf + retain_line_breaks_single: true + max_line_length: -1 + drop_merge_tag: true + pad_line_comments: 1 + trim_trailing_whitespace: true + eof_newline: true diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 00000000..d0af0342 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,15 @@ +--- +# yamllint configuration +# Reference: https://yamllint.readthedocs.io/en/stable/rules.html + +extends: default +rules: + line-length: + max: 120 + level: warning + indentation: + spaces: 2 + level: warning + comments: + require-starting-space: true + min-spaces-from-content: 1 diff --git a/CODEOWNERS b/CODEOWNERS index 59eceb91..dab126de 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -4,6 +4,6 @@ # Each line is a file pattern followed by one or more owners. # These owners will be the default owners for everything in the repo. -* @ginnocen @vkucera +* @vkucera # Order is important. The last matching pattern has the most precedence. diff --git a/CPPLINT.cfg b/CPPLINT.cfg new file mode 100644 index 00000000..7f7d3c35 --- /dev/null +++ b/CPPLINT.cfg @@ -0,0 +1 @@ +filter=-build/c++11,-build/namespaces,-readability/fn_size,-readability/todo,-runtime/references,-whitespace/blank_line,-whitespace/braces,-whitespace/comments,-whitespace/indent_namespace,-whitespace/line_length,-whitespace/semicolon,-whitespace/todo diff --git a/FirstAnalysis/Correlations/extract2D.C b/FirstAnalysis/Correlations/extract2D.C deleted file mode 100644 index 72747780..00000000 --- a/FirstAnalysis/Correlations/extract2D.C +++ /dev/null @@ -1,319 +0,0 @@ -/////////////////////////////////////////////////////////////////////////// -// Macro to produce 2D histograms of correlations vs. delta phi and delta eta -// -// This macro allows you to process the content of the CorrelationContainer -// for both same-event and mixed-event correlations and obtain the 2D correlation plot. -// 1/N_trig * dN/ddeltaphi*ddeltaeta = dN_same/ddeltaphi*ddeltaeta / dN_mixed/ddeltaphi*ddeltaeta -// Both numerator (same-event) and denominator (mixed-event) are properly normalised. -// -// Input: file with histograms produced by o2-analysis-hf-task-flow -// -// Usage: root -l extract2D.C -// -// Parameters: -// - fileName: input file -// - outputFile: output file containing final 2D correlation histograms -// - folder: name of the folder created by the o2-analysis-hf-task-flow, -// contains the results stored in CorrelationContainer -// - saveSameEventDis: flag to save 2D histograms of only same-event correlations -// -// Contributors: -// Katarina Krizkova Gajdosova -// Gian Michele Innocenti -// Jan Fiete Grosse-Oetringhaus -/////////////////////////////////////////////////////////////////////////// - -Float_t gpTMin = 0.21; -Float_t gpTMax = 2.99; -Float_t gEtaMin = -1.1; -Float_t gEtaMax = 1.1; -Float_t gZVtxMin = -10; -Float_t gZVtxMax = 10; - -void SetupRanges(CorrelationContainer* obj) -{ - obj->setEtaRange(0, 0); - //obj->setEtaRange(gEtaMin, gEtaMax); - obj->setPtRange(gpTMin, gpTMax); - obj->setZVtxRange(gZVtxMin + 0.01, gZVtxMax - 0.01); -} - -/////////////////////////////////////////////////////////////////////////// -// Function to average the 2D correlations over Vz bins normalised for -// the value in (0,0) bin. It is also divided by the number of trigger particles. -// Note: instead of just taking a value in one (0,0) bin, there is an option to -// do an average of values in delta eta = 0 over all delta phi bins -// to account for fluctuations -/////////////////////////////////////////////////////////////////////////// -void GetSumOfRatios(CorrelationContainer* h, CorrelationContainer* hMixed, TH1** hist, CorrelationContainer::CFStep step, Float_t centralityBegin, Float_t centralityEnd, Float_t ptBegin, Float_t ptEnd, Bool_t normalizePerTrigger = kTRUE) -{ - Printf("GetSumOfRatios | step %d | %.1f-%.1f%% | %.1f - %.1f GeV/c | %.1f - %.1f GeV/c", step, centralityBegin, centralityEnd, gpTMin, gpTMax, ptBegin, ptEnd); - - h->setCentralityRange(0.01 + centralityBegin, -0.01 + centralityEnd); - hMixed->setCentralityRange(0.01 + centralityBegin, -0.01 + centralityEnd); - *hist = h->getSumOfRatios(hMixed, step, ptBegin, ptEnd, normalizePerTrigger); - - TString str; - str.Form("%.1f < p_{T,trig} < %.1f", ptBegin - 0.01, ptEnd + 0.01); - - TString str2; - str2.Form("%.2f < p_{T,assoc} < %.2f", gpTMin - 0.01, gpTMax + 0.01); - - TString newTitle; - newTitle.Form("%s - %s - %.0f-%.0f", str.Data(), str2.Data(), centralityBegin, centralityEnd); - if ((*hist)) - (*hist)->SetTitle(newTitle); -} - -/////////////////////////////////////////////////////////////////////////// -// Function to plot same-event 2D correlations in a particular Vz bin -// It is also divided by the number of trigger particles and dphi bin width. -/////////////////////////////////////////////////////////////////////////// -void GetSameEventCorrelation(CorrelationContainer* h, TH2** hist, CorrelationContainer::CFStep step, Float_t centralityBegin, Float_t centralityEnd, Float_t ptBegin, Float_t ptEnd, Bool_t normalizePerTrigger = kTRUE) -{ - Printf("GetSameEventCorrelation | step %d | %.1f < Nch < %.1f | %.1f - %.1f GeV/c | %.1f - %.1f GeV/c \n", step, centralityBegin, centralityEnd, ptBegin, ptEnd, gpTMin, gpTMax); - - h->setCentralityRange(0.01 + centralityBegin, -0.01 + centralityEnd); - - *hist = h->getPerTriggerYield(step, ptBegin, ptEnd, normalizePerTrigger); - - TString str; - str.Form("%.1f < p_{T,trig} < %.1f", ptBegin - 0.01, ptEnd + 0.01); - - TString str2; - str2.Form("%.1f < p_{T,assoc} < %.1f", gpTMin - 0.01, gpTMax + 0.01); - - TString newTitle; - newTitle.Form("%s - %s , mult %.0f-%.0f, vz %.0f - %.0f", str.Data(), str2.Data(), centralityBegin, centralityEnd, gZVtxMin, gZVtxMax); - if ((*hist)) - (*hist)->SetTitle(newTitle); -} - -/////////////////////////////////////////////////////////////////////////// -// Function to draw a projection of specific axis of the CorrelationContainer -// It is mostly meant as a quick QA of the filled distributions -/////////////////////////////////////////////////////////////////////////// -TH1* GetProjectionOfAxis(CorrelationContainer* h, CorrelationContainer::CFStep step, bool pairhist = false, int naxis = 6) -{ - THnBase* sparse; - if (pairhist) - sparse = h->getPairHist()->getTHn(step); - else - sparse = h->getTriggerHist()->getTHn(step); - - TH1* hprojection = (TH1*)sparse->Projection(naxis); - return hprojection; -} - -/////////////////////////////////////////////////////////////////////////// -// Main function -/////////////////////////////////////////////////////////////////////////// -void extract2D(const char* fileName = "../../codeHF/AnalysisResults_O2.root", const char* outputFile = "dphi_corr.root", const char* folder = "hf-task-flow", bool saveSameEventDis = false) -{ - gStyle->SetOptStat(1111111); - - CorrelationContainer::CFStep step = CorrelationContainer::kCFStepReconstructed; - Bool_t normalizePerTrigger = kTRUE; // don't do this if histograms are to be merged with other periods later -> Use MergeDPhiFiles below - - auto file = TFile::Open(outputFile, "RECREATE"); - file->Close(); - - // the interval below defines the pttrig, ptass and multiplicity (or - // centrality in which the analysis will be performed. One "ridge" plot - // with the correct normalization will be obtained for each of this - // combination (with the condition that the selection on the associated pt - // has to be looser than the one on the trigger particle. - - // temporarily do only first pT bin for quick comparisons on small data sample - Int_t maxLeadingPt = 1; - Float_t leadingPtArr[] = {1.0, 2.0, 3.0, 4.0}; - - Int_t maxAssocPt = 1; - Float_t assocPtArr[] = {1.0, 2.0, 3.0, 4.0}; - - Int_t maxCentrality = 22; - Float_t centralityArr[] = {0.0, 2.750, 5.750, 7.750, 12.750, 17.750, 22.750, 27.750, 32.750, 37.750, 42.750, 47.750, 52.750, 57.750, 62.750, 67.750, 72.750, 77.750, 82.750, 87.750, 92.750, 97.750, 250.1}; - - // h is the container of the same event - // hMixed contain the data corresponding to the mixed event sample. - auto inputFile = TFile::Open(fileName); - auto h = (CorrelationContainer*)inputFile->Get(Form("%s/sameEventTPCTPCChHadrons", folder)); - auto hMixed = (CorrelationContainer*)inputFile->Get(Form("%s/mixedEventTPCTPCChHadrons", folder)); - - // auto proj = GetProjectionOfAxis(h, step, false, 1); - // proj->Draw(); - // printf("entires proj: %g \n", proj->GetEntries()); - // return; - - // the number of events for each multiplicity/centrality class is calculated and printed. - auto eventHist = h->getEventCount(); - Printf("Events with centrality: %d", (int)eventHist->Integral(eventHist->GetXaxis()->FindBin(6.), eventHist->GetXaxis()->FindBin(6.), eventHist->GetYaxis()->FindBin(0.), eventHist->GetYaxis()->FindBin(99.9))); - Printf("Events: %d", (int)eventHist->ProjectionX()->Integral(eventHist->GetXaxis()->FindBin(6.), eventHist->GetXaxis()->FindBin(6.))); - // eventHist->ProjectionX()->Draw(); - // return; - - // low multiplicity illustrative histograms - h->setPtRange(gpTMin, gpTMax); - h->setCentralityRange(10, 20); - h->setZVtxRange(-10, 10); - hMixed->setPtRange(gpTMin, gpTMax); - hMixed->setCentralityRange(10, 20); - hMixed->setZVtxRange(-10, 10); - - TH2* sameTwoD = (TH2*)h->getPerTriggerYield(step, 0.2, 2.99, true); - auto c1 = new TCanvas; - sameTwoD->Draw("SURF1"); - sameTwoD->SetStats(0); - sameTwoD->SetTitle(""); - sameTwoD->GetXaxis()->SetTitleOffset(1.5); - c1->SaveAs("sameCorr.png"); - - // Note: this is not normalised for the bin (0,0), - TH2* mixedTwoD = (TH2*)hMixed->getPerTriggerYield(step, 0.2, 2.99, false); - auto c2 = new TCanvas; - mixedTwoD->Draw("SURF1"); - mixedTwoD->SetStats(0); - mixedTwoD->SetTitle(""); - mixedTwoD->GetXaxis()->SetTitleOffset(1.5); - c2->SaveAs("mixedCorr.png"); - - auto ratio = (TH2*)sameTwoD->Clone("ratio"); - ratio->Divide(mixedTwoD); - - auto c3 = new TCanvas; - ratio->GetYaxis()->SetRangeUser(-1.59, 1.59); - ratio->GetXaxis()->SetTitleOffset(1.5); - ratio->SetStats(0); - ratio->SetTitle(""); - ratio->Draw("SURF1"); - c3->SaveAs("pertriggeryield.png"); - - auto c4 = new TCanvas; - ratio->SetMaximum(1.35); - ratio->Draw("SURF1"); - c4->SaveAs("pertriggeryield_zoomin.png"); - - // high multiplicity illustrative histograms - h->setPtRange(gpTMin, gpTMax); - h->setCentralityRange(40, 100); - h->setZVtxRange(-10, 10); - hMixed->setPtRange(gpTMin, gpTMax); - hMixed->setCentralityRange(40, 100); - hMixed->setZVtxRange(-10, 10); - - TH2* sameTwoDHM = (TH2*)h->getPerTriggerYield(step, 0.2, 2.99, true); - auto c1HM = new TCanvas; - sameTwoDHM->Draw("SURF1"); - sameTwoDHM->SetStats(0); - sameTwoDHM->SetTitle(""); - sameTwoDHM->GetXaxis()->SetTitleOffset(1.5); - c1HM->SaveAs("sameCorr_HM.png"); - - // Note: this is not normalised for the bin (0,0) - TH2* mixedTwoDHM = (TH2*)hMixed->getPerTriggerYield(step, 0.2, 2.99, false); - auto c2HM = new TCanvas; - mixedTwoDHM->Draw("SURF1"); - mixedTwoDHM->SetStats(0); - mixedTwoDHM->SetTitle(""); - mixedTwoDHM->GetXaxis()->SetTitleOffset(1.5); - c2HM->SaveAs("mixedCorr_HM.png"); - - auto ratioHM = (TH2*)sameTwoDHM->Clone("ratioHM"); - ratioHM->Divide(mixedTwoDHM); - - auto c3HM = new TCanvas; - ratioHM->GetYaxis()->SetRangeUser(-1.59, 1.59); - ratioHM->GetXaxis()->SetTitleOffset(1.5); - ratioHM->SetStats(0); - ratioHM->SetTitle(""); - ratioHM->Draw("SURF1"); - c3HM->SaveAs("pertriggeryield_HM.png"); - - auto c4HM = new TCanvas; - ratioHM->SetMaximum(1.35); - ratioHM->Draw("SURF1"); - c4HM->SaveAs("pertriggeryield_HM_zoomin.png"); - - // TODO: when doing HF correlations, make sure to project/integrate the correct inv. mass range/axis - - for (Int_t i = 0; i < maxLeadingPt; i++) { - for (Int_t j = 0; j < maxAssocPt; j++) { - if (assocPtArr[j] >= leadingPtArr[i + 1]) - continue; - - // Below each analysis is made for each choice of pttrig, ptassoc and multiplicity. - // The same event correlations is divided by mixed event after normalization - // for each pTtrig, pTassoc and mult bin (will be integrated over all Vz) - - gpTMin = assocPtArr[j] + 0.01; - gpTMax = assocPtArr[j + 1] - 0.01; - gZVtxMin = -10; - gZVtxMax = 10; - - SetupRanges(h); - SetupRanges(hMixed); - - for (Int_t mult = 0; mult < maxCentrality; mult++) { - - TH1* hist1 = 0; - GetSumOfRatios(h, hMixed, &hist1, step, centralityArr[mult], centralityArr[mult + 1], leadingPtArr[i] + 0.01, leadingPtArr[i + 1] - 0.01, normalizePerTrigger); - - file = TFile::Open(outputFile, "UPDATE"); - - if (hist1) { - hist1->SetName(Form("dphi_%d_%d_%d", i, j, mult)); - hist1->Write(); - } - - file->Close(); - - delete hist1; - } - - // Below, get same-event 2D distributions to compare with Jasper - // for each pT trig and pT passoc and each multiplicity bin - if (!saveSameEventDis) - continue; - - SetupRanges(h); - - for (Int_t mult = 0; mult < maxCentrality; mult++) { - - TH2* histSame2D = 0; - GetSameEventCorrelation(h, &histSame2D, step, centralityArr[mult], centralityArr[mult + 1], leadingPtArr[i] + 0.01, leadingPtArr[i + 1] - 0.01, normalizePerTrigger); - - file = TFile::Open(outputFile, "UPDATE"); - - if (histSame2D) { - histSame2D->SetName(Form("same_%d_%d_%d", i, j, mult)); - histSame2D->Write(); - } - - file->Close(); - - delete histSame2D; - } - } - - // triggers contain the information about the number of trigger particles - // in each interval of multiplicity (used for the result normalization) - - gZVtxMin = -10; - gZVtxMax = 10; - - SetupRanges(h); - - TH1* triggers = h->getTriggersAsFunctionOfMultiplicity(step, leadingPtArr[i] + 0.01, leadingPtArr[i + 1] - 0.01); - triggers->SetName(Form("triggers_%d", i)); - TString str; - str.Form("%.1f < p_{T,trig} < %.1f", leadingPtArr[i], leadingPtArr[i + 1]); - triggers->SetTitle(str); - - file = TFile::Open(outputFile, "UPDATE"); - triggers->Write(); - file->Close(); - } - - delete h; - delete hMixed; -} diff --git a/FirstAnalysis/Correlations/plotYield.C b/FirstAnalysis/Correlations/plotYield.C deleted file mode 100644 index 5d3070fb..00000000 --- a/FirstAnalysis/Correlations/plotYield.C +++ /dev/null @@ -1,158 +0,0 @@ -////////////////////////////////////////////////////////////// -// Macro to plot deltaphi projections of two-particle correlations and yields -// -// For different bins in pT (of trigger and associated particles) plot -// 1) the projection on deltaphi axis of the near-side ridge region (excluding the jet peak) -// + the fit with Fourier expansion -// 2) the integrated yield as a function of multiplicity -// -// Input: file with projection histograms produced by yieldExtraction.C macro in this folder -// -// Usage: root -l plotYield.C -// -// Parameters: -// - inFileName: name of the input file -// - savePlots: flag to save the plots -// -// Contributors: -// Katarina Krizkova Gajdosova -// Gian Michele Innocenti -// Jan Fiete Grosse-Oetringhaus -////////////////////////////////////////////////////////////// - -float ptTrig[] = {1.0, 2.0, 3.0, 4.0}; -float ptAssoc[] = {1.0, 2.0, 3.0, 4.0}; -static Double_t Nch[] = {0.0, 2.750, 5.250, 7.750, 12.750, 17.750, 22.750, 27.750, 32.750, 37.750, 42.750, 47.750, 52.750, 57.750, 62.750, 67.750, 72.750, 77.750, 82.750, 87.750, 92.750, 97.750, 250.1}; - -void DrawText(double xmin, double ymin, double textSize, TString text); - -////////////////////////////////////////////////////////////// -// main function -////////////////////////////////////////////////////////////// -void plotYield(const char* inFileName = "yield.root", bool savePlots = false) -{ - - gStyle->SetLegendBorderSize(-1); - - TFile* infile = new TFile(inFileName, "read"); - TFile* infileAll = new TFile("yieldAll.root", "read"); - - // plot deltaphi projections in bins of Nch - const uint ntrig = 1; - const uint nassoc = 1; - const uint nmult = 13; - TCanvas* cdphiRidge[ntrig][nassoc]; - TCanvas* cdphiRidge2[ntrig][nassoc]; - TH1D* hdphiRidge[ntrig][nassoc][nmult]; - TF1* fdphiRidge[ntrig][nassoc][nmult]; - TCanvas* cRidge[ntrig][nassoc]; - TGraphErrors* gRidge[ntrig][nassoc]; - - for (uint itrig = 0; itrig < ntrig; itrig++) { - for (uint iassoc = 0; iassoc < nassoc; iassoc++) { - - // since we have a lot mult bins, we define 2 canvases with 4x2 pads - cdphiRidge[itrig][iassoc] = new TCanvas(Form("cdphiRidge_%u_%u", itrig, iassoc), "", 1200, 600); - cdphiRidge[itrig][iassoc]->Divide(4, 2); - cdphiRidge2[itrig][iassoc] = new TCanvas(Form("cdphiRidge2_%u_%u", itrig, iassoc), "", 1200, 600); - cdphiRidge2[itrig][iassoc]->Divide(4, 2); - - for (uint imult = 0; imult < nmult; imult++) { - - // get the deltaphi projection and its fit (the fit was performed in yieldExtraction.C) - hdphiRidge[itrig][iassoc][imult] = (TH1D*)infile->Get(Form("proj_dphi_%u_%u_%u", itrig, iassoc, imult)); - fdphiRidge[itrig][iassoc][imult] = (TF1*)infile->Get(Form("fit_%u_%u_%u", itrig, iassoc, imult)); - - // draw a line that shows 0 baseline - double xbinlowedge = hdphiRidge[itrig][iassoc][imult]->GetBinLowEdge(1); - double xbinupperedge = hdphiRidge[itrig][iassoc][imult]->GetBinLowEdge(hdphiRidge[itrig][iassoc][imult]->GetNbinsX() + 1); - TLine* line = new TLine(xbinlowedge, 0, xbinupperedge, 0); - line->SetLineStyle(2); - line->SetLineColor(kGray + 2); - - // first pad of the first canvas will be emtpy, used for legend only - if (imult == 0) { - cdphiRidge[itrig][iassoc]->cd(imult + 1); - DrawText(0.2, 0.8, 0.06, Form("%.1f < p_{T,trig} < %.1f", ptTrig[itrig], ptTrig[itrig + 1])); - DrawText(0.2, 0.7, 0.06, Form("%.1f < p_{T,assoc} < %.1f", ptAssoc[iassoc], ptAssoc[iassoc + 1])); - - TLegend* leg = new TLegend(0.2, 0.4, 0.6, 0.65); - leg->SetTextSize(0.06); - leg->AddEntry(hdphiRidge[itrig][iassoc][imult], "Data", "lp"); - leg->AddEntry(fdphiRidge[itrig][iassoc][imult], "Fit", "l"); - leg->Draw("same"); - - continue; - } - - // first pad of the second canvas will be empty, used for legend only - if (imult == 8) { - cdphiRidge2[itrig][iassoc]->cd((imult + 1) - 8); - DrawText(0.2, 0.8, 0.06, Form("%.1f < p_{T,trig} < %.1f", ptTrig[itrig], ptTrig[itrig + 1])); - DrawText(0.2, 0.7, 0.06, Form("%.1f < p_{T,assoc} < %.1f", ptAssoc[iassoc], ptAssoc[iassoc + 1])); - - TLegend* leg = new TLegend(0.2, 0.4, 0.6, 0.65); - leg->SetTextSize(0.06); - leg->AddEntry(hdphiRidge[itrig][iassoc][imult], "Data", "lp"); - leg->AddEntry(fdphiRidge[itrig][iassoc][imult], "Fit", "l"); - leg->Draw("same"); - } - - // draw the projectionsa and fits on different pads of the same canvas - if (imult < 8) { - cdphiRidge[itrig][iassoc]->cd(imult + 1); - hdphiRidge[itrig][iassoc][imult]->SetStats(0); - hdphiRidge[itrig][iassoc][imult]->SetTitle(""); - hdphiRidge[itrig][iassoc][imult]->Draw(); - fdphiRidge[itrig][iassoc][imult]->Draw("same"); - line->Draw("same"); - DrawText(0.2, 0.8, 0.06, Form("#LT N #GT = %.1f", (Nch[imult + 1] + Nch[imult]) / 2.0)); - } else { - cdphiRidge2[itrig][iassoc]->cd((imult + 1) - 7); - hdphiRidge[itrig][iassoc][imult]->SetStats(0); - hdphiRidge[itrig][iassoc][imult]->SetTitle(""); - hdphiRidge[itrig][iassoc][imult]->Draw(); - fdphiRidge[itrig][iassoc][imult]->Draw("same"); - line->Draw("same"); - DrawText(0.2, 0.8, 0.06, Form("#LT N #GT = %.1f", (Nch[imult + 1] + Nch[imult]) / 2.0)); - } - - } // end of loop over multiplicity - - if (savePlots) { - cdphiRidge[itrig][iassoc]->SaveAs(Form("./plots/dPhiRidge_%u_%u.png", itrig, iassoc)); - cdphiRidge2[itrig][iassoc]->SaveAs(Form("./plots/dPhiRidge2_%u_%u.png", itrig, iassoc)); - } - - // plot the yield vs. multiplicity - gRidge[itrig][iassoc] = (TGraphErrors*)infile->Get(Form("ridgeYield_%u_%u", itrig, iassoc)); - - cRidge[itrig][iassoc] = new TCanvas(Form("cRidge_%u_%u", itrig, iassoc), "", 700, 500); - - TH1D* histempty = new TH1D("histempty", "", 100, 0, 100); - histempty->GetXaxis()->SetTitle("#LT N #GT"); - histempty->GetYaxis()->SetTitle("Y_{ridge}"); - histempty->SetMaximum(0.2); - histempty->SetStats(0); - histempty->Draw(); - - gRidge[itrig][iassoc]->SetTitle(""); - gRidge[itrig][iassoc]->SetMarkerStyle(kFullCircle); - gRidge[itrig][iassoc]->SetMarkerColor(kBlue + 1); - gRidge[itrig][iassoc]->SetLineColor(kBlue + 1); - gRidge[itrig][iassoc]->Draw("Psame"); - - if (savePlots) - cRidge[itrig][iassoc]->SaveAs(Form("./plots/ridge_%u_%u.png", itrig, iassoc)); - } - } -} -////////////////////////////////////////////////////////////// -void DrawText(double xmin, double ymin, double textSize, TString text) -{ - TLatex* tl = new TLatex(xmin, ymin, Form("%s", text.Data())); - tl->SetNDC(); - tl->SetTextFont(42); - tl->SetTextSize(textSize); - tl->Draw(); -} diff --git a/FirstAnalysis/Correlations/yieldExtraction.C b/FirstAnalysis/Correlations/yieldExtraction.C deleted file mode 100644 index 80ab52d7..00000000 --- a/FirstAnalysis/Correlations/yieldExtraction.C +++ /dev/null @@ -1,175 +0,0 @@ -////////////////////////////////////////////////////////////// -// Macro to obtain projections of two-particle correlations and yield -// -// For different bins in pT (of trigger and associated particles) do -// 1) a projection on deltaeta axis of the away and near side region separately -// 2) a projection on deltaphi axis of the near-side ridge region (excluding the jet peak) -// 3) fit the deltaphi projection with Fourier expansion -// 4) get ZYAM (=zero yield at minimum) -// 5) subtract ZYAM -// 6) integrate near-side deltaphi projection within ZYAM region to get the yield -// -// Input: file with 2D correlation histograms produced by extract2D.C macro in this folder -// -// Usage: root -l yieldExtraction.C -// -// Parameters: -// - inFileName: name of the input file -// - absDeltaEtaMin: lower edge of deltaeta range when integrating the near-side ridge region -// - absDeltaEtaMax: upper edge of deltaeta range when integrating the near-side ridge region -// - outFileName: name of the output file with histograms/graphs of projections and yields -// -// Contributors: -// Katarina Krizkova Gajdosova -// Gian Michele Innocenti -// Jan Fiete Grosse-Oetringhaus -////////////////////////////////////////////////////////////// - -bool wingCorrection = false; // correct for increase of correlation signal at large deltaeta values - -// Note: if a canvas is drawn with an empty pad, it is probably because -// the TFile took ownership of the histogram and deleted it when -// it went out of scope -// To fix it, call h->SetDirectory(0) before drawing - -void yieldExtraction(const char* inFileName = "dphi_corr_all.root", double absDeltaEtaMin = 1.4, double absDeltaEtaMax = 1.8, const char* outFileName = "yield.root") -{ - // Nch represents the multiplicity interval of the analysis - static Double_t Nch[] = {0.0, 2.750, 5.250, 7.750, 12.750, 17.750, 22.750, 27.750, 32.750, 37.750, 42.750, 47.750, 52.750, 57.750, 62.750, 67.750, 72.750, 77.750, 82.750, 87.750, 92.750, 97.750, 250.1}; - // Nbins is the number of multiplicity bins - static const uint Nbins = 14; // tmp for the case when I had low stat. - //static const uint Nbins = sizeof(Nch) / sizeof(Nch[0]); - const double absDeltaPhi = 1.3; // y-projection range (it is only needed for jet yield calculation from delta eta projection) - - TFile* infile = new TFile(inFileName, "read"); - TFile* outfile = new TFile(outFileName, "recreate"); - - const uint trigCount = 1; //4 - - for (uint itrig = 0; itrig < trigCount; ++itrig) { - for (uint iassoc = 0; iassoc <= itrig; ++iassoc) { - - TGraphErrors* gridgeYield = new TGraphErrors(Nbins); - - for (uint imult = 0; imult < Nbins; ++imult) { - - // 2D histogram of two-particle correlation: same/mixed event ratio (normalised as it should be: Ntrig, B(0,0)) - TH2D* hdphidetaRidge = (TH2D*)infile->Get(Form("dphi_%u_%u_%u", itrig, iassoc, imult)); - if (!hdphidetaRidge) { - printf("No histograms corresponding mult bin %u. (itrig=%u, iassoc=%u)\n", imult, itrig, iassoc); - continue; - } // if histogram not existing - - // Clone hdphidetaJet: hdphidetaRidge will be used for phi projection; hdphidetaJet for eta projection - TH2D* hdphidetaJet = (TH2D*)hdphidetaRidge->Clone("hdphidetaJet"); - - // Normalise hdphidetaRidge used for delta phi projection with the width of the long-range region - double norm = 2.0 * (absDeltaEtaMax - absDeltaEtaMin); - hdphidetaRidge->Scale(1.0 / norm); - - // projection of the away-side ridge on delta eta axis - int ajetaway = hdphidetaJet->GetXaxis()->FindBin(TMath::Pi() - 1.5); - int bjetaway = hdphidetaJet->GetXaxis()->FindBin(TMath::Pi() + 1.5); - TH1D* hdetaJetAway = hdphidetaJet->ProjectionY(Form("proj_deta_%u_%u_%u", itrig, iassoc, imult), ajetaway, bjetaway, "e"); - outfile->cd(); - hdetaJetAway->Write(); - - // projection of the near-side region (peak+ridge) on delta eta axis - int ajetpeak = hdphidetaJet->GetXaxis()->FindBin(-1.5); - int bjetpeak = hdphidetaJet->GetXaxis()->FindBin(+1.5); - TH1D* hdetaJetPeak = hdphidetaJet->ProjectionY(Form("proj_detaJetPeak_%u_%u_%u", itrig, iassoc, imult), ajetpeak, bjetpeak, "e"); - outfile->cd(); - hdetaJetPeak->Write(); - - // wing correction (switched off for now) - if (wingCorrection) { - // project the away side onto delta eta, fit with polynomial, and scale the 2D histogram by the difference - // between the projected histogram and the fit - int a = hdphidetaRidge->GetXaxis()->FindBin(TMath::Pi() - 1.5); - int b = hdphidetaRidge->GetXaxis()->FindBin(TMath::Pi() + 1.5); - TH1D* hdetaAwayProj = hdphidetaRidge->ProjectionY(Form("proj_deta_%u_%u_%u_scaler", itrig, iassoc, imult), a, b, "e"); - hdetaAwayProj->Fit("pol0", "0QSE"); - hdetaAwayProj->Divide(hdetaAwayProj->GetFunction("pol0")); - for (uint i = 1; i < hdphidetaRidge->GetNbinsX(); ++i) - for (uint j = 1; j < hdphidetaRidge->GetNbinsY(); ++j) { - double z = hdetaAwayProj->GetBinContent(j); - if (z <= 0.0) - continue; - hdphidetaRidge->SetBinContent(i, j, hdphidetaRidge->GetBinContent(i, j) / z); - hdphidetaRidge->SetBinError(i, j, hdphidetaRidge->GetBinError(i, j) / z); - } - } - - // projection of near-side ridge on delta phi axis (positive side of the jet peak) - int aridgeP = hdphidetaRidge->GetYaxis()->FindBin(absDeltaEtaMin); - int bridgeP = hdphidetaRidge->GetYaxis()->FindBin(absDeltaEtaMax); - TH1D* hdphiRidgeP = hdphidetaRidge->ProjectionX(Form("proj_dphi_P_%u_%u_%u", itrig, iassoc, imult), aridgeP, bridgeP, "e"); - outfile->cd(); - hdphiRidgeP->Write(); - - // projection of near-side ridge on delta phi axis (negative side of the jet peak) - int aridgeN = hdphidetaRidge->GetYaxis()->FindBin(-absDeltaEtaMax); - int bridgeN = hdphidetaRidge->GetYaxis()->FindBin(-absDeltaEtaMin); - TH1D* hdphiRidgeN = hdphidetaRidge->ProjectionX(Form("proj_dphi_N_%u_%u_%u", itrig, iassoc, imult), aridgeN, bridgeN, "e"); - outfile->cd(); - hdphiRidgeN->Write(); - - // add the projections positive + negative - TH1D* hdphiRidge = (TH1D*)hdphiRidgeP->Clone(Form("proj_dphi_%u_%u_%u", itrig, iassoc, imult)); - hdphiRidge->Add(hdphiRidgeP, hdphiRidgeN, 0.5, 0.5); - - // fit the projection to get ZYAM - TF1* fdphiRidge = new TF1(Form("fit_%u_%u_%u", itrig, iassoc, imult), - "[0]+[1]*(1+2*[2]*TMath::Cos(x)+2*[3]*TMath::Cos(2*x)+2*[4]*TMath::Cos(3*x))", - -TMath::Pi() / 2.0, 3.0 / 2.0 * TMath::Pi()); - fdphiRidge->SetParNames("czyam", "c", "v1", "v2", "v3"); - fdphiRidge->FixParameter(0, 0.0); // TODO: this is because otherwise it could bias the C_ZYAM extraction? the result doesn't change much - TFitResultPtr r = hdphiRidge->Fit(fdphiRidge, "0SE", "", -TMath::Pi() / 2.0, 3.0 / 2.0 * TMath::Pi()); - - // get C_ZYAM: value at bin with minimum - double phiMinX = fdphiRidge->GetMinimumX(-TMath::Pi() / 2.0, 3.0 / 2.0 * TMath::Pi()); - double phiMin = fdphiRidge->Eval(phiMinX); - double czyam = phiMin; - - double fitErr; - r->GetConfidenceIntervals(1, 1, 1, &phiMinX, &fitErr, 0.683, false); - - // subtract the C_ZYAM - for (uint idphi = 1; idphi < hdphiRidge->GetXaxis()->GetNbins() + 1; ++idphi) { - double y = hdphiRidge->GetBinContent(idphi); - double yerr = hdphiRidge->GetBinError(idphi); - hdphiRidge->SetBinContent(idphi, TMath::Max(y - czyam, 0.0)); - hdphiRidge->SetBinError(idphi, TMath::Sqrt(yerr * yerr + fitErr * fitErr)); - } - - int phiIntShift = 0; // TODO: check what was the meaning of this - - // write the ZYAM-subtracted histogram and function for later plotting - outfile->cd(); - hdphiRidge->Write(); - - fdphiRidge->SetParameter(0, fdphiRidge->GetParameter(0) - czyam); - outfile->cd(); - fdphiRidge->Write(); - - // near-side yield integration -> Y_ridge^near - int aridge = hdphiRidge->GetXaxis()->FindBin(-TMath::Abs(phiMinX)) + phiIntShift; - int bridge = hdphiRidge->GetXaxis()->FindBin(TMath::Abs(phiMinX)) + phiIntShift; - double YridgeErr; - double Yridge = hdphiRidge->IntegralAndError(aridge, bridge, YridgeErr, "width"); - printf(" = %.1lf, C_ZYAM = %.4f, Yridge = %.4lf pm %.6lf\n", (Nch[imult + 1] + Nch[imult]) / 2.0, czyam, Yridge, YridgeErr); - - gridgeYield->SetPoint(imult, (Nch[imult + 1] + Nch[imult]) / 2.0, Yridge); // saving in the bin center (though later it should be properly corrected) - gridgeYield->SetPointError(imult, 0.0, YridgeErr); - - } // loop over the index of the multiplicity interval - - outfile->cd(); - gridgeYield->Write(Form("ridgeYield_%u_%u", itrig, iassoc)); - - } // loop over the index of the associated particle - } // loop over the index of the trigger particle - - outfile->Close(); - -} // end of processYield diff --git a/FirstAnalysis/FONLLpred/DmesonLcPredictions_13TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root b/FirstAnalysis/FONLLpred/DmesonLcPredictions_13TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root deleted file mode 100644 index b51683bd..00000000 Binary files a/FirstAnalysis/FONLLpred/DmesonLcPredictions_13TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root and /dev/null differ diff --git a/FirstAnalysis/FONLLpred/DmesonLcPredictions_13TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root b/FirstAnalysis/FONLLpred/DmesonLcPredictions_13TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root deleted file mode 100644 index bde1db13..00000000 Binary files a/FirstAnalysis/FONLLpred/DmesonLcPredictions_13TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root and /dev/null differ diff --git a/FirstAnalysis/FONLLpred/DmesonLcPredictions_502TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root b/FirstAnalysis/FONLLpred/DmesonLcPredictions_502TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root deleted file mode 100644 index 4d6329a9..00000000 Binary files a/FirstAnalysis/FONLLpred/DmesonLcPredictions_502TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root and /dev/null differ diff --git a/FirstAnalysis/FONLLpred/DmesonLcPredictions_502TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root b/FirstAnalysis/FONLLpred/DmesonLcPredictions_502TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root deleted file mode 100644 index 1d56cb68..00000000 Binary files a/FirstAnalysis/FONLLpred/DmesonLcPredictions_502TeV_y05_FFptDepLHCb_BRpythia8_PDG2020.root and /dev/null differ diff --git a/FirstAnalysis/HFmcvalidation.py b/FirstAnalysis/HFmcvalidation.py deleted file mode 100644 index 08c10bd2..00000000 --- a/FirstAnalysis/HFmcvalidation.py +++ /dev/null @@ -1,132 +0,0 @@ -from ROOT import TCanvas, TFile, TGaxis, TLegend, gStyle - - -def printCanvas(canvas, title): - format_list = [".png", ".pdf", ".root"] - for fileFormat in format_list: - canvas.SaveAs(title + fileFormat) - - -def count_HFquarks_perColl(file, var): - cquark = TCanvas("cquark", "%s per collision" % var) - cquark.SetCanvasSize(900, 700) - cquark.Divide(2, 1) - hq = file.Get("hf-mc-validation-gen/hCountAverage%s" % var) - hq.GetXaxis().SetRangeUser(0.0, 8.0) - hq.SetTitle("Number of %s quarks per collision" % var) - hq.Draw("") - printCanvas(cquark, "QuarkCountsPerCollision%s" % var) - - -def count_Particle_perColl(file, var): - cparticle = TCanvas("cparticle", "%s per collision" % var) - cparticle.SetCanvasSize(900, 700) - cparticle.Divide(2, 1) - hp = file.Get("hf-mc-validation-gen/hCouterPerCollision%s" % var) - hp.Draw("") - printCanvas(cparticle, "%sPerCollision" % var) - - -def momentum_Conservation(file, var): - cmomentum = TCanvas("cmomentum", "Momentum Conservation %s" % var) - cmomentum.SetCanvasSize(900, 700) - cmomentum.Divide(2, 1) - if var == "P": - hp = file.Get("hf-mc-validation-gen/h%sdiffMotherDaughterGen" % var) - hp.SetTitle("Momentum Conservtion: magnitude (Gen)") - else: - hp = file.Get("hf-mc-validation-gen/h%sDiffMotherDaughterGen" % var) - hp.SetTitle("Momentum Conservation: %s component" % var) - hp.Draw("") - printCanvas(cmomentum, "%sconservation" % var) - - -def momentum_check(file): - cMomCheck = TCanvas("cMomCheck", "Momentum Conservation Check") - cMomCheck.SetCanvasSize(900, 700) - hMomCheck = file.Get("hf-mc-validation-gen/hMomentumCheck") - hMomCheck.Draw() - printCanvas(cMomCheck, "MomentumCheck") - - -def p_diff_reco_MC(file): - gStyle.SetOptStat(0) - components_list = ["x", "y", "z"] - color_list = [1, 2, 4] - cpt = TCanvas("c1", "Momentum Difference") - cpt.SetCanvasSize(1500, 1500) - cpt.cd() - mom_list = [] - leg = TLegend(0.1, 0.7, 0.4, 0.9, "") - leg.SetFillColor(0) - for i, comp in enumerate(components_list): - hp = file.Get("hf-mc-validation-rec/histP%s" % comp) - hp.Rebin(2) - hp.SetLineColor(color_list[i]) - hp.SetLineWidth(2) - mom_list.append(hp) - if i != 0: - hp.Draw("same") - else: - hp.SetTitle("Momentum difference Rec-Gen") - hp.GetXaxis().SetTitle("p_{i}^{reco}-p_{i}^{gen} (MeV/#it{c})") - hp.GetXaxis().SetRangeUser(-0.3, 0.3) - hp.Draw() - leg.AddEntry(mom_list[i], "P%s component" % comp) - leg.Draw() - printCanvas(cpt, "p_recoMC_diff") - - -def secondary_vertex_reco_MC(file): - gStyle.SetOptStat(0) - TGaxis.SetMaxDigits(3) - components_list = ["x", "y", "z"] - color_list = [1, 2, 4] - csecvertex = TCanvas("c1", "Secondary Vertex Difference") - csecvertex.SetCanvasSize(1000, 700) - csecvertex.cd() - secvertex_list = [] - leg = TLegend(0.1, 0.7, 0.4, 0.9, "Sec. Vertex:") - leg.SetFillColor(0) - for i, comp in enumerate(components_list): - hsecvertex = file.Get("hf-mc-validation-rec/histSecV%s" % comp) - hsecvertex.Rebin(1) - hsecvertex.SetLineColor(color_list[i]) - hsecvertex.SetLineWidth(2) - secvertex_list.append(hsecvertex) - if i != 0: - hsecvertex.Draw("same") - else: - hsecvertex.SetTitle("Secondary Vertex difference Rec-Gen") - hsecvertex.GetXaxis().SetTitle("V_{i}^{reco}-V_{i}^{gen} (cm)") - hsecvertex.Draw() - leg.AddEntry(secvertex_list[i], "%s component" % comp) - leg.Draw() - printCanvas(csecvertex, "SecVertex_recoMC_diff") - - -def decayLength_reco_MC(file): - cDecLenRes = TCanvas("cDecLenRes", "Decay Length") - cDecLenRes.SetCanvasSize(900, 700) - hDecLenRes = file.Get("hf-mc-validation-rec/histDecLen") - hDecLenRes.Rebin(2) - hDecLenRes.Draw() - printCanvas(cDecLenRes, "Resolution_DecayLength") - - -fileo2 = TFile("../codeHF/CCbar_pp_AnalysisResults_O2_500files.root") -# Generated Level Validation -quark_list = ["C", "Cbar", "B", "Bbar"] -for quark in quark_list: - count_HFquarks_perColl(fileo2, quark) -particle_list = ["Dzero", "Dplus", "Dstar", "LambdaC"] -for particle in particle_list: - count_Particle_perColl(fileo2, particle) -momentum_check(fileo2) -mom_list = ["P", "Px", "Py", "Pz", "Pt"] -for comp in mom_list: - momentum_Conservation(fileo2, comp) -# Reconstructed Level Validation -p_diff_reco_MC(fileo2) -secondary_vertex_reco_MC(fileo2) -decayLength_reco_MC(fileo2) diff --git a/FirstAnalysis/README.md b/FirstAnalysis/README.md deleted file mode 100644 index 65d3f00f..00000000 --- a/FirstAnalysis/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# O2 first analysis utilities - -## Introduction -The main purpose of this folder is to provide analysis tools to perform analysis of O2 analysis task outputs. -It includes for the moment a set of QA plotting macros to inspect `AnalysisResults.root` of MC and data samples. -It also includes some preliminary functionalities for performing efficiency corrections of HF analyses. -It is currently being used also for performing Run5 analysis. - -## Instructions for contributors - -* Write documentation comments to make the code easy to understand. -* Every file should contain the following details at the top: - * what the code does, - * which input it needs (e.g. output of which O2 workflow), - * how to run it (in case simply executing the script is not enough), - * names of authors, contributors, maintainers (to contact in case of problems or questions). -* Follow [PEP 8 naming conventions](https://www.python.org/dev/peps/pep-0008/#naming-conventions) in Python code. -* Do not use hard-coded paths! A default path should point to a file directly produced by the framework (e.g. `../codeHF/AnalysisResults_O2.root`). -* Handle errors and report them clearly. - -## Available samples ALICE3 -* D2H KrKr production (X events): - * AOD O2 tables: `/data/Run5data/EMBEDDING_KrKr_CCBARLc_scenario3/TEST` - * Analysis result: `/data/Run5data_samples/EMBEDDING_KrKr_CCBARLc_scenario3_20210224/AnalysisResults_O2.root` - -## Plotting -The analyses validation is supposed to use the [HFPlot tool](https://github.com/benedikt-voelkel/HFPlot) for plotting purposes in the future. -It is basically a *pythonic* wrapper around `ROOT` with some automated features. -As a first use case it is implemented in [distrib_studies.py](distrib_studies.py). -A more extensive README can be found [here](https://github.com/benedikt-voelkel/HFPlot) and there are also some examples provided. diff --git a/FirstAnalysis/alice3.png b/FirstAnalysis/alice3.png deleted file mode 100644 index a040eac2..00000000 Binary files a/FirstAnalysis/alice3.png and /dev/null differ diff --git a/FirstAnalysis/config/config_ptspectrum_Dplus_pp5TeV.yml b/FirstAnalysis/config/config_ptspectrum_Dplus_pp5TeV.yml deleted file mode 100644 index 1d0bf6df..00000000 --- a/FirstAnalysis/config/config_ptspectrum_Dplus_pp5TeV.yml +++ /dev/null @@ -1,25 +0,0 @@ -# example config for cross section calculation of D+ mesons - -observable: dsigmadpt # options: dsigmadpt, dNdpt -channel: DplustoKpipi # options: D0toKpi, DplustoKpipi, DstoKKpi, DstartoD0pi, LctopKpi, LctopK0S -system: pp # options: pp, pPb, PbPb -energy: 5TeV # options: 5TeV, 13TeV -period: Run2 # options: Run2 - -fraction: Nb # options: Nb, fc - -FONLL: FONLLpred/DmesonLcPredictions_502TeV_y05_FFee_BRpythia8_SepContr_PDG2020.root - -rawyield: - filename: test/RawYields_Dplus_pp5TeV_prompt_central.root - rawyieldhist: hRawYields - normhist: hEvForNorm - -acceff: - filename: test/Eff_times_Acc_Dplus_pp5TeV_central_newAcc.root - prompthist: hAccEffPrompt - nonprompthist: hAccEffFD - -output: - directory: '.' - filename: CrossSectionDplus_pp_5TeV # without extension diff --git a/FirstAnalysis/config/config_selopt.yml b/FirstAnalysis/config/config_selopt.yml deleted file mode 100644 index 6215f301..00000000 --- a/FirstAnalysis/config/config_selopt.yml +++ /dev/null @@ -1,24 +0,0 @@ -# example config for optimisation of preselections - -# input files -inputs: - background: ../../optimisation/run5/AnalysisResults_pp_GP_eta4_2T.root - prompt: ../../optimisation/run5/AnalysisResults_pp_HF_eta4_2T.root - nonprompt: null - -# list of enabled origins to be plot -origins: [Prompt, Bkg] - -# list of 2-prong candidates enabled -# options: D0ToPiK, JpsiToEE -cands2Prong: [D0ToPiK, JpsiToEE] -# list of variables to test for 2-prong candidates -# options: Cosp, DecLen, ImpParProd, MinDCAxy, MinTrackPt -vars2Prong: [Cosp, DecLen, ImpParProd, MinDCAxy, MinTrackPt] - -# list of 3-prong candidates enabled -# options: DPlusToPiKPi, DsToKKPi, LcToPKPi, XicToPKPi -cands3Prong: [DPlusToPiKPi, DsToKKPi, LcToPKPi, XicToPKPi] -# list of variables to test for 3-prong candidates -# options: Cosp, DecLen, MinDCAxy, MinTrackPt -vars3Prong: [Cosp, DecLen, MinDCAxy, MinTrackPt] diff --git a/FirstAnalysis/config/norm_database.yml b/FirstAnalysis/config/norm_database.yml deleted file mode 100644 index ce9f5cba..00000000 --- a/FirstAnalysis/config/norm_database.yml +++ /dev/null @@ -1,70 +0,0 @@ -# database with normalisation constants for cross section and RAA calculation - -BR: # PDG 2020 - D0toKpi: - value: 0.03950 - unc: 0.00011 - DplustoKpipi: - value: 0.0938 - unc: 0.0016 - DstoKKpi: - value: 0.0224 - unc: 0.0008 - LctopKpi: - value: 0.0628 - unc: 0.0032 - LctopK0S: - value: 0.0159 - unc: 0.0008 - -sigma: # MB cross section in pb - Run2: - pp: - 5TeV: 50.87e+9 - 13TeV: 57.8e+9 - -taa: - Run2: - PbPb: - 5TeV: - V0: - Cent010: - value: 23.07 - unc: 0.44 - Cent3050: - value: 3.897 - unc: 0.11 - Cent6080: - value: 0.4173 - unc: 0.014 - pPb: - 5TeV: - V0A: - Cent020: - value: 0.183 - unc: 0.006245 - Cent2040: - value: 0.134 - unc: 0.004899 - Cent4060: - value: 0.092 - unc: 0.004796 - Cent60100: - value: 0.041 - unc: 0.008832 - ZNA: - Cent010: - value: 0.172 - unc: 0.012 - Cent1020: - value: 0.158 - unc: 0.006 - Cent2040: - value: 0.137 - unc: 0.003 - Cent4060: - value: 0.102 - unc: 0.005 - Cent60100: - value: 0.0459 - unc: 0.0024 diff --git a/FirstAnalysis/contamination.py b/FirstAnalysis/contamination.py deleted file mode 100644 index 75bf1133..00000000 --- a/FirstAnalysis/contamination.py +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/env python - -from ROOT import TCanvas, TFile, gROOT, gStyle - -path_file = "../codeHF/AnalysisResults_O2.root" - -gStyle.SetOptStat(0) -gStyle.SetErrorX(0) -gStyle.SetFrameLineWidth(1) -gStyle.SetTitleSize(0.045, "x") -gStyle.SetTitleSize(0.045, "y") -gStyle.SetMarkerSize(1) -gStyle.SetLabelOffset(0.015, "x") -gStyle.SetLabelOffset(0.02, "y") -gStyle.SetTickLength(-0.02, "x") -gStyle.SetTickLength(-0.02, "y") -gStyle.SetTitleOffset(1.1, "x") -gStyle.SetTitleOffset(1.0, "y") - -gROOT.SetBatch(True) - - -def saveCanvas(canvas, title): - format_list = [".pdf", ".png"] - for fileFormat in format_list: - canvas.SaveAs(title + fileFormat) - - -def kinematic_plots(var, particle, detector, hp): - fileo2 = TFile(path_file) - cres = TCanvas("cres", "resolution distribution") - cres.SetCanvasSize(1600, 1000) - cres.cd() - num = fileo2.Get( - "qa-tracking-rejection-%s/tracking%ssel%s/%seta" % (particle, detector, hp, var) - ) - den = fileo2.Get("qa-tracking-rejection-%s/tracking/%seta" % (particle, var)) - # gPad.SetLogz() - num.Divide(den) - num.Draw("coltz") - num.GetYaxis().SetTitle("#eta") - num.GetYaxis().SetTitleOffset(1.0) - num.GetZaxis().SetRangeUser(0.01, 1) - num.SetTitle("Fraction of %s selected by %s as %s" % (particle, detector, hp)) - saveCanvas( - cres, "contamination/%seta_%sSelfrom%sas%s" % (var, particle, detector, hp) - ) - - -def ratioparticle( - var="pt", - numname="Electron", - selnum="RICHSelHpElLoose", - denname="Pion", - selden="RICHSelHpElLoose", - label="e/#pi", -): - fileo2 = TFile(path_file) - cres = TCanvas("cres", "resolution distribution") - cres.SetCanvasSize(1600, 1000) - cres.cd() - cres.SetLogy() - - num2d = fileo2.Get("qa-rejection-general/h%s%s/%seta" % (numname, selnum, var)) - den2d = fileo2.Get("qa-rejection-general/h%s%s/%seta" % (denname, selden, var)) - num = num2d.ProjectionX("num", 1, num2d.GetXaxis().GetNbins()) - den = den2d.ProjectionX("den", 1, den2d.GetXaxis().GetNbins()) - num.Divide(den) - num.Draw("coltz") - num.GetYaxis().SetTitle(label) - num.GetXaxis().SetTitle("p_{T}") - # num.SetMinimum(0.001) - # num.SetMaximum(2.0) - num.GetYaxis().SetTitleOffset(1.0) - # num.GetZaxis().SetRangeUser(0.01, 1) - # nameresult = "Fraction of %s selected by %s over %s selected by %s" % (num,selnum,den,selden) - canvas = "Fractionof%s%sOver%s%s" % (numname, selnum, denname, selden) - # num.SetTitle(nameresult) - saveCanvas(cres, "rejection/%s" % (canvas)) - - -def is_e_not_pi_plots(particle): - fileo2 = TFile(path_file) - task = "qa-rejection-general" - folder_gm = "h%sRICHSelHpElTight" % particle - folder_alt = "h%sRICHSelHpElTightAlt" % particle - folder_diff = "h%sRICHSelHpElTightAltDiff" % particle - hist = "pteta" - hist_gm = fileo2.Get("%s/%s/%s" % (task, folder_gm, hist)) - hist_gm.SetTitle("%s isRICHElTight" % particle) - hist_alt = fileo2.Get("%s/%s/%s" % (task, folder_alt, hist)) - hist_alt.SetTitle("%s isElectronAndNotPion" % particle) - hist_diff = fileo2.Get("%s/%s/%s" % (task, folder_diff, hist)) - hist_diff.SetTitle("%s isRICHElTight != isElectronAndNotPion" % particle) - cepi = TCanvas("cepi", "e not pi selection") - cepi.SetCanvasSize(1600, 1000) - cepi.Divide(2, 2) - cepi.cd(1) - hist_gm.Draw("colz") - cepi.cd(2) - hist_alt.Draw("colz") - cepi.cd(3) - hist_diff.Draw("colz") - # num.GetYaxis().SetTitleOffset(1.0) - # num.GetZaxis().SetRangeUser(0.01, 1) - saveCanvas(cepi, "contamination/is_e_not_pi_%s" % particle) - - -# kinematic_plots("p", "pion", "MID", "Muon") -# kinematic_plots("p", "mu", "MID", "Muon") -# kinematic_plots("p", "pion", "TOF", "Electron") -# kinematic_plots("p", "pion", "RICH", "Electron") -# kinematic_plots("pt", "pion", "RICH", "Electron") -# kinematic_plots("p", "kaon", "RICH", "Electron") -# kinematic_plots("pt", "kaon", "RICH", "Electron") -# kinematic_plots("p", "pion", "TOF", "Kaon") -# kinematic_plots("p", "pion", "RICH", "Kaon") - -ratioparticle( - "pt", "Electron", "RICHSelHpElTight", "Electron", "NoSel", "e/e RICHSelHpElTight" -) -ratioparticle("pt", "Electron", "NoSel", "Pion", "NoSel", "e/#pi No cuts") -ratioparticle( - "pt", "Electron", "RICHSelHpElTight", "Pion", "RICHSelHpElTight", "Tight e/#pi " -) -ratioparticle("pt", "Muon", "MID", "Pion", "MID", "MIDSel") -ratioparticle("pt", "Pion", "RICHSelHpElTight", "Pion", "NoSel", "Contamination") -ratioparticle("pt", "Pion", "MID", "Pion", "NoSel", "Contamination MID") - -ratioparticle( - "pt", - "Electron", - "RICHSelHpElTightAlt", - "Electron", - "RICHSelHpElTight", - "e isElectronAndNotPion/RICHSelHpElTight", -) -ratioparticle( - "pt", - "Electron", - "RICHSelHpElTightAlt", - "Pion", - "RICHSelHpElTightAlt", - "isElectronAndNotPion e/#pi", -) - - -for p in ("Electron", "Pion", "Kaon", "Muon"): - is_e_not_pi_plots(p) diff --git a/FirstAnalysis/database.yaml b/FirstAnalysis/database.yaml deleted file mode 100644 index 0cf290d3..00000000 --- a/FirstAnalysis/database.yaml +++ /dev/null @@ -1,62 +0,0 @@ -Xi_cc: - pp14p0: - absy1p44: - latexcand: "#Xi_{cc}" - inputBkg: /data/Run5/results/20200602_9am_loosecuts/AnalysisResults_O2_MB.root - inputSig: /data/Run5/results/20200602_9am_loosecuts/AnalysisResults_O2_enriched.root - dirname: hf-task-xicc-mc - normalized: 1 - varlist: ["mass", "d0Prong0", "d0Prong1", "CPA", "Y", "DecLength", "Ct", "Eta", "chi2PCA"] - varlatex: ["inv. mass (GeV)", "d_{0} prong 0 (cm)", "d_{0} prong 1 (cm)", "cos(#theta_{p})", "rapidity", "dec. length (cm)", "c#tau (cm)", "#eta", "chi^{2} decay"] - histonamesig: ["hMassSig", "hd0Prong0Sig", "hd0Prong1Sig", "hCPASig", "hYSig", "hDecLengthSig", "hCtSig", "hEtaSig", "hChi2PCASig"] - histonamebkg: ["hMassBg", "hd0Prong0Bg", "hd0Prong1Bg", "hCPABg", "hYBg", "hDecLengthBg", "hCtBg", "hEtaBg", "hChi2PCABg"] - ymin: [0.0001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001] - ymax: [0.4, 5., 5., 5., 5., 5., 10., 5., 5.] - xmin: [3.2, -0.01, -0.01, 0.5, -3., 0.00001, 0., -3., 0.] - xmax: [4., 0.04, 0.04, 1.1, 3., 3., 0.1, 3., 0.1] - rebin: [5, 2, 5, 2, 5, 5, 5, 5, 5] - dolog: [0, 1, 1, 1, 1, 1, 1, 1, 1] - dologx: [0, 1, 0, 0, 0, 1, 0, 0, 1] - legtoleft: [1, 1, 1, 1, 1, 1, 1, 1, 1] - -X3872: - pp14p0: - absy1p44: - latexcand: "X(3872)" - inputBkg: /data/Run5/results/Xanalysis_0p7pt_RICHTOF/AnalysisResults_O2_MB.root - inputSig: /data/Run5/results/Xanalysis_0p7pt_RICHTOF/AnalysisResults_O2_enriched.root - dirname: hf-task-x-mc - normalized: 1 - varlist: ["mass", "d0Prong0", "d0Prong1", "CPA", "Y", "DecLength", "Ct", "Eta", "chi2PCA"] - varlatex: ["inv. mass (GeV)", "d_{0} prong 0 (cm)", "d_{0} prong 1 (cm)", "cos(#theta_{p})", "rapidity", "dec. length (cm)", "c#tau (cm)", "#eta", "chi^{2} decay"] - histonamesig: ["hMassRecSig", "hd0Prong0RecSig", "hd0Prong1RecSig", "hCPARecSig", "hYSig", "hDeclengthRecSig", "hCtSig", "hEtaRecSig", "hChi2PCASig"] - histonamebkg: ["hMassRecBg", "hd0Prong0RecBg", "hd0Prong1RecBg", "hCPARecBg", "hYBg", "hDeclengthRecBg", "hCtBg", "hEtaRecBg", "hChi2PCABg"] - ymin: [0.0001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001] - ymax: [0.4, 5., 5., 5., 5., 5., 10., 5., 5.] - xmin: [3.2, -0.01, -0.01, 0.5, -3., 0.00001, 0., -3., 1.e-6] - xmax: [4., 0.04, 0.04, 1.1, 3., 3., 0.1, 3., 0.1] - rebin: [5, 2, 5, 5, 5, 5, 5, 5, 5] - dolog: [0, 1, 1, 1, 1, 1, 1, 1, 1] - dologx: [0, 1, 0, 0, 0, 1, 0, 0, 1] - legtoleft: [1, 1, 1, 1, 1, 1, 1, 1, 1] - -Jpsi: - pp14p0: - absy1p44: - latexcand: "Jpsi" - inputBkg: /data/Run5/results/Xanalysis_0p7pt_RICHTOF/AnalysisResults_O2_MB.root - inputSig: /data/Run5/results/Xanalysis_0p7pt_RICHTOF/AnalysisResults_O2_enriched.root - dirname: hf-task-jpsi-mc - normalized: 1 - varlist: ["mass", "d0Prong0", "d0Prong1", "Y", "DecLength", "Ct", "d0xd0", "chi2PCA"] - varlatex: ["inv. mass (GeV)", "d_{0} prong 0 (cm)", "d_{0} prong 1 (cm)", "rapidity", "dec. length (cm)", "c#tau (cm)", "d_{0} x d_{1}", "chi^{2} decay"] - histonamesig: ["hMassSig", "hd0Prong0Sig", "hd0Prong1Sig", "hYSig", "hDecLengthSig", "hCtSig", "hd0d0Sig", "hChi2PCASig"] - histonamebkg: ["hMassBg", "hd0Prong0Bg", "hd0Prong1Bg", "hYBg", "hDecLengthBg", "hCtBg", "hd0d0Bg", "hChi2PCABg"] - ymin: [0.0001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001] - ymax: [0.4, 5., 5., 5., 5., 10., 5., 5.] - xmin: [3.2, -0.01, -0.01, -3., 0.00001, 0., -0.02, 1.e-6] - xmax: [4., 0.04, 0.04, 3., 3., 0.1, 0.02, 0.1] - rebin: [5, 5, 5, 5, 1, 5, 5, 1] - dolog: [0, 1, 1, 1, 1, 1, 1, 1] - dologx: [0, 1, 0, 0, 1, 0, 0, 1] - legtoleft: [1, 1, 1, 1, 1, 1, 1, 1] diff --git a/FirstAnalysis/distrib_studies.py b/FirstAnalysis/distrib_studies.py deleted file mode 100644 index 294ec1b5..00000000 --- a/FirstAnalysis/distrib_studies.py +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env python -import os -from math import ceil, sqrt - -import yaml -from hfplot.plot_spec_root import ROOTFigure -from hfplot.style import StyleObject1D -from ROOT import TFile - - -def makeSavePaths(title, *fileFormats, outputdir="outputPlots"): - """ - Saves the canvas as the desired output format in an output directory (default = outputPlots) - """ - if not os.path.exists(outputdir): - os.makedirs(outputdir) - return [outputdir + "/" + title + fileFormat for fileFormat in fileFormats] - - -def distr_studies(hadron="Xi_cc", collision="pp14p0", yrange="absy1p44"): - """ - Make distribution comparisons - """ - with open(r"database.yaml") as database: - param = yaml.safe_load(database) - latexcand = param[hadron][collision][yrange]["latexcand"] - inputBkg = param[hadron][collision][yrange]["inputBkg"] - inputSig = param[hadron][collision][yrange]["inputSig"] - dirname = param[hadron][collision][yrange]["dirname"] - normalized = param[hadron][collision][yrange]["normalized"] - lvarlist = param[hadron][collision][yrange]["varlist"] - lvarlatex = param[hadron][collision][yrange]["varlatex"] - lhistonamesig = param[hadron][collision][yrange]["histonamesig"] - lhistonamebkg = param[hadron][collision][yrange]["histonamebkg"] - lrebin = param[hadron][collision][yrange]["rebin"] - ldolog = param[hadron][collision][yrange]["dolog"] - ldologx = param[hadron][collision][yrange]["dologx"] - - formats = [".pdf", ".root", ".C"] # fileformats - fileBkg = TFile(inputBkg) - fileSig = TFile(inputSig) - - lhistosig = [] - lhistobkg = [] - nPtBins = 0 - lptMin = [] - lptMax = [] - - # Define some styles - style_sig = StyleObject1D() - style_sig.markercolor = 2 - style_sig.markerstyle = 21 - style_sig.markersize = 2 - style_sig.draw_options = "P" - style_bkg = StyleObject1D() - style_bkg.markerstyle = 23 - style_bkg.markersize = 2 - style_bkg.draw_options = "P" - - for index, var in enumerate(lvarlist): - - lhistosigvar = [] - lhistobkgvar = [] - hsig = fileSig.Get(f"{dirname}/{lhistonamesig[index]}") - hbkg = fileBkg.Get(f"{dirname}/{lhistonamebkg[index]}") - - nPtBins = hsig.GetNbinsY() - print(var) - for iptBin in range(nPtBins): - # Collect the histogram projections in bins of pT for each variable - hsig_px = hsig.ProjectionX( - f"hsig_px_var{var}_pt{iptBin}", iptBin + 1, iptBin + 1 - ) - hbkg_px = hbkg.ProjectionX( - f"hbkg_px_var{var}_pt{iptBin}", iptBin + 1, iptBin + 1 - ) - lhistosigvar.append(hsig_px) - lhistobkgvar.append(hbkg_px) - if index == 0: - ptMin = hsig.GetYaxis().GetBinLowEdge(iptBin + 1) - ptMax = ptMin + hsig.GetYaxis().GetBinWidth(iptBin + 1) - lptMin.append(ptMin) - lptMax.append(ptMax) - - lhistosig.append(lhistosigvar) - lhistobkg.append(lhistobkgvar) - - for index, var in enumerate(lvarlist): - # sort out required number of columns and rows for a squared grid and create a figure - n_cols_rows = ceil(sqrt(nPtBins)) - column_margin = [(0.05, 0.01)] * n_cols_rows - row_margin = [(0.05, 0.01)] * n_cols_rows - figure = ROOTFigure( - n_cols_rows, - n_cols_rows, - row_margin=row_margin, - column_margin=column_margin, - size=(1500, 900), - ) - # can adjust some axis properties globally - figure.axes(label_size=0.02, title_size=0.02) - # here we use the feature to only apply to certain axes - figure.axes("x", title=lvarlatex[index], title_offset=1) - figure.axes("y", title="Entries", title_offset=1.08) - # legend positioning, default would be "top right", so just put left (top will be added by default) - figure.legend(position=(0.05, 0.6, 0.7, 0.8)) - - rebin = lrebin[index] - - for iptBin in range(nPtBins): - hist_sig = lhistosig[index][iptBin] - hist_bkg = lhistobkg[index][iptBin] - - if rebin > 1: - hist_sig.RebinX(rebin) - hist_bkg.RebinX(rebin) - - nSigEntries = hist_sig.Integral() - nBkgEntries = hist_bkg.Integral() - - if not nSigEntries or not nBkgEntries: - print( - f"ERROR: Found empty signal or background distribution for variable={var} in pT bin={iptBin}" - ) - continue - - if normalized: - for ibin in range(hist_sig.GetNbinsX()): - bincontent = hist_sig.GetBinContent(ibin + 1) - hist_sig.SetBinContent(ibin + 1, bincontent / nSigEntries) - hist_sig.SetBinError(ibin + 1, 0.0) - - for ibin in range(hist_bkg.GetNbinsX()): - bincontent = hist_bkg.GetBinContent(ibin + 1) - hist_bkg.SetBinContent(ibin + 1, bincontent / nBkgEntries) - hist_bkg.SetBinError(ibin + 1, 0.0) - - figure.define_plot(x_log=ldologx[index], y_log=ldolog[index]) - figure.add_object( - hist_sig, - style=style_sig, - label=f"Sig before norm ({int(nSigEntries)} entries)", - ) - figure.add_object( - hist_bkg, - style=style_bkg, - label=f"Bkg before norm ({int(nBkgEntries)} entries)", - ) - figure.add_text( - f"{lptMin[iptBin]:.1f} GeV < p_{{T}} ({latexcand}) < {lptMax[iptBin]:.1f} GeV", - 0.0, - 0.8, - ) - - figure.create() - for save_paths in makeSavePaths( - f"distribution_{var}", *formats, outputdir=f"output_{hadron}" - ): - figure.save(save_paths) - - -distr_studies() diff --git a/FirstAnalysis/efficiency_studies.py b/FirstAnalysis/efficiency_studies.py deleted file mode 100755 index 0476a9b1..00000000 --- a/FirstAnalysis/efficiency_studies.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -from ROOT import TH1F, TCanvas, TEfficiency, TFile, TLegend, gPad, gStyle - - -def saveCanvas(canvas, title): - format_list = [".png", ".pdf", ".root"] - for fileFormat in format_list: - canvas.SaveAs(title + fileFormat) - - -def efficiencytracking(var): - # plots the efficiency vs pT, eta and phi for all the species(it extracts the - # Efficiency from qa - tracking - efficiency if you have ran with-- make - eff) - hadron_list = ["pion", "proton", "kaon", "electron", "muon"] - color_list = [1, 2, 4, 6, 8] - marker_list = [20, 21, 22, 34, 45] - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - - c1 = TCanvas("c1", "Efficiency") - gStyle.SetOptStat(0) - gStyle.SetErrorX(0) - gStyle.SetFrameLineWidth(2) - gStyle.SetTitleSize(0.045, "x") - gStyle.SetTitleSize(0.045, "y") - gStyle.SetMarkerSize(1) - gStyle.SetLabelOffset(0.015, "x") - gStyle.SetLabelOffset(0.02, "y") - gStyle.SetTickLength(-0.02, "x") - gStyle.SetTickLength(-0.02, "y") - gStyle.SetTitleOffset(1.1, "x") - gStyle.SetTitleOffset(1.0, "y") - - c1.SetCanvasSize(800, 600) - c1.cd() - c1.SetGridy() - c1.SetGridx() - eff_list = [] - - if var == "Pt": - hempty = TH1F("hempty", ";Transverse Momentum(GeV/c);Efficiency", 100, 0.05, 10) - gPad.SetLogx() - elif var == "Eta": - hempty = TH1F("hempty", ";Pseudorapidity;Efficiency", 100, -4.0, 4.0) - elif var == "Phi": - hempty = TH1F("hempty", ";Azimuthal angle(rad);Efficiency", 100, 0.0, 6.0) - - hempty.GetYaxis().CenterTitle() - hempty.GetXaxis().CenterTitle() - hempty.GetXaxis().SetNoExponent() - hempty.GetXaxis().SetMoreLogLabels(1) - hempty.Draw() - leg = TLegend(0.55, 0.15, 0.89, 0.35, "P") - leg.SetNColumns(2) - leg.SetHeader("Minimum bias KrKr #sqrt{s} = 6.46TeV", "C") - leg.SetFillColor(0) - - for i, had in enumerate(hadron_list): - leff = fileo2.Get("qa-tracking-efficiency-%s/Efficiency" % had) - if var == "Pt": - eff = leff.At(0) - elif var == "Eta": - eff = leff.At(1) - elif var == "Phi": - eff = leff.At(2) - gPad.Update() - eff.Paint("p") - gr = eff.GetPaintedGraph().Clone() - for j in range(0, gr.GetN()): - gr.GetEXlow()[j] = 0 - gr.GetEXhigh()[j] = 0 - - gr.SetLineColor(color_list[i]) - gr.SetMarkerColor(color_list[i]) - gr.SetMarkerStyle(marker_list[i]) - eff_list.append(gr) - gr.Draw(" same p") - leg.AddEntry(eff_list[i], had, "p") - leg.Draw() - saveCanvas(c1, "efficiency_tracking_%s" % var) - - -def efficiencyhadron(had, var): - # extract the efficiency vs pT for single species(D0, Lc, Jpsi) - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - ceffhf = TCanvas("ceffhf", "A Simple Graph Example") - ceffhf.SetCanvasSize(1500, 700) - ceffhf.Divide(2, 1) - gPad.SetLogy() - # hnum = fileo2.Get("qa-tracking-efficiency-%s/%s/num" % (had, var)) - hnum = fileo2.Get("hf-task-%s-mc/h%sRecSig" % (had, var)) - # hden = fileo2.Get("qa-tracking-efficiency-%s/%s/den" % (had, var)) - hden = fileo2.Get("hf-task-%s-mc/h%sGen" % (had, var)) - hnum.Rebin(4) - hden.Rebin(4) - eff = TEfficiency(hnum, hden) - eff.Draw() - saveCanvas(ceffhf, "efficiency_hfcand%s%s" % (had, var)) - - -var_list = ["Pt", "Eta", "Phi"] -hfhadron_list = ["d0", "dplus", "lc", "xic", "jpsi"] - -for var in var_list: - efficiencytracking(var) - -for had in hfhadron_list: - efficiencyhadron(had, "Pt") diff --git a/FirstAnalysis/hf_analysis_utils.py b/FirstAnalysis/hf_analysis_utils.py deleted file mode 100644 index bc0528f3..00000000 --- a/FirstAnalysis/hf_analysis_utils.py +++ /dev/null @@ -1,330 +0,0 @@ -#!/usr/bin/env python3 - -""" -file: hf_analysis_utils.py -brief: script with miscellanea utils methods for the HF analyses -author: Fabrizio Grosa , CERN -""" - -import numpy as np - - -# pylint: disable=too-many-arguments -def compute_crosssection( - rawy, - rawy_unc, - frac, - eff_times_acc, - delta_pt, - delta_y, - sigma_mb, - n_events, - br, - method_frac="Nb", -): - """ - Method to compute cross section and its statistical uncertainty - Only the statistical uncertainty on the raw yield and prompt (non-prompt) - fraction are considered (the others are systematics) - - Parameters - ---------- - - rawy: raw yield - - rawy_unc: raw-yield statistical uncertainty - - frac: either prompt or non-prompt fraction - - eff_times_acc: efficiency times acceptance for prompt or non-prompt - - delta_pt: pT interval - - delta_y: Y interval - - sigma_mb: hadronic cross section for MB - - n_events: number of events - - br: branching ratio of the decay channel - - method_frac: method used to compute frac needed to propoer compute uncertainty - - Returns - ---------- - - crosssection: cross section - - crosssec_unc: cross-section statistical uncertainty - """ - - crosssection = ( - rawy - * frac - * sigma_mb - / (2 * delta_pt * delta_y * eff_times_acc * n_events * br) - ) - if method_frac == "Nb": - crosssec_unc = rawy_unc / (rawy * frac) * crosssection - else: - crosssec_unc = rawy_unc / rawy * crosssection - - return crosssection, crosssec_unc - - -# pylint: disable=too-many-branches,too-many-arguments,too-many-locals -def compute_fraction_fc( - acc_eff_prompt, - acc_eff_fd, - cross_sec_prompt, - cross_sec_fd, - raa_prompt=1.0, - raa_fd=1.0, -): - """ - Method to get fraction of prompt / FD fraction with fc method - - Parameters - ---------- - - acc_eff_prompt: efficiency times acceptance of prompt D - - acc_eff_fd: efficiency times acceptance of non-prompt D - - cross_sec_prompt: list of production cross sections (cent, min, max) - of prompt D in pp collisions from theory - - cross_sec_fd: list of production cross sections (cent, min, max) - of non-prompt D in pp collisions from theory - - raa_prompt: list of nuclear modification factors (cent, min, max) of prompt D from theory - - raa_fd: list of nuclear modification factors of (cent, min, max) non-prompt D from theory - - Returns - ---------- - - frac_prompt: list of fraction of prompt D (central, min, max) - - frac_fd: list of fraction of non-prompt D (central, min, max) - """ - - if not isinstance(cross_sec_prompt, list) and isinstance(cross_sec_prompt, float): - cross_sec_prompt = [cross_sec_prompt] - if not isinstance(cross_sec_fd, list) and isinstance(cross_sec_fd, float): - cross_sec_fd = [cross_sec_fd] - if not isinstance(raa_prompt, list) and isinstance(raa_prompt, float): - raa_prompt = [raa_prompt] - if not isinstance(raa_fd, list) and isinstance(raa_fd, float): - raa_fd = [raa_fd] - - frac_prompt, frac_fd = [], [] - if acc_eff_prompt == 0: - frac_fd_cent = 1.0 - frac_prompt_cent = 0.0 - frac_prompt = [frac_prompt_cent, frac_prompt_cent, frac_prompt_cent] - frac_fd = [frac_fd_cent, frac_fd_cent, frac_fd_cent] - return frac_prompt, frac_fd - if acc_eff_fd == 0: - frac_fd_cent = 0.0 - frac_prompt_cent = 1.0 - frac_prompt = [frac_prompt_cent, frac_prompt_cent, frac_prompt_cent] - frac_fd = [frac_fd_cent, frac_fd_cent, frac_fd_cent] - return frac_prompt, frac_fd - - for i_sigma, (sigma_p, sigma_f) in enumerate(zip(cross_sec_prompt, cross_sec_fd)): - for i_raa, (raa_p, raa_f) in enumerate(zip(raa_prompt, raa_fd)): - if i_sigma == 0 and i_raa == 0: - frac_prompt_cent = 1.0 / ( - 1 + acc_eff_fd / acc_eff_prompt * sigma_f / sigma_p * raa_f / raa_p - ) - frac_fd_cent = 1.0 / ( - 1 + acc_eff_prompt / acc_eff_fd * sigma_p / sigma_f * raa_p / raa_f - ) - else: - frac_prompt.append( - 1.0 - / ( - 1 - + acc_eff_fd - / acc_eff_prompt - * sigma_f - / sigma_p - * raa_f - / raa_p - ) - ) - frac_fd.append( - 1.0 - / ( - 1 - + acc_eff_prompt - / acc_eff_fd - * sigma_p - / sigma_f - * raa_p - / raa_f - ) - ) - - if frac_prompt and frac_fd: - frac_prompt.sort() - frac_fd.sort() - frac_prompt = [frac_prompt_cent, frac_prompt[0], frac_prompt[-1]] - frac_fd = [frac_fd_cent, frac_fd[0], frac_fd[-1]] - else: - frac_prompt = [frac_prompt_cent, frac_prompt_cent, frac_prompt_cent] - frac_fd = [frac_fd_cent, frac_fd_cent, frac_fd_cent] - - return frac_prompt, frac_fd - - -# pylint: disable=too-many-branches,too-many-arguments,too-many-locals,invalid-name -def compute_fraction_nb( - rawy, - acc_eff_same, - acc_eff_other, - crosssection, - delta_pt, - delta_y, - br, - n_events, - sigma_mb, - raa_ratio=1.0, - taa=1.0, -): - """ - Method to get fraction of prompt / FD fraction with Nb method - - Parameters - ---------- - - acc_eff_same: efficiency times acceptance of prompt (non-prompt) D - - acc_eff_other: efficiency times acceptance of non-prompt (prompt) D - - crosssection: list of production cross sections (cent, min, max) of non-prompt (prompt) - D in pp collisions from theory - - delta_pt: width of pT interval - - delta_y: width of Y interval - - br: branching ratio for the chosen decay channel - - n_events: number of events corresponding to the raw yields - - sigma_mb: MB cross section - - raa_ratio: list of D nuclear modification factor ratios - non-prompt / prompt (prompt / non-prompt) (cent, min, max) (=1 in case of pp) - - taa: average nuclear overlap function (=1 in case of pp) - - Returns - ---------- - - frac: list of fraction of prompt (non-prompt) D (central, min, max) - """ - - if not isinstance(crosssection, list) and isinstance(crosssection, float): - crosssection = [crosssection] - - if not isinstance(raa_ratio, list) and isinstance(raa_ratio, float): - raa_ratio = [raa_ratio] - - frac = [] - for i_sigma, sigma in enumerate(crosssection): - for i_raa_ratio, raa_rat in enumerate(raa_ratio): - raa_other = 1.0 - if i_sigma == 0 and i_raa_ratio == 0: - if raa_rat == 1.0 and taa == 1.0: # pp - frac_cent = ( - 1 - - sigma - * delta_pt - * delta_y - * acc_eff_other - * br - * n_events - * 2 - / rawy - / sigma_mb - ) - else: # p-Pb or Pb-Pb: iterative evaluation of Raa needed - delta_raa = 1.0 - while delta_raa > 1.0e-3: - raw_fd = ( - taa - * raa_rat - * raa_other - * sigma - * delta_pt - * delta_y - * acc_eff_other - * br - * n_events - * 2 - ) - frac_cent = 1 - raw_fd / rawy - raa_other_old = raa_other - raa_other = ( - frac_cent - * rawy - * sigma_mb - / 2 - / acc_eff_same - / delta_pt - / delta_y - / br - / n_events - ) - delta_raa = abs((raa_other - raa_other_old) / raa_other) - else: - if raa_rat == 1.0 and taa == 1.0: # pp - frac.append( - 1 - - sigma - * delta_pt - * delta_y - * acc_eff_other - * br - * n_events - * 2 - / rawy - / sigma_mb - ) - else: # p-Pb or Pb-Pb: iterative evaluation of Raa needed - delta_raa = 1.0 - frac_tmp = 1.0 - while delta_raa > 1.0e-3: - raw_fd = ( - taa - * raa_rat - * raa_other - * sigma - * delta_pt - * delta_y - * acc_eff_other - * br - * n_events - * 2 - ) - frac_tmp = 1 - raw_fd / rawy - raa_other_old = raa_other - raa_other = ( - frac_tmp - * rawy - * sigma_mb - / 2 - / acc_eff_same - / delta_pt - / delta_y - / br - / n_events - ) - delta_raa = abs((raa_other - raa_other_old) / raa_other) - frac.append(frac_tmp) - - if frac: - frac.sort() - frac = [frac_cent, frac[0], frac[-1]] - else: - frac = [frac_cent, frac_cent, frac_cent] - - return frac - - -def get_hist_binlimits(histo): - """ - Method to retrieve bin limits of ROOT.TH1 - - Parameters - ---------- - - histo: ROOT.TH1 - - Returns - ---------- - - bin_limits: numpy array of bin limits - """ - - if np.array(histo.GetXaxis().GetXbins(), "d").any(): # variable binning - bin_limits = np.array(histo.GetXaxis().GetXbins(), "d") - else: # constant binning - n_limits = histo.GetNbinsX() + 1 - low_edge = histo.GetBinLowEdge(1) - bin_width = histo.GetBinWidth(1) - bin_limits = np.array( - [low_edge + i_bin * bin_width for i_bin in range(n_limits)], "d" - ) - - return bin_limits diff --git a/FirstAnalysis/hf_pt_spectrum.py b/FirstAnalysis/hf_pt_spectrum.py deleted file mode 100644 index 484d9296..00000000 --- a/FirstAnalysis/hf_pt_spectrum.py +++ /dev/null @@ -1,347 +0,0 @@ -#!/usr/bin/env python3 - -""" -file: hf_pt_spectrum.py -brief: script for computation of pT-differential yields (cross sections) -usage: python3 HfPtSpectrum.py CONFIG -author: Fabrizio Grosa , CERN -""" - - -import argparse -import os -import sys - -import numpy as np -import yaml -from hf_analysis_utils import ( - compute_crosssection, - compute_fraction_fc, - compute_fraction_nb, - get_hist_binlimits, -) -from hfplot.plot_spec_root import ROOTFigure -from hfplot.style import StyleObject1D -from ROOT import ( # pylint: disable=import-error,no-name-in-module - TH1, - TH1F, - TFile, - TGraphAsymmErrors, - gROOT, - kAzure, - kFullCircle, -) - - -# pylint: disable=too-many-locals,too-many-statements -def load_inputs(input_cfg): - """ - Helper method to load inputs - - Parameters - ---------- - - input_cfg: dictionary from yaml config file - - Returns - ---------- - - histos: dictionary with input histos, keys (rawyields, acceffp, acceffnp) - - norm: dictionary with normalisations, keys (BR, events, sigmaMB) - """ - - observable = input_cfg["observable"] - if observable not in ["dsigmadpt", "dNdpt"]: - print(f"\033[91mERROR: observable {observable} not supported. Exit\033[0m") - sys.exit(1) - - channel = input_cfg["channel"] - if channel not in [ - "D0toKpi", - "DplustoKpipi", - "DstoKpipi", - "DstartoD0pi", - "LctopKpi", - "LctopK0S", - ]: - print(f"\033[91mERROR: channel {channel} not supported. Exit\033[0m") - sys.exit(2) - - system = input_cfg["system"] - if system not in ["pp", "pPb", "PbPb"]: - print(f"\033[91mERROR: channel {channel} not supported. Exit\033[0m") - sys.exit(3) - if system in ["pPb", "PbPb"] and observable == "dsigmadpt": - print("\033[93mWARNING: switching from dsigmadpt to dNdpt\033[0m") - - energy = input_cfg["energy"] - if energy not in ["5TeV", "13TeV"]: - print(f"\033[91mERROR: energy {energy} not supported. Exit\033[0m") - sys.exit(4) - - frac_method = input_cfg["fraction"] - if frac_method not in ["Nb", "fc"]: - print( - f"\033[91mERROR: method to subtract nonprompt" - f" {frac_method} not supported. Exit\033[0m" - ) - sys.exit(5) - - rawy_file_name = input_cfg["rawyield"]["filename"] - rawy_hist_name = input_cfg["rawyield"]["rawyieldhist"] - norm_hist_name = input_cfg["rawyield"]["normhist"] - - eff_file_name = input_cfg["acceff"]["filename"] - effprompt_hist_name = input_cfg["acceff"]["prompthist"] - effnonprompt_hist_name = input_cfg["acceff"]["nonprompthist"] - - pred_file_name = input_cfg["FONLL"] - - # load histos from root files - histos = {} - infile_rawy = TFile.Open(rawy_file_name) - histos["rawyields"] = infile_rawy.Get(rawy_hist_name) - if not histos["rawyields"]: - print( - f"\033[91mERROR: raw-yield histo {rawy_hist_name}" - f" not found in {rawy_file_name}. Exit\033[0m" - ) - sys.exit(6) - histos["rawyields"].SetDirectory(0) - h_events = infile_rawy.Get(norm_hist_name) - if not h_events: - print( - f"\033[91mERROR: normalisation histo {norm_hist_name}" - f" not found in {rawy_file_name}. Exit\033[0m" - ) - sys.exit(7) - h_events.SetDirectory(0) - infile_rawy.Close() - - infile_eff = TFile.Open(eff_file_name) - histos["acceffp"] = infile_eff.Get(effprompt_hist_name) - if not histos["acceffp"]: - print( - f"\033[91mERROR: prompt (acc x eff) histo {effprompt_hist_name}" - f" not found in {eff_file_name}. Exit\033[0m" - ) - sys.exit(8) - histos["acceffp"].SetDirectory(0) - histos["acceffnp"] = infile_eff.Get(effnonprompt_hist_name) - if not histos["acceffnp"]: - print( - f"\033[91mERROR: nonprompt (acc x eff) histo {effprompt_hist_name}" - f"not found in {eff_file_name}. Exit\033[0m" - ) - sys.exit(9) - histos["acceffnp"].SetDirectory(0) - infile_eff.Close() - - fonll_hist_name = { - "D0toKpi": "hD0Kpi", - "DplustoKpipi": "hDpluskpipi", - "DstoKKpi": "hDsPhipitoKkpi", - "DstartoD0pi": "hDstarD0pi", - "LctopKpi": "hLcpkpi", - "LctopK0S": "hLcK0sp", - } - histos["FONLL"] = {"prompt": {}, "nonprompt": {}} - infile_fonll = TFile.Open(pred_file_name) - for pred in ("central", "min", "max"): - histos["FONLL"]["nonprompt"][pred] = infile_fonll.Get( - f"{fonll_hist_name[channel]}fromBpred_{pred}_corr" - ) - histos["FONLL"]["nonprompt"][pred].SetDirectory(0) - if frac_method == "fc": - histos["FONLL"]["prompt"][pred] = infile_fonll.Get( - f"{fonll_hist_name[channel]}pred_{pred}" - ) - histos["FONLL"]["prompt"][pred].SetDirectory(0) - infile_fonll.Close() - - # load normalisation info from common database - norm = {} - with open("config/norm_database.yml", "r") as yml_norm_db: - norm_db = yaml.safe_load(yml_norm_db) - norm["BR"] = norm_db["BR"][channel]["value"] - norm["events"] = h_events.GetBinContent(1) - norm["sigmaMB"] = ( - norm_db["sigma"]["Run2"][system][energy] if observable == "dsigmadpt" else 1.0 - ) - - return histos, norm - - -def main(): - """ - Main function - """ - - parser = argparse.ArgumentParser(description="Arguments to pass") - parser.add_argument( - "configfile_name", - metavar="text", - default="config_Dplus_pp5TeV.yml", - help="input yaml config file", - ) - parser.add_argument( - "--batch", action="store_true", default=False, help="suppress video output" - ) - args = parser.parse_args() - - if args.batch: - gROOT.SetBatch(True) - - # load info from config file - with open(args.configfile_name, "r") as yml_configfile: - cfg = yaml.safe_load(yml_configfile) - frac_method = cfg["fraction"] - - histos, norm = load_inputs(cfg) - - # consistency check of bins - ptlims = {} - for histo in ["rawyields", "acceffp", "acceffnp"]: - ptlims[histo] = get_hist_binlimits(histos[histo]) - if ( - histo != "rawyields" - and not np.equal(ptlims[histo], ptlims["rawyields"]).all() - ): - print("\033[91mERROR: histo binning not consistent. Exit\033[0m") - sys.exit(10) - - # compute cross section - axistit_cross = "d#sigma/d#it{p}_{T} (pb GeV^{-1} #it{c})" - axistit_cross_times_br = "d#sigma/d#it{p}_{T} #times BR (pb GeV^{-1} #it{c})" - axistit_pt = "#it{p}_{T} (GeV/#it{c})" - axistit_fprompt = "#if{f}_{prompt}" - gfraction = TGraphAsymmErrors(0) - gfraction.SetNameTitle("gfraction", f";{axistit_pt};{axistit_fprompt}") - hptspectrum = TH1F( - "hptspectrum", - f";{axistit_pt};{axistit_cross}", - len(ptlims["rawyields"]) - 1, - ptlims["rawyields"], - ) - hptspectrum_wo_br = TH1F( - "hptspectrum_wo_br", - f";{axistit_pt};{axistit_cross_times_br}", - len(ptlims["rawyields"]) - 1, - ptlims["rawyields"], - ) - - for i_pt, (ptmin, ptmax) in enumerate( - zip(ptlims["rawyields"][:-1], ptlims["rawyields"][1:]) - ): - pt_cent = (ptmax + ptmin) / 2 - pt_delta = ptmax - ptmin - rawy = histos["rawyields"].GetBinContent(i_pt + 1) - rawy_unc = histos["rawyields"].GetBinError(i_pt + 1) - eff_times_acc_prompt = histos["acceffp"].GetBinContent(i_pt + 1) - eff_times_acc_nonprompt = histos["acceffnp"].GetBinContent(i_pt + 1) - ptmin_fonll = ( - histos["FONLL"]["nonprompt"]["central"].GetXaxis().FindBin(ptmin * 1.0001) - ) - ptmax_fonll = ( - histos["FONLL"]["nonprompt"]["central"].GetXaxis().FindBin(ptmax * 0.9999) - ) - crosssec_nonprompt_fonll = [ - histos["FONLL"]["nonprompt"][pred].Integral( - ptmin_fonll, ptmax_fonll, "width" - ) - / (ptmax - ptmin) - for pred in histos["FONLL"]["nonprompt"] - ] - - # compute prompt fraction - if frac_method == "Nb": - frac = compute_fraction_nb( # BR already included in FONLL prediction - rawy, - eff_times_acc_prompt, - eff_times_acc_nonprompt, - crosssec_nonprompt_fonll, - pt_delta, - 1.0, - 1.0, - norm["events"], - norm["sigmaMB"], - ) - elif frac_method == "fc": - crosssec_prompt_fonll = [ - histos["FONLL"]["prompt"][pred].Integral( - ptmin_fonll, ptmax_fonll, "width" - ) - / (ptmax - ptmin) - for pred in histos["FONLL"]["prompt"] - ] - frac = compute_fraction_fc( - eff_times_acc_prompt, - eff_times_acc_nonprompt, - crosssec_prompt_fonll, - crosssec_nonprompt_fonll, - ) - - # compute cross section times BR - crosssec, crosssec_unc = compute_crosssection( - rawy, - rawy_unc, - frac[0], - eff_times_acc_prompt, - ptmax - ptmin, - 1.0, - norm["sigmaMB"], - norm["events"], - 1.0, - frac_method, - ) - - hptspectrum.SetBinContent(i_pt + 1, crosssec / norm["BR"]) - hptspectrum.SetBinError(i_pt + 1, crosssec_unc / norm["BR"]) - hptspectrum_wo_br.SetBinContent(i_pt + 1, crosssec) - hptspectrum_wo_br.SetBinError(i_pt + 1, crosssec_unc) - gfraction.SetPoint(i_pt, pt_cent, frac[0]) - gfraction.SetPointError( - i_pt, pt_delta / 2, pt_delta / 2, frac[0] - frac[1], frac[2] - frac[0] - ) - - # create plots - style_hist = StyleObject1D() - style_hist.markercolor = kAzure + 4 - style_hist.markerstyle = kFullCircle - style_hist.markersize = 1 - style_hist.linecolor = kAzure + 4 - style_hist.linewidth = 2 - style_hist.draw_options = "P" - - fig_crosssec = ROOTFigure( - 1, 1, column_margin=(0.14, 0.035), row_margin=(0.1, 0.035), size=(600, 800) - ) - fig_crosssec.axes(label_size=0.025, title_size=0.030) - fig_crosssec.axes("x", title=axistit_pt, title_offset=1.5) - fig_crosssec.axes("y", title=axistit_cross_times_br, title_offset=1.8) - fig_crosssec.define_plot(0, 0, y_log=True) - fig_crosssec.add_object(hptspectrum_wo_br, style=style_hist) - fig_crosssec.create() - - output_dir = cfg["output"]["directory"] - if not os.path.exists(output_dir): - os.makedirs(output_dir) - fig_crosssec.save(os.path.join(output_dir, f'{cfg["output"]["filename"]}.pdf')) - - # save output file - output_file = TFile( - os.path.join(output_dir, f'{cfg["output"]["filename"]}.root'), "recreate" - ) - hptspectrum.Write() - hptspectrum_wo_br.Write() - gfraction.Write() - for hist in histos: - if isinstance(histos[hist], TH1): - histos[hist].Write() - else: - for flav in histos[hist]: - for pred in histos[hist][flav]: - histos[hist][flav][pred].Write() - output_file.Close() - - -# call main function -main() diff --git a/FirstAnalysis/homogenize_output.py b/FirstAnalysis/homogenize_output.py deleted file mode 100755 index 3ef0c4bc..00000000 --- a/FirstAnalysis/homogenize_output.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python3 - -""" -Script to split the directories of a file into several ones with the same structure, useful for ML processing -""" - -import argparse -import os -import time -from multiprocessing import Pool - -from ROOT import TFile - -g_verbose = False -g_out_path = False -g_base_dir = False - - -def split_file(input_name): - processing_time = time.time() - print(" > Processing file", input_name) - if g_verbose: - print("Homogenizing file", f"'{input_name}'", "for ML processing") - f = TFile(input_name, "READ") - if g_verbose: - f.ls() - lk = f.GetListOfKeys() - files_created = 0 - for i in lk: - obj = f.Get(i.GetName()) - if obj.ClassName() == "TDirectoryFile": - fout = input_name.replace(".root", f"_sub{files_created}.root") - fout = os.path.join(g_out_path, fout.split("/")[-1]) - if os.path.isfile(fout): - raise RuntimeError("File", fout, "already there!") - fout = TFile(fout, "RECREATE") - if not fout.IsOpen(): - raise RuntimeError("File", fout, "is not open!") - if g_verbose: - print("Creating omogenized file to", fout) - files_created += 1 - fout.mkdir(g_base_dir + "0") - fout.cd(g_base_dir + "0") - for j in obj.GetListOfKeys(): - if g_verbose: - print("Writing", j.ClassName(), j) - t = obj.Get(j.GetName()) - if t.ClassName() == "TTree": - t.CloneTree().Write() - else: - t.Clone().Write() - if g_verbose: - fout.ls() - fout.Close() - print( - " < Processed file", - input_name, - "split into", - files_created, - "files, in", - time.time() - processing_time, - "seconds", - ) - - -def main(input_files, verbose=True, base_dir="TF_", out_path="", jobs=20): - global g_verbose - g_verbose = verbose - global g_out_path - g_out_path = out_path - global g_base_dir - g_base_dir = base_dir - - print("Omogenizing", len(input_files), "files") - processing_time = time.time() - with Pool(jobs) as p: - p.map(split_file, input_files) - print("Done, in", time.time() - processing_time, "seconds") - - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Omogenizer for ML processing") - parser.add_argument("input_files", type=str, nargs="+", help="Input files") - parser.add_argument( - "--base_dir", - type=str, - default="TF_", - help="Name of the base directory, usually `TF_` or `DF_`", - ) - parser.add_argument( - "--out_dir", "-o", type=str, default="./tmp/", help="Name of the output path" - ) - parser.add_argument( - "--jobs", "-j", type=int, default=5, help="Number of parallel jobs" - ) - parser.add_argument("-v", action="store_true", help="Verbose mode") - args = parser.parse_args() - main(args.input_files, verbose=args.v, base_dir=args.base_dir, jobs=args.jobs) diff --git a/FirstAnalysis/kinematic2D_run5.py b/FirstAnalysis/kinematic2D_run5.py deleted file mode 100644 index bd674fdd..00000000 --- a/FirstAnalysis/kinematic2D_run5.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -from ROOT import TCanvas, TFile, gPad, gStyle - -gStyle.SetOptStat(0) -gStyle.SetErrorX(0) -gStyle.SetFrameLineWidth(1) -gStyle.SetTitleSize(0.045, "x") -gStyle.SetTitleSize(0.045, "y") -gStyle.SetMarkerSize(1) -gStyle.SetLabelOffset(0.015, "x") -gStyle.SetLabelOffset(0.02, "y") -gStyle.SetTickLength(-0.02, "x") -gStyle.SetTickLength(-0.02, "y") -gStyle.SetTitleOffset(1.1, "x") -gStyle.SetTitleOffset(1.0, "y") - - -def saveCanvas(canvas, title): - format_list = ["png", ".pdf", ".root"] - for fileFormat in format_list: - canvas.SaveAs(title + fileFormat) - - -def kinematic_plots(var1): - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - cres = TCanvas("cres", "resolution distribution") - cres.SetCanvasSize(1600, 1200) - cres.Divide(1, 3) - sig = fileo2.Get("hf-task-jpsi-mc/h%sSig" % var1) - bkg = fileo2.Get("hf-task-jpsi-mc/h%sBg" % var1) - gen = fileo2.Get("hf-task-jpsi-mc/h%sGen" % var1) - cres.cd(1) - gPad.SetLogz() - sig.Draw("coltz") - sig.SetTitle("%s Signal distribution(Rec. Level)" % var1) - cres.cd(2) - gPad.SetLogz() - bkg.Draw("coltz") - bkg.SetTitle("%s Background distribution(Rec. Level)" % var1) - cres.cd(3) - gPad.SetLogz() - gen.Draw("coltz") - gen.SetTitle("%s Gen distribution(Gen. Level)" % var1) - saveCanvas(cres, "%s" % var1) - ceff = TCanvas("ceff", "2D efficiencies") - ceff.SetCanvasSize(1600, 1200) - ceff.cd() - eff = sig.Clone("eff") - den = gen.Clone("den") - eff.Divide(den) - eff.Draw("COLZ") - eff.SetTitle("%s Jpsi reco and sel. efficiency (Reco pt / Gen pt)" % var1) - saveCanvas(ceff, "efficiencyYpt") - - -var_list = ["Y"] - -for var in var_list: - kinematic_plots(var) diff --git a/FirstAnalysis/plot_seleff_vs_cuts.py b/FirstAnalysis/plot_seleff_vs_cuts.py deleted file mode 100644 index b5c2267d..00000000 --- a/FirstAnalysis/plot_seleff_vs_cuts.py +++ /dev/null @@ -1,307 +0,0 @@ -#!/usr/bin/env python3 - -""" -file: plot_seleff_vs_cuts.py -brief: script to plot selection efficiencies vs cut obtained with HFSelOptimisation.cxx task -usage: python3 plot_seleff_vs_cuts.py CONFIG [--batch] -author: Fabrizio Grosa , CERN -""" - -import argparse -from typing import Dict - -import yaml -from ROOT import ( # pylint: disable=import-error,no-name-in-module - TCanvas, - TFile, - TLegend, - gROOT, - gStyle, - kAzure, - kBlack, - kBlue, - kFullCircle, - kGreen, - kMagenta, - kOrange, - kRed, -) - - -def set_hist_style(histo, color=kBlack, marker=kFullCircle, markersize=1): - """ - Helper method to set histo graphic style - """ - histo.SetLineColor(color) - histo.SetMarkerColor(color) - histo.SetMarkerStyle(marker) - histo.SetMarkerSize(markersize) - - -gStyle.SetPadBottomMargin(0.15) -gStyle.SetPadLeftMargin(0.14) -gStyle.SetPadRightMargin(0.12) -gStyle.SetPadTickX(1) -gStyle.SetPadTickY(1) -gStyle.SetTitleSize(0.045, "xy") -gStyle.SetLabelSize(0.045, "y") -gStyle.SetLabelSize(0.055, "x") -gStyle.SetTitleOffset(1.4, "x") -gStyle.SetOptStat(0) - -cand_types = ["2Prong", "3Prong"] -colors = {"Prompt": kRed + 1, "NonPrompt": kAzure + 4, "Bkg": kBlack} -colors_channel = { - "D0ToPiK": kRed + 1, - "JpsiToEE": kMagenta + 1, - "2Prong": kBlack, - "DPlusToPiKPi": kGreen + 2, - "DsToKKPi": kOrange + 7, - "LcToPKPi": kAzure + 4, - "XicToPKPi": kBlue + 3, - "3Prong": kBlack, -} -leg_orig_names = {"Prompt": "prompt", "NonPrompt": "non-prompt", "Bkg": "background"} -leg_channel_names = { - "D0ToPiK": "D^{0} #rightarrow K^{#minus}#pi^{#plus}", - "JpsiToEE": "J/#psi #rightarrow e^{#minus}e^{#plus}", - "DPlusToPiKPi": "D^{#plus} #rightarrow K^{#minus}#pi^{#plus}#pi^{#plus}", - "DsToKKPi": "D_{s}^{#plus} #rightarrow K^{#plus}K^{#minus}#pi^{#plus}", - "LcToPKPi": "#Lambda_{c}^{#plus} #rightarrow pK^{#minus}#pi^{#plus}", - "XicToPKPi": "#Xi_{c}^{#plus} #rightarrow pK^{#minus}#pi^{#plus}", -} - -parser = argparse.ArgumentParser(description="Arguments") -parser.add_argument( - "cfgfilename", metavar="text", default="config.yml", help="input yaml config file" -) -parser.add_argument("--batch", action="store_true", help="suppress video output") -args = parser.parse_args() - -with open(args.cfgfilename, "r") as yml_file: - cfg = yaml.safe_load(yml_file) - -infile_names = { - "Prompt": cfg["inputs"]["prompt"], - "NonPrompt": cfg["inputs"]["nonprompt"], - "Bkg": cfg["inputs"]["background"], -} - -origins = cfg["origins"] -cands = {"2Prong": cfg["cands2Prong"], "3Prong": cfg["cands3Prong"]} -for cand_type in cand_types: - cands[cand_type].insert(0, cand_type) -vars_to_plot = {"2Prong": cfg["vars2Prong"], "3Prong": cfg["vars3Prong"]} - -if args.batch: - gROOT.SetBatch(True) - -hvar_vs_pt = {} # type: Dict[str, Dict] -hvar = {} # type: Dict[str, Dict] -hvar_perevent = {} # type: Dict[str, Dict] -hvar_fracs = {} # type: Dict[str, Dict] -hnorm_vs_pt = {} # type: Dict[str, Dict] -for cand_type in cand_types: - for cand in cands[cand_type]: - ( - hvar_vs_pt[cand], - hvar[cand], - hvar_perevent[cand], - hvar_fracs[cand], - hnorm_vs_pt[cand], - ) = ({} for _ in range(5)) - - for iVar, var in enumerate(vars_to_plot[cand_type]): - ( - hvar_vs_pt[cand][var], - hvar[cand][var], - hvar_perevent[cand][var], - hvar_fracs[cand][var], - ) = ({} for _ in range(4)) - - for orig in origins: - infile = TFile.Open(infile_names[orig]) - hvar_vs_pt[cand][var][orig] = infile.Get( - f"hf-sel-optimisation/h{orig}{var}VsPt{cand}" - ) - if iVar == 0: - hnorm_vs_pt[cand][orig] = infile.Get( - f"hf-sel-optimisation/h{orig}VsPt{cand}" - ) - hEvents = infile.Get("hf-tag-sel-collisions/hEvents") - hvar_vs_pt[cand][var][orig].SetDirectory(0) - hnorm_vs_pt[cand][orig].SetDirectory(0) - hEvents.SetDirectory(0) - nEvents = hEvents.GetBinContent(2) - - hvar[cand][var][orig] = [] - hvar_perevent[cand][var][orig] = [] - hvar_fracs[cand][var][orig] = [] - nPtBins = hvar_vs_pt[cand][var][orig].GetXaxis().GetNbins() - - for iPtBin in range(1, nPtBins + 1): - hvar[cand][var][orig].append( - hvar_vs_pt[cand][var][orig].ProjectionY( - f"h{orig}{var}{cand}_pTbin{iPtBin}", iPtBin, iPtBin - ) - ) - hvar[cand][var][orig][iPtBin - 1].SetDirectory(0) - hvar[cand][var][orig][iPtBin - 1].GetXaxis().SetRangeUser( - 1.0, hvar_vs_pt[cand][var][orig].GetYaxis().GetNbins() - ) - hvar_fracs[cand][var][orig].append( - hvar[cand][var][orig][iPtBin - 1].Clone( - f"h{orig}{var}{cand}_Frac_pTbin{iPtBin}" - ) - ) - hvar_fracs[cand][var][orig][iPtBin - 1].SetDirectory(0) - hvar_fracs[cand][var][orig][iPtBin - 1].GetXaxis().SetRangeUser( - 1.0, hvar_vs_pt[cand][var][orig].GetYaxis().GetNbins() - ) - set_hist_style( - hvar[cand][var][orig][iPtBin - 1], - colors[orig], - kFullCircle, - 1.0, - ) - set_hist_style( - hvar_fracs[cand][var][orig][iPtBin - 1], - colors_channel[cand], - kFullCircle, - 1.0, - ) - hvar_perevent[cand][var][orig].append( - hvar[cand][var][orig][iPtBin - 1].Clone( - f"h{orig}{var}{cand}_perEvent_pTbin{iPtBin}" - ) - ) - hvar_perevent[cand][var][orig][iPtBin - 1].SetDirectory(0) - norm = hnorm_vs_pt[cand][orig].GetBinContent(iPtBin) - normCandType = hnorm_vs_pt[cand_type][orig].GetBinContent(iPtBin) - if norm == 0: - norm = 1 - if normCandType == 0: - normCandType = 1 - hvar[cand][var][orig][iPtBin - 1].Scale(1.0 / norm) - hvar_fracs[cand][var][orig][iPtBin - 1].Divide( - hvar[cand][var][orig][iPtBin - 1], - hvar[cand_type][var][orig][iPtBin - 1], - norm, - normCandType, - "", - ) - hvar_perevent[cand][var][orig][iPtBin - 1].Scale(1.0 / nEvents) - -# plots -leg_orig = TLegend(0.35, 0.2, 0.7, 0.35) -leg_orig.SetTextSize(0.045) -leg_orig.SetBorderSize(0) -leg_orig.SetFillStyle(0) - -leg_channels = {} # type: Dict[str, TLegend] - -ceff = {} # type: Dict[str, TCanvas] -ccand_perevent = {} # type: Dict[str, TCanvas] -cfracs = {} # type: Dict[str, TCanvas] -for cand_type in cand_types: - leg_channels[cand_type] = TLegend(0.35, 0.2, 0.7, 0.45) - leg_channels[cand_type].SetTextSize(0.045) - leg_channels[cand_type].SetBorderSize(0) - leg_channels[cand_type].SetFillStyle(0) - for cand in cands[cand_type]: - ceff[cand], ccand_perevent[cand] = ({} for _ in range(2)) - - for iVar, var in enumerate(vars_to_plot[cand_type]): - ceff[cand][var] = TCanvas(f"c{var}{cand}", "", 1200, 400) - ccand_perevent[cand][var] = TCanvas(f"c{var}{cand}_perEvent", "", 1200, 400) - - nCutsTested = hvar[cand][var][origins[0]][-1].GetNbinsX() - varTitle = hvar[cand][var][origins[0]][-1].GetXaxis().GetTitle() - ceff[cand][var].Divide(nPtBins, 1) - ccand_perevent[cand][var].Divide(nPtBins, 1) - - for iPtBin in range(nPtBins): - # fill legend - for orig in origins: - if iPtBin == 1 and leg_orig.GetNRows() < len(origins): - leg_orig.AddEntry( - hvar[cand][var][orig][iPtBin - 1], - leg_orig_names[orig], - "pl", - ) - - ptMin = ( - hvar_vs_pt[cand][var][origins[0]] - .GetXaxis() - .GetBinLowEdge(iPtBin + 1) - ) - ptMax = ( - hvar_vs_pt[cand][var][origins[0]] - .GetXaxis() - .GetBinUpEdge(iPtBin + 1) - ) - h_frame = hvar[cand][var][origins[0]][iPtBin].Clone( - f"h_frame{var}{cand}_pTbin{iPtBin}" - ) - h_frame.Reset() - h_frame.SetTitle( - f"{ptMin}<#it{{p}}_{{T}}<{ptMax} GeV/#it{{c}};{varTitle};selection efficiency;" - ) - h_frame.GetYaxis().SetRangeUser( - hvar[cand][var]["Bkg"][iPtBin].GetMinimum() / 10, 1.2 - ) - ceff[cand][var].cd(iPtBin + 1).SetLogy() - h_frame.DrawCopy() - for orig in origins: - hvar[cand][var][orig][iPtBin].DrawCopy("same") - leg_orig.Draw() - ccand_perevent[cand][var].cd(iPtBin + 1).SetLogy() - h_frame.GetYaxis().SetRangeUser( - hvar_perevent[cand][var]["Bkg"][iPtBin].GetMinimum() / 10, - hvar_perevent[cand][var]["Bkg"][iPtBin].GetMaximum() * 20, - ) - h_frame.GetYaxis().SetTitle("candidates/event") - h_frame.DrawCopy() - hvar_perevent[cand][var]["Bkg"][iPtBin].DrawCopy("same") - ceff[cand][var].SaveAs(f"c{var}{cand}.pdf") - ccand_perevent[cand][var].SaveAs(f"c{var}{cand}_perEvent.pdf") - - for iVar, var in enumerate(vars_to_plot[cand_type]): - cfracs[var] = {} - nCutsTested = hvar[cand][var][origins[0]][-1].GetNbinsX() - varTitle = hvar[cand][var][origins[0]][-1].GetXaxis().GetTitle() - for orig in origins: - cfracs[var][orig] = TCanvas(f"c{orig}{var}{cand_type}_Fracs", "", 1200, 400) - cfracs[var][orig].Divide(nPtBins, 1) - for iPtBin in range(nPtBins): - ptMin = ( - hvar_vs_pt[cand_type][var][orig] - .GetXaxis() - .GetBinLowEdge(iPtBin + 1) - ) - ptMax = ( - hvar_vs_pt[cand_type][var][orig].GetXaxis().GetBinUpEdge(iPtBin + 1) - ) - h_frame = hvar_fracs[cand][var][origins[0]][iPtBin].Clone( - f"h_frame_frac{var}{cand}_pTbin{iPtBin}" - ) - h_frame.Reset() - cfracs[var][orig].cd(iPtBin + 1).SetLogy() - h_frame.GetYaxis().SetRangeUser(1.0e-3, 1.2) - h_frame.GetYaxis().SetTitle("fraction") - h_frame.DrawCopy() - for cand in cands[cand_type]: - if cand != cand_type: - n_rows_leg = leg_channels[cand_type].GetNRows() - if iPtBin == 1 and n_rows_leg < len(cands[cand_type]) - 1: - leg_channels[cand_type].AddEntry( - hvar_fracs[cand][var][orig][iPtBin], - leg_channel_names[cand], - "pl", - ) - hvar_fracs[cand][var][orig][iPtBin].DrawCopy("same") - leg_channels[cand_type].Draw() - cfracs[var][orig].SaveAs(f"c{cand_type}{orig}{var}_Frac.pdf") - -if not args.batch: - input("Press enter to exit") diff --git a/FirstAnalysis/plotsinglevar.py b/FirstAnalysis/plotsinglevar.py deleted file mode 100644 index 35fe3f5f..00000000 --- a/FirstAnalysis/plotsinglevar.py +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/env python -import os - -from ROOT import TF1, TH2F, TCanvas, TFile, TLatex, gROOT, gStyle - - -def makeSavePaths(title, *fileFormats, outputdir="outputPlots"): - """ - Saves the canvas as the desired output format in an output directory (default = outputPlots) - """ - if not os.path.exists(outputdir): - os.makedirs(outputdir) - return [outputdir + "/" + title + fileFormat for fileFormat in fileFormats] - - -def plotsinglevar( - mode="MM", - filename="../codeHF/AnalysisResults_O2.root", - dirname="hf-task-xicc-mc", - latex="Xi_{cc}", - iptBin=2, - histonmasssig="hPtRecGenDiff", # hPtRecGenDiff hXSecVtxPosDiff - xmin=-2.0, - xmax=2.0, - ymin=0.1, - ymax=1.0e6, - rebin=4, - logx=1, - logy=1, - xminfit=-2.0, - xmaxfit=2.0, - title="", - xaxis="Xi_{cc} X vertex reco - gen (cm)", - dofit=0, -): - gStyle.SetOptStat(0) - gROOT.SetBatch(1) - - fileSig = TFile(filename) - histo2d = fileSig.Get("%s/%s" % (dirname, histonmasssig)) - hvar = histo2d.ProjectionX("hvar", iptBin + 1, iptBin + 1) - hvar.GetXaxis().SetRangeUser(xmin, xmax) - hvar.Draw() - ptMin = histo2d.GetYaxis().GetBinLowEdge(iptBin + 1) - ptMax = ptMin + histo2d.GetYaxis().GetBinWidth(iptBin + 1) - # ymax = hvar.GetMaximum() * 10 - # ymin = hvar.GetMinimum() - hempty = TH2F("hempty", ";%s; Entries" % xaxis, 100, xmin, xmax, 100, ymin, ymax) - hempty.GetXaxis().SetLabelFont(42) - hempty.GetXaxis().SetTitleOffset(1) - hempty.GetXaxis().SetLabelSize(0.03) - hempty.GetXaxis().SetTitleFont(42) - hempty.GetYaxis().SetLabelFont(42) - hempty.GetYaxis().SetTitleOffset(1.35) - hempty.GetYaxis().SetTitleFont(42) - hempty.GetZaxis().SetLabelFont(42) - hempty.GetZaxis().SetTitleOffset(1) - hempty.GetZaxis().SetTitleFont(42) - - canvas = TCanvas("canvas", "A Simple Graph Example", 881, 176, 668, 616) - gStyle.SetOptStat(0) - canvas.SetHighLightColor(2) - canvas.Range(-1.25, -4.625, 11.25, 11.625) - canvas.SetFillColor(0) - canvas.SetBorderMode(0) - canvas.SetBorderSize(2) - canvas.SetFrameBorderMode(0) - canvas.SetFrameBorderMode(0) - if logx == 1: - canvas.SetLogx() - if logy == 1: - canvas.SetLogy() - canvas.cd() - hempty.Draw("") - hvar.Draw("PEsame") - latexa = TLatex() - latexa.SetTextSize(0.04) - latexa.SetTextFont(42) - latexa.SetTextAlign(3) - xave = xmin + (xmax - xmin) / 4.0 - latexa.DrawLatex( - xave, ymax * 0.2, "%.1f < p_{T} (%s) < %.1f GeV" % (ptMin, latex, ptMax) - ) - if dofit: - f = TF1("f", "gaus") - hvar.Fit("f", "R", "", xminfit, xmaxfit) - latexb = TLatex() - latexb.SetTextSize(0.04) - latexb.SetTextFont(42) - latexb.SetTextAlign(3) - mean = f.GetParameter(1) - sigma = f.GetParameter(2) - latexb.DrawLatex(xave, ymax * 0.35, "#mu = %.5f, #sigma = %.5f" % (mean, sigma)) - canvas.SaveAs("%s%s.pdf" % (histonmasssig, mode)) - - -plotsinglevar( - "MuMu", - "/home/auras/analysis/AnalysisResults_O2_Signal_PID_mumu.root", - "hf-task-jpsi-mc", - "J/#psi", - 2, - "hMassBg", - 2.7, - 3.4, - 0.1, - 5e3, - 4, - 0, - 1, - 2.0, - 4.0, - "", - "Inv. Mass (GeV/c2)", - 0, -) diff --git a/FirstAnalysis/sig_vs_bkg.py b/FirstAnalysis/sig_vs_bkg.py deleted file mode 100644 index 113f67f8..00000000 --- a/FirstAnalysis/sig_vs_bkg.py +++ /dev/null @@ -1,283 +0,0 @@ -#!/usr/bin/env python3 - -""" -Produce plots of signal vs background distributions. - -Takes a signal file and background file and any number of variables. -Makes and saves signal vs background plots for each decay channel and each variable. -Creates one plot per pT bin and saves them all to one canvas per variable -or optionally in separate canvases (singlepad = True). -User can also manually set the options to normalise or rebin the histograms, -defaults are True and 1 (no rebin), respectively. - -Input: file with histograms produced by o2-analysis-hf-task-... in MC mode - -Usage: python3 sig_vs_bkg.py - -Parameters: -- path_file_sig: path to file with signal distributions -- path_file_bkg: path to file with background distributions -- variables: list of variable strings -- decays: list of decay channel strings (appearing in hf-task-{decay}...) - -Contributors: - Rik Spijkers - Luigi Dello Stritto - Vít Kučera -""" - -import os -import sys -from math import ceil, sqrt - -from ROOT import TCanvas, TFile, TLegend, gROOT, gStyle, kBlue, kRed - - -def create_canvas(n_plots, name, size_x=1500, size_y=800): - """ - Creates a canvas and automatically divides it in a nxn grid of subpads, - where n is the lowest value for which all the plots can be drawn - - Returns the canvas - """ - canvas = TCanvas(name, "canvas title") - # automatically determine the grid of plots based on the number of plots - n_div = ceil(sqrt(float(n_plots))) - canvas.SetCanvasSize(size_x, size_y) - canvas.Divide(n_div, n_div) - return canvas - - -def save_canvas(canvas, name, *file_formats, dir_output="outputPlots"): - """ - Saves the canvas as the desired output format in an output directory. - """ - if not os.path.exists(dir_output): - os.makedirs(dir_output) - for file_format in file_formats: - file_format = file_format.replace(".", "") - canvas.SaveAs(f"{dir_output}/{name}.{file_format}") - - -def set_histogram(his, y_min, y_max, margin_low, margin_high, logscale): - """ - Sets histogram axes labels and range. - """ - for ax in his.GetXaxis(), his.GetYaxis(): - ax.SetTitleFont(textfont) - ax.SetTitleSize(textsize) - ax.SetTitleOffset(1.0) - ax.SetLabelFont(textfont) - ax.SetLabelSize(labelsize) - k = 1.0 - margin_high - margin_low - if logscale and y_min > 0 and y_max > 0: - y_range = y_max / y_min - his.GetYaxis().SetRangeUser( - y_min / pow(y_range, margin_low / k), y_max * pow(y_range, margin_high / k) - ) - else: - logscale = False - y_range = y_max - y_min - his.GetYaxis().SetRangeUser( - y_min - margin_low / k * y_range, y_max + margin_high / k * y_range - ) - return logscale - - -def main(): - """ - Main plotting function - - Loops over decays, variables and pT bins. - """ - file_sig = TFile(path_file_sig) - if file_sig.IsZombie(): - print(f"Error: Failed to open file {path_file_sig}") - sys.exit(1) - file_bkg = TFile(path_file_bkg) - if file_bkg.IsZombie(): - print(f"Error: Failed to open file {path_file_bkg}") - sys.exit(1) - for decay in decays: - print(f"Decay: {decay}") - for var in variables: - print(f"Variable: {var}") - name_h_sig = f"hf-task-{decay}-mc/h{var}RecSig" - h_sig = file_sig.Get(name_h_sig) - if not h_sig: - print( - f"Error: Failed to get histogram {name_h_sig}! Skipping variable {var}" - ) - continue - name_h_bkg = f"hf-task-{decay}-mc/h{var}RecBg" - h_bkg = file_bkg.Get(name_h_bkg) - if not h_bkg: - print( - f"Error: Failed to get histogram {name_h_bkg}! Skipping variable {var}" - ) - continue - if type(h_sig) != type(h_bkg): - print( - f"Error: Histograms are not of the same type! Skipping variable {var}..." - ) - continue - n_bins_pt = h_sig.GetNbinsY() - print(f"pT bins: {n_bins_pt}") - if h_bkg.GetNbinsY() != n_bins_pt: - print( - f"Error: Histograms have different number of pT bins! Skipping variable {var}" - ) - continue - # rebin along the variable axis - if rebin > 1: - h_sig.RebinX(rebin) - h_bkg.RebinX(rebin) - # create canvas and legend - if not singlepad: - canvas_all = create_canvas(n_bins_pt, f"canvas_{decay}_{var}") - list_leg = [] # one legend for each pT bin - - for i in range(n_bins_pt): - bin_pt = i + 1 - if singlepad: - canvas_single = create_canvas(1, f"canvas_{decay}_{var}_{bin_pt}") - pad = canvas_single.cd(1) - else: - pad = canvas_all.cd(bin_pt) - # create a 1D histogram per pT bin - if h_sig.InheritsFrom("TH2"): - h_sig_px = h_sig.ProjectionX( - f"h_sig_px_{decay}_{var}_{bin_pt}", bin_pt, bin_pt - ) - h_bkg_px = h_bkg.ProjectionX( - f"h_bkg_px_{decay}_{var}_{bin_pt}", bin_pt, bin_pt - ) - elif h_sig.InheritsFrom("TH1"): - h_sig_px = h_sig - h_bkg_px = h_bkg - else: - print(f"Error: Unsupported histogram type: {type(h_sig)}") - sys.exit(1) - # get pT range - pt_min = h_sig.GetYaxis().GetBinLowEdge(bin_pt) - pt_max = h_sig.GetYaxis().GetBinLowEdge(bin_pt + 1) - title = labels[decay] if decay in labels else decay - if n_bins_pt > 1: - title += f", {pt_min:g} #leq #it{{p}}_{{T}}/(GeV/#it{{c}}) < {pt_max:g} (bin {bin_pt})" - h_bkg_px.SetTitle(title) - h_bkg_px.SetYTitle("entries") - # create legend and entries - list_leg.append(TLegend(0.5, 0.8, 0.95, 0.9)) - list_leg[i].SetNColumns(2) - n_entries_sig = h_sig_px.GetEntries() - n_entries_bkg = h_bkg_px.GetEntries() - list_leg[i].AddEntry(h_sig_px, f"Sig. ({int(n_entries_sig)})", "FL") - list_leg[i].AddEntry(h_bkg_px, f"Bkg. ({int(n_entries_bkg)})", "FL") - # normalise histograms - if normalise: - if n_entries_sig > 0 and n_entries_bkg > 0: - h_sig_px.Scale(1.0 / n_entries_sig, "nosw2") - h_bkg_px.Scale(1.0 / n_entries_bkg, "nosw2") - h_bkg_px.SetYTitle("normalised entries") - else: - print( - f"Warning: Signal or backgound histogram has no entries, " - f"so cannot be normalised! (ptbin = {bin_pt})" - ) - # determine y range - y_max = max( - h_bkg_px.GetBinContent(h_bkg_px.GetMaximumBin()), - h_sig_px.GetBinContent(h_sig_px.GetMaximumBin()), - ) - y_min = min(h_bkg_px.GetMinimum(0), h_sig_px.GetMinimum(0)) - logscale = set_histogram( - h_bkg_px, y_min, y_max, margin_low, margin_high, True - ) - if logscale: - pad.SetLogy() - - # draw the histograms and legend - h_bkg_px.SetLineColor(4) - h_bkg_px.SetLineWidth(2) - h_bkg_px.SetFillColorAlpha(kBlue, 0.35) - h_bkg_px.SetFillStyle(3345) - h_bkg_px.GetYaxis().SetMaxDigits(3) - h_bkg_px.DrawCopy("hist") - - h_sig_px.SetLineColor(2) - h_sig_px.SetLineWidth(2) - h_sig_px.SetFillColorAlpha(kRed + 1, 0.35) - h_sig_px.SetFillStyle(3354) - h_sig_px.DrawCopy("hist same") - - # lat.DrawLatex(0.17,0.88,"ALICE 3 Study, layout v1") - # lat3.DrawLatex(0.17,0.83,"PYTHIA 8.2, #sqrt{#it{s}} = 14 TeV") - # lat2.DrawLatex(0.17,0.78,"#Xi^{++}_{cc} #rightarrow #Xi_{c}^{+} #pi^{+} and charge conj.") - # lat2.DrawLatex(0.17,0.73,"|#it{y}_{#Xi_{cc}}| #leq 1.44, 4 < #it{p}_{T} < 6 GeV/#it{c}") - - list_leg[i].Draw() - - pad.RedrawAxis() - - if singlepad: - save_canvas( - canvas_single, - f"sig_vs_bkg_{var}_{bin_pt}", - *formats, - dir_output=f"output_{decay}", - ) - - if not singlepad: - save_canvas( - canvas_all, - f"sig_vs_bkg_{var}", - *formats, - dir_output=f"output_{decay}", - ) - - -# TLatex labels of decay channels -labels = {"d0": "D^{0} #rightarrow #pi K", "lc": "#Lambda^{+}_{c} #rightarrow p K #pi"} - -# general settings -gROOT.SetBatch(True) -gStyle.SetOptStat(0) -gStyle.SetPalette(0) -gStyle.SetFrameFillColor(0) - -# text attributes -textfont = 42 -textsize = 0.05 -labelsize = 0.05 - -# plotting range -margin_low = 0.05 -margin_high = 0.14 - -# canvas settings -gStyle.SetCanvasColor(0) -gStyle.SetPadLeftMargin(0.1) -gStyle.SetPadBottomMargin(0.12) -gStyle.SetPadRightMargin(0.05) -gStyle.SetPadTopMargin(0.1) -singlepad = False # make one canvas per pT bin - -# legend settings -gStyle.SetLegendFillColor(0) -# gStyle.SetLegendBorderSize(0) -gStyle.SetLegendFont(textfont) -gStyle.SetLegendTextSize(textsize) - -formats = ["pdf", "png", "root"] # output file formats -normalise = True -rebin = 1 - -path_file_sig = "../codeHF/AnalysisResults_O2.root" -path_file_bkg = "../codeHF/AnalysisResults_O2.root" - -# variables = ["d0Prong0", "d0Prong1", "d0Prong2", "PtProng0", "PtProng1", "PtProng2", "CPA", "Eta", "Declength"] -variables = ["CPA", "Pt", "Eta"] - -decays = ["d0"] - -main() diff --git a/FirstAnalysis/trackingstudies.py b/FirstAnalysis/trackingstudies.py deleted file mode 100644 index 4c03b7d7..00000000 --- a/FirstAnalysis/trackingstudies.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/env python -from ROOT import TCanvas, TFile, TLegend, gStyle - - -def saveCanvas(canvas, title): - format_list = ["png", ".pdf", ".root"] - for fileFormat in format_list: - canvas.SaveAs(title + fileFormat) - - -# superimposed reco and gen distributions per specie -def specie_distribution(had, var): - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - gStyle.SetOptStat(0) - cpt = TCanvas("cpt", "pT distribution") - cpt.SetCanvasSize(1500, 700) - cpt.Divide(2, 1) - hnum = fileo2.Get("qa-tracking-efficiency-%s/%s/num" % (had, var)) - hden = fileo2.Get("qa-tracking-efficiency-%s/%s/den" % (had, var)) - hden.Rebin(4) - hnum.Rebin(4) - hnum.SetLineColor(6) - hden.GetYaxis().SetRangeUser( - 0.7 * hnum.GetBinContent(hden.GetMinimumBin()), - 1.3 * hden.GetBinContent(hden.GetMaximumBin()), - ) - hden.Draw() - hnum.Draw("same") - hden.SetTitle("%s tracks %s distribution" % (had, var)) - leg = TLegend(0.7, 0.7, 0.9, 0.9, "") - leg.SetFillColor(0) - leg.AddEntry(hnum, "Rec. Level") - leg.AddEntry(hden, "Gen. Level") - leg.Draw() - saveCanvas(cpt, "%sdistribution_hfcand%s" % (var, had)) - - -def multiplicity(): - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - cmult = TCanvas("cmult", "mult distribution") - cmult.SetCanvasSize(1500, 700) - cmult.SetLogy() - cmult.Divide(2, 1) - hmult = fileo2.Get("qa-global-observables/multiplicity/numberOfTracks") - hmult.Rebin(4) - hmult.Draw() - hmult.SetTitle("Multiplicity Distribution") - saveCanvas(cmult, "multiplicity") - - -def var_tracking(var): - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - cvar = TCanvas("cvar", "var distribution") - cvar.SetCanvasSize(1800, 800) - cvar.Divide(2, 1) - hvar = fileo2.Get("qa-tracking-kine/tracking/%s" % var) - hvar.Rebin(4) - hvar.Draw() - saveCanvas(cvar, "tracking_%s" % var) - - -def tracking_resolution(var1, mode, var2, var3): - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - cres = TCanvas("cres", "resolution distribution") - cres.SetCanvasSize(1500, 700) - if var1 == "eta": - heta = fileo2.Get("qa-tracking-resolution/eta/etaDiffMCRecoVsEta%s" % mode) - heta.Draw("coltz") - heta.SetTitle("%s resolution" % var1) - saveCanvas(cres, "Resolution_%s_%s" % (var1, var2)) - - if var1 == "impactParameter": - himp_par = fileo2.Get( - "qa-tracking-resolution/%s/%s%sVs%s" % (var1, var1, var2, var3) - ) - himp_par.Draw("coltz") - himp_par.SetTitle("Impact Parameter resolution: %s Vs %s" % (var2, var3)) - saveCanvas(cres, "impact_parameter_resolution%sVs%s" % (var2, var3)) - if var1 == "impactParameterError": - himp_par_err = fileo2.Get( - "qa-tracking-resolution/impactParameter/%s%sVs%s" % (var1, var2, var3) - ) - himp_par_err.Draw("coltz") - himp_par_err.SetTitle( - "Impact Parameter Error resolution: %s Vs %s" % (var2, var3) - ) - saveCanvas(cres, "impactParameterError_resolution%sVs%s" % (var2, var3)) - if var1 == "phi": - hphi = fileo2.Get("qa-tracking-resolution/phi/phiDiffMCRec") - hphi.Draw() - saveCanvas(cres, "phi_resolution") - - if var1 == "pt": - h_pt = fileo2.Get("qa-tracking-resolution/pt/ptResolutionVs%s" % var2) - h_pt.Draw("coltz") - saveCanvas(cres, "ptResolutionVs%s" % var2) - - -def vertex_distributions(var): - fileo2 = TFile("../codeHF/AnalysisResults_O2.root") - cvertex = TCanvas("cvertex", "vertex ") - cvertex.SetCanvasSize(1800, 700) - cvertex.Divide(2, 1) - hvertex = fileo2.Get("qa-global-observables/collision/%s" % var) - cvertex.cd(1) - hvertex.Draw() - hvertex_res = fileo2.Get("qa-global-observables/collision/%svsNContrib" % var) - cvertex.cd(2) - hvertex_res.Draw("coltz") - saveCanvas(cvertex, "vertex_%s" % var) - - -multiplicity() -specie_list = ["pion", "proton", "kaon", "electron", "muon"] -var_list = ["pt", "eta", "phi"] -for specie in specie_list: - for var in var_list: - specie_distribution(specie, var) - -vertex_coord_list = ["X", "Y", "Z"] -for coord in vertex_coord_list: - vertex_distributions(coord) - -for var in var_list: - var_tracking(var) - -var1_list = ["RPhi", "Z"] -var2_list = ["Pt", "Phi", "Eta"] -tracking_resolution("eta", "MC", "", "") -tracking_resolution("pt", "", "Eta", "") -for var1 in var1_list: - for var2 in var2_list: - tracking_resolution("impactParameter", "MC", var1, var2) - tracking_resolution("impactParameterError", "MC", var1, var2) diff --git a/README.md b/README.md index 1e9edac3..f8dcce82 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,62 @@ # Run 3 validation framework -[![GitHub MegaLinter](https://github.com/AliceO2Group/Run3Analysisvalidation/workflows/MegaLinter/badge.svg?branch=master)](https://github.com/marketplace/actions/megalinter) -[![GitHub Clang Format Linter](https://github.com/AliceO2Group/Run3Analysisvalidation/workflows/Clang%20Format%20Linter/badge.svg)](https://github.com/marketplace/actions/clang-format-lint) +[![MegaLinter](https://github.com/AliceO2Group/Run3Analysisvalidation/workflows/MegaLinter/badge.svg?branch=master)](https://github.com/AliceO2Group/Run3Analysisvalidation/actions?query=workflow%3AMegaLinter+branch%3Amaster) ## Introduction -The main purpose of the Run 3 validation framework is to provide a compact and flexible tool for validation of the +The Run 3 validation framework is a tool for an easy execution, testing and validation of the Run 3 analysis code on large local samples. + +Its features include + +* simple specification of input datasets, +* simple configuration and activation of analysis tasks, +* easy generation of the O2 command for complex workflow topologies, +* job parallelisation, +* output merging, +* error checking and reporting, +* specification of postprocessing. + +It also provides tools for: + +* post mortem debugging of failing jobs, +* comparison of histograms between ROOT files, +* visualisation of workflow dependencies, +* downloading of data samples from the Grid, +* maintenance of Git repositories and installations of aliBuild packages. + +The original purpose of the Run 3 validation framework was to provide a compact and flexible tool for validation of the [O2(Physics)](https://github.com/AliceO2Group/O2Physics) analysis framework by comparison of its output to its [AliPhysics](https://github.com/alisw/AliPhysics) counterpart. The general idea is to run the same analysis using AliPhysics and O2(Physics) and produce comparison plots. +However, it can be used without AliPhysics as well to run O2 analyses locally, similar to running trains on AliHyperloop. +This makes it a convenient framework for local development, testing and debugging of O2(Physics) code. + ## Overview The validation framework is a general configurable platform that gives user the full control over what is done. -Its flexibility is enabled by strict separation of its specialised components into a system of bash scripts. +Its flexibility is enabled by strict separation of its specialised components into a system of Bash scripts. Configuration is separate from execution code, input configuration is separate from task configuration, execution steps are separate from the main steering code. -* The steering script [`runtest.sh`](exec/runtest.sh) provides control parameters and interface to the machinery for task execution. -* User provides configuration bash scripts which: +* The steering script [`run_analysis.sh`](exec/run_analysis.sh) provides control parameters and interface to the machinery for task execution. +* User provides configuration Bash scripts which: * modify control parameters, * produce modified configuration files, * generate step scripts executed by the framework in the validation steps. -### Execution +## Execution Execution code can be found in the [`exec`](exec) directory. -The steering script [`runtest.sh`](exec/runtest.sh) performs the following execution steps: +**The user should not touch anything in this directory!** + +The steering script [`run_analysis.sh`](exec/run_analysis.sh) performs the following execution steps: + * Load input specification. * Load tasks configuration. * Print out input description. * Clean before running. (activated by `DOCLEAN=1`) - * Deletes specified files. + * Deletes specified files (produced by previous runs). * Generate list of input files. * Modify the JSON file. * Convert `AliESDs.root` to `AO2D.root`. (activated by `DOCONVERT=1`) @@ -46,59 +71,121 @@ The steering script [`runtest.sh`](exec/runtest.sh) performs the following execu * If `SAVETREES=1`, tables are saved as trees in the `AnalysisResults_trees_O2.root` file. * Parameters of individual tasks are picked up from the JSON configuration file (`dpl-config.json` by default). * By default, the list of input files includes files produced by the conversion step. - * In case you want to use `AO2D.root` files as input directly, you can set `ISINPUTO2=1` in your input specification + * In case you want to use `AO2D.root` files as input directly, you can set `INPUT_IS_O2=1` in your input specification and use it in your configuration to deactivate incompatible steps (typically the conversion and AliPhysics tasks). * Run output postprocessing. (activated by `DOPOSTPROCESS=1`) * Executes the postprocessing step script. * This step typically compares AliPhysics and O2 output and produces plots. * Clean after running. (activated by `DOCLEAN=1`) - * Deletes specified files. + * Deletes specified (temporary) files. * Done * This step is just a visual confirmation that all steps have finished without errors. All steps are activated by default and some can be disabled individually by setting the respective activation variables to `0` in user's task configuration. -### Configuration +## Configuration -The steering script [`runtest.sh`](exec/runtest.sh) can be executed with the following optional arguments: +The steering script [`run_analysis.sh`](exec/run_analysis.sh) can be executed with the following optional arguments: ```bash -bash [/]runtest.sh [-h] [-i ] [-t ] [-d] +[/]run_analysis.sh [-h] [-i ] [-t ] [-d] ``` -`-h` Prints out the usage specification above. +`` Input specification script. See [Input specification](#input-specification). -`-d` (Debug mode) Prints out more information about settings and execution. - -`` Input specification -* Bash script that modifies input parameters. -* This script defines which data will be processed. * Defaults to `config_input.sh` (in the current directory). -`` Task configuration -* Bash script that cleans the directory, deactivates steps, modifies the JSON file, generates step scripts. -* This script defines what the validation steps will do. +`` Task configuration script. See [Task configuration](#task-configuration). + * Defaults to `config_tasks.sh` (in the current directory). -* Provides these mandatory functions: - * `Clean` Performs cleanup before and after running. - * `AdjustJson` Modifies the JSON file. (e.g. selection cut activation) - * `MakeScriptAli` Generates the AliPhysics step script. - * `MakeScriptO2` Generates the O2 step script. - * `MakeScriptPostprocess` Generates the postprocessing step script. (e.g. plotting) -* The `Clean` function takes one argument: `$1=1` before running, `$1=2` after running. -* The AliPhysics and O2 step scripts take two arguments: `$1=""`, `$2=""`. -* The postprocessing step script takes two arguments: `$1=""`, `$2=""`. -Implementation of these configuration scripts is fully up to the user. +`-d` Debug mode. Prints out more information about settings and execution. + +`-h` Help. Prints out the usage specification above. + +### Input specification + +The input specification script is a Bash script that sets input parameters used by the steering script. + +**This script defines which data will be processed and how.** + +These are the available input parameters and their default values: + +* `INPUT_LABEL="nothing"` Input description +* `INPUT_DIR="$PWD"` Input directory +* `INPUT_FILES="AliESDs.root"` Input file pattern +* `INPUT_SYS="pp"` Collision system (`"pp"`, `"PbPb"`) +* `INPUT_RUN=2` LHC Run (2, 3, 5) +* `INPUT_IS_O2=0` Input files are in O2 format. +* `INPUT_IS_MC=0` Input files are MC data. +* `INPUT_PARENT_MASK=""` Path replacement mask for the input directory of parent files in case of linked derived O2 input. Set to `";"` if no replacement needed. Syntax: "alien:///path/in/alien;/local/path" +* `INPUT_TASK_CONFIG=""` Input-specific task configuration (e.g. enabling converters), overriding the task configuration. String of space-separated commands. +* `JSON="dpl-config.json"` O2 device configuration + +This allows you to define several input datasets and switch between them easily by setting the corresponding value of `INPUT_CASE`. + +Other available parameters allow you to specify how many input files to process and how to parallelise the job execution. + +### Task configuration -Dummy examples can be found in: [`config/config_input_dummy.sh`](config/config_input_dummy.sh), [`config/config_tasks_dummy.sh`](config/config_tasks_dummy.sh). +The task configuration script is a Bash script that modifies the task parameters used by the steering script. + +**This script defines which validation steps will run and what they will do.** + +* It cleans the directory, deactivates incompatible steps, modifies the JSON file, generates step scripts. +* The body of the script has to provide these mandatory functions: + * `Clean` Performs cleanup before and after running. + * `AdjustJson` Modifies the JSON file (e.g. selection cut activation). + * `MakeScriptAli` Generates the AliPhysics step script `script_ali.sh`. + * `MakeScriptO2` Generates the O2 step script `script_o2.sh`. + * `MakeScriptPostprocess` Generates the postprocessing step script `script_postprocess.sh` (e.g. plotting). +* The `Clean` function takes one argument: `$1=1` for cleaning before running, `$1=2` for cleaning after running. +* The AliPhysics and O2 step scripts take two arguments: `$1=""`, `$2=""`. +* The postprocessing step script takes two arguments: `$1=""`, `$2=""`. + +Configuration that should be defined in the task configuration includes: + +* Deactivation of the validation steps (`DOCLEAN`, `DOCONVERT`, `DOALI`, `DOO2`, `DOPOSTPROCESS`) +* Customisation of the commands loading the AliPhysics, O2Physics and postprocessing environments (`ENV_ALI`, `ENV_O2`, `ENV_POST`). By default the latest builds of AliPhysics, O2Physics and ROOT are used, respectively. +* Any other parameters related to "what should run and how", e.g. `SAVETREES`, `MAKE_GRAPH`, `USEALIEVCUTS` + +### Workflow specification + +The full O2 command, executed in the O2 step script to run the activated O2 workflows, is generated in the `MakeScriptO2` function using a dedicated Python script [`make_command_o2.py`](exec/make_command_o2.py). +This script generates the command using a **YAML database (`workflows.yml`) that specifies workflow options and how workflows depend on each other**. +You can consider a workflow specification in this database to be the equivalent of a wagon definition on AliHyperloop, including the definition of the wagon name, the workflow name, the dependencies and the derived data. The main difference is that the device configuration is stored in the JSON file. + +The workflow database has two sections: `options` and `workflows`. +The `options` section defines `global` options, used once at the end of the command, and `local` options, used for every workflow. +The `workflows` section contains the "wagon" definitions. +The available parameters are: + +* `executable` Workflow command, if different from the "wagon" name + * This allows you to define multiple wagons for the same workflow. +* `dependencies` **Direct** dependencies (i.e. other wagons **directly** needed to run this wagon) + * Allowed formats: string, list of strings + * Direct dependencies are wagons that produce tables consumed by this wagon. You can figure them out using the [`find_dependencies.py`](https://github.com/AliceO2Group/O2Physics/blob/master/Scripts/find_dependencies.py) script in O2Physics. +* `requires_mc` Boolean parameter to specify whether the workflow can only run on MC +* `options` Command line options. (Currently not supported on AliHyperloop.) + * Allowed formats: string, list of strings, dictionary with keys `default`, `real`, `mc` +* `tables` Descriptions of output tables to be saved as trees + * Allowed formats: string, list of strings, dictionary with keys `default`, `real`, `mc` + +The `make_command_o2.py` script allows you to generate a topology graph to visualise the dependencies defined in the database, using [Graphviz](https://graphviz.org/). +Generation of the topology graph can be conveniently enabled with `MAKE_GRAPH=1` in the task configuration. + +Dummy examples of the configuration files can be found in: + +* [`config/config_input_dummy.sh`](config/config_input_dummy.sh), +* [`config/config_tasks_dummy.sh`](config/config_tasks_dummy.sh), +* [`config/workflows_dummy.yml`](config/workflows_dummy.yml). ## Preparation ### Build AliPhysics and O2(Physics) Follow the official [AliPhysics installation](https://alice-doc.github.io/alice-analysis-tutorial/building/) and -[O2(Physics) installation](https://aliceo2group.github.io/analysis-framework/docs/installing/) instructions. +[O2(Physics) installation](https://aliceo2group.github.io/analysis-framework/docs/gettingstarted/installing.html) instructions. Make sure the AliPhysics and O2Physics environments can be entered using the following respective commands. @@ -137,10 +224,10 @@ sudo apt install parallel Now you are ready to run the validation code. -**Make sure that your bash environment is clean! +**Make sure that your Bash environment is clean! Do not load ROOT, AliPhysics, O2, O2Physics or any other aliBuild package environment before running the framework!** -Enter any directory and execute the steering script `runtest.sh`. +Enter any directory and execute the steering script `run_analysis.sh`. (You can create a symlink for convenience.) All the processing will take place in the current directory. @@ -157,14 +244,27 @@ If any step fails, the script will display an error message and you should look If the main log file of a validation step mentions "parallel: This job failed:", inspect the respective log file in the directory of the corresponding job. +## How to add a new workflow + +To add a new workflow in the framework configuration, you need to follow these steps. + +* Add the workflow in the [task configuration](#task-configuration): + * Add the activation switch: `DOO2_...=0 # name of the workflow (without o2-analysis)`. + * Add the application of the switch in the `MakeScriptO2` function: `[ $DOO2_... -eq 1 ] && WORKFLOWS+=" o2-analysis-..."`. + * If needed, add lines in the `AdjustJson` function to modify the JSON configuration. +* Add the [workflow specification](#workflow-specification) in the workflow database: + * See the dummy example `o2-analysis-workflow` for the full list of options. +* Add the device configuration in the default JSON file. + ## Job debugging If you run many parallelised jobs and some of them don't finish successfully, you can make use of the debugging script [`debug.sh`](exec/debug.sh) in the [`exec`](exec) directory which can help you figure out what went wrong, where and why. You can execute the script from the current working directory using the following syntax (options can be combined): + ```bash -bash [/]debug.sh [-h] [-t TYPE] [-b [-u]] [-f] [-w] [-e] +[/]debug.sh [-h] [-t TYPE] [-b [-u]] [-f] [-w] [-e] ``` `-h` Print out the usage help. @@ -181,10 +281,16 @@ bash [/]debug.sh [-h] [-t TYPE] [-b [-u]] [-f] [-w] [-e] `-e` Show errors (for all jobs). -## Heavy-flavour analyses +## Specific analyses + +### Heavy-flavour analyses Enter the [`codeHF`](codeHF) directory and see the [`README`](codeHF/README.md). +### Jet analyses + +Enter the [`codeJE`](codeJE) directory. + ## Keep your repositories and installations up to date and clean With the ongoing fast development, it can easily happen that updating the O2Physics part of the validation @@ -198,8 +304,9 @@ This includes updating alidist, AliPhysics, O2(Physics), and this Run as well as re-building your AliPhysics and O2(Physics) installations via aliBuild and deleting obsolete builds. You can execute the script from any directory on your system using the following syntax: + ```bash -python /exec/update_packages.py [-h] [-d] [-l] [-c] database +[/]exec/update_packages.py [-h] [-d] [-l] [-c] database ``` optional arguments: @@ -246,7 +353,7 @@ It is possible to check your code locally (before even committing or pushing): ### Space checker ```bash -bash /exec/check_spaces.sh +[/]exec/check_spaces.sh ``` ### [ClangFormat](https://clang.llvm.org/docs/ClangFormat.html) @@ -255,8 +362,8 @@ bash /exec/check_spaces.sh clang-format -style=file -i ``` -### [MegaLinter](https://megalinter.github.io/latest/mega-linter-runner/) +### [MegaLinter](http://megalinter.io/latest/mega-linter-runner/) ```bash -mega-linter-runner +npx mega-linter-runner ``` diff --git a/Upgrade/InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/AnalysisResults_O2_ONIAX.root b/Upgrade/InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/AnalysisResults_O2_ONIAX.root deleted file mode 100644 index e307a0af..00000000 Binary files a/Upgrade/InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/AnalysisResults_O2_ONIAX.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/BkgperEvents.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/BkgperEvents.root deleted file mode 100644 index e0869a0b..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/BkgperEvents.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/eff.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/eff.root deleted file mode 100644 index b5d39f39..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/eff.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/efficiencies.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/efficiencies.root deleted file mode 100644 index b5d39f39..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/efficiencies.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root deleted file mode 100644 index af53543a..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root deleted file mode 100644 index 2286453f..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/efficiencies.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/efficiencies.root deleted file mode 100644 index 2286453f..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/efficiencies.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy2p0_scenario3/bkgperevent.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy2p0_scenario3/bkgperevent.root deleted file mode 100644 index 9b709296..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy2p0_scenario3/bkgperevent.root and /dev/null differ diff --git a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy2p0_scenario3/efficiencies.root b/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy2p0_scenario3/efficiencies.root deleted file mode 100644 index b82ae764..00000000 Binary files a/Upgrade/InputsExp/Jpsi_ptdep_pp14p0_absy2p0_scenario3/efficiencies.root and /dev/null differ diff --git a/Upgrade/InputsExp/Lc_ptdep_pp14p0_absy3p0_scenario3/bkgperevent.root b/Upgrade/InputsExp/Lc_ptdep_pp14p0_absy3p0_scenario3/bkgperevent.root deleted file mode 100644 index ec3d4b84..00000000 Binary files a/Upgrade/InputsExp/Lc_ptdep_pp14p0_absy3p0_scenario3/bkgperevent.root and /dev/null differ diff --git a/Upgrade/InputsExp/Lc_ptdep_pp14p0_absy3p0_scenario3/efficiencies.root b/Upgrade/InputsExp/Lc_ptdep_pp14p0_absy3p0_scenario3/efficiencies.root deleted file mode 100644 index 788c8b2b..00000000 Binary files a/Upgrade/InputsExp/Lc_ptdep_pp14p0_absy3p0_scenario3/efficiencies.root and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_high.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_high.pdf deleted file mode 100644 index 68b66698..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_high.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_low.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_low.pdf deleted file mode 100644 index 455c985d..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_low.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_mid.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_mid.pdf deleted file mode 100644 index e8bdbd3d..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/background_counts_decL_omegac_mid.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/efficiency_decL_omegac_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/efficiency_decL_omegac_withSpecialCuts.pdf deleted file mode 100644 index 658bf905..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/efficiency_decL_omegac_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/generated_pt_distribution.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/generated_pt_distribution.pdf deleted file mode 100644 index bc787464..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/generated_pt_distribution.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/generated_rapidity_distribution.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/generated_rapidity_distribution.pdf deleted file mode 100644 index b53c46c8..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/generated_rapidity_distribution.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_high_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_high_withSpecialCuts.pdf deleted file mode 100644 index 3f4725fa..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_high_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_low_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_low_withSpecialCuts.pdf deleted file mode 100644 index ac54bac5..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_low_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_mid_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_mid_withSpecialCuts.pdf deleted file mode 100644 index c08644ca..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_background_decL_omegac_mid_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_high.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_high.pdf deleted file mode 100644 index ef9140ee..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_high.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_low.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_low.pdf deleted file mode 100644 index cddd9741..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_low.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_mid.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_mid.pdf deleted file mode 100644 index 4d0490bf..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/mass_signal_mid.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_high.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_high.pdf deleted file mode 100644 index f42165cf..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_high.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_low.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_low.pdf deleted file mode 100644 index 102ce4b9..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_low.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_mid.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_mid.pdf deleted file mode 100644 index 58e3ab9f..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/minv_signal_fit_decL_omegac_mid.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/reconstruction_decL_omegac_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/reconstruction_decL_omegac_withSpecialCuts.pdf deleted file mode 100644 index b857c6b9..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/reconstruction_decL_omegac_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/signif_estimate_shm_coal_omegacc_decL_omegac.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/signif_estimate_shm_coal_omegacc_decL_omegac.pdf deleted file mode 100644 index 715d51e0..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/signif_estimate_shm_coal_omegacc_decL_omegac.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/tablecuts_trial_decL_omegac_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/tablecuts_trial_decL_omegac_withSpecialCuts.pdf deleted file mode 100644 index e4fd99d8..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_oldLifetime/tablecuts_trial_decL_omegac_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_high.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_high.pdf deleted file mode 100644 index ad90d409..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_high.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_low.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_low.pdf deleted file mode 100644 index 5f03bc7e..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_low.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_mid.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_mid.pdf deleted file mode 100644 index 35928e7f..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/background_counts_decL_omegac_mid.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/efficiency_decL_omegac_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/efficiency_decL_omegac_withSpecialCuts.pdf deleted file mode 100644 index 6f4941cb..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/efficiency_decL_omegac_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/generated_pt_distribution.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/generated_pt_distribution.pdf deleted file mode 100644 index 0a96d522..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/generated_pt_distribution.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/generated_rapidity_distribution.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/generated_rapidity_distribution.pdf deleted file mode 100644 index a143b01b..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/generated_rapidity_distribution.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_high_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_high_withSpecialCuts.pdf deleted file mode 100644 index 6c50d27f..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_high_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_low_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_low_withSpecialCuts.pdf deleted file mode 100644 index 21b1768f..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_low_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_mid_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_mid_withSpecialCuts.pdf deleted file mode 100644 index dfbba17a..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_background_decL_omegac_mid_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_high.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_high.pdf deleted file mode 100644 index 65677978..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_high.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_low.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_low.pdf deleted file mode 100644 index f445a750..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_low.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_mid.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_mid.pdf deleted file mode 100644 index dff3ac22..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/mass_signal_mid.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_high.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_high.pdf deleted file mode 100644 index 03b69a08..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_high.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_low.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_low.pdf deleted file mode 100644 index 2305968a..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_low.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_mid.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_mid.pdf deleted file mode 100644 index eb359307..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/minv_signal_fit_decL_omegac_mid.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/reconstruction_decL_omegac_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/reconstruction_decL_omegac_withSpecialCuts.pdf deleted file mode 100644 index 6519d379..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/reconstruction_decL_omegac_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/signif_estimate_shm_coal_omegacc_decL_omegac.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/signif_estimate_shm_coal_omegacc_decL_omegac.pdf deleted file mode 100644 index 98407422..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/signif_estimate_shm_coal_omegacc_decL_omegac.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/significance_estimate_trial_decL_omegac.root b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/significance_estimate_trial_decL_omegac.root deleted file mode 100644 index 4c637ea6..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/significance_estimate_trial_decL_omegac.root and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/tablecuts_trial_decL_omegac_withSpecialCuts.pdf b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/tablecuts_trial_decL_omegac_withSpecialCuts.pdf deleted file mode 100644 index 98114538..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_4_updatedLifetime/tablecuts_trial_decL_omegac_withSpecialCuts.pdf and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_6/significance_estimate_trial_decL_omegac.root b/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_6/significance_estimate_trial_decL_omegac.root deleted file mode 100644 index 0b6dea32..00000000 Binary files a/Upgrade/InputsExp/Omega_cc_aliphysics/decay_length_omegac/trial_6/significance_estimate_trial_decL_omegac.root and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_ccc_aliphysics/README.md b/Upgrade/InputsExp/Omega_ccc_aliphysics/README.md deleted file mode 100644 index 090a0bb6..00000000 --- a/Upgrade/InputsExp/Omega_ccc_aliphysics/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# Omega_{ccc} -Significance estimate - -Introduction -There is a macro which takes in Inputs: -1. generated signal -2. reconstructed signal -3. reconstructed background - -The first two are used to estimate the "efficiency x acceptance" which is one of the ingredient needed to estimate the "raw-signal-per-event". - -The reconstructed background is needed to estimate the "background-per-event". - -Then, the significance/sqrt{events} is computed from the raw-signal-per-event and the background-per-event. - -The goal of the macro is to estimate the significance/sqrt{events} for different trial -The macro works in the following way: -- select the variable you want to study for the trial (e.g. d0(rphi) of Omega_c "d0rphi_omegac_cuts"); -- define inside the macro a set of cut values you want to apply on this variable; -- choose if you want to add an additional set of predefined cuts which are applied in all the trials (e.g. chi2/ndf < 4, cos(pointing angle)>0.99) --> "bool useSpecialCuts = true" to use the pre-defined set of cuts as default; -- then the macro runs over the signal trees (generated and reconstructed) to get the efficiency x acceptance for each trial; -- runs over the background tree to get the background-per-event for each trial; -- compute the raw-signal-per-event using the efficiency x acceptance, the theoretical inputs for dN/dy and the estimated B.R. -- finally computes the significance/sqrt{events} with the expected raw-signal-per-event and the. expected background-per-event -This procedure is done automatically for 3 pT bins: 0-2, 2-4, 4-10 GeV/c. - -Description of the output -For each variable a dedicated directory is created (e.g. d0rphi_omegac_cuts) and there inside all the related trials are stored (e.g. trial_4,5). -Each directory trial_* contains the following files: -- tablecuts_trial_*_*.pdf --> a pdf where all the applied selections are reported. Example: tablecuts_trial_d0rphi_omegac_withSpecialCuts.pdf --> there are some fixed cuts for Omega_c,cc,ccc applied to all the trials and at the bottom the list of the cut values for the trial on the d0(rphi) of Omega_c -- mass_signal_low/mid/high.pdf --> histograms of invariant mass distribution for reconstructed signal. Filled to check that the reconstruction is done properly. -- mass_background_*_*_low/mid/high.pdf --> histograms of invariant mass distribution obtained from the background tree -- minv_signal_fit_*_low/mid/high.pdf --> histograms of invariant mass distribution for reconstructed signal fitted with a gaussian. The width of this gaussian is used to define the +/-3 sigma region around the expected mass value where we take the background counts -- background_counts_*_*_high.pdf --> histograms with invariant mass distribution from background candidates. Here are reported the counts of background in the +/-3 sigma region around the mass peak, which are used to evaluate the background-per-event -- generated_pt/rapidity_distribution.pdf --> generated distributions of mother particle (e.g. Omega_ccc). In particular: - - Gen (top left): distribution with all generated mother particle without any selections - - GenAcc (top right): distribution with all mothers inside the rapidity gap and the daughters inside the pseudorapidity gap - - GenLimAcc (bottom left): distribution with all mothers inside the rapidity gap -- reconstruction_*_*_withSpecialCuts.pdf --> distribution of reconstructed mother particle for the different trial. The label "withSpecialCuts" means that the set of fixed cut is applied. -- efficiency_*_*_withSpecialCuts.pdf --> contains the efficiency and acceptance calculation. In particular: - - RecoCuts/GenAcc --> pure efficiency term - - GenAcc/GenLimAcc --> pure acceptance term - - RecoCuts/GenLimAcc --> efficiency x acceptance, which is used in the raw signal estimate -- signif_estimate_shm_coal_omegaccc_*_*.pdf --> contains the ingredients and the estimate of the significance/sqrt{events}. In particular: - - Raw signal (top left) --> raw signal per event obtained as S = dN/dy x (effXacc) x BR; the dashed line refers to dN/dy from coalescence, while the solid line from SHM; the different colors refer to the different trial (i.e. we estimate the raw signal per event for each trial) - - Background (top right) --> background per event - - Significance/sqrt{event} (bottom left) - - Inputs (bottom right) --> contains the details of the background and the theoretical inputs used in the calculation - -All what described here is referred to the studies for the Omega_ccc, but is also valid for the Omega_cc. - - diff --git a/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_4_oldLifetime/significance_estimate_trial_d0rphi_omegac.root b/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_4_oldLifetime/significance_estimate_trial_d0rphi_omegac.root deleted file mode 100644 index 7eca1e84..00000000 Binary files a/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_4_oldLifetime/significance_estimate_trial_d0rphi_omegac.root and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_5_updatedLifetime/significance_estimate_trial_d0rphi_omegac.root b/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_5_updatedLifetime/significance_estimate_trial_d0rphi_omegac.root deleted file mode 100644 index 11e2e80f..00000000 Binary files a/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_5_updatedLifetime/significance_estimate_trial_d0rphi_omegac.root and /dev/null differ diff --git a/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_6/significance_estimate_trial_d0rphi_omegac.root b/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_6/significance_estimate_trial_d0rphi_omegac.root deleted file mode 100644 index e5f70e50..00000000 Binary files a/Upgrade/InputsExp/Omega_ccc_aliphysics/d0rphi_omegac_cuts/trial_6/significance_estimate_trial_d0rphi_omegac.root and /dev/null differ diff --git a/Upgrade/InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root b/Upgrade/InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root deleted file mode 100644 index d794b17f..00000000 Binary files a/Upgrade/InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root and /dev/null differ diff --git a/Upgrade/InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root b/Upgrade/InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root deleted file mode 100644 index caa73831..00000000 Binary files a/Upgrade/InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root and /dev/null differ diff --git a/Upgrade/InputsTheory/Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44.root b/Upgrade/InputsTheory/Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44.root deleted file mode 100644 index 666259b2..00000000 Binary files a/Upgrade/InputsTheory/Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44.root and /dev/null differ diff --git a/Upgrade/InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root b/Upgrade/InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root deleted file mode 100644 index 614eeccf..00000000 Binary files a/Upgrade/InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root and /dev/null differ diff --git a/Upgrade/InputsTheory/Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44.root b/Upgrade/InputsTheory/Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44.root deleted file mode 100644 index efc64462..00000000 Binary files a/Upgrade/InputsTheory/Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44.root and /dev/null differ diff --git a/Upgrade/InputsTheory/Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44.root b/Upgrade/InputsTheory/Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44.root deleted file mode 100644 index 3ce46d94..00000000 Binary files a/Upgrade/InputsTheory/Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44.root and /dev/null differ diff --git a/Upgrade/InputsTheory/Lambda_c_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv b/Upgrade/InputsTheory/Lambda_c_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv deleted file mode 100644 index 01f04bc1..00000000 --- a/Upgrade/InputsTheory/Lambda_c_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv +++ /dev/null @@ -1,26 +0,0 @@ -pt,cross -0.0, 3.17E-01 -0.3, 3.27E-01 -0.6, 3.21E-01 -0.9, 2.99E-01 -1.2, 2.61E-01 -1.5, 2.11E-01 -1.8, 1.56E-01 -2.1, 1.07E-01 -2.4, 6.75E-02 -2.7, 3.92E-02 -3.0, 2.16E-02 -3.3, 1.17E-02 -3.6, 6.61E-03 -3.9, 3.91E-03 -4.2, 2.41E-03 -4.5, 1.51E-03 -4.8, 9.59E-04 -5.1, 6.14E-04 -5.4, 3.96E-04 -5.7, 2.59E-04 -6.0, 1.72E-04 -6.5, 8.97E-05 -7.0, 4.95E-05 -7.5, 2.88E-05 -8.0, 1.77E-05 diff --git a/Upgrade/InputsTheory/Omega_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv b/Upgrade/InputsTheory/Omega_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv deleted file mode 100644 index f80ffd07..00000000 --- a/Upgrade/InputsTheory/Omega_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv +++ /dev/null @@ -1,26 +0,0 @@ -pt,cross -0.0, 0.00006646310783540042 -0.3, 0.00006646310783540042 -0.6, 0.00006404004271197282 -0.9, 0.00006170531598835199 -1.2, 0.000057288112837756064 -1.5, 0.00004937969317714344 -1.8, 0.00004256300264549499 -2.1, 0.000035349811050301094 -2.4, 0.000028288694346259665 -2.7, 0.000021017480113324872 -3.0, 0.000015045941012517134 -3.3, 0.000010378367193526983 -3.6, 0.000006404004271197283 -3.9, 0.0000039516110714498495 -4.2, 0.000002263803409521451 -4.5, 0.0000012496091412919893 -4.8, 6.646310783540055e-7 -5.1, 3.5349811050301095e-7 -5.4, 2.0251239642430092e-7 -5.7, 1.1178591777554069e-7 -6.0, 6.404004271197296e-8 -6.5, 2.7257365073673226e-8 -7.0, 1.2496091412919918e-8 -7.5, 5.945570708544431e-9 -8.0, 2.8288694346259783e-9 diff --git a/Upgrade/InputsTheory/Omega_ccc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv b/Upgrade/InputsTheory/Omega_ccc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv deleted file mode 100644 index 467143ed..00000000 --- a/Upgrade/InputsTheory/Omega_ccc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv +++ /dev/null @@ -1,26 +0,0 @@ -pt,cross -0.0, 1.90E-07 -0.3, 1.89E-07 -0.6, 1.87E-07 -0.9, 1.83E-07 -1.2, 1.76E-07 -1.5, 1.67E-07 -1.8, 1.55E-07 -2.1, 1.40E-07 -2.4, 1.24E-07 -2.7, 1.06E-07 -3.0, 8.74E-08 -3.3, 6.97E-08 -3.6, 5.33E-08 -3.9, 3.91E-08 -4.2, 2.75E-08 -4.5, 1.84E-08 -4.8, 1.18E-08 -5.1, 7.30E-09 -5.4, 4.34E-09 -5.7, 2.51E-09 -6.0, 1.43E-09 -6.5, 5.61E-10 -7.0, 2.27E-10 -7.5, 9.76E-11 -8.0, 4.49E-11 diff --git a/Upgrade/InputsTheory/X3872_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv b/Upgrade/InputsTheory/X3872_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv deleted file mode 100644 index bc0dc7e2..00000000 --- a/Upgrade/InputsTheory/X3872_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv +++ /dev/null @@ -1,26 +0,0 @@ -pt,cross -0.0, 0.0000168 -0.3, 0.0000162 -0.6, 0.0000162 -0.9, 0.0000156 -1.2, 0.0000145 -1.5, 0.0000140 -1.8, 0.0000125 -2.1, 0.0000108 -2.4, 0.00000928 -2.7, 0.00000715 -3.0, 0.00000551 -3.3, 0.00000394 -3.6, 0.00000271 -3.9, 0.00000180 -4.2, 0.00000107 -4.5, 6.10e-7 -4.8, 3.62e-7 -5.1, 1.99e-7 -5.4, 1.14e-7 -5.7, 6.76e-8 -6, 4.01e-8 -6.5, 1.64e-8 -7.0, 7.49e-9 -7.5, 3.55e-9 -8.0, 1.74e-9 diff --git a/Upgrade/InputsTheory/Xi_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv b/Upgrade/InputsTheory/Xi_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv deleted file mode 100644 index 0ed871bc..00000000 --- a/Upgrade/InputsTheory/Xi_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5.csv +++ /dev/null @@ -1,26 +0,0 @@ -pt,cross -0.0, 3.21E-04 -0.3, 3.19E-04 -0.6, 3.13E-04 -0.9, 3.02E-04 -1.2, 2.84E-04 -1.5, 2.58E-04 -1.8, 2.28E-04 -2.1, 1.91E-04 -2.4, 1.54E-04 -2.7, 1.17E-04 -3.0, 8.46E-05 -3.3, 5.73E-05 -3.6, 3.66E-05 -3.9, 2.21E-05 -4.2, 1.27E-05 -4.5, 7.13E-06 -4.8, 3.97E-06 -5.1, 2.25E-06 -5.4, 1.31E-06 -5.7, 7.83E-07 -6.0, 4.84E-07 -6.5, 2.31E-07 -7.0, 1.17E-07 -7.5, 6.15E-08 -8.0, 3.32E-08 diff --git a/Upgrade/InputsTheory/charm_sys_SHMC.txt b/Upgrade/InputsTheory/charm_sys_SHMC.txt deleted file mode 100644 index 7c975907..00000000 --- a/Upgrade/InputsTheory/charm_sys_SHMC.txt +++ /dev/null @@ -1,238 +0,0 @@ - -SHMC, 18.01.2021 (dN/dy, mass, 2J+1) - -n C=1, C=2, C=3 (part.only): 8.776e-05 3.395e-09 1.118e-12 * n_cc: 4.822e-08 - -System: Pb-Pb, V: 4997 -sigma_ccbar: 0.532, Ncc_dir: 13.05 => gc: 29.84 -In/I0 (26.17) C=1,2,3: 9.807e-01 9.251e-01 8.393e-01 - D^{0} 6.063e+00 1.865 1 - D^{+} 2.685e+00 1.869 1 - D^{*+} 2.373e+00 2.010 3 - D_{s}^{+} 2.164e+00 1.968 1 - #Lambda_{c}^{+} 1.312e+00 2.287 2 - #Sigma_{c}^{0} 1.429e-01 2.454 2 - #Xi_{c}^{0} 2.653e-01 2.470 2 - #Omega_{c}^{0} 5.680e-02 2.695 2 - c-d 1.613e-03 3.225 3 - c-t 3.893e-06 4.162 2 - X(2900) 3.657e-03 2.900 1 - J/#psi 1.096e-01 3.097 3 - #psi(2S) 3.083e-03 3.686 3 - #chi_{c1} 8.824e-03 3.511 3 - X(3872) 2.807e-03 3.843 7 - P_{c}(4320) 6.243e-05 4.380 4 - #Xi_{cc}^{+} 5.672e-03 3.620 4 - #Omega_{cc}^{+} 2.663e-03 3.746 4 -#Omega_{ccc}^{++} 1.246e-04 4.797 4 - -System: Xe-Xe, V: 3171 -sigma_ccbar: 0.532, Ncc_dir: 6.91 => gc: 25.38 -In/I0 (14.12) C=1,2,3: 9.639e-01 8.635e-01 7.194e-01 - D^{0} 3.216e+00 1.865 1 - D^{+} 1.424e+00 1.869 1 - D^{*+} 1.259e+00 2.010 3 - D_{s}^{+} 1.148e+00 1.968 1 - #Lambda_{c}^{+} 6.961e-01 2.287 2 - #Sigma_{c}^{0} 7.580e-02 2.454 2 - #Xi_{c}^{0} 1.407e-01 2.470 2 - #Omega_{c}^{0} 3.013e-02 2.695 2 - c-d 8.556e-04 3.225 3 - c-t 2.065e-06 4.162 2 - X(2900) 1.940e-03 2.900 1 - J/#psi 5.029e-02 3.097 3 - #psi(2S) 1.415e-03 3.686 3 - #chi_{c1} 4.049e-03 3.511 3 - X(3872) 1.288e-03 3.843 7 - P_{c}(4320) 2.865e-05 4.380 4 - #Xi_{cc}^{+} 2.430e-03 3.620 4 - #Omega_{cc}^{+} 1.141e-03 3.746 4 -#Omega_{ccc}^{++} 4.167e-05 4.797 4 - -System: Kr-Kr, V: 2018 -sigma_ccbar: 0.532, Ncc_dir: 3.62 => gc: 21.65 -In/I0 (7.67) C=1,2,3: 9.323e-01 7.568e-01 5.375e-01 - D^{0} 1.689e+00 1.865 1 - D^{+} 7.479e-01 1.869 1 - D^{*+} 6.611e-01 2.010 3 - D_{s}^{+} 6.028e-01 1.968 1 - #Lambda_{c}^{+} 3.655e-01 2.287 2 - #Sigma_{c}^{0} 3.980e-02 2.454 2 - #Xi_{c}^{0} 7.389e-02 2.470 2 - #Omega_{c}^{0} 1.582e-02 2.695 2 - c-d 4.493e-04 3.225 3 - c-t 1.084e-06 4.162 2 - X(2900) 1.019e-03 2.900 1 - J/#psi 2.330e-02 3.097 3 - #psi(2S) 6.554e-04 3.686 3 - #chi_{c1} 1.876e-03 3.511 3 - X(3872) 5.966e-04 3.843 7 - P_{c}(4320) 1.327e-05 4.380 4 - #Xi_{cc}^{+} 9.865e-04 3.620 4 - #Omega_{cc}^{+} 4.632e-04 3.746 4 -#Omega_{ccc}^{++} 1.231e-05 4.797 4 - -System: Ar-Ar, V: 961 -sigma_ccbar: 0.532, Ncc_dir: 1.26 => gc: 18.10 -In/I0 (3.05) C=1,2,3: 8.138e-01 4.668e-01 2.021e-01 - D^{0} 5.868e-01 1.865 1 - D^{+} 2.598e-01 1.869 1 - D^{*+} 2.297e-01 2.010 3 - D_{s}^{+} 2.095e-01 1.968 1 - #Lambda_{c}^{+} 1.270e-01 2.287 2 - #Sigma_{c}^{0} 1.383e-02 2.454 2 - #Xi_{c}^{0} 2.567e-02 2.470 2 - #Omega_{c}^{0} 5.497e-03 2.695 2 - c-d 1.561e-04 3.225 3 - c-t 3.767e-07 4.162 2 - X(2900) 3.540e-04 2.900 1 - J/#psi 7.752e-03 3.097 3 - #psi(2S) 2.181e-04 3.686 3 - #chi_{c1} 6.241e-04 3.511 3 - X(3872) 1.985e-04 3.843 7 - P_{c}(4320) 4.416e-06 4.380 4 - #Xi_{cc}^{+} 2.024e-04 3.620 4 - #Omega_{cc}^{+} 9.505e-05 3.746 4 -#Omega_{ccc}^{++} 1.287e-06 4.797 4 - -System: O-O, V: 384 -sigma_ccbar: 0.532, Ncc_dir: 0.33 => gc: 18.46 -In/I0 (1.25) C=1,2,3: 5.265e-01 1.542e-01 3.102e-02 - D^{0} 1.549e-01 1.865 1 - D^{+} 6.858e-02 1.869 1 - D^{*+} 6.062e-02 2.010 3 - D_{s}^{+} 5.528e-02 1.968 1 - #Lambda_{c}^{+} 3.352e-02 2.287 2 - #Sigma_{c}^{0} 3.650e-03 2.454 2 - #Xi_{c}^{0} 6.775e-03 2.470 2 - #Omega_{c}^{0} 1.451e-03 2.695 2 - c-d 4.120e-05 3.225 3 - c-t 9.943e-08 4.162 2 - X(2900) 9.342e-05 2.900 1 - J/#psi 3.225e-03 3.097 3 - #psi(2S) 9.071e-05 3.686 3 - #chi_{c1} 2.596e-04 3.511 3 - X(3872) 8.257e-05 3.843 7 - P_{c}(4320) 1.837e-06 4.380 4 - #Xi_{cc}^{+} 2.783e-05 3.620 4 - #Omega_{cc}^{+} 1.306e-05 3.746 4 -#Omega_{ccc}^{++} 8.380e-08 4.797 4 - - -*** sigma_ccbar +18% -> 0.628 mb *** - -System: Pb-Pb, V: 4997 -sigma_ccbar: 0.628, Ncc_dir: 15.40 => gc: 35.03 -In/I0 (30.72) C=1,2,3: 9.836e-01 9.360e-01 8.617e-01 - D^{0} 7.137e+00 1.865 1 - D^{+} 3.161e+00 1.869 1 - D^{*+} 2.794e+00 2.010 3 - D_{s}^{+} 2.548e+00 1.968 1 - #Lambda_{c}^{+} 1.545e+00 2.287 2 - #Sigma_{c}^{0} 1.682e-01 2.454 2 - #Xi_{c}^{0} 3.123e-01 2.470 2 - #Omega_{c}^{0} 6.686e-02 2.695 2 - c-d 1.899e-03 3.225 3 - c-t 4.583e-06 4.162 2 - X(2900) 4.306e-03 2.900 1 - J/#psi 1.510e-01 3.097 3 - #psi(2S) 4.248e-03 3.686 3 - #chi_{c1} 1.216e-02 3.511 3 - X(3872) 3.866e-03 3.843 7 - P_{c}(4320) 8.601e-05 4.380 4 - #Xi_{cc}^{+} 7.907e-03 3.620 4 - #Omega_{cc}^{+} 3.712e-03 3.746 4 -#Omega_{ccc}^{++} 2.069e-04 4.797 4 - -System: Xe-Xe, V: 3171 -sigma_ccbar: 0.628, Ncc_dir: 8.15 => gc: 29.72 -In/I0 (16.54) C=1,2,3: 9.693e-01 8.828e-01 7.558e-01 - D^{0} 3.787e+00 1.865 1 - D^{+} 1.677e+00 1.869 1 - D^{*+} 1.483e+00 2.010 3 - D_{s}^{+} 1.352e+00 1.968 1 - #Lambda_{c}^{+} 8.198e-01 2.287 2 - #Sigma_{c}^{0} 8.927e-02 2.454 2 - #Xi_{c}^{0} 1.657e-01 2.470 2 - #Omega_{c}^{0} 3.548e-02 2.695 2 - c-d 1.008e-03 3.225 3 - c-t 2.432e-06 4.162 2 - X(2900) 2.285e-03 2.900 1 - J/#psi 6.898e-02 3.097 3 - #psi(2S) 1.941e-03 3.686 3 - #chi_{c1} 5.554e-03 3.511 3 - X(3872) 1.766e-03 3.843 7 - P_{c}(4320) 3.930e-05 4.380 4 - #Xi_{cc}^{+} 3.407e-03 3.620 4 - #Omega_{cc}^{+} 1.600e-03 3.746 4 -#Omega_{ccc}^{++} 7.033e-05 4.797 4 - -System: Kr-Kr, V: 2018 -sigma_ccbar: 0.628, Ncc_dir: 4.27 => gc: 25.24 -In/I0 (8.94) C=1,2,3: 9.423e-01 7.892e-01 5.891e-01 - D^{0} 1.990e+00 1.865 1 - D^{+} 8.811e-01 1.869 1 - D^{*+} 7.789e-01 2.010 3 - D_{s}^{+} 7.103e-01 1.968 1 - #Lambda_{c}^{+} 4.307e-01 2.287 2 - #Sigma_{c}^{0} 4.690e-02 2.454 2 - #Xi_{c}^{0} 8.706e-02 2.470 2 - #Omega_{c}^{0} 1.864e-02 2.695 2 - c-d 5.293e-04 3.225 3 - c-t 1.278e-06 4.162 2 - X(2900) 1.200e-03 2.900 1 - J/#psi 3.166e-02 3.097 3 - #psi(2S) 8.906e-04 3.686 3 - #chi_{c1} 2.549e-03 3.511 3 - X(3872) 8.107e-04 3.843 7 - P_{c}(4320) 1.803e-05 4.380 4 - #Xi_{cc}^{+} 1.398e-03 3.620 4 - #Omega_{cc}^{+} 6.563e-04 3.746 4 -#Omega_{ccc}^{++} 2.137e-05 4.797 4 - -System: Ar-Ar, V: 961 -sigma_ccbar: 0.628, Ncc_dir: 1.48 => gc: 20.66 -In/I0 (3.48) C=1,2,3: 8.403e-01 5.177e-01 2.460e-01 - D^{0} 6.917e-01 1.865 1 - D^{+} 3.063e-01 1.869 1 - D^{*+} 2.708e-01 2.010 3 - D_{s}^{+} 2.469e-01 1.968 1 - #Lambda_{c}^{+} 1.497e-01 2.287 2 - #Sigma_{c}^{0} 1.630e-02 2.454 2 - #Xi_{c}^{0} 3.027e-02 2.470 2 - #Omega_{c}^{0} 6.480e-03 2.695 2 - c-d 1.840e-04 3.225 3 - c-t 4.441e-07 4.162 2 - X(2900) 4.173e-04 2.900 1 - J/#psi 1.010e-02 3.097 3 - #psi(2S) 2.843e-04 3.686 3 - #chi_{c1} 8.135e-04 3.511 3 - X(3872) 2.587e-04 3.843 7 - P_{c}(4320) 5.756e-06 4.380 4 - #Xi_{cc}^{+} 2.927e-04 3.620 4 - #Omega_{cc}^{+} 1.374e-04 3.746 4 -#Omega_{ccc}^{++} 2.332e-06 4.797 4 - -System: O-O, V: 384 -sigma_ccbar: 0.628, Ncc_dir: 0.39 => gc: 20.35 -In/I0 (1.37) C=1,2,3: 5.632e-01 1.797e-01 3.962e-02 - D^{0} 1.827e-01 1.865 1 - D^{+} 8.090e-02 1.869 1 - D^{*+} 7.152e-02 2.010 3 - D_{s}^{+} 6.522e-02 1.968 1 - #Lambda_{c}^{+} 3.954e-02 2.287 2 - #Sigma_{c}^{0} 4.306e-03 2.454 2 - #Xi_{c}^{0} 7.993e-03 2.470 2 - #Omega_{c}^{0} 1.711e-03 2.695 2 - c-d 4.860e-05 3.225 3 - c-t 1.173e-07 4.162 2 - X(2900) 1.102e-04 2.900 1 - J/#psi 3.923e-03 3.097 3 - #psi(2S) 1.103e-04 3.686 3 - #chi_{c1} 3.158e-04 3.511 3 - X(3872) 1.004e-04 3.843 7 - P_{c}(4320) 2.234e-06 4.380 4 - #Xi_{cc}^{+} 3.945e-05 3.620 4 - #Omega_{cc}^{+} 1.852e-05 3.746 4 -#Omega_{ccc}^{++} 1.436e-07 4.797 4 - diff --git a/Upgrade/InputsTheory/x3872_ptdep_PbPb5TeV_absy1p44.root b/Upgrade/InputsTheory/x3872_ptdep_PbPb5TeV_absy1p44.root deleted file mode 100644 index 18bee3df..00000000 Binary files a/Upgrade/InputsTheory/x3872_ptdep_PbPb5TeV_absy1p44.root and /dev/null differ diff --git a/Upgrade/InputsTheory/x3872_ptdep_Pyhia8monash_pp14p0_absy1p44.root b/Upgrade/InputsTheory/x3872_ptdep_Pyhia8monash_pp14p0_absy1p44.root deleted file mode 100644 index a8fb630e..00000000 Binary files a/Upgrade/InputsTheory/x3872_ptdep_Pyhia8monash_pp14p0_absy1p44.root and /dev/null differ diff --git a/Upgrade/README.md b/Upgrade/README.md deleted file mode 100644 index 93ad9510..00000000 --- a/Upgrade/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# ALICE3 HF performance studies - -## Introduction - -The purpose of this repository is to collect the macros and utilities to study the performances of the ALICE3 detector with heavy-flavoured hadrons, including charmed and beauty hadrons, HF jets and quarkonia. For these studies, the ALICE3 detector setup is simulated using the [DelphesO2](https://github.com/AliceO2Group/DelphesO2) package, while the heavy-flavour reconstruction is performed using the [O2](https://github.com/AliceO2Group/AliceO2) analysis framework. - -## Overview - -The repository now contains the following subfolders: - -### InputTheory -This folder contains pT-dependent predictions for charmed and multi-charm baryons, which are used to estimate the expected signal yields of each hadron. In particular: -* predictions in csv format from the coalescence calculations based on arXiv.1907.12786 in PbPb collisions at 2.76 TeV. These inputs can be converted in ROOT histograms by using the following [script](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/read_predictions_ptdep_stat_cholee_2_pbpb2p76_absy0p5.py), as discussed later. -* predictions for the Λc baryons in pp collisions from Pythia 8. - -### InputExp -This folder contains the experimental inputs for performing significance estimations for the different hadrons in both pp and AA collisions. -The name of the folder indicates whether these studies were performed with aliphysics or with the O2 simulation and analysis framework. Each folder typically contains: -* a histogram with the background content within 3 sigma from the peak mean normalized by the number of events extracted in MB Monte Carlo simulations -* a histogram with the efficiencies for each channel. - -### analysis -In this folder, we collect all the analysis macros for performing the final analyses and plots. In particular: -* The [script](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/read_predictions_ptdep_stat_cholee_2_pbpb2p76_absy0p5.py) already introduced above to convert the cvs predictions from arXiv.1907.12786 to ROOT histograms (the ROOT files are not pushed into the repository, but one needs to generate them when needed). -* A [script](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/expected_yields.py) to perform the comparison of the expected yields of charmed and multi-charmed hadrons in AA collisions. Few remarks: - * For the moment, we consider for each theoretical calculation the same pT-shape. We indeed consider the normalized pT-spectrum from arXiv.1907.12786 and we just multiply it for the expected dN/dy provided by each theory group (collected [here](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/databases/theory_yields.yaml)). - * Make sure you run the script descrive in the bullet above in advance in order to generate the ROOT histograms needed for the comparison. -* A [script](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/significance.py) that performs the significance estimation as a function of pT (currently working only for Λc baryons in pp collisions). The parameters needed are read from the following two databases, [significance.yaml](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/databases/significance.yaml) and [general.yaml](https://github.com/AliceUpgrades/ALICE3_HFperformance/blob/main/analysis/databases/general.yaml). - -## HowTo - -All the scripts can be run as simple python scripts from the folder "analysis" . E.g.: -```python -python read_predictions_ptdep_stat_cholee_2_pbpb2p76_absy0p5.py -``` -```python -python expected_yields.py -``` -```python -python significance.py -``` - diff --git a/Upgrade/analysis/GetBkgPerEventAndEff.C b/Upgrade/analysis/GetBkgPerEventAndEff.C deleted file mode 100644 index a1878a5e..00000000 --- a/Upgrade/analysis/GetBkgPerEventAndEff.C +++ /dev/null @@ -1,413 +0,0 @@ -#if !defined(__CINT__) || defined(__MAKECINT__) -#include "TFile.h" -#include "TH1D.h" -#include "TH2D.h" -#include "TMath.h" -#include "TCanvas.h" -#include "TDatabasePDG.h" -#include "TF1.h" -#include "TStyle.h" -#include "TLatex.h" -#include "TEfficiency.h" -#endif - -using namespace std; - -enum myProc_t { kJpsiToEE, - kJpsiToMuMu, - kXToPiPiEE, - kXToPiPiMuMu, - kXicc, - kBplus, - kChic1, - kChic2, - kNChannels }; - -const char* hfTaskLabel[kNChannels] = {"jpsi", "jpsiToMuMu", "x", "xToPiPiMuMu", "xicc", "bplus", "chic", "chic"}; -const char* histNameSig[kNChannels] = {"hMassSig", "hMassRecSig", "hMassRecSig", "hMassRecSig", "hMassSig", "hMassRecSig", "hMassRecSig", "hMassRecSig"}; -const char* histNameBkg[kNChannels] = {"hMass", "hMassRecBkg", "hMass", "hMassRecBkg", "hMass", "hMass", "hMass", "hMass"}; - -const char* label[kNChannels] = { - "J/#psi #rightarrow ee", - "J/#psi #rightarrow #mu#mu", - "X #rightarrow J/#psi(ee) #pi#pi", - "X #rightarrow J/#psi(#mu#mu) #pi#pi", - "#Xi_{cc}^{++} #rightarrow #Xi_{c}^{+}#pi^{+}", - "B^{+} #rightarrow D^{0}#pi^{+}", - "#chi_{c1} #rightarrow J/#psi #gamma", - "#chi_{c2} #rightarrow J/#psi #gamma"}; - -const Double_t massMin[kNChannels] = {2.60, 2.60, 3.60, 3.60, 3.30, 4.60, 3.10, 3.10}; -const Double_t massMax[kNChannels] = {3.55, 3.55, 4.10, 4.10, 3.90, 6.00, 4.00, 4.00}; - -const Double_t massMean[kNChannels] = { - TDatabasePDG::Instance()->GetParticle(443)->Mass(), - TDatabasePDG::Instance()->GetParticle(443)->Mass(), - 3.872, - 3.872, - TDatabasePDG::Instance()->GetParticle(4412)->Mass(), - TDatabasePDG::Instance()->GetParticle(521)->Mass(), - TDatabasePDG::Instance()->GetParticle(20443)->Mass(), - TDatabasePDG::Instance()->GetParticle(445)->Mass()}; - -const Double_t nsigma = 3; - -Int_t nPtBins = 0; -const Int_t nMaxPtBins = 1000; -Double_t ptBinLimits[nMaxPtBins] = {0}; - -Double_t sidebandCount[2] = {0}; // upper and lower limit of the signal window for bkg counting -Double_t sidebandFit[2] = {0}; // upper and lower limit of the signal window for bkg fitting - -// Control parameters for the description of the bkg with a polynomial function. -// The description starts with a pol2 model, and if the bkg fit has a larger chi2/ndf than the chi2OverNDF_limit parameter, -// the degree of the polynomial function describing it is increased by 1, with an upper limit given by maxPolDegree -const Double_t chi2OverNDF_limit = 3.; -const Int_t maxPolDegree = 4; - -TCanvas *cnvSig = 0, *cnvBkg = 0, *cnvBkgperEvents = 0, *cnvEfficiency = 0; - -TH1D *hBkgPerEvent = 0, *hEfficiency = 0, *hEfficiencyNoPID = 0, *hMassSig[nMaxPtBins] = {0}, *hMassBkg[nMaxPtBins] = {0}; -TH2D *hMassVsPtSig = 0, *hMassVsPtBkg = 0; - -TF1 *fitBkg[nMaxPtBins] = {0}, *fitBkgSideBands[nMaxPtBins] = {0}, *fitSig[nMaxPtBins] = {0}; - -Double_t fitPol(Double_t* var, Double_t* par); -Double_t fitPolSideBands(Double_t* var, Double_t* par); - -Double_t fitExpoWithThreshold(Double_t* var, Double_t* par); -Double_t fitExpoWithThresholdSideBands(Double_t* var, Double_t* par); - -void info(myProc_t channel); -void mystyle(); - -void BookCanvas(); -void BookHistos(); - -//==================================================================================================================================================== - -void GetBkgPerEventAndEff(const char* signalfilename, - const char* bkgfilename, - const myProc_t channel) -{ - - mystyle(); - - Double_t bkg, errBkg; - - //----------------------------------------------------------------------------------------------------------------------------- - - // Conneting directories from input files - - TFile* input_sig = new TFile(signalfilename, "read"); - TFile* input_bkg = new TFile(bkgfilename, "read"); - - auto dir_sig = (TDirectory*)input_sig->GetDirectory(Form("hf-task-%s-mc", hfTaskLabel[channel])); - auto dir_bkg = (TDirectory*)input_bkg->GetDirectory(Form("hf-task-%s", hfTaskLabel[channel])); - - hMassVsPtSig = (TH2D*)dir_sig->Get(histNameSig[channel]); - hMassVsPtSig->SetName("hMassVsPtSig"); - - hMassVsPtBkg = (TH2D*)dir_bkg->Get(histNameBkg[channel]); - hMassVsPtBkg->SetName("hMassVsPtBkg"); - - Double_t nEventsBkg = -1; - TH1F* hCount = (TH1F*)input_bkg->Get("qa-global-observables/eventCount"); - if (!hCount) { - nEventsBkg = 20e6; - printf("\n********* WARNING: cannot retrieve bkg number of events, using nEventsBkg = %d *********\n\n", Int_t(nEventsBkg)); - } else { - nEventsBkg = hCount->GetBinContent(1); - printf("nEventsBkg = %d, read from qa-global-observables/eventCount\n", Int_t(nEventsBkg)); - } - - // check of consistency for hMassVsPtSig vs hMassVsPtBkg (same pt binning) - TH1D* hTmpSig = hMassVsPtSig->ProjectionY(); - TH1D* hTmpBkg = hMassVsPtBkg->ProjectionY(); - if (!(hTmpSig->Add(hTmpBkg))) { - printf("ERROR: sig and bkg histograms have different pt binning, quitting.\n"); - return; - } - - nPtBins = TMath::Min(hMassVsPtBkg->GetNbinsY(), nMaxPtBins); - BookCanvas(); - - for (int i = 0; i < nPtBins; i++) { - ptBinLimits[i] = hMassVsPtSig->GetYaxis()->GetBinLowEdge(i + 1); - ptBinLimits[i + 1] = hMassVsPtSig->GetYaxis()->GetBinLowEdge(i + 1) + hMassVsPtSig->GetYaxis()->GetBinWidth(i + 1); - } - - BookHistos(); - - auto hPtGenSig = (TH1F*)dir_sig->Get("hPtGen"); - auto hPtRecSig = (TH1F*)dir_sig->Get("hPtRecSig"); - - auto gp = (TH1D*)hPtGenSig->Rebin(nPtBins, "gp", ptBinLimits); - auto rp = (TH1D*)hPtRecSig->Rebin(nPtBins, "eff", ptBinLimits); - - gp->Sumw2(); - rp->Sumw2(); - rp->Divide(gp); - - hEfficiency = (TH1D*)rp->Clone(); - hEfficiency->SetTitle(";p_{T} (GeV/c); Reconstruction Efficiency"); - hEfficiency->SetLineColor(kRed); - hEfficiency->SetLineWidth(2); - hEfficiency->GetYaxis()->CenterTitle(); - - cnvEfficiency->cd(); - hEfficiency->Draw("e"); - - info(channel); - - //----------------------------------------------------------------------------------------------------------------------------- - - for (int i = 0; i < nPtBins; i++) { - - Int_t ptBin = i + 1; - - // Projecting sig and bkg histos form TH2D objects - - hMassSig[i] = hMassVsPtSig->ProjectionX(Form("hMassSig_PtBin_%d", ptBin), ptBin, ptBin, "e"); - hMassBkg[i] = hMassVsPtBkg->ProjectionX(Form("hMassBkg_PtBin_%d", ptBin), ptBin, ptBin, "e"); - - if (hMassSig[i]->GetMaximum() < 20) - hMassSig[i]->Rebin(2); - - hMassSig[i]->GetXaxis()->SetRangeUser(massMin[channel], massMax[channel]); - hMassBkg[i]->GetXaxis()->SetRangeUser(massMin[channel], massMax[channel]); - - hMassSig[i]->SetTitle(Form("%2.1f < p_{T} < %2.1f", ptBinLimits[i], ptBinLimits[i + 1])); - hMassBkg[i]->SetTitle(Form("%2.1f < p_{T} < %2.1f", ptBinLimits[i], ptBinLimits[i + 1])); - - // Setting the fit functions for bkg and sig - - fitSig[i] = new TF1(Form("fitSig_%d", i), "gaus", massMean[channel] - 5 * hMassSig[i]->GetRMS(), massMean[channel] + 5 * hMassSig[i]->GetRMS()); - fitSig[i]->SetNpx(10000); - - // Gaussian fit on the signal - - cnvSig->cd(i + 1); - - hMassSig[i]->Fit(fitSig[i], "Q", "", massMean[channel] - 5 * hMassSig[i]->GetRMS(), massMean[channel] + 5 * hMassSig[i]->GetRMS()); - Double_t sigmaSig = fitSig[i]->GetParameter(2); - - sidebandCount[0] = massMean[channel] - nsigma * sigmaSig; - sidebandCount[1] = massMean[channel] + nsigma * sigmaSig; - - // Fit of the bakground - - cnvBkg->cd(i + 1); - - if (channel != kChic1 && channel != kChic2) { - - sidebandFit[0] = sidebandCount[0]; - sidebandFit[1] = sidebandCount[1]; - - fitBkg[i] = new TF1(Form("fitBkg_%d", i), fitPol, massMin[channel], massMax[channel], maxPolDegree + 1); - fitBkgSideBands[i] = new TF1(Form("fitBkgSideBands_%d", i), fitPolSideBands, massMin[channel], massMax[channel], maxPolDegree + 1); - fitBkg[i]->SetNpx(10000); - fitBkgSideBands[i]->SetNpx(10000); - - // we start with a 2nd order polynomial - Int_t nPolDegree = 2; - for (Int_t j = nPolDegree + 1; j <= maxPolDegree; j++) - fitBkgSideBands[i]->FixParameter(j, 0); - - hMassBkg[i]->Fit(fitBkgSideBands[i], "Q", "", massMin[channel], massMax[channel]); - - while (fitBkgSideBands[i]->GetChisquare() / fitBkgSideBands[i]->GetNDF() > chi2OverNDF_limit && nPolDegree < maxPolDegree) { - nPolDegree++; - fitBkgSideBands[i]->ReleaseParameter(nPolDegree); - hMassBkg[i]->Fit(fitBkgSideBands[i], "Q", "", massMin[channel], massMax[channel]); - } - - } - - else { - - // adapting the sidebands to exlude the chi_c1 + chi_c2 region (2 sigma only, otherwise we loose too much arm leverage for the fit) - - sidebandFit[0] = massMean[kChic1] - 2 * sigmaSig; - sidebandFit[1] = massMean[kChic2] + 2 * sigmaSig; - - fitBkg[i] = new TF1(Form("fitBkg_%d", i), fitExpoWithThreshold, massMin[channel], massMax[channel], 5); - fitBkgSideBands[i] = new TF1(Form("fitBkgSideBands_%d", i), fitExpoWithThresholdSideBands, massMin[channel], massMax[channel], 5); - fitBkg[i]->SetNpx(10000); - fitBkgSideBands[i]->SetNpx(10000); - - double threshold = 0; - - for (int iBin = 1; iBin <= hMassBkg[i]->GetNbinsX(); iBin++) { - if (hMassBkg[i]->GetBinContent(iBin) > 0) { - threshold = hMassBkg[i]->GetBinCenter(iBin); - break; - } - } - - hMassBkg[i]->Fit("expo", "Q", "", 3.6, 4.0); - - fitBkgSideBands[i]->SetParameters(threshold, 0.02, 0, hMassBkg[i]->GetFunction("expo")->GetParameter(0), TMath::Min(hMassBkg[i]->GetFunction("expo")->GetParameter(1), 0.)); - fitBkgSideBands[i]->SetParLimits(0, threshold - 0.2, threshold + 0.2); - fitBkgSideBands[i]->SetParLimits(1, 0.001, 0.1); - fitBkgSideBands[i]->SetParLimits(2, 0, hMassBkg[i]->GetBinContent(hMassBkg[i]->GetNbinsX())); - fitBkgSideBands[i]->SetParLimits(4, -10, 0); - hMassBkg[i]->Fit(fitBkgSideBands[i], "Q", "", massMin[channel], massMax[channel]); - hMassBkg[i]->Fit(fitBkgSideBands[i], "Q", "", massMin[channel], massMax[channel]); - } - - for (Int_t j = 0; j <= fitBkgSideBands[i]->GetNpar(); j++) - fitBkg[i]->SetParameter(j, fitBkgSideBands[i]->GetParameter(j)); - - bkg = fitBkg[i]->Integral(sidebandCount[0], sidebandCount[1]) / hMassBkg[i]->GetBinWidth(1); - bkg /= nEventsBkg; // bkg is the expected background in the +/- 3 sigma window per MB event - - // Evaluating significance and filling histos - - hBkgPerEvent->SetBinContent(i + 1, bkg); - hBkgPerEvent->SetBinError(i + 1, 0.); - } - - TFile* fileOutEff = new TFile(Form("efficiency_%s.root", hfTaskLabel[channel]), "recreate"); - hEfficiency->Write(); - fileOutEff->Close(); - - TFile* fileOutBkgPerEvents = new TFile(Form("bkgPerEvents_%s.root", hfTaskLabel[channel]), "recreate"); - cnvBkgperEvents->cd(); - cnvBkgperEvents->SetLogy(); - hBkgPerEvent->Draw("e ]["); - info(channel); - hBkgPerEvent->Write(); - fileOutBkgPerEvents->Close(); -} - -//==================================================================================================================================================== - -Double_t fitPol(Double_t* var, Double_t* par) -{ - - Double_t result = par[0]; - for (Int_t i = 1; i <= maxPolDegree; i++) - result += par[i] * TMath::Power(var[0], i); - - return result; -} - -//==================================================================================================================================================== - -Double_t fitPolSideBands(Double_t* var, Double_t* par) -{ - - if (sidebandFit[0] < var[0] && var[0] < sidebandFit[1]) { - TF1::RejectPoint(); - return 0; - } - - return fitPol(var, par); -} - -//==================================================================================================================================================== - -Double_t fitExpoWithThreshold(Double_t* var, Double_t* par) -{ - - Double_t meanThreshold = par[0]; - Double_t x = var[0] - meanThreshold; - Double_t widthThreshold = par[1]; - Double_t offset = par[2]; - Double_t constExpo = par[3]; - Double_t slopeExpo = par[4]; - - return 0.5 * (1. + TMath::Erf(x / widthThreshold)) * (offset + TMath::Exp(x * slopeExpo + constExpo)); -} - -//==================================================================================================================================================== - -Double_t fitExpoWithThresholdSideBands(Double_t* var, Double_t* par) -{ - - if (sidebandFit[0] < var[0] && var[0] < sidebandFit[1]) { - TF1::RejectPoint(); - return 0; - } - - return fitExpoWithThreshold(var, par); -} - -//==================================================================================================================================================== - -void info(myProc_t channel) -{ - - TLatex* t = new TLatex(8, 8, "ALICE3 O2 Performance"); - t->SetNDC(); - t->SetTextSize(0.5); - t->SetTextAlign(10); - t->SetTextColor(1); - t->SetTextSize(0.03); - t->DrawLatex(0.5, 0.85, "ALICE3 O2 Performance"); - - t->SetTextSize(0.025); - t->SetTextAlign(12); - t->DrawLatex(0.5, 0.8, "PYTHIA 8 pp #sqrt{s} = 14TeV "); - // t->DrawLatex(0.5, 0.75, "Inclusive J/#psi #rightarrow ee "); - t->DrawLatex(0.5, 0.75, label[channel]); - t->DrawLatex(0.5, 0.7, "kinematic cuts"); -} - -//==================================================================================================================================================== - -void BookCanvas() -{ - - cnvSig = new TCanvas("cnvSig", "Signal fit", 2000, 800); - int nColums = 5; - int nRows = (nPtBins - 1) / nColums + 1; - cnvSig->Divide(nColums, nRows); - - cnvBkg = new TCanvas("cnvBkg", "Bkg fit", 2000, 800); - cnvBkg->Divide(nColums, nRows); - - cnvBkgperEvents = new TCanvas("BkgperEvents", "Bkg/nEvents"); - cnvEfficiency = new TCanvas("cnvEfficiency", "Efficiency", 800, 600); -} - -//==================================================================================================================================================== - -void BookHistos() -{ - - hBkgPerEvent = new TH1D("hBkgPerEvent", ";p_{T}(J/#psi)(GeV/c);Bkg/nEvents", nPtBins, ptBinLimits); - hEfficiency = new TH1D("hEfficiency", ";p_{T}(J/#psi)(GeV/c); Reconstruction Efficiency", nPtBins, ptBinLimits); - - hBkgPerEvent->SetLineColor(kRed); - hBkgPerEvent->SetLineWidth(3); - - hEfficiency->SetLineColor(kRed); - hEfficiency->SetLineWidth(3); - - hBkgPerEvent->GetYaxis()->CenterTitle(); -} - -//==================================================================================================================================================== - -void mystyle() -{ - - gROOT->ForceStyle(); - gStyle->SetOptStat(0); - gStyle->SetFrameLineWidth(2); - gStyle->SetTitleSize(0.045, "x"); - gStyle->SetTitleSize(0.045, "y"); - gStyle->SetMarkerSize(1); - gStyle->SetLineWidth(2); - gStyle->SetLabelOffset(0.015, "x"); - gStyle->SetLabelOffset(0.01, "y"); - gStyle->SetTitleOffset(1, "x"); - gStyle->SetTitleOffset(0.8, "y"); - gStyle->SetTextSize(0.03); - gStyle->SetTextAlign(5); - gStyle->SetTextColor(1); -} - -//==================================================================================================================================================== diff --git a/Upgrade/analysis/SOverBComp.C b/Upgrade/analysis/SOverBComp.C deleted file mode 100644 index ec04d460..00000000 --- a/Upgrade/analysis/SOverBComp.C +++ /dev/null @@ -1,179 +0,0 @@ -void SOverBComp() -{ - - TH1D* sig_sc3; - TH1D* sig_sc2; - - Int_t nBinsMerge = 6; - Double_t xAxis1[7] = {0, 1, 2, 4, 6, 8, 10}; - - TFile* fileSig3 = TFile::Open("Scenario3/foutputLambda_c.root", "READ"); - cout << "ok" << endl; - sig_sc3 = new TH1D(*((TH1D*)fileSig3->Get("histosigoverbkg"))); - - TFile* fileSig2 = TFile::Open("Scenario2/foutputLambda_c.root", "READ"); - cout << "ok" << endl; - sig_sc2 = new TH1D(*((TH1D*)fileSig2->Get("histosigoverbkg"))); - - int textfont = 42; - float textsize = 0.047; - float labelsize = 0.04; - - TLatex* lat = new TLatex(); - lat->SetNDC(); - lat->SetTextFont(textfont); - lat->SetTextSize(textsize); - - TLatex* lat2 = new TLatex(); - lat2->SetNDC(); - lat2->SetTextFont(textfont); - lat2->SetTextSize(textsize * 1.0); - - TLatex* lat3 = new TLatex(); - lat3->SetNDC(); - lat3->SetTextFont(textfont); - lat3->SetTextSize(textsize * 1.0); - - TCanvas* canvas3a = new TCanvas("canvas3a", "", 443, 100, 700, 700); - gStyle->SetOptStat(0); - gStyle->SetOptTitle(0); - gStyle->SetLegendBorderSize(0); - gStyle->SetLegendFont(textfont); - gStyle->SetLegendTextSize(textsize); - - canvas3a->Range(0, 0, 1, 1); - canvas3a->SetFillColor(0); - canvas3a->SetBorderMode(0); - canvas3a->SetBorderSize(2); - canvas3a->SetFrameBorderMode(0); - - // ------------>Primitives in pad: canvas3a_1 - TPad* canvas3a_1 = new TPad("canvas3a_1", "canvas3a_1", 0.01, 0.3, 0.99, 0.99); - canvas3a_1->Draw(); - canvas3a_1->cd(); - canvas3a_1->Range(-0.3750001, -2248.875, 13.375, 20249.88); - canvas3a_1->SetFillColor(0); - canvas3a_1->SetBorderMode(0); - canvas3a_1->SetBorderSize(2); - //canvas3a_1->SetGridx(); - //canvas3a_1->SetGridy(); - canvas3a_1->SetLeftMargin(0.15); - canvas3a_1->SetFrameBorderMode(0); - canvas3a_1->SetFrameBorderMode(0); - - cout << "ok" << endl; - - //sig_sc3->SetMarkerSize(1.25); - //sig_sc3->SetMinimum(2.27); - //sig_sc3->SetMaximum(2.30); - sig_sc3->SetEntries(7); - sig_sc3->SetStats(0); - sig_sc3->SetLineWidth(2); - sig_sc3->SetLineColor(4); - //sig_sc3->SetMarkerColor(1); - //sig_sc3->SetMarkerStyle(21); - sig_sc3->GetXaxis()->SetTitle("#it{p}_{T}(#Lambda_{c}) [GeV/#it{c}]"); - sig_sc3->GetXaxis()->SetNdivisions(511); - sig_sc3->GetXaxis()->SetRangeUser(0, 10); - sig_sc3->GetXaxis()->SetLabelFont(42); - sig_sc3->GetXaxis()->SetLabelSize(0.04); - sig_sc3->GetXaxis()->SetTitleSize(0.04); - sig_sc3->GetXaxis()->SetTitleOffset(1.0); - sig_sc3->GetYaxis()->SetRangeUser(0.000003, 5); - sig_sc3->GetXaxis()->SetTitleFont(42); - - // sig_sc3->GetYaxis()->SetTitle("#frac{d^{2}#sigma}{dy dp_{T}} [#frac{#mu b}{GeV/c}]"); - sig_sc3->GetYaxis()->SetTitle("Signal/Background (3#sigma)"); - sig_sc3->GetYaxis()->SetLabelFont(42); - sig_sc3->GetYaxis()->SetTitleFont(42); - sig_sc3->GetYaxis()->SetLabelSize(0.05); - sig_sc3->GetYaxis()->SetTitleSize(0.07); - sig_sc3->GetYaxis()->SetTitleOffset(0.9); - sig_sc3->GetYaxis()->SetDecimals(kTRUE); - - canvas3a_1->SetLogy(); - sig_sc3->Draw(""); - - sig_sc2->SetLineWidth(2); - sig_sc2->SetLineColor(2); - // sig_sc2->SetMarkerStyle(21); - // sig_sc2->SetMarkerSize(1.25); - //sig_sc2->SetMarkerColor(2); - sig_sc2->Draw("same"); - - lat->DrawLatex(0.2, 0.83, "ALICE3 projection, pp #sqrt{s}= 14 TeV"); - lat2->DrawLatex(0.2, 0.76, "Pythia 8, mode = 2"); - lat3->DrawLatex(0.2, 0.69, "#Lambda_{c} #rightarrow pK#pi, |y| < 1.44, BR=6.28%"); - - /////////////////////////////////////////////////////////////////////// RATIO ///////////////////////////////////////////////////////////////////// - - TLegend* leg = new TLegend(0.53, 0.25, 0.88, 0.40, 0, "NDC"); - leg->AddEntry(sig_sc3, "Scenario3", "lp"); - leg->AddEntry(sig_sc2, "Scenario2", "lp"); - leg->SetFillStyle(0); - leg->SetBorderSize(0); - leg->SetFillColor(0); - //leg->SetTextSize(22); - - leg->Draw(); - - canvas3a_1->Modified(); - canvas3a->cd(); - - // ------------>Primitives in pad: canvas3a_2 - TPad* canvas3a_2 = new TPad("canvas3a_2", "canvas3a_2", 0.01, 0.01, 0.99, 0.365); - canvas3a_2->Draw(); - canvas3a_2->cd(); - canvas3a_2->Range(-0.3750001, -0.7452094, 13.375, 0.6383566); - canvas3a_2->SetFillColor(0); - canvas3a_2->SetBorderMode(0); - canvas3a_2->SetBorderSize(2); - //canvas3a_2->SetGridx(); - canvas3a_2->SetGridy(); - canvas3a_2->SetLeftMargin(0.15); - canvas3a_2->SetBottomMargin(0.2); - canvas3a_2->SetFrameBorderMode(0); - canvas3a_2->SetFrameBorderMode(0); - - TH1F* SigRatio = new TH1F("SigRatio", "", 6, xAxis1); - SigRatio->Divide(sig_sc3, sig_sc2, 1., 1.); - - //SigRatio->SetMarkerStyle(1); - //SigRatio->SetMarkerSize(1); - SigRatio->SetMinimum(0.99); - SigRatio->SetMaximum(1.01); - SigRatio->SetEntries(7); - SigRatio->SetStats(0); - SigRatio->SetLineWidth(2); - SigRatio->SetLineColor(4); - SigRatio->GetXaxis()->SetTitle("p_{T}(#Lambda_{c}) [GeV/c]"); - //SigRatio->GetXaxis()->SetNdivisions(511); - SigRatio->GetXaxis()->SetLabelFont(42); - SigRatio->GetXaxis()->SetLabelSize(0.085); - SigRatio->GetXaxis()->SetTitleSize(0.095); - SigRatio->GetXaxis()->SetTitleOffset(1.0); - SigRatio->GetXaxis()->SetRangeUser(0, 10); - SigRatio->GetYaxis()->SetRangeUser(0., 15); - SigRatio->GetXaxis()->SetTitleFont(42); - SigRatio->GetYaxis()->SetTitle("Scenario3 / Scenario2"); - SigRatio->GetYaxis()->SetNdivisions(106); - SigRatio->GetYaxis()->SetLabelFont(42); - SigRatio->GetYaxis()->SetLabelSize(0.085); - SigRatio->GetYaxis()->SetTitleSize(0.08); - SigRatio->GetYaxis()->SetTitleOffset(0.7); - SigRatio->GetYaxis()->SetTitleFont(42); - SigRatio->GetYaxis()->SetDecimals(kTRUE); - SigRatio->Draw(""); - - TLine* line = new TLine(0, 1, 10., 1); - line->SetLineColor(1); - line->SetLineWidth(4); - line->SetLineStyle(2); - line->Draw("same"); - - canvas3a_2->Modified(); - canvas3a->cd(); - canvas3a->Modified(); - canvas3a->cd(); - canvas3a->SetSelected(canvas3a); -} diff --git a/Upgrade/analysis/clean.sh b/Upgrade/analysis/clean.sh deleted file mode 100644 index 1f1c233c..00000000 --- a/Upgrade/analysis/clean.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -rm .analysis.py.swp -rm .prediction.yaml.swp -rm .read_predictions.py.swp -rm ./*.root ./*.pdf ./*.C -rm plots/*.pdf -cd ../InputsTheory || exit -rm ./*.root ./*.pdf ./*.C -git checkout Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy3p0.root -cd - || exit diff --git a/Upgrade/analysis/databases/general.yaml b/Upgrade/analysis/databases/general.yaml deleted file mode 100644 index ef761233..00000000 --- a/Upgrade/analysis/databases/general.yaml +++ /dev/null @@ -1,64 +0,0 @@ -latexparticle: - Lambda_c: "#Lambda_{c}" - Xi_cc: "#Xi_{cc}" - Omega_cc: "#Omega_{cc}" - Omega_ccc: "#Omega_{ccc}" - X3872: "X(3872)" - Jpsitoee: "J/#psi #rightarrow e^{#plus} e^{#minus}" - Chi_c: "#chi_{c1} #rightarrow J/#psi #gamma" - B_plus: "B^{#plus} #rightarrow #bar{D}^{0} #pi^{#plus}" -text_string: - PbPb5p52: "PbPb #sqrt{#it{s}_{NN}} = 5.52 TeV" - pp14p0: "pp #sqrt{#it{s}} = 14 TeV" - absy3p0: "|#it{y}| < 3.0" - absy2p0: "|#it{y}| < 2.0" - absy1p44: "|#it{y}| < 1.44" - absy0p33: "|#it{y}| < 0.33" - Pyhia8mode2: "Pythia 8, mode = 2" - Pyhia8monash: "Pythia 8, monash tune" - SHMC_2021: "SHMC_2021" -statistics: - PbPb2p76: - sigmaAA_b: 7.8 #FIXME these are copied from 5.52 TeV - lumiAA_monthi_invnb: 4.92 #FIXME these are copied from 5.52 TeV - PbPb5p5: - sigmaAA_b: 7.8 #FIXME these are copied from 5.52 TeV - lumiAA_monthi_invnb: 4.92 #FIXME these are copied from 5.52 TeV - PbPb5p52: - sigmaAA_b: 7.8 - lumiAA_monthi_invnb: 35 - KrKr6p46: - sigmaAA_b: 4.06 - lumiAA_monthi_invnb: 123. - ArAr6p3: - sigmaAA_b: 2.6 - lumiAA_monthi_invnb: 1080 - pp14p0: - sigmaAA_b: 0.070 - lumiAA_monthi_invnb: 18000000 - -branchingratio: - Jpsitoee: - central: 0.0594 - Chi_c: - central: 0.020374200 #0.343*0.0594 - Lambda_c: - central: 0.0628 - Xi_cc: #https://arxiv.org/abs/1703.09086 - central: 1.1e-3 - min: 2.2e-4 - max: 2.2e-3 - Omega_cc: - central: 1.08e-3 - min: 2.16e-4 - max: 2.16e-3 - Omega_ccc: - central: 5.4e-05 - min: 2.16e-6 - max: 2.16e-4 - X3872: - # https://pdg.lbl.gov/2020/tables/rpp2020-tab-mesons-c-cbar.pdf - # https://journals.aps.org/prd/pdf/10.1103/PhysRevD.100.094003 - central: 0.0024440100 #0.041 * 0.05961 - B_plus: - central: 0.00018467280 diff --git a/Upgrade/analysis/databases/significance.yaml b/Upgrade/analysis/databases/significance.yaml deleted file mode 100644 index 0bfea591..00000000 --- a/Upgrade/analysis/databases/significance.yaml +++ /dev/null @@ -1,102 +0,0 @@ ---- -Lambda_c: - pp14p0: - absy1p44: - ymin: 40 - ymax: 10000000 - binning: [0., 1., 2., 4., 6., 8., 10.] - efffile: ../InputsExp/Lc_ptdep_pp14p0_absy1p44_scenario3/efficiencies.root - histoeff: eff - bkgfile: ../InputsExp/Lc_ptdep_pp14p0_absy1p44_scenario3/bkgperevent.root - histobkg: hbkg_fromsidebands - theoryfile: ../InputsTheory/Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44.root - histoyield: hLccrossvspt - histoyield_norm: hLccrossvspt -Jpsitoee: - pp14p0: - absy1p44: - ymin: 10 - ymax: 100000 - binning: [0., 1., 2., 3., 4., 5., 7., 10.] - efffile: ../InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/efficiencies.root # this is temporarily the Lc files - # efffile: ../InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/efficiencies.root # this is temporarily the Lc files - histoeff: eff.root - bkgfile: ../InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root # this is temporarily the Lc files - # bkgfile: ../InputsExp/Jpsi_ptdep_pp14p0_absy1p44_scenario3_RICH3sigma/BkgperEvents.root # this is temporarily the Lc files - histobkg: BkgperEvents.root - theoryfile: ../InputsTheory/Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44.root # this is temporarely the Lc file - histoyield: hJpsicrossvspt # to be replaced with the name of the jpsi th histogram - histoyield_norm: hJpsiyieldsvspt_unnorm # to be replaced with the name of the jpsi th histogram -Chi_c: - pp14p0: - absy1p44: - ymin: 0.1 - ymax: 10000 - binning: [0., 0.5, 1., 2., 3., 4., 5., 7., 10., 15.] - efffile: ../InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/efficiency_chic.root - histoeff: eff - bkgfile: ../InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/bkgPerEvents_chic.root - histobkg: hBkgPerEvent - theoryfile: ../InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root - histoyield: hChic1crossvspt - histoyield_norm: hChic1yieldsvspt_unnorm - absy0p33: - ymin: 0.1 - ymax: 10000 - binning: [0., 0.5, 1., 2., 3., 4., 5., 7., 10., 15.] - efffile: ../InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/efficiency_chic.root - histoeff: eff - bkgfile: ../InputsExp/Chic1_ptdep_pp14p0_absy1p44_MIDECAL/bkgPerEvents_chic.root - histobkg: hBkgPerEvent - theoryfile: ../InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root - histoyield: hChic1crossvspt - histoyield_norm: hChic1crossvspt - PbPb5p52: - absy1p44: - ymin: 0.001 - ymax: 100 - binning: [0., 0.5, 1., 2., 3., 4., 5., 7., 10., 15.] - efffile: ../InputsExp/Chic1_ptdep_PbPb5p52_absy1p44_MIDECAL/efficiency_chic.root - histoeff: eff - bkgfile: ../InputsExp/Chic1_ptdep_PbPb5p52_absy1p44_MIDECAL/bkgPerEvents_chic.root - histobkg: hBkgPerEvent - theoryfile: ../InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root - histoyield: hChic1crossvspt - histoyield_norm: hChic1crossvspt - absy0p33: - ymin: 0.001 - ymax: 100 - binning: [0., 0.5, 1., 2., 3., 4., 5., 7., 10., 15.] - efffile: ../InputsExp/Chic1_ptdep_PbPb5p52_absy1p44_MIDECAL/efficiency_chic.root - histoeff: eff - bkgfile: ../InputsExp/Chic1_ptdep_PbPb5p52_absy1p44_MIDECAL/bkgPerEvents_chic.root - histobkg: hBkgPerEvent - theoryfile: ../InputsTheory/Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root - histoyield: hChic1crossvspt - histoyield_norm: hChic1crossvspt -X3872: - pp14p0: - absy1p44: - ymin: 0.00001 - ymax: 100 - binning: [0., 0.5, 1., 2., 3., 4., 5., 7., 10.] - efffile: ../InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/eff.root - histoeff: eff - bkgfile: ../InputsExp/X3872_ptdep_pp14p0_absy1p44_scenario3_noRICH/BkgperEvents.root - histobkg: hBkgPerEvent - theoryfile: ../InputsTheory/x3872_ptdep_Pyhia8monash_pp14p0_absy1p44.root # this is temporarely the Lc file - histoyield: hx3872crossvspt # to be replaced with the name of the jpsi th histogram - histoyield_norm: hx3872crossvspt # to be replaced with the name of the jpsi th histogram -B_plus: - pp14p0: - absy1p44: - ymin: 0.001 - ymax: 10000 - binning: [0, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0, 13.0, 16.0, 20.0, 24.0] - efffile: ../InputsExp/Bplus_ptdep_pp14p0_absy1p44_scenario3/efficiency_bplus.root - histoeff: eff - bkgfile: ../InputsExp/Bplus_ptdep_pp14p0_absy1p44_scenario3/bkgPerEvents_bplus.root - histobkg: hBkgPerEvent - theoryfile: ../InputsTheory/Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44.root - histoyield: hBpluscrossvspt # to be replaced with the name of the jpsi th histogram - histoyield_norm: hBpluscrossvspt # to be replaced with the name of the jpsi th histogram diff --git a/Upgrade/analysis/databases/theory_yields.yaml b/Upgrade/analysis/databases/theory_yields.yaml deleted file mode 100644 index 9af59243..00000000 --- a/Upgrade/analysis/databases/theory_yields.yaml +++ /dev/null @@ -1,126 +0,0 @@ ---- -SHMC_2021: - PbPb5p52: - absy0p5: - Lambda_c: 1.312e+00 - Xi_cc: 5.672e-03 - Omega_cc: 2.663e-03 - Omega_ccc: 1.246e-04 - X3872: 2.807e-03 - absy1p44: - Chi_c: 5.62e-03 #FIXME approximated - absy0p33: - Chi_c: 5.62e-03 #FIXME approximated - KrKr6p46: - absy0p5: - Lambda_c: 3.655e-01 - Xi_cc: 9.865e-04 - Omega_cc: 4.632e-04 - Omega_ccc: 1.231e-05 - X3872: 5.966e-04 - ArAr6p3: - absy0p5: - Lambda_c: 1.270e-01 - Xi_cc: 2.024e-04 - Omega_cc: 9.505e-05 - Omega_ccc: 1.287e-06 - X3872: 1.985e-04 - -Stat_ChoLee_1: - PbPb2p76: - absy0p5: - Xi_cc: 4.90e-03 - Omega_ccc: 5.3e-06 - -Stat_ChoLee_2: - PbPb2p76: - absy0p5: - Xi_cc: 6.70e-03 - Omega_ccc: 5.9e-06 - -Stat_ChoLee_tetra: - PbPb2p76: - absy0p5: - X3872: 3.80e-4 - -Stat_ChoLee_molecule: - PbPb2p76: - absy0p5: - X3872: 4.50e-3 - -Stat_Becc_min: - PbPb5p5: - absy0p5: - Xi_cc: 1.9e-02 - Omega_ccc: 1.0e-03 - -Stat_Becc_max: - PbPb5p5: - absy0p5: - Xi_cc: 0.38 - Omega_ccc: 0.03 - -Catania: - PbPb5p5: - absy0p5: - Xi_cc: 1.8e-03 - Omega_ccc: 3.5e-05 - -Pyhia8mode2: - pp14p0: - absy1p44: - Lambda_c: 1 - B_plus: 1 - -Pyhia8monash: - pp14p0: - absy1p44: - Jpsitoee: 1 - X3872: 1 - Chi_c: 1 - absy0p33: - Chi_c: 1 -comparison_models_AA: - pt_binning: - Lambda_c: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - Xi_cc: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - Omega_cc: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - Omega_ccc: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - X3872: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - - Omega_ccc: - models: ["SHMC_2021", "SHMC_2021", "SHMC_2021", "Stat_ChoLee_1", "Stat_ChoLee_2", "Catania", "SHMC_2021", "SHMC_2021"] - collisions: ["PbPb5p52", "KrKr6p46", "ArAr6p3", "PbPb2p76", "PbPb2p76", "PbPb5p5", "PbPb5p52", "PbPb5p52"] - yrange: ["absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5"] - brmode: ["central", "central", "central", "central", "central", "central", "max", "min"] - colors: [1, 2, 4, 5, 6, 7, 9, 11] - useshape: "Omega_ccc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - ymin: 1.e-5 - ymax: 1.e+10 - Omega_cc: - models: ["SHMC_2021", "SHMC_2021", "SHMC_2021", "SHMC_2021", "SHMC_2021", "SHMC_2021", "SHMC_2021"] - collisions: ["PbPb5p52", "KrKr6p46", "ArAr6p3", "PbPb5p52", "PbPb5p52", "KrKr6p46", "KrKr6p46"] - yrange: ["absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5"] - brmode: ["central", "central", "central", "max", "min", "max", "min"] - colors: [1, 2, 4, 5, 6, 7, 9] - useshape: "Omega_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - ymin: 1.e-2 - ymax: 1.e+10 - Xi_cc: - models: ["SHMC_2021", "Stat_ChoLee_1", "Stat_ChoLee_2", "Catania", "SHMC_2021", "SHMC_2021", "SHMC_2021"] - collisions: ["PbPb5p52", "PbPb2p76", "PbPb2p76", "PbPb5p5", "KrKr6p46", "KrKr6p46", "KrKr6p46"] - yrange: ["absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5"] - brmode: ["central", "central", "central", "central", "central", "min", "max"] - colors: [1, 2, 4, 5, 7, 9, 11] - useshape: "Xi_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - ymin: 1.e-2 - ymax: 1.e+10 - X3872: - models: ["SHMC_2021", "SHMC_2021", "SHMC_2021", "Stat_ChoLee_tetra", "Stat_ChoLee_molecule"] - collisions: ["PbPb5p52", "KrKr6p46", "ArAr6p3", "PbPb2p76", "PbPb2p76"] - yrange: ["absy0p5", "absy0p5", "absy0p5", "absy0p5", "absy0p5"] - brmode: ["central", "central", "central", "central", "central"] - colors: [1, 2, 4, 5, 7] - useshape: "X3872_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - ymin: 1.e-2 - ymax: 1.e+10 diff --git a/Upgrade/analysis/expected_yields.py b/Upgrade/analysis/expected_yields.py deleted file mode 100644 index bf48a8cc..00000000 --- a/Upgrade/analysis/expected_yields.py +++ /dev/null @@ -1,128 +0,0 @@ -# pylint: disable=too-many-locals,too-many-statements, missing-docstring, pointless-string-statement -from array import array - -import yaml - -# pylint: disable=import-error, no-name-in-module, unused-import -from ROOT import TH2F, TCanvas, TFile, TLegend, gPad, gStyle - -""" -Perform comparison between expected yields of the different baryons based -on dN/dy from different theoretical calculations and different assumptions -for the integrated luminosity of the various ion species. -for the moment we use the pT-shape normalized to unity from -arXiv.1907.12786 and we just multiply for dN/dy of each model. -""" - - -def analysis(hadron="Omega_ccc"): - gStyle.SetOptStat(0) - with open(r"databases/theory_yields.yaml") as fileparamyields: - paramyields = yaml.safe_load(fileparamyields) - models = paramyields["comparison_models_AA"][hadron]["models"] - collisions = paramyields["comparison_models_AA"][hadron]["collisions"] - brmodes = paramyields["comparison_models_AA"][hadron]["brmode"] - yranges = paramyields["comparison_models_AA"][hadron]["yrange"] - colors = paramyields["comparison_models_AA"][hadron]["colors"] - useshape = paramyields["comparison_models_AA"][hadron]["useshape"] - ymin = paramyields["comparison_models_AA"][hadron]["ymin"] - ymax = paramyields["comparison_models_AA"][hadron]["ymax"] - binanal = array("d", paramyields["comparison_models_AA"]["pt_binning"][hadron]) - - with open(r"databases/general.yaml") as fileparamgen: - paramgen = yaml.safe_load(fileparamgen) - - histolist = [None] * len(models) - - fin = TFile("../InputsTheory/" + useshape + ".root") - histo_norm = fin.Get("hdNdpt_norm") # this is the pT-shape normalized to unity - - for icase, _ in enumerate(models): - histolist[icase] = histo_norm.Clone( - "dNdpt%s%s%s" % (models[icase], collisions[icase], brmodes[icase]) - ) - canvas = TCanvas("canvas", "A Simple Graph Example", 881, 176, 668, 616) - gStyle.SetOptStat(0) - canvas.SetHighLightColor(2) - canvas.Range(-1.25, -4.625, 11.25, 11.625) - canvas.SetFillColor(0) - canvas.SetBorderMode(0) - canvas.SetBorderSize(2) - canvas.SetLogy() - canvas.SetFrameBorderMode(0) - canvas.SetFrameBorderMode(0) - canvas.cd() - gPad.SetLogy() - - hempty = TH2F("hempty", ";p_{T};Yields", 100, 0.0, 10.0, 100, ymin, ymax) - hempty.GetXaxis().SetTitle("p_{T}") - hempty.GetXaxis().SetLabelFont(42) - hempty.GetXaxis().SetTitleOffset(1) - hempty.GetXaxis().SetTitleFont(42) - hempty.GetYaxis().SetLabelFont(42) - hempty.GetYaxis().SetTitleOffset(1.35) - hempty.GetYaxis().SetTitleFont(42) - hempty.GetZaxis().SetLabelFont(42) - hempty.GetZaxis().SetTitleOffset(1) - hempty.GetZaxis().SetTitleFont(42) - hempty.Draw() - - leg = TLegend(0.1471471, 0.6108291, 0.3018018, 0.8747885, "", "brNDC") - leg.SetBorderSize(1) - leg.SetLineColor(0) - leg.SetLineStyle(1) - leg.SetLineWidth(1) - leg.SetFillColor(0) - leg.SetTextSize(0.022) - leg.SetFillStyle(1001) - - # each case represents a combination of expected dNdy, - # collision type and HP on the branching ratio. - for icase, _ in enumerate(models): - brmode = brmodes[icase] - collision = collisions[icase] - model = models[icase] - yrange = yranges[icase] - - sigma_aa_b = paramgen["statistics"][collision]["sigmaAA_b"] - lumiaa_monthi_invnb = paramgen["statistics"][collision]["lumiAA_monthi_invnb"] - nevt = sigma_aa_b * lumiaa_monthi_invnb * 1e9 # luminosity given in nb-1 - bratio = paramgen["branchingratio"][hadron][brmode] - yieldmid = paramyields[model][collision][yrange][hadron] - text = "%s N_{ev}(%s) = %.1f B, BR=%.5f%%" % ( - model, - collision, - nevt / 1e9, - bratio * 100, - ) - scalef = bratio * nevt * yieldmid - - # before rebinning, the dNdpT is multiplied by the binwidth, - # branching ratios, expected dN/dy and number of events - # so that the yields can be simplied summed in rebinning process. - for ibin in range(histolist[icase].GetNbinsX()): - binwdith = histolist[icase].GetBinWidth(ibin + 1) - yvalue = histolist[icase].GetBinContent(ibin + 1) - histolist[icase].SetBinContent(ibin + 1, binwdith * scalef * yvalue) - histolist[icase] = histolist[icase].Rebin( - len(binanal) - 1, "histo_pred%s%s%s" % (model, collision, brmode), binanal - ) - histolist[icase].SetLineColor(colors[icase]) - histolist[icase].SetMarkerColor(colors[icase]) - histolist[icase].SetLineWidth(2) - histolist[icase].Draw("same") - text = text + " Yield(tot)=%.2f" % (histolist[icase].Integral()) - leg.AddEntry(histolist[icase], text, "pF") - leg.Draw() - canvas.SaveAs(hadron + "_results.pdf") - canvas.SaveAs(hadron + "_results.C") - foutput = TFile("foutput" + hadron + ".root", "recreate") - for icase, _ in enumerate(models): - foutput.cd() - histolist[icase].Write() - - -analysis("Omega_ccc") -analysis("Omega_cc") -analysis("Xi_cc") -analysis("X3872") diff --git a/Upgrade/analysis/plots/placeholder.txt b/Upgrade/analysis/plots/placeholder.txt deleted file mode 100644 index 8b137891..00000000 --- a/Upgrade/analysis/plots/placeholder.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Upgrade/analysis/read_predictions_ptdep_stat_cholee_2_pbpb2p76_absy0p5.py b/Upgrade/analysis/read_predictions_ptdep_stat_cholee_2_pbpb2p76_absy0p5.py deleted file mode 100644 index 13dc1e94..00000000 --- a/Upgrade/analysis/read_predictions_ptdep_stat_cholee_2_pbpb2p76_absy0p5.py +++ /dev/null @@ -1,158 +0,0 @@ -# pylint: disable=too-many-locals,too-many-statements, missing-docstring, pointless-string-statement -from array import array - -import pandas as pd # pylint: disable=import-error -import yaml - -# pylint: disable=import-error, no-name-in-module, unused-import -from ROOT import TH1F, TH2F, TCanvas, TFile, TGraph, TLatex, gPad, gStyle - -""" -read predictions from arXiv.1907.12786. -The predictions are given for PbPb collisions at 2.76 TeV at mid-rapidity -for one unit of rapidity (therefore |y|<0.5). -""" - - -def read_predictions(hadron="Omega_ccc"): - collision = "PbPb" - - # the option below do2pipnorm switches on/off the rinormalization of the - # extracted spectrum, which are given as 2*pi*pt dN/dpT. - # For obtaining the dN/dpt one has to multiply for 2*pi*pt. - do2pipnorm = 1 - energy = 2.76 - - # miny,maxy are the yaxis min and max for plotting reasons only. - if hadron == "Lambda_c": - filename = "Lambda_c_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - miny = 0.0001 - maxy = 10.0 - if hadron == "Xi_cc": - filename = "Xi_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - miny = 1.0e-8 - maxy = 1.0e-2 - if hadron == "Omega_cc": - filename = "Omega_cc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - miny = 1.0e-8 - maxy = 1.0e-2 - if hadron == "Omega_ccc": - filename = "Omega_ccc_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - miny = 1.0e-9 - maxy = 1.0e-5 - if hadron == "X3872": - filename = "X3872_ptdep_Stat_ChoLee_2_PbPb2p76_absy0p5" - miny = 1.0e-8 - maxy = 1.0e-2 - - with open(r"databases/general.yaml") as fileparam: - param = yaml.safe_load(fileparam) - latexname = param["latexparticle"][hadron] - - # the binning of the ROOT histo in which the predictions will - # be saved is hardcoded. - nbins = 50 - minb = 0.0 - maxb = 50.0 - width = (maxb - minb) / float(nbins) - - legendtext = "%s %.2f TeV, arXiv.1907.12786 (Coal.2)" % (collision, energy) - dfpred = pd.read_csv("../InputsTheory/" + filename + ".csv") - ptcand = dfpred["pt"] - cross = dfpred["cross"] - - ptcand_val = array("f", ptcand) - cross_val = array("f", cross) - if do2pipnorm == 1: - cross_val_ptscaled = array( - "f", [2 * 3.14 * a * b for a, b in zip(ptcand_val, cross_val)] - ) - if do2pipnorm == 0: - cross_val_ptscaled = cross_val - - # number of data points in each predictions - npoints = 25 - - grpred = TGraph(npoints, ptcand_val, cross_val_ptscaled) - grpred.SetName("gdNdpt") - grpred.SetLineColor(1) - grpred.SetLineWidth(4) - grpred.SetMarkerColor(1) - grpred.SetMarkerStyle(21) - grpred.SetTitle("") - grpred.GetXaxis().SetTitle("p_{T} (GeV)") - grpred.GetYaxis().SetTitle("dN/dp_{T} (%s) (GeV^{-1})" % latexname) - - histo = TH1F("hdNdpt", ";p_{T}; #Delta N/#Delta p_{T}, |y|<0.5", nbins, minb, maxb) - norm = 0.0 - for i in range(nbins - 1): - # to allow for the use of a arbitrary binning, we use the Eval function - # of TGraph. We set to zero the prediction for xvalues for which data - # are not given (8 GeV/c in this case). Given that most of the - # cross-section is at low pT the bias is negligible - yvalue = grpred.Eval(i * width + width / 2.0) - if i * width + width / 2.0 > 8.0: - yvalue = 0.0 - histo.SetBinContent(i + 1, yvalue) - print(i + 1, i * width + width / 2.0, yvalue) - norm = norm + width * yvalue - fout = TFile("../InputsTheory/" + filename + ".root", "recreate") - fout.cd() - grpred.Write() - histo.Write() - histo_norm = TH1F( - "hdNdpt_norm", - ";p_{T}; #Delta N/#Delta p_{T}, |y|<0.5, norm = 1", - nbins, - minb, - maxb, - ) - for i in range(nbins - 1): - histo_norm.SetBinContent(i + 1, histo.GetBinContent(i + 1) / norm) - histo_norm.Write() - - cpred = TCanvas("cpred", "A Simple Graph Example", 881, 176, 668, 616) - gStyle.SetOptStat(0) - cpred.SetHighLightColor(2) - cpred.Range(-1.25, -4.625, 11.25, 11.625) - cpred.SetFillColor(0) - cpred.SetBorderMode(0) - cpred.SetBorderSize(2) - cpred.SetLogy() - cpred.SetFrameBorderMode(0) - cpred.SetFrameBorderMode(0) - cpred.cd() - gPad.SetLogy() - hempty = TH2F("hempty", ";p_{T};dN/d p_{T}", 100, 0.0, 10.0, 100, miny, maxy) - hempty.GetYaxis().SetTitle("dN/dp_{T} (%s) (GeV^{-1})" % latexname) - hempty.GetXaxis().SetTitle("p_{T}") - hempty.GetXaxis().SetLabelFont(42) - hempty.GetXaxis().SetTitleOffset(1) - hempty.GetXaxis().SetTitleFont(42) - hempty.GetYaxis().SetLabelFont(42) - hempty.GetYaxis().SetTitleOffset(1.35) - hempty.GetYaxis().SetTitleFont(42) - hempty.GetZaxis().SetLabelFont(42) - hempty.GetZaxis().SetTitleOffset(1) - hempty.GetZaxis().SetTitleFont(42) - hempty.Draw() - grpred.Draw("Psame") - histo.SetLineColor(1) - histo.SetLineWidth(2) - histo.Draw("same") - tex = TLatex() - tex.SetNDC() - tex.SetTextFont(40) - tex.SetTextColor(1) - tex.SetTextSize(0.03) - tex.SetTextAlign(12) - tex.DrawLatex(0.12, 0.85, legendtext + ", dNdy=%.8f" % norm) - # tex.Draw() - cpred.SaveAs("plots/" + filename + ".pdf") - - -read_predictions("Omega_ccc") -read_predictions("Omega_cc") -read_predictions("Xi_cc") -read_predictions("X3872") -read_predictions("Lambda_c") diff --git a/Upgrade/analysis/significance.py b/Upgrade/analysis/significance.py deleted file mode 100644 index 8bde2793..00000000 --- a/Upgrade/analysis/significance.py +++ /dev/null @@ -1,242 +0,0 @@ -# pylint: disable=too-many-locals,too-many-statements, missing-docstring, pointless-string-statement -from array import array -from math import sqrt - -import yaml - -# pylint: disable=import-error, no-name-in-module, unused-import, too-many-arguments -from ROOT import TH2F, TCanvas, TFile, TLatex, gPad, gStyle - -""" -Macro to perform significance estimation of a given decay channel -in a given collision system. The ingredients are: - - efficiency vs pt - - estimated background yield within 3sigma below the peak / event - bkgperevent is already multiplied by binwidth - - expected signal yield / event = dN/dpT * binwidth * BR * efficiency -""" - - -def analysis( - hadron="Lambda_c", - collision="pp14p0", - yrange="absy3p0", - brmode="central", - model="Pyhia8mode2", - use_unnorm=1, -): - gStyle.SetOptStat(0) - with open(r"databases/significance.yaml") as filesignificance: - paramsignificance = yaml.safe_load(filesignificance) - ymin = paramsignificance[hadron][collision][yrange]["ymin"] - ymax = paramsignificance[hadron][collision][yrange]["ymax"] - # bin of the final analysis, has to be the binning of efficiency, bkg histos - binanal = array("d", paramsignificance[hadron][collision][yrange]["binning"]) - nfileyieldth = paramsignificance[hadron][collision][yrange]["theoryfile"] - - nfileeff = paramsignificance[hadron][collision][yrange]["efffile"] - nhistoeff = paramsignificance[hadron][collision][yrange]["histoeff"] - nfilebkg = paramsignificance[hadron][collision][yrange]["bkgfile"] - nhistobkg = paramsignificance[hadron][collision][yrange]["histobkg"] - nhistoyieldth = paramsignificance[hadron][collision][yrange]["histoyield"] - nhistoyieldth_norm = paramsignificance[hadron][collision][yrange]["histoyield_norm"] - - with open(r"databases/general.yaml") as fileparamgen: - paramgen = yaml.safe_load(fileparamgen) - with open(r"databases/theory_yields.yaml") as fileyields: - paramyields = yaml.safe_load(fileyields) - - textcollision = paramgen["text_string"][collision] - textrapid = paramgen["text_string"][yrange] - textmodel = paramgen["text_string"][model] - - sigma_aa_b = paramgen["statistics"][collision]["sigmaAA_b"] - lumiaa_monthi_invnb = paramgen["statistics"][collision]["lumiAA_monthi_invnb"] - nevt = sigma_aa_b * lumiaa_monthi_invnb * 1e9 - # nevt = 2.*1e9 - bratio = paramgen["branchingratio"][hadron][brmode] - decaychannel = paramgen["latexparticle"][hadron] - - if hadron == "Chi_c" and yrange == "absy1p44": - bratio *= 0.8 # chi_c1 and chi_c2 are measured together: non-weighted average of their BRs - decaychannel = "#chi_{c} #rightarrow J/#psi #gamma" - - yieldmid = paramyields[model][collision][yrange][hadron] - text = "%s, N_{ev} = %f 10^{9}" % (textmodel, (float)(nevt) / 1.0e9) - text_a = "%s, %s, BR=%.2f%%" % (decaychannel, textrapid, bratio * 100) - text_b = "ALICE3 projection, with IRIS, no PID, %s" % textcollision - fileeff = TFile(nfileeff) - histoeff = fileeff.Get(nhistoeff) - filebkg = TFile(nfilebkg) - hbkgperevent = filebkg.Get(nhistobkg) - - fileyieldth = TFile(nfileyieldth) - histoyieldth = None - - if use_unnorm == 1: - histodndptth = fileyieldth.Get(nhistoyieldth) - histodndptth.Scale(1.0 / 70000.0) # TEMPORARY this is a fix to account for the - # conversion from a cross-section in mub - # to yields, sigma=70000 mub - else: - histodndptth = fileyieldth.Get(nhistoyieldth_norm) - integral = 0 - for ibin in range(histodndptth.GetNbinsX()): - binwdith = histodndptth.GetBinWidth(ibin + 1) - integral += histodndptth.GetBinContent(ibin + 1) * binwdith - histodndptth.Scale(1.0 / integral) - histodndptth.Scale(yieldmid) - print("yieldmid = %f\n", yieldmid) - integral = 0 - for ibin in range(histodndptth.GetNbinsX()): - binwdith = histodndptth.GetBinWidth(ibin + 1) - integral += histodndptth.GetBinContent(ibin + 1) * binwdith - print("yieldmid = %f\n", yieldmid) - - if hadron == "Chi_c" and collision == "pp14p0": - print("scaling signal yield by 0.1") - histodndptth.Scale(0.1) # because pythia8 is wrong by a factor ~10 - - if hadron == "Chi_c" and yrange == "absy1p44": - print("scaling bkg by 2*2, and signal by 3.4") - hbkgperevent.Scale( - 2 - ) # to take approximately into account the worsening of the sig/bkg in the full - # rapidity range (PbWO4 and W+Sci) - hbkgperevent.Scale( - 2 - ) # because in |y| < 1.44 we sum chi_c1 and chi_c2 (states are not resolved) - histodndptth.Scale( - 3.4 - ) # because in |y| < 1.44 we sum chi_c1 and chi_c2 (states are not resolved). - # Assuming chi_c2/chi_c1 (!!) from Pythia8 - - if hadron == "Chi_c" and yrange == "absy0p33": - print("scaling signal and bkg by 0.23, from |y| < 1.44 to |y| < 0.33") - hbkgperevent.Scale( - 0.23 - ) # to take into account the reduction of the statistics from |y| < 1.44 to |y| < 0.33 - # (the input file for chi_c is always |y| < 1.44) - histodndptth.Scale( - 0.23 - ) # to take into account the reduction of the statistics from |y| < 1.44 to |y| < 0.33 - # (the input file for chi_c is always |y| < 1.44) - - histoyieldth = histodndptth.Clone("histoyieldth") - - for ibin in range(histoyieldth.GetNbinsX()): - binwdith = histoyieldth.GetBinWidth(ibin + 1) - yieldperevent = histoyieldth.GetBinContent(ibin + 1) * binwdith * bratio - histoyieldth.SetBinContent(ibin + 1, yieldperevent) - histoyieldth.SetBinError(ibin + 1, 0.0) - histoyieldth = histoyieldth.Rebin(len(binanal) - 1, "histoyieldth", binanal) - histosignfperevent = histoyieldth.Clone("histosignfperevent") - histosignf = histoyieldth.Clone("histosignf") - histosigoverbkg = histoyieldth.Clone("histosigoverbkg") - - canvas = TCanvas("canvas", "A Simple Graph Example", 881, 176, 668, 616) - gStyle.SetOptStat(0) - canvas.SetHighLightColor(2) - canvas.Range(-1.25, -4.625, 11.25, 11.625) - canvas.SetFillColor(0) - canvas.SetBorderMode(0) - canvas.SetBorderSize(2) - canvas.SetLogy() - canvas.SetFrameBorderMode(0) - canvas.SetFrameBorderMode(0) - canvas.cd() - gPad.SetLogy() - - hempty = TH2F( - "hempty", - ";p_{T} (GeV/c); Significance(3#sigma)", - 100, - 0.0, - 10.0, - 100, - ymin, - ymax, - ) - hempty.GetXaxis().SetTitle("p_{T} (GeV/c)") - hempty.GetXaxis().SetLabelFont(42) - hempty.GetXaxis().SetTitleOffset(1) - hempty.GetXaxis().SetTitleFont(42) - hempty.GetYaxis().SetLabelFont(42) - hempty.GetYaxis().SetTitleOffset(1.35) - hempty.GetYaxis().SetTitleFont(42) - hempty.GetZaxis().SetLabelFont(42) - hempty.GetZaxis().SetTitleOffset(1) - hempty.GetZaxis().SetTitleFont(42) - hempty.Draw() - - histosignf = histosignfperevent.Clone("histosignf") - for ibin in range(histoyieldth.GetNbinsX()): - yieldperevent = histoyieldth.GetBinContent(ibin + 1) - bkgperevent = hbkgperevent.GetBinContent(ibin + 1) - eff = histoeff.GetBinContent(ibin + 1) - signalperevent = eff * yieldperevent - significanceperevent = 0 - if bkgperevent > 0: - significanceperevent = signalperevent / sqrt(signalperevent + bkgperevent) - signaloverbkg = 0 - if bkgperevent > 0: - signaloverbkg = signalperevent / bkgperevent - histosignfperevent.SetBinContent(ibin + 1, significanceperevent) - histosignfperevent.SetBinError(ibin + 1, 0.0) - histosignf.SetBinContent(ibin + 1, significanceperevent * sqrt(nevt)) - histosignf.SetBinError(ibin + 1, 0.0) - histosigoverbkg.SetBinContent(ibin + 1, signaloverbkg) - histosigoverbkg.SetBinError(ibin + 1, 0.0) - - histosignfperevent.SetLineColor(1) - histosignfperevent.SetMarkerColor(1) - histosignfperevent.SetLineWidth(1) - histosignf.SetLineColor(1) - histosignf.SetMarkerColor(1) - histosignf.SetLineWidth(2) - histosignf.Draw("same") - t_b = TLatex() - t_b.SetNDC() - t_b.SetTextFont(42) - t_b.SetTextColor(1) - t_b.SetTextSize(0.035) - t_b.SetTextAlign(12) - t_b.DrawLatex(0.2, 0.85, text_b) - t_c = TLatex() - t_c.SetNDC() - t_c.SetTextFont(42) - t_c.SetTextColor(1) - t_c.SetTextSize(0.03) - t_c.SetTextAlign(12) - t_c.DrawLatex(0.2, 0.80, text) - t_a = TLatex() - t_a.SetNDC() - t_a.SetTextFont(42) - t_a.SetTextColor(1) - t_a.SetTextSize(0.035) - t_a.SetTextAlign(12) - t_a.DrawLatex(0.2, 0.75, text_a) - canvas.SaveAs(hadron + "_" + collision + "_" + yrange + "_results.pdf") - canvas.SaveAs(hadron + "_" + collision + "_" + yrange + "_results.C") - - foutput = TFile( - "foutput" + hadron + "_" + collision + "_" + yrange + ".root", "recreate" - ) - foutput.cd() - histoeff.Write() - hbkgperevent.Write() - histosignfperevent.Write() - histoyieldth.Write() - histosignf.Write() - histodndptth.Write() - histosigoverbkg.Write() - - -# analysis("Lambda_c", "pp14p0", "absy1p44", "central", "Pyhia8mode2", 1) -# analysis("Jpsitoee", "pp14p0", "absy1p44", "central", "Pyhia8monash", 1) -# analysis("Chi_c", "pp14p0", "absy1p44", "central", "Pyhia8monash", 1) -# analysis("Chi_c", "pp14p0", "absy0p33", "central", "Pyhia8monash", 1) -# analysis("Chi_c", "PbPb5p52", "absy1p44", "central", "SHMC_2021", 0) -# analysis("Chi_c", "PbPb5p52", "absy0p33", "central", "SHMC_2021", 0) -# analysis("X3872", "pp14p0", "absy1p44", "central", "Pyhia8monash", 1) -analysis("B_plus", "pp14p0", "absy1p44", "central", "Pyhia8mode2", 1) diff --git a/Upgrade/g4me/README.md b/Upgrade/g4me/README.md deleted file mode 100644 index cf07028d..00000000 --- a/Upgrade/g4me/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# g4me analysis code - -## Introduction - -The purpose of this repository is to collect the macros and utilities to study the performances of the ALICE3 detector with heavy-flavoured hadrons, including charmed and beauty hadrons, HF jets and quarkonia. For these studies, the ALICE3 detector setup is simulated using the [DelphesO2](https://github.com/AliceO2Group/DelphesO2) package, while the heavy-flavour reconstruction is performed using the [O2](https://github.com/AliceO2Group/AliceO2) analysis framework. diff --git a/Upgrade/g4me/analysis/ExtractAccMaps2D.C b/Upgrade/g4me/analysis/ExtractAccMaps2D.C deleted file mode 100644 index adec9994..00000000 --- a/Upgrade/g4me/analysis/ExtractAccMaps2D.C +++ /dev/null @@ -1,68 +0,0 @@ -#include "TFile.h" -#include "TH1D.h" -#include "TH2D.h" -#include "TH3D.h" - -enum part_t { kMIDElectron, - kMIDMuon, - kMIDPion, - kMIDKaon, - kMIDProton, - kNPartTypes }; -const char* partName[kNPartTypes] = {"electron", "muon", "pion", "kaon", "proton"}; - -enum { kGoodMatch, - kFakeMatch, - kAllMatch }; -const char* tagMatch[3] = {"GoodMatch", "FakeMatch", "allMatch"}; - -TH2D *accEffMuonPID_2D[kNPartTypes] = {0}, *gen[kNPartTypes] = {0}, *recWithMuonPID[kNPartTypes][3] = {{0}}, *fakeMatchRate[kNPartTypes] = {0}; - -TH3D* hChi2VsMomVsEtaMatchedTracks[kNPartTypes][2] = {{0}}; -TH2D* hMomVsEtaITSTracks[kNPartTypes] = {0}; - -TFile* fileIn = 0; - -//==================================================================================================================================================== - -void ExtractAccMaps2D(const char* inputFileName = "histosTracking.root", double chi2Max = 1.5) -{ - - fileIn = new TFile(inputFileName); - - for (int iPart = 0; iPart < kNPartTypes; iPart++) { - - gen[iPart] = (TH2D*)fileIn->Get(Form("hMomVsEtaITSTracks_%s", partName[iPart])); - - for (int iMatch = 0; iMatch < 2; iMatch++) { - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch] = (TH3D*)fileIn->Get(Form("hChi2VsMomVsEtaMatchedTracks_%s_%s", partName[iPart], tagMatch[iMatch])); - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->GetXaxis()->SetRangeUser(0, chi2Max); - recWithMuonPID[iPart][iMatch] = (TH2D*)hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->Project3D("zy"); - recWithMuonPID[iPart][iMatch]->SetName(Form("recWithMuonPID_%s_%s", partName[iPart], tagMatch[iMatch])); - } - - recWithMuonPID[iPart][kAllMatch] = (TH2D*)recWithMuonPID[iPart][kGoodMatch]->Clone(Form("recWithMuonPID_%s_%s", partName[iPart], tagMatch[kAllMatch])); - recWithMuonPID[iPart][kAllMatch]->Add(recWithMuonPID[iPart][kFakeMatch]); - fakeMatchRate[iPart] = (TH2D*)recWithMuonPID[iPart][kFakeMatch]->Clone(Form("fakeMatchRate_%s", partName[iPart])); - fakeMatchRate[iPart]->Divide(recWithMuonPID[iPart][kAllMatch]); - fakeMatchRate[iPart]->SetTitle(Form("Fake match probability for for %ss", partName[iPart])); - - accEffMuonPID_2D[iPart] = (TH2D*)recWithMuonPID[iPart][kAllMatch]->Clone(Form("accEffMuonPID_2D_%s", partName[iPart])); - accEffMuonPID_2D[iPart]->Divide(gen[iPart]); - accEffMuonPID_2D[iPart]->SetTitle(Form("Acc #times Eff #times #muPID for %ss", partName[iPart])); - } - - TFile* fileOut = new TFile(Form("accEffMuonPID.MaxChi2_%3.1f.root", chi2Max), "recreate"); - - for (int iPart = 0; iPart < kNPartTypes; iPart++) { - - gen[iPart]->Write(); - fakeMatchRate[iPart]->Write(); - accEffMuonPID_2D[iPart]->Write(); - - for (int iMatch = 0; iMatch < 3; iMatch++) - recWithMuonPID[iPart][iMatch]->Write(); - } - - fileOut->Close(); -} diff --git a/Upgrade/g4me/analysis/GetPzOverPt.C b/Upgrade/g4me/analysis/GetPzOverPt.C deleted file mode 100644 index 7ae21c1a..00000000 --- a/Upgrade/g4me/analysis/GetPzOverPt.C +++ /dev/null @@ -1,20 +0,0 @@ -//converts eta into pzOverPt - -void GetPzOverPt() -{ - const Double_t etaMin = -1.60; - const Double_t etaMax = 1.60; - const Double_t step = 0.10; - Int_t nbEta = (etaMax - etaMin) / step + 1; - TLorentzVector convertor; - Double_t pzOverpt = 0, eta = 0; - - FILE* myfile = fopen("File_pzOverpt.txt", "w"); - for (int i = 0; i < nbEta; i++) { - eta = etaMin + i * step; - convertor.SetPtEtaPhiM(1, eta, 0, 1); - pzOverpt = convertor.Pz() / convertor.Px(); - fprintf(myfile, "%4.2f %4.2f\n", eta, pzOverpt); - } - fclose(myfile); -} diff --git a/Upgrade/g4me/analysis/MIDTrackletSelector.cxx b/Upgrade/g4me/analysis/MIDTrackletSelector.cxx deleted file mode 100644 index de526536..00000000 --- a/Upgrade/g4me/analysis/MIDTrackletSelector.cxx +++ /dev/null @@ -1,188 +0,0 @@ -#include "MIDTrackletSelector.h" -#include "THnSparse.h" -#include "TH3.h" -#include "TH2.h" -#include "TFile.h" -#include "TVector3.h" -#include "TMath.h" - -MIDTrackletSelector::MIDTrackletSelector() -{ - - mInputFile = NULL; - mTrackletAcc3D = NULL; - mTrackletAcc2D = NULL; - - for (int iCharge = 0; iCharge < kNChargeOptions; iCharge++) - mTrackletAcc4D[iCharge] = NULL; - - mIsSelectorSetup = kFALSE; -} - -//========================================================================================================== - -bool MIDTrackletSelector::Setup(const Char_t* nameInputFile = "muonTrackletAcceptance.root") -{ - - mInputFile = new TFile(nameInputFile); - if (!mInputFile) { - printf("File %s not found\n", nameInputFile); - return kFALSE; - } - if (!(mInputFile->IsOpen())) { - printf("File %s not open\n", nameInputFile); - return kFALSE; - } - - mTrackletAcc4D[kMuonMinus] = (THnSparse*)mInputFile->Get("trackletAcceptanceMuMinus"); - if (!mTrackletAcc4D[kMuonMinus]) { - printf("Object not found in file %s, quitting\n", mInputFile->GetName()); - return kFALSE; - } - - mTrackletAcc4D[kMuonPlus] = (THnSparse*)mInputFile->Get("trackletAcceptanceMuPlus"); - if (!mTrackletAcc4D[kMuonPlus]) { - printf("Object not found in file %s, quitting\n", mInputFile->GetName()); - return kFALSE; - } - - mTrackletAcc4D[kAllMuons] = (THnSparse*)mTrackletAcc4D[kMuonMinus]->Clone("trackletAcceptanceAllMuons"); - mTrackletAcc4D[kAllMuons]->Add(mTrackletAcc4D[kMuonPlus]); - - mTrackletAcc3D = (TH3C*)mTrackletAcc4D[kAllMuons]->Projection(0, 1, 2); - mTrackletAcc2D = (TH2C*)mTrackletAcc4D[kAllMuons]->Projection(1, 0); - - mEtaMax = mTrackletAcc4D[kAllMuons]->GetAxis(2)->GetXmax(); - mMomMax = mTrackletAcc4D[kAllMuons]->GetAxis(3)->GetBinCenter(mTrackletAcc4D[kAllMuons]->GetAxis(3)->GetNbins()); - mMomMin = mTrackletAcc4D[kAllMuons]->GetAxis(3)->GetBinCenter(1); - - mIsSelectorSetup = kTRUE; - - printf("Setup of MIDTrackletSelector successfully completed\n"); - return kTRUE; -} - -//==================================================================================================================================================== - -bool MIDTrackletSelector::IsMIDTrackletSelected(TVector3 posHitLayer1, TVector3 posHitLayer2, bool evalEta = kFALSE) -{ - - if (!mIsSelectorSetup) { - printf("ERROR: MIDTrackletSelector not initialized\n"); - return kFALSE; - } - - if (posHitLayer1.Perp() > posHitLayer2.Perp()) { - TVector3 tmp = posHitLayer1; - posHitLayer1 = posHitLayer2; - posHitLayer2 = tmp; - } - - double deltaPhi = posHitLayer2.DeltaPhi(posHitLayer1); - double deltaEta = posHitLayer2.Eta() - posHitLayer1.Eta(); - - if (evalEta) { - double eta = posHitLayer1.Eta(); - if (abs(eta) > mEtaMax) - return kFALSE; - return mTrackletAcc3D->GetBinContent(mTrackletAcc3D->FindBin(deltaEta, deltaPhi, eta)); - } - - else - return mTrackletAcc2D->GetBinContent(mTrackletAcc2D->FindBin(deltaEta, deltaPhi)); - - return kFALSE; -} - -//==================================================================================================================================================== - -bool MIDTrackletSelector::IsMIDTrackletSelectedWithSearchSpot(TVector3 posHitLayer1, TVector3 posHitLayer2, TVector3 posITStrackLayer1, bool evalEta = kFALSE) -{ - - if (!mIsSelectorSetup) { - printf("ERROR: MIDTrackletSelector not initialized\n"); - return kFALSE; - } - - if (posHitLayer1.Perp() > posHitLayer2.Perp()) { - TVector3 tmp = posHitLayer1; - posHitLayer1 = posHitLayer2; - posHitLayer2 = tmp; - } - - double deltaPhiITS = posITStrackLayer1.DeltaPhi(posHitLayer1); - double deltaEtaITS = posITStrackLayer1.Eta() - posHitLayer1.Eta(); - - if (TMath::Sqrt(deltaPhiITS * deltaPhiITS + deltaEtaITS * deltaEtaITS) > 0.2) - return kFALSE; - - return IsMIDTrackletSelected(posHitLayer1, posHitLayer2, evalEta); -} - -//==================================================================================================================================================== - -bool MIDTrackletSelector::IsMIDTrackletSelected(TVector3 posHitLayer1, TVector3 posHitLayer2, TVector3 trackITS, int charge = 0) -{ - - if (!mIsSelectorSetup) { - printf("ERROR: MIDTrackletSelector not initialized\n"); - return kFALSE; - } - - if (posHitLayer1.Perp() > posHitLayer2.Perp()) { - TVector3 tmp = posHitLayer1; - posHitLayer1 = posHitLayer2; - posHitLayer2 = tmp; - } - - double deltaPhi = posHitLayer2.DeltaPhi(posHitLayer1); - double deltaEta = posHitLayer2.Eta() - posHitLayer1.Eta(); - double eta = trackITS.Eta(); - double mom = trackITS.Mag(); - - if (abs(eta) > mEtaMax) - return kFALSE; - - if (mom > mMomMax) - mom = mMomMax; - if (mom < mMomMin) - mom = mMomMin; - - double coord[4] = {deltaEta, deltaPhi, eta, mom}; - - if (charge > 0) - return mTrackletAcc4D[kMuonPlus]->GetBinContent(mTrackletAcc4D[kMuonPlus]->GetBin(coord)); - else if (charge < 0) - return mTrackletAcc4D[kMuonMinus]->GetBinContent(mTrackletAcc4D[kMuonMinus]->GetBin(coord)); - else - return mTrackletAcc4D[kAllMuons]->GetBinContent(mTrackletAcc4D[kAllMuons]->GetBin(coord)); - - return kFALSE; -} - -//==================================================================================================================================================== - -bool MIDTrackletSelector::IsMIDTrackletSelectedWithSearchSpot(TVector3 posHitLayer1, TVector3 posHitLayer2, TVector3 trackITS, TVector3 posITStrackLayer1, int charge = 0) -{ - - if (!mIsSelectorSetup) { - printf("ERROR: MIDTrackletSelector not initialized\n"); - return kFALSE; - } - - if (posHitLayer1.Perp() > posHitLayer2.Perp()) { - TVector3 tmp = posHitLayer1; - posHitLayer1 = posHitLayer2; - posHitLayer2 = tmp; - } - - double deltaPhiITS = posITStrackLayer1.DeltaPhi(posHitLayer1); - double deltaEtaITS = posITStrackLayer1.Eta() - posHitLayer1.Eta(); - - if (TMath::Sqrt(deltaPhiITS * deltaPhiITS + deltaEtaITS * deltaEtaITS) > 0.2) - return kFALSE; - - return IsMIDTrackletSelected(posHitLayer1, posHitLayer2, trackITS, charge); -} - -//==================================================================================================================================================== diff --git a/Upgrade/g4me/analysis/MIDTrackletSelector.h b/Upgrade/g4me/analysis/MIDTrackletSelector.h deleted file mode 100644 index 2594b01a..00000000 --- a/Upgrade/g4me/analysis/MIDTrackletSelector.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef MIDTrackletSelector_h -#define MIDTrackletSelector_h - -#include "THnSparse.h" -#include "TH3.h" -#include "TH2.h" -#include "TFile.h" -#include "TVector3.h" -#include "TMath.h" - -using namespace std; - -class MIDTrackletSelector -{ - - public: - MIDTrackletSelector(); - ~MIDTrackletSelector() = default; - - enum { kMuonMinus, - kMuonPlus, - kAllMuons, - kNChargeOptions }; - - bool Setup(const Char_t* nameInputFile); - bool IsSelectorSetup() { return mIsSelectorSetup; } - bool IsMIDTrackletSelected(TVector3 posHitLayer1, TVector3 posHitLayer2, bool evalEta); - bool IsMIDTrackletSelected(TVector3 posHitLayer1, TVector3 posHitLayer2, TVector3 trackITS, int charge); - bool IsMIDTrackletSelectedWithSearchSpot(TVector3 posHitLayer1, TVector3 posHitLayer2, TVector3 posITStrackLayer1, bool evalEta); - bool IsMIDTrackletSelectedWithSearchSpot(TVector3 posHitLayer1, TVector3 posHitLayer2, TVector3 trackITS, TVector3 posITStrackLayer1, int charge); - - TH2C* GetAcc2D() { return mTrackletAcc2D; } - TH3C* GetAcc3D() { return mTrackletAcc3D; } - THnSparse* GetAcc4D(int charge) { return mTrackletAcc4D[charge]; } - - protected: - TFile* mInputFile; - TH3C* mTrackletAcc3D; - TH2C* mTrackletAcc2D; - THnSparse* mTrackletAcc4D[kNChargeOptions]; - bool mIsSelectorSetup; - double mEtaMax; - double mMomMax; - double mMomMin; -}; - -#endif diff --git a/Upgrade/g4me/analysis/PrepareTracksForMatchingAndFit.C b/Upgrade/g4me/analysis/PrepareTracksForMatchingAndFit.C deleted file mode 100644 index 0609a199..00000000 --- a/Upgrade/g4me/analysis/PrepareTracksForMatchingAndFit.C +++ /dev/null @@ -1,245 +0,0 @@ -#include "io.C" -#include "style.C" -#include -#include "TTree.h" -#include "TFile.h" -#include -#include "TVector3.h" -#include "TMatrixDSym.h" -#include "TClonesArray.h" -#include "TMath.h" -#include "TDatabasePDG.h" -#include "TParticle.h" -#include "TObjString.h" -#include "TSystem.h" -#include "TROOT.h" -#include "TRandom.h" -#include "TDatime.h" - -#include "MIDTrackletSelector.h" - -#ifdef __MAKECINT__ -#pragma link C++ class vector < TClonesArray> + ; -#endif - -// IDs of the two MIS layers, taken from the PVIDMapFile.dat produced by g4me -const int idLayerMID1 = 300; -const int idLayerMID2 = 301; - -const double rMaxITS = 110; // (in cm). Above this radius, hits are not considered as belonging to the ITS - -// This macro reads an output file from a g4me simulation and writes a TTree containing, event per event, a list of ITS tracks (i.e. TClonesArray -// of ITS hits from a same track) and MID tracklets (i.e. any combination of hits from the 1st and 2nd MID layers, passing the selections -// implemented in the macro IsMIDTrackletSelected.C) as an input for the fit routine based on GenFit - -TTree* treeOut = 0; - -IO_t io; - -Bool_t IsTrackCharged(Int_t iTrack); -Bool_t IsTrackInteresting(Int_t iTrack); - -//==================================================================================================================================================== - -void PrepareTracksForMatchingAndFit(const char* inputFileName, const char* outputFileName, const double hitMinP = 0.050) -{ - - TDatime t; - gRandom->SetSeed(t.GetDate() + t.GetYear() * t.GetHour() * t.GetMinute() * t.GetSecond()); - - MIDTrackletSelector* trackletSel = new MIDTrackletSelector(); - if (!(trackletSel->Setup("muonTrackletAcceptance.root"))) { - printf("MID tracklet selector could not be initialized. Quitting.\n"); - return; - } - - style(); - - const double resolutionITS = 5.e-4; // 5 um - const double resolutionMID = 100.e-4; // 100 um - - io.open(inputFileName); - auto nEvents = io.nevents(); - - int nPreparedTracksITS = 0, nHits_MIDLayer1 = 0, nHits_MIDLayer2 = 0, nPreparedTrackletsMID = 0; - - TFile* fileOut = new TFile(outputFileName, "recreate"); - treeOut = new TTree("TracksToBeFitted", "Tracks to be fitted"); - - TClonesArray trackCandidatesHitPosITS("TClonesArray"); // array of hit position arrays (for the ITS tracks) - TClonesArray trackCandidatesHitCovITS("TClonesArray"); // array of hit covariance arrays (for the ITS tracks) - TClonesArray trackCandidatesHitPosMID("TClonesArray"); // array of hit position arrays (for the MID tracklets) - TClonesArray trackCandidatesHitCovMID("TClonesArray"); // array of hit covariance arrays (for the MID tracklets) - TClonesArray particlesITS("TParticle"); // array of particles corresponding to the ITS tracks - std::vector idTrackITS; - std::vector idTrackMID; - - treeOut->Branch("TrackCandidatesHitPosITS", &trackCandidatesHitPosITS, 256000, -1); - treeOut->Branch("TrackCandidatesHitCovITS", &trackCandidatesHitCovITS, 256000, -1); - treeOut->Branch("TrackCandidatesHitPosMID", &trackCandidatesHitPosMID, 256000, -1); - treeOut->Branch("TrackCandidatesHitCovMID", &trackCandidatesHitCovMID, 256000, -1); - treeOut->Branch("ParticlesITS", &particlesITS, 256000, -1); - treeOut->Branch("idTrackITS", &idTrackITS); - treeOut->Branch("idTrackMID", &idTrackMID); - - TVector3 pos, mom; - TMatrixDSym covITS(3); - for (int i = 0; i < 3; i++) - covITS(i, i) = resolutionITS * resolutionITS; - TMatrixDSym covMID(3); - for (int i = 0; i < 3; i++) - covMID(i, i) = resolutionMID * resolutionMID; - - // loop over events - - for (int iEv = 0; iEv < nEvents; iEv++) { - - io.event(iEv); - - trackCandidatesHitPosITS.Clear(); - trackCandidatesHitCovITS.Clear(); - trackCandidatesHitPosMID.Clear(); - trackCandidatesHitCovMID.Clear(); - particlesITS.Clear(); - idTrackITS.clear(); - idTrackMID.clear(); - - std::vector allTracksHitPosITS(io.tracks.n, TClonesArray("TVector3")); - std::vector allTracksHitCovITS(io.tracks.n, TClonesArray("TMatrixDSym")); - - std::vector arrayHitID_MIDLayer1(io.hits.n, -1); - std::vector arrayHitID_MIDLayer2(io.hits.n, -1); - nHits_MIDLayer1 = 0; - nHits_MIDLayer2 = 0; - - for (int iHit = 0; iHit < io.hits.n; iHit++) { - - // filling arrays of hit IDs from MID layers (coming from any charged tracks) - - auto trackID = io.hits.trkid[iHit]; - - if (!(IsTrackCharged(trackID))) - continue; - - mom.SetXYZ(io.hits.px[iHit], io.hits.py[iHit], io.hits.pz[iHit]); - if (mom.Mag() < hitMinP) - continue; - - if (io.hits.lyrid[iHit] == idLayerMID1) - arrayHitID_MIDLayer1[nHits_MIDLayer1++] = iHit; - if (io.hits.lyrid[iHit] == idLayerMID2) - arrayHitID_MIDLayer2[nHits_MIDLayer2++] = iHit; - - // filling arrays of hits from ITS tracks (only for interesting tracks: charged and primary). - // Hits from ITS are by definition all the hits having radius < rMaxITS - - if (!(IsTrackInteresting(trackID))) - continue; - - pos.SetXYZ(gRandom->Gaus(io.hits.x[iHit], resolutionITS), gRandom->Gaus(io.hits.y[iHit], resolutionITS), gRandom->Gaus(io.hits.z[iHit], resolutionITS)); - if (pos.Perp() < rMaxITS) { - new ((allTracksHitPosITS.at(trackID))[(allTracksHitPosITS.at(trackID)).GetEntries()]) TVector3(pos); - new ((allTracksHitCovITS.at(trackID))[(allTracksHitCovITS.at(trackID)).GetEntries()]) TMatrixDSym(covITS); - } - } - - // filling the final arrays with the hit information from good ITS tracks - - nPreparedTracksITS = 0; - - for (int iTrack = 0; iTrack < io.tracks.n; iTrack++) { - if (IsTrackInteresting(iTrack)) { - new (trackCandidatesHitPosITS[nPreparedTracksITS]) TClonesArray(allTracksHitPosITS.at(iTrack)); - new (trackCandidatesHitCovITS[nPreparedTracksITS]) TClonesArray(allTracksHitCovITS.at(iTrack)); - idTrackITS.emplace_back(iTrack); - TParticle part; - part.SetPdgCode(io.tracks.pdg[iTrack]); - part.SetProductionVertex(io.tracks.vx[iTrack], io.tracks.vy[iTrack], io.tracks.vz[iTrack], io.tracks.vt[iTrack]); - part.SetMomentum(io.tracks.px[iTrack], io.tracks.py[iTrack], io.tracks.pz[iTrack], io.tracks.e[iTrack]); - new (particlesITS[nPreparedTracksITS]) TParticle(part); - nPreparedTracksITS++; - } - } - - // filling the final arrays with the hit information from selected MID tracklets - - nPreparedTrackletsMID = 0; - TVector3 posHitMID1, posHitMID2; - int idHitLayer1, idHitLayer2, trackIdHitLayer1, trackIdHitLayer2, trackletID; - - for (int iHitLayer1 = 0; iHitLayer1 < nHits_MIDLayer1; iHitLayer1++) { - - idHitLayer1 = arrayHitID_MIDLayer1[iHitLayer1]; - posHitMID1.SetXYZ(gRandom->Gaus(io.hits.x[idHitLayer1], resolutionMID), gRandom->Gaus(io.hits.y[idHitLayer1], resolutionMID), gRandom->Gaus(io.hits.z[idHitLayer1], resolutionMID)); - trackIdHitLayer1 = io.hits.trkid[idHitLayer1]; - - for (int iHitLayer2 = 0; iHitLayer2 < nHits_MIDLayer2; iHitLayer2++) { - - idHitLayer2 = arrayHitID_MIDLayer2[iHitLayer2]; - posHitMID2.SetXYZ(gRandom->Gaus(io.hits.x[idHitLayer2], resolutionMID), gRandom->Gaus(io.hits.y[idHitLayer2], resolutionMID), gRandom->Gaus(io.hits.z[idHitLayer2], resolutionMID)); - trackIdHitLayer2 = io.hits.trkid[idHitLayer2]; - - if (trackletSel->IsMIDTrackletSelected(posHitMID1, posHitMID2, kFALSE)) { - - if (trackIdHitLayer1 == trackIdHitLayer2) - trackletID = trackIdHitLayer1; - else - trackletID = -1; - - TClonesArray trackletMIDpos("TVector3"); - TClonesArray trackletMIDcov("TMatrixDSym"); - - new (trackletMIDpos[trackletMIDpos.GetEntries()]) TVector3(posHitMID1); - new (trackletMIDpos[trackletMIDpos.GetEntries()]) TVector3(posHitMID2); - new (trackletMIDcov[trackletMIDcov.GetEntries()]) TMatrixDSym(covMID); - new (trackletMIDcov[trackletMIDcov.GetEntries()]) TMatrixDSym(covMID); - - new (trackCandidatesHitPosMID[nPreparedTrackletsMID]) TClonesArray(trackletMIDpos); - new (trackCandidatesHitCovMID[nPreparedTrackletsMID]) TClonesArray(trackletMIDcov); - - idTrackMID.emplace_back(trackletID); - - nPreparedTrackletsMID++; - } - } - } - - printf("Ev %4d : %4d ITS tracks and %4d MID tracklets prepared for fitting\n", iEv, nPreparedTracksITS, nPreparedTrackletsMID); - - treeOut->Fill(); - } - - treeOut->Write(); -} - -//==================================================================================================================================================== - -Bool_t IsTrackInteresting(Int_t iTrack) -{ - - if (!(IsTrackCharged(iTrack))) - return kFALSE; - if (!(io.tracks.parent[iTrack] == -1)) - return kFALSE; - - return kTRUE; -} - -//==================================================================================================================================================== - -Bool_t IsTrackCharged(Int_t iTrack) -{ - - if (iTrack < 0 || iTrack >= io.tracks.n) { - printf("ERROR: track index %d out of range (io.tracks.n = %d)\n", iTrack, io.tracks.n); - return kFALSE; - } - if (!(TDatabasePDG::Instance()->GetParticle(io.tracks.pdg[iTrack]))) - return kFALSE; - if (TMath::Abs(TDatabasePDG::Instance()->GetParticle(io.tracks.pdg[iTrack])->Charge()) < 0.1) - return kFALSE; - - return kTRUE; -} - -//==================================================================================================================================================== diff --git a/Upgrade/g4me/analysis/PrepareTracksForMatchingAndFit_embedding.C b/Upgrade/g4me/analysis/PrepareTracksForMatchingAndFit_embedding.C deleted file mode 100644 index 96044bc4..00000000 --- a/Upgrade/g4me/analysis/PrepareTracksForMatchingAndFit_embedding.C +++ /dev/null @@ -1,328 +0,0 @@ -#include "io.C" -#include "style.C" -#include -#include "TTree.h" -#include "TFile.h" -#include -#include "TVector3.h" -#include "TMatrixDSym.h" -#include "TClonesArray.h" -#include "TMath.h" -#include "TDatabasePDG.h" -#include "TParticle.h" -#include "TObjString.h" -#include "TSystem.h" -#include "TROOT.h" -#include "TRandom.h" -#include "TDatime.h" - -#include "MIDTrackletSelector.h" - -#ifdef __MAKECINT__ -#pragma link C++ class vector < TClonesArray> + ; -#endif - -// IDs of the two MIS layers, taken from the PVIDMapFile.dat produced by g4me -const int idLayerMID1 = 300; -const int idLayerMID2 = 301; - -const double rMaxITS = 110; // (in cm). Above this radius, hits are not considered as belonging to the ITS - -// This macro reads an output file from a g4me simulation and writes a TTree containing, event per event, a list of ITS tracks (i.e. TClonesArray -// of ITS hits from a same track) and MID tracklets (i.e. any combination of hits from the 1st and 2nd MID layers, passing the selections -// implemented in the macro IsMIDTrackletSelected.C) as an input for the fit routine based on GenFit - -TTree* treeOut = 0; - -IO_t io_underlying; -IO_t io_signal; - -Bool_t IsTrackCharged(struct IO_t*, Int_t iTrack); -Bool_t IsTrackInteresting(struct IO_t*, Int_t iTrack); - -//==================================================================================================================================================== - -void PrepareTracksForMatchingAndFit_embedding(const char* inputFileName_underlying, - const char* inputFileName_signal, - const char* outputFileName, - const bool prepareUnderlyingITS = kFALSE, - const double hitMinP = 0.050) -{ - - TDatime t; - gRandom->SetSeed(t.GetDate() + t.GetYear() * t.GetHour() * t.GetMinute() * t.GetSecond()); - - MIDTrackletSelector* trackletSel = new MIDTrackletSelector(); - if (!(trackletSel->Setup("muonTrackletAcceptance.root"))) { - printf("MID tracklet selector could not be initialized. Quitting.\n"); - return; - } - - style(); - - const double resolutionITS = 5.e-4; // 5 um - const double resolutionMID = 100.e-4; // 100 um - - io_underlying.open(inputFileName_underlying); - io_signal.open(inputFileName_signal); - - auto nEvents = min(io_underlying.nevents(), io_signal.nevents()); - - int nPreparedTracksITS = 0, nHits_MIDLayer1 = 0, nHits_MIDLayer2 = 0, nPreparedTrackletsMID = 0; - - TFile* fileOut = new TFile(outputFileName, "recreate"); - treeOut = new TTree("TracksToBeFitted", "Tracks to be fitted"); - - TClonesArray trackCandidatesHitPosITS("TClonesArray"); // array of hit position arrays (for the ITS tracks) - TClonesArray trackCandidatesHitCovITS("TClonesArray"); // array of hit covariance arrays (for the ITS tracks) - TClonesArray trackCandidatesHitPosMID("TClonesArray"); // array of hit position arrays (for the MID tracklets) - TClonesArray trackCandidatesHitCovMID("TClonesArray"); // array of hit covariance arrays (for the MID tracklets) - TClonesArray particlesITS("TParticle"); // array of particles corresponding to the ITS tracks - std::vector idTrackITS; - std::vector idTrackMID; - - treeOut->Branch("TrackCandidatesHitPosITS", &trackCandidatesHitPosITS, 256000, -1); - treeOut->Branch("TrackCandidatesHitCovITS", &trackCandidatesHitCovITS, 256000, -1); - treeOut->Branch("TrackCandidatesHitPosMID", &trackCandidatesHitPosMID, 256000, -1); - treeOut->Branch("TrackCandidatesHitCovMID", &trackCandidatesHitCovMID, 256000, -1); - treeOut->Branch("ParticlesITS", &particlesITS, 256000, -1); - treeOut->Branch("idTrackITS", &idTrackITS); - treeOut->Branch("idTrackMID", &idTrackMID); - - TVector3 pos, mom; - TMatrixDSym covITS(3); - for (int i = 0; i < 3; i++) - covITS(i, i) = resolutionITS * resolutionITS; - TMatrixDSym covMID(3); - for (int i = 0; i < 3; i++) - covMID(i, i) = resolutionMID * resolutionMID; - - // loop over events - - for (int iEv = 0; iEv < nEvents; iEv++) { - - io_underlying.event(iEv); - io_signal.event(iEv); - - trackCandidatesHitPosITS.Clear(); - trackCandidatesHitCovITS.Clear(); - trackCandidatesHitPosMID.Clear(); - trackCandidatesHitCovMID.Clear(); - particlesITS.Clear(); - idTrackITS.clear(); - idTrackMID.clear(); - - Int_t nTracks_underlying = io_underlying.tracks.n; - Int_t nTracks = io_underlying.tracks.n + io_signal.tracks.n; - Int_t nHits = io_underlying.hits.n + io_signal.hits.n; - - std::vector allTracksHitPosITS(nTracks, TClonesArray("TVector3")); - std::vector allTracksHitCovITS(nTracks, TClonesArray("TMatrixDSym")); - - std::vector arrayHit_MIDLayer1; - std::vector arrayHit_MIDLayer2; - std::vector arrayHitTrackID_MIDLayer1(nHits, -1); - std::vector arrayHitTrackID_MIDLayer2(nHits, -1); - nHits_MIDLayer1 = 0; - nHits_MIDLayer2 = 0; - - //-------------------------------------------------------------------------- - // Loop over underlying event hits - - for (int iHit = 0; iHit < io_underlying.hits.n; iHit++) { - - //filling arrays of hit IDs from MID layers (coming from any charged tracks) - - auto trackID = io_underlying.hits.trkid[iHit]; - - if (!(IsTrackCharged(&io_underlying, trackID))) - continue; - - mom.SetXYZ(io_underlying.hits.px[iHit], io_underlying.hits.py[iHit], io_underlying.hits.pz[iHit]); - if (mom.Mag() < hitMinP) - continue; - - if (io_underlying.hits.lyrid[iHit] == idLayerMID1) { - TVector3 vectHit(io_underlying.hits.x[iHit], io_underlying.hits.y[iHit], io_underlying.hits.z[iHit]); - arrayHit_MIDLayer1.emplace_back(vectHit); - arrayHitTrackID_MIDLayer1[nHits_MIDLayer1++] = trackID; - } - if (io_underlying.hits.lyrid[iHit] == idLayerMID2) { - TVector3 vectHit(io_underlying.hits.x[iHit], io_underlying.hits.y[iHit], io_underlying.hits.z[iHit]); - arrayHit_MIDLayer2.emplace_back(vectHit); - arrayHitTrackID_MIDLayer2[nHits_MIDLayer2++] = trackID; - } - - if (prepareUnderlyingITS) { - - // filling arrays of hits from ITS tracks (only for interesting tracks: charged and primary). - // Hits from ITS are by definition all the hits having radius < rMaxITS - if (!(IsTrackInteresting(&io_underlying, trackID))) - continue; - - pos.SetXYZ(gRandom->Gaus(io_underlying.hits.x[iHit], resolutionITS), gRandom->Gaus(io_underlying.hits.y[iHit], resolutionITS), gRandom->Gaus(io_underlying.hits.z[iHit], resolutionITS)); - if (pos.Perp() < rMaxITS) { - new ((allTracksHitPosITS.at(trackID))[(allTracksHitPosITS.at(trackID)).GetEntries()]) TVector3(pos); - new ((allTracksHitCovITS.at(trackID))[(allTracksHitCovITS.at(trackID)).GetEntries()]) TMatrixDSym(covITS); - } - } - } - - // filling the final arrays with the hit information from good ITS tracks - - nPreparedTracksITS = 0; - - if (prepareUnderlyingITS) { - for (int iTrack = 0; iTrack < io_underlying.tracks.n; iTrack++) { - if (IsTrackInteresting(&io_underlying, iTrack)) { - new (trackCandidatesHitPosITS[nPreparedTracksITS]) TClonesArray(allTracksHitPosITS.at(iTrack)); - new (trackCandidatesHitCovITS[nPreparedTracksITS]) TClonesArray(allTracksHitCovITS.at(iTrack)); - idTrackITS.emplace_back(iTrack); - TParticle part; - part.SetPdgCode(io_underlying.tracks.pdg[iTrack]); - part.SetProductionVertex(io_underlying.tracks.vx[iTrack], io_underlying.tracks.vy[iTrack], io_underlying.tracks.vz[iTrack], io_underlying.tracks.vt[iTrack]); - part.SetMomentum(io_underlying.tracks.px[iTrack], io_underlying.tracks.py[iTrack], io_underlying.tracks.pz[iTrack], io_underlying.tracks.e[iTrack]); - new (particlesITS[nPreparedTracksITS]) TParticle(part); - nPreparedTracksITS++; - } - } - } - - // filling the final arrays with the hit information from selected MID tracklets - - // end of loop over pythia tree - - //-------------------------------------------------------------------------- - // Loop over signal event hits - - for (int iHit = 0; iHit < io_signal.hits.n; iHit++) { - - // filling arrays of hit IDs from MID layers (coming from any charged tracks) - - auto trackID = io_signal.hits.trkid[iHit]; - - if (!(IsTrackCharged(&io_signal, trackID))) - continue; - - mom.SetXYZ(io_signal.hits.px[iHit], io_signal.hits.py[iHit], io_signal.hits.pz[iHit]); - if (mom.Mag() < hitMinP) - continue; - - if (io_signal.hits.lyrid[iHit] == idLayerMID1) { - TVector3 vectHit(io_signal.hits.x[iHit], io_signal.hits.y[iHit], io_signal.hits.z[iHit]); - arrayHit_MIDLayer1.emplace_back(vectHit); - arrayHitTrackID_MIDLayer1[nHits_MIDLayer1++] = trackID + nTracks_underlying; - } - if (io_signal.hits.lyrid[iHit] == idLayerMID2) { - TVector3 vectHit(io_signal.hits.x[iHit], io_signal.hits.y[iHit], io_signal.hits.z[iHit]); - arrayHit_MIDLayer2.emplace_back(vectHit); - arrayHitTrackID_MIDLayer2[nHits_MIDLayer2++] = trackID + nTracks_underlying; - } - - // filling arrays of hits from ITS tracks (only for interesting tracks: charged and primary). - // Hits from ITS are by definition all the hits having radius < rMaxITS - if (!(IsTrackInteresting(&io_signal, trackID))) - continue; - - pos.SetXYZ(gRandom->Gaus(io_signal.hits.x[iHit], resolutionITS), gRandom->Gaus(io_signal.hits.y[iHit], resolutionITS), gRandom->Gaus(io_signal.hits.z[iHit], resolutionITS)); - if (pos.Perp() < rMaxITS) { - new ((allTracksHitPosITS.at(trackID + nTracks_underlying))[(allTracksHitPosITS.at(trackID + nTracks_underlying)).GetEntries()]) TVector3(pos); - new ((allTracksHitCovITS.at(trackID + nTracks_underlying))[(allTracksHitCovITS.at(trackID + nTracks_underlying)).GetEntries()]) TMatrixDSym(covITS); - } - } - - // filling the final arrays with the hit information from good ITS tracks - - for (int iTrack = 0; iTrack < io_signal.tracks.n; iTrack++) { - if (IsTrackInteresting(&io_signal, iTrack)) { - new (trackCandidatesHitPosITS[nPreparedTracksITS]) TClonesArray(allTracksHitPosITS.at(iTrack + nTracks_underlying)); - new (trackCandidatesHitCovITS[nPreparedTracksITS]) TClonesArray(allTracksHitCovITS.at(iTrack + nTracks_underlying)); - idTrackITS.emplace_back(iTrack + nTracks_underlying); - TParticle part; - part.SetPdgCode(io_signal.tracks.pdg[iTrack]); - part.SetProductionVertex(io_signal.tracks.vx[iTrack], io_signal.tracks.vy[iTrack], io_signal.tracks.vz[iTrack], io_signal.tracks.vt[iTrack]); - part.SetMomentum(io_signal.tracks.px[iTrack], io_signal.tracks.py[iTrack], io_signal.tracks.pz[iTrack], io_signal.tracks.e[iTrack]); - new (particlesITS[nPreparedTracksITS]) TParticle(part); - nPreparedTracksITS++; - } - } - - // filling the final arrays with the hit information from selected MID tracklets - nPreparedTrackletsMID = 0; - TVector3 posHitMID1, posHitMID2; - int trackIdHitLayer1, trackIdHitLayer2, trackletID; - - for (int iHitLayer1 = 0; iHitLayer1 < nHits_MIDLayer1; iHitLayer1++) { - - posHitMID1.SetXYZ(gRandom->Gaus(arrayHit_MIDLayer1[iHitLayer1].X(), resolutionMID), gRandom->Gaus(arrayHit_MIDLayer1[iHitLayer1].Y(), resolutionMID), gRandom->Gaus(arrayHit_MIDLayer1[iHitLayer1].Z(), resolutionMID)); - trackIdHitLayer1 = arrayHitTrackID_MIDLayer1[iHitLayer1]; - - for (int iHitLayer2 = 0; iHitLayer2 < nHits_MIDLayer2; iHitLayer2++) { - - posHitMID2.SetXYZ(gRandom->Gaus(arrayHit_MIDLayer2[iHitLayer2].X(), resolutionMID), gRandom->Gaus(arrayHit_MIDLayer2[iHitLayer2].Y(), resolutionMID), gRandom->Gaus(arrayHit_MIDLayer2[iHitLayer2].Z(), resolutionMID)); - trackIdHitLayer2 = arrayHitTrackID_MIDLayer2[iHitLayer2]; - - if (trackletSel->IsMIDTrackletSelected(posHitMID1, posHitMID2, kFALSE)) { - - if (trackIdHitLayer1 == trackIdHitLayer2) - trackletID = trackIdHitLayer1; - else - trackletID = -1; - - TClonesArray trackletMIDpos("TVector3"); - TClonesArray trackletMIDcov("TMatrixDSym"); - - new (trackletMIDpos[trackletMIDpos.GetEntries()]) TVector3(posHitMID1); - new (trackletMIDpos[trackletMIDpos.GetEntries()]) TVector3(posHitMID2); - new (trackletMIDcov[trackletMIDcov.GetEntries()]) TMatrixDSym(covMID); - new (trackletMIDcov[trackletMIDcov.GetEntries()]) TMatrixDSym(covMID); - - new (trackCandidatesHitPosMID[nPreparedTrackletsMID]) TClonesArray(trackletMIDpos); - new (trackCandidatesHitCovMID[nPreparedTrackletsMID]) TClonesArray(trackletMIDcov); - - idTrackMID.emplace_back(trackletID); - - nPreparedTrackletsMID++; - } - } - } - //-------------------------------------------------------------------------- - printf("Ev %4d : %4d ITS tracks and %4d MID tracklets prepared for fitting\n", iEv, nPreparedTracksITS, nPreparedTrackletsMID); - - treeOut->Fill(); - } - - treeOut->Write(); -} - -//==================================================================================================================================================== - -Bool_t IsTrackInteresting(struct IO_t* io, Int_t iTrack) -{ - - if (!(IsTrackCharged(io, iTrack))) - return kFALSE; - if (!(io->tracks.parent[iTrack] == -1)) - return kFALSE; - - return kTRUE; -} - -//==================================================================================================================================================== - -Bool_t IsTrackCharged(struct IO_t* io, Int_t iTrack) -{ - - if (iTrack < 0 || iTrack >= io->tracks.n) { - printf("ERROR: track index %d out of range (io->tracks.n = %d)\n", iTrack, io->tracks.n); - return kFALSE; - } - if (!(TDatabasePDG::Instance()->GetParticle(io->tracks.pdg[iTrack]))) - return kFALSE; - if (TMath::Abs(TDatabasePDG::Instance()->GetParticle(io->tracks.pdg[iTrack])->Charge()) < 0.1) - return kFALSE; - - return kTRUE; -} - -//==================================================================================================================================================== diff --git a/Upgrade/g4me/analysis/SmoothAccMaps2D.C b/Upgrade/g4me/analysis/SmoothAccMaps2D.C deleted file mode 100644 index 71ca3e36..00000000 --- a/Upgrade/g4me/analysis/SmoothAccMaps2D.C +++ /dev/null @@ -1,91 +0,0 @@ -#include "TFile.h" -#include "TH1D.h" -#include "TH2D.h" -#include "TF1.h" -#include "TCanvas.h" -#include "TPad.h" -#include "TStyle.h" - -enum part_t { kMIDElectron, - kMIDMuon, - kMIDPion, - kMIDKaon, - kMIDProton, - kNPartTypes }; -const char* partName[kNPartTypes] = {"electron", "muon", "pion", "kaon", "proton"}; - -TFile* fileIn = 0; - -TH2D *accEffMuonPID_2D[kNPartTypes] = {0}, *accEffMuonPID_2D_Param[kNPartTypes] = {0}; -TH1D* hTmp = 0; -TF1* fitFunction = 0; - -TCanvas* cnv[kNPartTypes] = {0}; - -double GausPlusConstant(double* var, double* par); - -//==================================================================================================================================================== - -void SmoothAccMaps2D(const char* nameInputFile) -{ - - gStyle->SetOptStat(0); - - fileIn = new TFile(nameInputFile); - - fitFunction = new TF1("fitFunction", GausPlusConstant, -2, 2, 4); - - double offset, eta; - - for (int iPart = 0; iPart < kNPartTypes; iPart++) { - - accEffMuonPID_2D[iPart] = (TH2D*)fileIn->Get(Form("accEffMuonPID_2D_%s", partName[iPart])); - accEffMuonPID_2D_Param[iPart] = (TH2D*)accEffMuonPID_2D[iPart]->Clone(Form("accEffMuonPID_2D_Param_%s", partName[iPart])); - accEffMuonPID_2D_Param[iPart]->Smooth(1); - - for (int iBinMom = 1; iBinMom <= accEffMuonPID_2D_Param[iPart]->GetNbinsY(); iBinMom++) { - - hTmp = accEffMuonPID_2D_Param[iPart]->ProjectionX("hTmp", iBinMom, iBinMom); - - offset = 0.5 * (hTmp->GetBinContent(1) + hTmp->GetBinContent(hTmp->GetNbinsX())); - - fitFunction->SetParameter(0, offset); - fitFunction->SetParameter(1, hTmp->GetBinContent(hTmp->GetBinContent(hTmp->GetNbinsX() / 2)) - offset); - fitFunction->FixParameter(2, 0); - fitFunction->SetParameter(3, 0.4); - - hTmp->Fit(fitFunction, "Q", "", -1.6, 1.6); - - for (int iBinEta = 1; iBinEta <= accEffMuonPID_2D_Param[iPart]->GetNbinsX(); iBinEta++) { - - eta = accEffMuonPID_2D_Param[iPart]->GetXaxis()->GetBinCenter(iBinEta); - accEffMuonPID_2D_Param[iPart]->SetBinContent(iBinEta, iBinMom, fitFunction->Eval(eta)); - } - } - } - - for (int iPart = 0; iPart < kNPartTypes; iPart++) { - - cnv[iPart] = new TCanvas(Form("cnv_%ss", partName[iPart]), Form("cnv_%ss", partName[iPart]), 1200, 600); - cnv[iPart]->Divide(2, 1); - - cnv[iPart]->cd(1); - gPad->SetLogy(); - accEffMuonPID_2D[iPart]->GetZaxis()->SetRangeUser(0, 0.05); - accEffMuonPID_2D[iPart]->Draw("colz"); - cnv[iPart]->cd(2); - gPad->SetLogy(); - accEffMuonPID_2D_Param[iPart]->GetZaxis()->SetRangeUser(0, 0.05); - accEffMuonPID_2D_Param[iPart]->Draw("colz"); - } -} - -//==================================================================================================================================================== - -double GausPlusConstant(double* var, double* par) -{ - - return par[0] + par[1] * TMath::Gaus(var[0], par[2], par[3]); -} - -//==================================================================================================================================================== diff --git a/Upgrade/g4me/analysis/StudyMuonMatchingChi2.C b/Upgrade/g4me/analysis/StudyMuonMatchingChi2.C deleted file mode 100644 index 6bf06331..00000000 --- a/Upgrade/g4me/analysis/StudyMuonMatchingChi2.C +++ /dev/null @@ -1,570 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "mySpacepointDetectorHit.h" -#include "mySpacepointMeasurement.h" - -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include -#include "TVector3.h" -#include "TMatrixDSym.h" -#include - -#include "TDatabasePDG.h" -#include -#include "TFile.h" -#include "TTree.h" -#include "TParticle.h" -#include "TH1D.h" -#include "TH2D.h" -#include "TH3D.h" -#include "THnSparse.h" -#include "TObjString.h" -#include "TDatime.h" - -#include "MIDTrackletSelector.h" - -enum part_t { kMIDElectron, - kMIDMuon, - kMIDPion, - kMIDKaon, - kMIDProton, - kNPartTypes }; -const int pdgCode[kNPartTypes] = {11, 13, 211, 321, 2212}; -const char* partName[kNPartTypes] = {"electron", "muon", "pion", "kaon", "proton"}; - -const int nLayerITS = 12; -const int nMinMeasurementsITS = nLayerITS; - -const double rLayerMID1 = 238.; // in cm - -enum { kGoodMatch, - kFakeMatch }; -const char* tagMatch[2] = {"GoodMatch", "FakeMatch"}; - -THnSparse* hDistanceFromGoodHitAtLayerMID1[kNPartTypes] = {0}; -TH3D* hChi2VsMomVsEtaMatchedTracks[kNPartTypes][2] = {{0}}; -TH2D* hMomVsEtaITSTracks[kNPartTypes] = {0}; - -const int nMaxHelixSteps = 100; - -void BookHistos(); - -void CircleFit(double x1, double y1, double x2, double y2, double x3, double y3, double& radius); -void EstimateInitialMomentum(genfit::mySpacepointDetectorHit* hitMin, - genfit::mySpacepointDetectorHit* hitMid, - genfit::mySpacepointDetectorHit* hitMax, - TVector3 vtx, - double fieldStrength, - double& charge, - TVector3& mom); - -//==================================================================================================================================================== - -void StudyMuonMatchingChi2(const char* inputFileName, - const char* outputFileName, - int pdg = -13, - bool displayTracks = kTRUE, - const char* geoFileName = "g4meGeometry.muon.root", - double fieldStrength = 0.5) -{ - - TDatime t; - gRandom->SetSeed(t.GetDate() + t.GetYear() * t.GetHour() * t.GetMinute() * t.GetSecond()); - - MIDTrackletSelector* trackletSel = new MIDTrackletSelector(); - if (!(trackletSel->Setup("muonTrackletAcceptance.root"))) { - printf("MID tracklet selector could not be initialized. Quitting.\n"); - return; - } - - BookHistos(); - - // init geometry and mag. field - new TGeoManager("Geometry", "Geane geometry"); - TGeoManager::Import(geoFileName); - genfit::FieldManager::getInstance()->init(new genfit::ConstField(0., 0., fieldStrength * 10)); // in kGauss - genfit::MaterialEffects::getInstance()->init(new genfit::TGeoMaterialInterface()); - - // init event display - genfit::EventDisplay* display = 0; - if (displayTracks) - display = genfit::EventDisplay::getInstance(); - - // init fitter - genfit::AbsKalmanFitter* fitter = new genfit::KalmanFitterRefTrack(); - fitter->setMaxIterations(20); - fitter->setMinIterations(10); - - TFile* fileIn = new TFile(inputFileName); - TTree* treeIn = (TTree*)fileIn->Get("TracksToBeFitted"); - TClonesArray *trackCandidatesHitPosITS = 0, *trackCandidatesHitCovITS = 0, *hitsPosITS = 0, *hitsCovITS = 0, *particlesITS = 0; - TClonesArray *trackCandidatesHitPosMID = 0, *trackCandidatesHitCovMID = 0, *hitsPosMID = 0, *hitsCovMID = 0; - std::vector* idTrackITS = 0; - std::vector* idTrackMID = 0; - - treeIn->SetBranchAddress("TrackCandidatesHitPosITS", &trackCandidatesHitPosITS); - treeIn->SetBranchAddress("TrackCandidatesHitCovITS", &trackCandidatesHitCovITS); - treeIn->SetBranchAddress("TrackCandidatesHitPosMID", &trackCandidatesHitPosMID); - treeIn->SetBranchAddress("TrackCandidatesHitCovMID", &trackCandidatesHitCovMID); - treeIn->SetBranchAddress("ParticlesITS", &particlesITS); - treeIn->SetBranchAddress("idTrackITS", &idTrackITS); - treeIn->SetBranchAddress("idTrackMID", &idTrackMID); - - TClonesArray myDetectorHitArrayITS("genfit::mySpacepointDetectorHit"); - TClonesArray myDetectorHitArrayGlobal("genfit::mySpacepointDetectorHit"); - - TParticle* part = 0; - - const double primVtxResolution = 3e-4; // 3 um (for ~10 contributors) - const double resolutionITS = 5e-4; // 5 um - const double resolutionMID = 100e-4; // 100 um - - // init the factory - - int myDetId = 1; - - genfit::MeasurementFactory factoryITS; - genfit::MeasurementProducer myProducerITS(&myDetectorHitArrayITS); - factoryITS.addProducer(myDetId, &myProducerITS); - - genfit::MeasurementFactory factoryGlobal; - genfit::MeasurementProducer myProducerGlobal(&myDetectorHitArrayGlobal); - factoryGlobal.addProducer(myDetId, &myProducerGlobal); - - int nEvents = treeIn->GetEntries(); - - // main loop - - for (int iEvent = 0; iEvent < nEvents; iEvent++) { - - // if (!(iEvent%100)) printf("\n----------- iEv = %5d of %5d ----------------\n",iEvent,nEvents); - printf("\n----------- iEv = %5d of %5d ----------------\n", iEvent, nEvents); - - treeIn->GetEntry(iEvent); - - int nTracksITS = trackCandidatesHitPosITS->GetEntries(); - int nTrackletsMID = trackCandidatesHitPosMID->GetEntries(); - - vector>> fitTracksGlobal(kNPartTypes, vector>(2)); // for drawing purposes only - vector> fitTracksITS(kNPartTypes); // for drawing purposes only - - for (int iTrackITS = 0; iTrackITS < nTracksITS; iTrackITS++) { - - bool fitITSConverged = kFALSE; - double charge = 1.; // abs value of muon charge - TVector3 posAtLayerMID1, fittedMomAtVtx; - - myDetectorHitArrayITS.Clear(); - - hitsPosITS = (TClonesArray*)trackCandidatesHitPosITS->At(iTrackITS); - hitsCovITS = (TClonesArray*)trackCandidatesHitCovITS->At(iTrackITS); - - // TrackCand - genfit::TrackCand myCandITS; - - int nMeasurementsITS = hitsPosITS->GetEntries(); - if (nMeasurementsITS < nMinMeasurementsITS) - continue; - - // printf("ITS track %3d has %2d nMeasurements\n",iTrackITS,nMeasurementsITS); - - for (int iHitITS = 0; iHitITS < nMeasurementsITS; iHitITS++) { - TVector3* posHit = (TVector3*)hitsPosITS->At(iHitITS); - TMatrixDSym* covHit = (TMatrixDSym*)hitsCovITS->At(iHitITS); - new (myDetectorHitArrayITS[iHitITS]) genfit::mySpacepointDetectorHit(*posHit, *covHit); - myCandITS.addHit(myDetId, iHitITS); - } - - TVector3 vtx(0, 0, 0); // primary vertex - - part = (TParticle*)particlesITS->At(iTrackITS); - vtx.SetXYZ(gRandom->Gaus(part->Vx(), primVtxResolution), - gRandom->Gaus(part->Vy(), primVtxResolution), - gRandom->Gaus(part->Vz(), primVtxResolution)); - - TVector3 momIni; - - EstimateInitialMomentum((genfit::mySpacepointDetectorHit*)myDetectorHitArrayITS[0], - (genfit::mySpacepointDetectorHit*)myDetectorHitArrayITS[nMeasurementsITS / 2], - (genfit::mySpacepointDetectorHit*)myDetectorHitArrayITS[nMeasurementsITS - 1], - vtx, - fieldStrength, - charge, - momIni); - - if ((TDatabasePDG::Instance()->GetParticle(pdg)->Charge() * charge) < 0) - pdg *= -1; - - // initial guess for cov - TMatrixDSym covSeed(6); - for (int i = 0; i < 3; i++) - covSeed(i, i) = resolutionITS * resolutionITS; - for (int i = 3; i < 6; i++) - covSeed(i, i) = pow(resolutionITS / nMeasurementsITS / sqrt(3), 2); - - // set start values and pdg to cand - myCandITS.setPosMomSeedAndPdgCode(vtx, momIni, pdg); - myCandITS.setCovSeed(covSeed); - - // create track - genfit::AbsTrackRep* repITS = new genfit::RKTrackRep(pdg); - genfit::Track fitTrackITS(myCandITS, factoryITS, repITS); - - // do the fit: ITS track ------------------- - - try { - fitter->processTrack(&fitTrackITS); - } catch (genfit::Exception& e) { - std::cerr << e.what(); - std::cerr << "Exception, next track" << std::endl; - continue; - } - - fitTrackITS.checkConsistency(); - - if (fitTrackITS.getFitStatus(repITS)->isFitConverged()) - fitITSConverged = kTRUE; - - if (fitITSConverged) { - - genfit::MeasuredStateOnPlane fittedStateITS(fitTrackITS.getFittedState(0, repITS)); - - // estimating kinematics at primary vertex - fittedStateITS.extrapolateToPoint(vtx); - fittedMomAtVtx = fittedStateITS.getMom(); - - // estimating position at first MID layer - // (I use a simple helix model which doesn't take into account propagation in materials. A proper way to do it would be fittedStateITS.extrapolateToCylinder(rLayerMID1) - // but unfortunately the method crashes when a track is absorbed in the materials and doesn't manage to arrive the requested MID layer) - genfit::HelixTrackModel helix(vtx, fittedMomAtVtx, charge); - double length = 0; - double deltaR = rLayerMID1; - int nSteps = 0; - while (deltaR > 1 && nSteps < nMaxHelixSteps) { // 1 cm tolerance for the radial distance between the MID layer and the effective extrapolation radius of the helix - length += deltaR; - posAtLayerMID1 = helix.getPos(length); - deltaR = rLayerMID1 - posAtLayerMID1.Perp(); - nSteps++; - } - } - - // do the fit: Global track ------------------- - - bool isGoodMatch = kFALSE; - double bestChi2OverNDF_Global = 99999999.; - genfit::Track* bestGlobalTrack = 0; - TVector3 goodHitAtLayerMID1; - bool goodTrackletExists = kFALSE; - - int nSelTracklets = 0; - - for (int iTrackletMID = 0; iTrackletMID < nTrackletsMID; iTrackletMID++) { - - if (!fitITSConverged) - continue; - - myDetectorHitArrayGlobal.Clear(); - - hitsPosMID = (TClonesArray*)trackCandidatesHitPosMID->At(iTrackletMID); - hitsCovMID = (TClonesArray*)trackCandidatesHitCovMID->At(iTrackletMID); - - int nMeasurementsMID = hitsPosMID->GetEntries(); - if (nMeasurementsMID != 2) - continue; - - // if (!(trackletSel->IsMIDTrackletSelected(*((TVector3*)hitsPosMID->At(0)),*((TVector3*)hitsPosMID->At(1)),fittedMomAtVtx,posAtLayerMID1,charge))) continue; - if (!(trackletSel->IsMIDTrackletSelectedWithSearchSpot(*((TVector3*)hitsPosMID->At(0)), *((TVector3*)hitsPosMID->At(1)), posAtLayerMID1, kFALSE))) - continue; - - nSelTracklets++; - - // TrackCand - genfit::TrackCand myCandGlobal; - - if (idTrackITS->at(iTrackITS) == idTrackMID->at(iTrackletMID)) { - // WARNING: if more than a tracklet has the track ID of the ITS track (for instance tracks doing spirals), the last registered one is - // registered in goodHitAtLayerMID1. However, the tracklet selector should remove the "backward tracklets" thanks to the comparison - // at the first MID layer between the tracklet position and the extrapolation of the ITS track - goodHitAtLayerMID1.SetXYZ(((TVector3*)hitsPosMID->At(0))->X(), ((TVector3*)hitsPosMID->At(0))->Y(), ((TVector3*)hitsPosMID->At(0))->Z()); - goodTrackletExists = kTRUE; - } - - int nHitsGlobal = 0; - - for (int iHitITS = 0; iHitITS < nMeasurementsITS; iHitITS++) { - TVector3* posHit = (TVector3*)hitsPosITS->At(iHitITS); - TMatrixDSym* covHit = (TMatrixDSym*)hitsCovITS->At(iHitITS); - new (myDetectorHitArrayGlobal[nHitsGlobal]) genfit::mySpacepointDetectorHit(*posHit, *covHit); - myCandGlobal.addHit(myDetId, nHitsGlobal); - nHitsGlobal++; - } - for (int iHitMID = 0; iHitMID < nMeasurementsMID; iHitMID++) { - TVector3* posHit = (TVector3*)hitsPosMID->At(iHitMID); - TMatrixDSym* covHit = (TMatrixDSym*)hitsCovMID->At(iHitMID); - new (myDetectorHitArrayGlobal[nHitsGlobal]) genfit::mySpacepointDetectorHit(*posHit, *covHit); - myCandGlobal.addHit(myDetId, nHitsGlobal); - nHitsGlobal++; - } - - myCandGlobal.setPosMomSeedAndPdgCode(vtx, fittedMomAtVtx, pdg); - myCandGlobal.setCovSeed(covSeed); - - genfit::AbsTrackRep* repGlobal = new genfit::RKTrackRep(pdg); - genfit::Track fitTrackGlobal(myCandGlobal, factoryGlobal, repGlobal); - - try { - fitter->processTrack(&fitTrackGlobal); - } catch (genfit::Exception& e) { - std::cerr << e.what(); - std::cerr << "Exception, next track" << std::endl; - continue; - } - - fitTrackGlobal.checkConsistency(); - - double chi2OverNDF_Global = fitTrackGlobal.getFitStatus(repGlobal)->getChi2() / fitTrackGlobal.getFitStatus(repGlobal)->getNdf(); - - // the best matching tracklet is defined as the one minimizing the global track chi2 - if (chi2OverNDF_Global < bestChi2OverNDF_Global) { - bestChi2OverNDF_Global = chi2OverNDF_Global; - isGoodMatch = (idTrackITS->at(iTrackITS) == idTrackMID->at(iTrackletMID)); - if (bestGlobalTrack) - delete bestGlobalTrack; - bestGlobalTrack = new genfit::Track(fitTrackGlobal); - } - } - - // printf("%3d selected tracklets out of %3d\n",nSelTracklets,nTrackletsMID); - - int pdgCodePart = TMath::Abs(part->GetPdgCode()); - double momPart = part->P(); - double etaPart = part->Eta(); - - for (int iPartType = 0; iPartType < kNPartTypes; iPartType++) { - if (pdgCodePart == pdgCode[iPartType]) { - - // filling histos with the ITS track information - - hMomVsEtaITSTracks[iPartType]->Fill(etaPart, momPart); - - fitTracksITS[iPartType].push_back(new genfit::Track(fitTrackITS)); - - if (goodTrackletExists) { - double deltaPhi = posAtLayerMID1.DeltaPhi(goodHitAtLayerMID1); - double deltaEta = posAtLayerMID1.Eta() - goodHitAtLayerMID1.Eta(); - double var[4] = {deltaEta, deltaPhi, etaPart, momPart}; - hDistanceFromGoodHitAtLayerMID1[iPartType]->Fill(var); - } - - // filling histos with the best ITS-MID match information - - if (bestGlobalTrack) { - - if (isGoodMatch) { - hChi2VsMomVsEtaMatchedTracks[iPartType][kGoodMatch]->Fill(bestChi2OverNDF_Global, etaPart, momPart); - if (iEvent < 100) - fitTracksGlobal[iPartType][kGoodMatch].push_back(new genfit::Track(*bestGlobalTrack)); - } else { - hChi2VsMomVsEtaMatchedTracks[iPartType][kFakeMatch]->Fill(bestChi2OverNDF_Global, etaPart, momPart); - if (iEvent < 100) - fitTracksGlobal[iPartType][kFakeMatch].push_back(new genfit::Track(*bestGlobalTrack)); - } - } - - break; - } - } - } - - if (iEvent < 100 && display) { - // add tracks to event display - display->addEvent(fitTracksGlobal[kMIDMuon][kGoodMatch]); - } - - } // end loop over events - - delete fitter; - - TFile* fileOut = new TFile(outputFileName, "recreate"); - for (int iPart = 0; iPart < kNPartTypes; iPart++) { - hMomVsEtaITSTracks[iPart]->Write(); - hDistanceFromGoodHitAtLayerMID1[iPart]->Write(); - for (int iMatch = 0; iMatch < 2; iMatch++) { - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->Write(); - } - } - - fileOut->Close(); - - // open event display - if (display) - display->open(); -} - -//==================================================================================================================================================== - -void BookHistos() -{ - - // non-uniform p binning - - const int nMomBins = 40; - const double momBinCenter[nMomBins] = { - 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, - 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, - 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, - 4.0, 4.5, 5.0, 6.0, 7.0, 8.0, 10., 12., 15., 20.}; - - double momBinLimits[nMomBins + 1] = {0}; - momBinLimits[0] = momBinCenter[0] - 0.5 * (momBinCenter[1] - momBinCenter[0]); - for (int iMomBin = 0; iMomBin < nMomBins - 1; iMomBin++) - momBinLimits[iMomBin + 1] = 0.5 * (momBinCenter[iMomBin] + momBinCenter[iMomBin + 1]); - momBinLimits[nMomBins] = momBinCenter[nMomBins - 1] + 0.5 * (momBinCenter[nMomBins - 1] - momBinCenter[nMomBins - 2]); - - // uniform eta binning - - const int nEtaBins = 33; - const double etaMin = -1.65; - const double etaMax = 1.65; - - for (int iPart = 0; iPart < kNPartTypes; iPart++) { - - hMomVsEtaITSTracks[iPart] = new TH2D(Form("hMomVsEtaITSTracks_%s", partName[iPart]), Form("hMomVsEtaITSTracks_%s", partName[iPart]), - nEtaBins, etaMin, etaMax, nMomBins, momBinLimits[0], momBinLimits[nMomBins]); - hMomVsEtaITSTracks[iPart]->GetYaxis()->Set(nMomBins, momBinLimits); - - hMomVsEtaITSTracks[iPart]->Sumw2(); - hMomVsEtaITSTracks[iPart]->SetXTitle("#eta"); - hMomVsEtaITSTracks[iPart]->SetYTitle("p (GeV/c)"); - - for (int iMatch = 0; iMatch < 2; iMatch++) { - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch] = new TH3D(Form("hChi2VsMomVsEtaMatchedTracks_%s_%s", partName[iPart], tagMatch[iMatch]), - Form("hChi2VsMomVsEtaMatchedTracks_%s_%s", partName[iPart], tagMatch[iMatch]), - 200, 0, 20, nEtaBins, etaMin, etaMax, nMomBins, momBinLimits[0], momBinLimits[nMomBins]); - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->GetZaxis()->Set(nMomBins, momBinLimits); - - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->Sumw2(); - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->SetXTitle(Form("#chi^{2}/ndf (%s, %s)", partName[iPart], tagMatch[iMatch])); - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->SetYTitle("#eta"); - hChi2VsMomVsEtaMatchedTracks[iPart][iMatch]->SetZTitle("p (GeV/c)"); - } - - int nBins[4] = {300, 300, nEtaBins, nMomBins}; - double xMin[4] = {-0.3, -0.3, etaMin, momBinLimits[0]}; - double xMax[4] = {0.3, 0.3, etaMax, momBinLimits[nMomBins]}; - - hDistanceFromGoodHitAtLayerMID1[iPart] = new THnSparseD(Form("hDistanceFromGoodHitAtLayerMID1_%s", partName[iPart]), - Form("hDistanceFromGoodHitAtLayerMID1_%s", partName[iPart]), - 4, nBins, xMin, xMax); - hDistanceFromGoodHitAtLayerMID1[iPart]->GetAxis(3)->Set(nMomBins, momBinLimits); - - hDistanceFromGoodHitAtLayerMID1[iPart]->GetAxis(0)->SetTitle("#Delta#eta"); - hDistanceFromGoodHitAtLayerMID1[iPart]->GetAxis(1)->SetTitle("#Delta#phi"); - hDistanceFromGoodHitAtLayerMID1[iPart]->GetAxis(2)->SetTitle("#eta"); - hDistanceFromGoodHitAtLayerMID1[iPart]->GetAxis(3)->SetTitle("#p (GeV/c)"); - } -} - -//==================================================================================================================================================== - -void CircleFit(double x1, double y1, double x2, double y2, double x3, double y3, double& radius) -{ - - auto d1x = y2 - y1; - auto d1y = x1 - x2; - auto d2x = y3 - y1; - auto d2y = x1 - x3; - - auto k = d1y * d2x - d1x * d2y; - - if (TMath::Abs(k) < 0.000001) { - radius = 999999999; - return; - } - - auto s1x = (x1 + x2) / 2; - auto s1y = (y1 + y2) / 2; - auto s2x = (x1 + x3) / 2; - auto s2y = (y1 + y3) / 2; - auto l = d1x * (s2y - s1y) - d1y * (s2x - s1x); - auto m = l / k; - - auto centerX = s2x + m * d2x; - auto centerY = s2y + m * d2y; - - auto dx = centerX - x1; - auto dy = centerY - y1; - radius = TMath::Sqrt(dx * dx + dy * dy); -} - -//==================================================================================================================================================== - -void EstimateInitialMomentum(genfit::mySpacepointDetectorHit* hitMin, - genfit::mySpacepointDetectorHit* hitMid, - genfit::mySpacepointDetectorHit* hitMax, - TVector3 vtx, - double fieldStrength, - double& charge, - TVector3& mom) -{ - - double radius = 0; - CircleFit(hitMin->getPos().X(), hitMin->getPos().Y(), - hitMid->getPos().X(), hitMid->getPos().Y(), - hitMax->getPos().X(), hitMax->getPos().Y(), - radius); - - double pt = TMath::Abs(radius * 0.01 * fieldStrength * charge / 3.3); // momentum component transverse to the mag. field - - TVector3 v1(hitMax->getPos().X() - hitMin->getPos().X(), - hitMax->getPos().Y() - hitMin->getPos().Y(), - hitMax->getPos().Z() - hitMin->getPos().Z()); - - TVector3 v2(hitMin->getPos().X() - vtx.X(), - hitMin->getPos().Y() - vtx.Y(), - hitMin->getPos().Z() - vtx.Z()); - - double eta = v1.Eta(); - double phi = v2.Phi(); - - mom.SetPtEtaPhi(pt, eta, phi); - - TVector3 v3(hitMax->getPos().X() - hitMid->getPos().X(), - hitMax->getPos().Y() - hitMid->getPos().Y(), - 0); - - TVector3 v4(hitMid->getPos().X() - hitMin->getPos().X(), - hitMid->getPos().Y() - hitMin->getPos().Y(), - 0); - - TVector3 v5 = v3.Cross(v4); - - if (v5.Z() < 0) - charge *= -1; -} - -//==================================================================================================================================================== diff --git a/Upgrade/g4me/analysis/empty.txt b/Upgrade/g4me/analysis/empty.txt deleted file mode 100644 index 8b137891..00000000 --- a/Upgrade/g4me/analysis/empty.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Upgrade/g4me/analysis/io.C b/Upgrade/g4me/analysis/io.C deleted file mode 100644 index 1a29adcb..00000000 --- a/Upgrade/g4me/analysis/io.C +++ /dev/null @@ -1,190 +0,0 @@ -#include -#include "TTree.h" -#include "TFile.h" -struct IO_t { - - static const int kMaxHits = 1048576; - - struct Hits_t { - int n; - int trkid[kMaxHits]; - float trklen[kMaxHits]; - float edep[kMaxHits]; - float x[kMaxHits]; - float y[kMaxHits]; - float z[kMaxHits]; - float t[kMaxHits]; - double e[kMaxHits]; - double px[kMaxHits]; - double py[kMaxHits]; - double pz[kMaxHits]; - int lyrid[kMaxHits]; - } hits; - - static const int kMaxTracks = 1048576; - - enum ETrackStatus_t { - kTransport = 1 << 0, - kElectromagnetic = 1 << 1, - kHadronic = 1 << 2, - kDecay = 1 << 3, - kConversion = 1 << 4, - kCompton = 1 << 5 - }; - - enum G4ProcessType { - fNotDefined, - fTransportation, - fElectromagnetic, - fOptical, - fHadronic, - fPhotolepton_hadron, - fDecay, - fGeneral, - fParameterisation, - fUserDefined, - fParallel, - fPhonon, - fUCN - }; - - enum G4EmProcessSubType { - fCoulombScattering = 1, - fIonisation = 2, - fBremsstrahlung = 3, - fPairProdByCharged = 4, - fAnnihilation = 5, - fAnnihilationToMuMu = 6, - fAnnihilationToHadrons = 7, - fNuclearStopping = 8, - fElectronGeneralProcess = 9, - - fMultipleScattering = 10, - - fRayleigh = 11, - fPhotoElectricEffect = 12, - fComptonScattering = 13, - fGammaConversion = 14, - fGammaConversionToMuMu = 15, - fGammaGeneralProcess = 16, - - fCerenkov = 21, - fScintillation = 22, - fSynchrotronRadiation = 23, - fTransitionRadiation = 24 - }; - - struct Tracks_t { - int n; - char proc[kMaxTracks]; - char sproc[kMaxTracks]; - int status[kMaxTracks]; - int parent[kMaxTracks]; - int particle[kMaxTracks]; - int pdg[kMaxTracks]; - double vt[kMaxTracks]; - double vx[kMaxTracks]; - double vy[kMaxTracks]; - double vz[kMaxTracks]; - double e[kMaxTracks]; - double px[kMaxTracks]; - double py[kMaxTracks]; - double pz[kMaxTracks]; - } tracks; - - struct Particles_t { - int n; - int parent[kMaxTracks]; - int pdg[kMaxTracks]; - double vt[kMaxTracks]; - double vx[kMaxTracks]; - double vy[kMaxTracks]; - double vz[kMaxTracks]; - double e[kMaxTracks]; - double px[kMaxTracks]; - double py[kMaxTracks]; - double pz[kMaxTracks]; - } particles; - - TTree *tree_hits = nullptr, *tree_tracks = nullptr, *tree_particles = nullptr; - - bool - open(std::string filename) - { - auto fin = TFile::Open(filename.c_str()); - std::cout << " io.open: reading data from " << filename << std::endl; - - tree_hits = (TTree*)fin->Get("Hits"); - tree_hits->SetBranchAddress("n", &hits.n); - tree_hits->SetBranchAddress("trkid", &hits.trkid); - tree_hits->SetBranchAddress("trklen", &hits.trklen); - tree_hits->SetBranchAddress("edep", &hits.edep); - tree_hits->SetBranchAddress("x", &hits.x); - tree_hits->SetBranchAddress("y", &hits.y); - tree_hits->SetBranchAddress("z", &hits.z); - tree_hits->SetBranchAddress("t", &hits.t); - tree_hits->SetBranchAddress("e", &hits.e); - tree_hits->SetBranchAddress("px", &hits.px); - tree_hits->SetBranchAddress("py", &hits.py); - tree_hits->SetBranchAddress("pz", &hits.pz); - tree_hits->SetBranchAddress("lyrid", &hits.lyrid); - auto tree_hits_nevents = tree_hits->GetEntries(); - - tree_tracks = (TTree*)fin->Get("Tracks"); - tree_tracks->SetBranchAddress("n", &tracks.n); - tree_tracks->SetBranchAddress("proc", &tracks.proc); - tree_tracks->SetBranchAddress("sproc", &tracks.sproc); - tree_tracks->SetBranchAddress("status", &tracks.status); - tree_tracks->SetBranchAddress("parent", &tracks.parent); - tree_tracks->SetBranchAddress("particle", &tracks.particle); - tree_tracks->SetBranchAddress("pdg", &tracks.pdg); - tree_tracks->SetBranchAddress("vt", &tracks.vt); - tree_tracks->SetBranchAddress("vx", &tracks.vx); - tree_tracks->SetBranchAddress("vy", &tracks.vy); - tree_tracks->SetBranchAddress("vz", &tracks.vz); - tree_tracks->SetBranchAddress("e", &tracks.e); - tree_tracks->SetBranchAddress("px", &tracks.px); - tree_tracks->SetBranchAddress("py", &tracks.py); - tree_tracks->SetBranchAddress("pz", &tracks.pz); - auto tree_tracks_nevents = tree_tracks->GetEntries(); - - tree_particles = (TTree*)fin->Get("Particles"); - if (tree_particles) { - tree_particles->SetBranchAddress("n", &particles.n); - tree_particles->SetBranchAddress("parent", &particles.parent); - tree_particles->SetBranchAddress("pdg", &particles.pdg); - tree_particles->SetBranchAddress("vt", &particles.vt); - tree_particles->SetBranchAddress("vx", &particles.vx); - tree_particles->SetBranchAddress("vy", &particles.vy); - tree_particles->SetBranchAddress("vz", &particles.vz); - tree_particles->SetBranchAddress("e", &particles.e); - tree_particles->SetBranchAddress("px", &particles.px); - tree_particles->SetBranchAddress("py", &particles.py); - tree_particles->SetBranchAddress("pz", &particles.pz); - } - auto tree_particles_nevents = tree_particles ? tree_particles->GetEntries() : 0; - - if (((tree_hits && tree_tracks) && (tree_hits_nevents != tree_tracks_nevents)) || - ((tree_hits && tree_particles) && (tree_hits_nevents != tree_particles_nevents))) { - std::cout << " io.open: entries mismatch in trees " << std::endl; - if (tree_hits) - std::cout << " " << tree_hits_nevents << " events in \'Hits\' tree " << std::endl; - if (tree_tracks) - std::cout << " " << tree_tracks_nevents << " events in \'Tracks\' tree " << std::endl; - if (tree_particles) - std::cout << " " << tree_particles_nevents << " events in \'Particles\' tree " << std::endl; - return true; - } - std::cout << " io.open: successfully retrieved " << tree_tracks_nevents << " events " << std::endl; - return false; - } - - int nevents() { return tree_tracks->GetEntries(); } - void event(int iev) - { - tree_tracks->GetEntry(iev); - tree_hits->GetEntry(iev); - if (tree_particles) - tree_particles->GetEntry(iev); - } -}; diff --git a/Upgrade/g4me/analysis/muonAccEffPID.root b/Upgrade/g4me/analysis/muonAccEffPID.root deleted file mode 100644 index 4d834868..00000000 Binary files a/Upgrade/g4me/analysis/muonAccEffPID.root and /dev/null differ diff --git a/Upgrade/g4me/analysis/muonTrackletAcceptance.root b/Upgrade/g4me/analysis/muonTrackletAcceptance.root deleted file mode 100644 index a0f29694..00000000 Binary files a/Upgrade/g4me/analysis/muonTrackletAcceptance.root and /dev/null differ diff --git a/Upgrade/g4me/setup/GetAbsoThicknessVsZ.C b/Upgrade/g4me/setup/GetAbsoThicknessVsZ.C deleted file mode 100644 index 223fe5c7..00000000 --- a/Upgrade/g4me/setup/GetAbsoThicknessVsZ.C +++ /dev/null @@ -1,50 +0,0 @@ -#include "TMath.h" -#include -#include "TGraphErrors.h" - -const Int_t nbEta = 6; - -void GetAbsoThicknessVsZ(const Double_t Rint = 162, const Double_t ThicknessEta0 = 70, const Double_t etaMax = 1.6) -{ - const Int_t deltaZ = 20; - const Int_t NbCyl = 4; - Double_t zMax = 0; - - const Double_t eta[nbEta] = {0.0, 0.5, 1.0, 1.2, 1.4, 1.5}; - const Double_t expThick[nbEta] = {70, 65, 65, 60, 60, 50}; - Double_t zVsEta[nbEta] = {0}; - TGraphErrors* graphThicknessVsZ = new TGraphErrors(nbEta); - - graphThicknessVsZ->SetName("tgraph"); - graphThicknessVsZ->SetTitle("Ideal thickness of the absorber as a function of z"); - - FILE* myfile = fopen("AbsoThicknessVsZ.txt", "w"); - - Int_t thickness = 0; - zMax = (Rint + ThicknessEta0) * (1 - exp(-2 * etaMax)) / (2 * exp(-etaMax)) + deltaZ; - Int_t zCenter[NbCyl] = {0, 120, 260, (320 + int(zMax)) / 2}; - Int_t halfLength[NbCyl] = {40, 80, 60, (int(zMax) - 320) / 2}; - printf("%d\n", int(zMax)); - - const Int_t cylThick[NbCyl] = {70, 65, 60, 50}; - - for (int i = 0; i < nbEta; i++) { - zVsEta[i] = Rint * (exp(eta[i]) - exp(-eta[i])) / 2; - graphThicknessVsZ->SetPoint(i, zVsEta[i], expThick[i]); - graphThicknessVsZ->SetPointError(i, 0, 5); - } - - for (Int_t j = 0; j < NbCyl; j++) { - fprintf(myfile, "%6d %3d %6d\n", zCenter[j], cylThick[j], halfLength[j]); - if (j) { - fprintf(myfile, "%6d %3d %6d\n", -zCenter[j], cylThick[j], halfLength[j]); - } - } - fclose(myfile); - - /*graphThicknessVsZ->GetXaxis()->SetTitle("z (cm)"); - graphThicknessVsZ->GetYaxis()->SetTitle("Abso thickness (cm)"); - graphThicknessVsZ->SetMarkerStyle(21); - graphThicknessVsZ->Draw("apl");*/ - //s->Draw("same"); -} diff --git a/Upgrade/g4me/setup/GetEmCalThicknessVsZ.C b/Upgrade/g4me/setup/GetEmCalThicknessVsZ.C deleted file mode 100644 index 4119af8e..00000000 --- a/Upgrade/g4me/setup/GetEmCalThicknessVsZ.C +++ /dev/null @@ -1,20 +0,0 @@ -#include "TMath.h" -#include - -void GetEmCalThicknessVsZ(const Double_t Rint = 100, const Double_t ThicknessEta0 = 30, const Double_t etaMax = 1.6) -{ - const Int_t deltaZ = 10; - Double_t zMax = 0; - - FILE* myfile = fopen("EmCalThicknessVsZ.txt", "w"); - Double_t thickness = 0; - zMax = (Rint + ThicknessEta0) * (1 - exp(-2 * etaMax)) / (2 * exp(-etaMax)) + deltaZ; - for (Int_t z = 0; z < zMax; z += deltaZ) { - thickness = sin(atan(Rint / (z * 1.0))) * ThicknessEta0; - fprintf(myfile, "%6d %3d\n", z, TMath::Nint(thickness)); - if (z) { - fprintf(myfile, "%6d %3d\n", -z, TMath::Nint(thickness)); - } - } - fclose(myfile); -} diff --git a/Upgrade/g4me/setup/createSetupNewEmCalNewAbsoPartGun.sh b/Upgrade/g4me/setup/createSetupNewEmCalNewAbsoPartGun.sh deleted file mode 100644 index ccff9673..00000000 --- a/Upgrade/g4me/setup/createSetupNewEmCalNewAbsoPartGun.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash - -partName=$1 -en=$2 -abs=$3 -seedr=$4 -nEvents=$5 -emcalThicknessEta0=30 -pzOverpt=$6 - -emcalRmin=130 -emcalRmax=$((emcalRmin+emcalThicknessEta0)) - -absRmin=$((emcalRmax+2)) -absRmax=$((absRmin+abs)) - -detAfterAbs1Rmin=$((absRmax+5)) # inner radius of the first muonId active layer -detAfterAbs1Rmax=$((absRmax+6)) # outer radius - -detAfterAbs2Rmin=$((detAfterAbs1Rmax+15)) # inner radius of the second muonId active layer -detAfterAbs2Rmax=$((detAfterAbs1Rmax+16)) # outer radius - -# to avoid "+" and "-" symbols in the filename -partNameLabel="${partName/+/Plus}" -partNameLabel="${partNameLabel/-/Minus}" - -label=ParticleGun_${partNameLabel}_${en}GeV_abs_${abs}cm_pzOverpt_${pzOverpt}_seed_${seedr} -nameSetupFile=setup$label.mac - -### Starting creating setup file -if [ -f "$nameSetupFile" ]; then - rm "$nameSetupFile" -fi -{ - echo "/random/setSeeds $seedr $seedr" - echo "/process/optical/verbose 0" - echo "/detector/world/dimensions 6. 6. 6. m" - echo "### beam pipe" - echo "/detector/pipe/radius 1.6 cm" - echo "/detector/pipe/length 200. cm" - echo "/detector/pipe/thickness 500 um" - echo "#" - echo "/detector/enable ABSO" - echo "###SENSITIVE LAYERS" - echo "# rmin rmax runit length length_unit material add_sd" - echo "# First sensitive layer to register what comes out" - echo "/detector/ABSO/addCylinder $detAfterAbs1Rmin $detAfterAbs1Rmax cm 600. cm G4_Galactic true" - echo "# Second sensitive layer to register what comes out" - echo "/detector/ABSO/addCylinder $detAfterAbs2Rmin $detAfterAbs2Rmax cm 600. cm G4_Galactic true" - echo "#" - echo "#" - echo "### inner tracker radius length thickness" - echo "/detector/tracker/addLayer 0.5 cm 16 cm 50. um" - echo "/detector/tracker/addLayer 1.2 cm 16 cm 50. um" - echo "/detector/tracker/addLayer 2.5 cm 16 cm 50. um" - echo "/detector/tracker/addLayer 3.75 cm 16 cm 50. um" - echo "#" - echo "### outer tracker radius length thickness" - echo "/detector/tracker/addLayer 7. cm 40 cm 500. um" - echo "/detector/tracker/addLayer 12. cm 60. cm 500. um" - echo "/detector/tracker/addLayer 20. cm 80. cm 500. um" - echo "/detector/tracker/addLayer 30. cm 120. cm 500. um" - echo "/detector/tracker/addLayer 45. cm 180. cm 500. um" - echo "/detector/tracker/addLayer 60. cm 240. cm 500. um" - echo "/detector/tracker/addLayer 80. cm 320. cm 500. um" - echo "/detector/tracker/addLayer 100. cm 400. cm 500. um" - echo "#" - echo "#" - echo "### EMCAL" - echo "#" - echo "#" - echo "# rmin rmax runit length length_unit material add_sd x y z" -} >> "$nameSetupFile" - -if [ ! -f EmCalThicknessVsZ.txt ]; then - root -q -b -l GetEmCalThicknessVsZ.C\($emcalRmin,${emcalThicknessEta0}\) - echo "File EmCalThicknessVsZ.txt did not exit, I created it !" -fi - -while read -r z emcalThickness; do - emcalRmaxVsZ=$((emcalRmin + emcalThickness)) - echo "/detector/ABSO/addCylinder $emcalRmin $emcalRmaxVsZ cm 5 cm G4_PbWO4 false 0 0 $z" >> "$nameSetupFile" -done > "$nameSetupFile" - -if [ ! -f AbsoThicknessVsZ.txt ]; then - root -q -b -l GetAbsoThicknessVsZ.C\("$absRmin","$abs"\) - echo "File AbsoThicknessVsZ.txt did not exit, I created it !" -fi - -while read -r zabso absoThickness halflength; do - absoRmaxVsZ=$((absRmin + absoThickness)) - echo "/detector/ABSO/addCylinder $absRmin $absoRmaxVsZ cm $halflength cm G4_Fe false 0 0 $zabso" >> "$nameSetupFile" -done > "$nameSetupFile" diff --git a/Upgrade/g4me/setup/createSetupNewEmCalNewAbsoPythiaMB.sh b/Upgrade/g4me/setup/createSetupNewEmCalNewAbsoPythiaMB.sh deleted file mode 100644 index b6459e00..00000000 --- a/Upgrade/g4me/setup/createSetupNewEmCalNewAbsoPythiaMB.sh +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/bash - -abs=$1 -seedr=$2 -nEvents=$3 -emcalThicknessEta0=30 - -seedPythia=${seedr:1} - -emcalRmin=130 -emcalRmax=$((emcalRmin+emcalThicknessEta0)) - -absRmin=$((emcalRmax+2)) -absRmax=$((absRmin+abs)) - -detAfterAbs1Rmin=$((absRmax+5)) # inner radius of the first muonId active layer -detAfterAbs1Rmax=$((absRmax+6)) # outer radius - -detAfterAbs2Rmin=$((detAfterAbs1Rmax+15)) # inner radius of the second muonId active layer -detAfterAbs2Rmax=$((detAfterAbs1Rmax+16)) # outer radius - -nameConfigFile=pythia8_pp14_seed_${seedPythia}.cfg - -label=PythiaMB_abs_${abs}cm_seed_${seedr} -nameSetupFile=setup$label.mac - -### Starting creating setup file -if [ -f "$nameSetupFile" ]; then - rm "$nameSetupFile" -fi -{ - echo "/random/setSeeds $seedr $seedr" - echo "/process/optical/verbose 0" - echo "/detector/world/dimensions 6. 6. 6. m" - echo "### beam pipe" - echo "/detector/pipe/radius 1.6 cm" - echo "/detector/pipe/length 200. cm" - echo "/detector/pipe/thickness 500 um" - echo "#" - echo "/detector/enable ABSO" - echo "###SENSITIVE LAYERS" - echo "# rmin rmax runit length length_unit material add_sd" - echo "# First sensitive layer to register what comes out" - echo "/detector/ABSO/addCylinder $detAfterAbs1Rmin $detAfterAbs1Rmax cm 600. cm G4_Galactic true" - echo "# Second sensitive layer to register what comes out" - echo "/detector/ABSO/addCylinder $detAfterAbs2Rmin $detAfterAbs2Rmax cm 600. cm G4_Galactic true" - echo "#" - echo "#" - echo "### inner tracker radius length thickness" - echo "/detector/tracker/addLayer 0.5 cm 16 cm 50. um" - echo "/detector/tracker/addLayer 1.2 cm 16 cm 50. um" - echo "/detector/tracker/addLayer 2.5 cm 16 cm 50. um" - echo "/detector/tracker/addLayer 3.75 cm 16 cm 50. um" - echo "#" - echo "### outer tracker radius length thickness" - echo "/detector/tracker/addLayer 7. cm 40 cm 500. um" - echo "/detector/tracker/addLayer 12. cm 60. cm 500. um" - echo "/detector/tracker/addLayer 20. cm 80. cm 500. um" - echo "/detector/tracker/addLayer 30. cm 120. cm 500. um" - echo "/detector/tracker/addLayer 45. cm 180. cm 500. um" - echo "/detector/tracker/addLayer 60. cm 240. cm 500. um" - echo "/detector/tracker/addLayer 80. cm 320. cm 500. um" - echo "/detector/tracker/addLayer 100. cm 400. cm 500. um" - echo "#" - echo "#" - echo "### EMCAL" - echo "#" - echo "#" - echo "# rmin rmax runit length length_unit material add_sd x y z" -} >> "$nameSetupFile" - -if [ ! -f EmCalThicknessVsZ.txt ]; then - root -q -b -l GetEmCalThicknessVsZ.C\($emcalRmin,${emcalThicknessEta0}\) - echo "File EmCalThicknessVsZ.txt did not exit, I created it !" -fi - -while read -r z emcalThickness; do - emcalRmaxVsZ=$((emcalRmin + emcalThickness)) - echo "/detector/ABSO/addCylinder $emcalRmin $emcalRmaxVsZ cm 5 cm G4_PbWO4 false 0 0 $z" >> "$nameSetupFile" -done > "$nameSetupFile" - -if [ ! -f AbsoThicknessVsZ.txt ]; then - root -q -b -l GetAbsoThicknessVsZ.C\("$absRmin","$abs"\) - echo "File AbsoThicknessVsZ.txt did not exit, I created it !" -fi - -while read -r zabso absoThickness halflength; do - absoRmaxVsZ=$((absRmin + absoThickness)) - echo "/detector/ABSO/addCylinder $absRmin $absoRmaxVsZ cm $halflength cm G4_Fe false 0 0 $zabso" >> "$nameSetupFile" -done > "$nameSetupFile" - -### Starting creating config file -if [ -f "$nameConfigFile" ]; then - rm "$nameConfigFile" -fi -{ - echo "### service" - echo "Next:numberShowEvent = 0" - echo "### random" - echo "Random:setSeed = on" - echo "Random:seed = $seedPythia" - echo "### beams" - echo "Beams:idA 2212 # proton" - echo "Beams:idB 2212 # proton" - echo "Beams:eCM 14000. # GeV" - echo "### processes" - echo "SoftQCD:inelastic on # all inelastic processes" - echo "### decays" - echo "ParticleDecays:limitTau0 on" - echo "ParticleDecays:tau0Max = 10" -} >> "$nameConfigFile" diff --git a/Upgrade/g4me/setup/empty.txt b/Upgrade/g4me/setup/empty.txt deleted file mode 100644 index 8b137891..00000000 --- a/Upgrade/g4me/setup/empty.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/Upgrade/g4me/setup/g4meGeometry.root b/Upgrade/g4me/setup/g4meGeometry.root deleted file mode 100644 index a2479cb1..00000000 Binary files a/Upgrade/g4me/setup/g4meGeometry.root and /dev/null differ diff --git a/Upgrade/pythia/README.md b/Upgrade/pythia/README.md deleted file mode 100644 index 638ca59b..00000000 --- a/Upgrade/pythia/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Pythia utilities - -## Introduction - -The purpose of this repository is to collect the macros and utilities to run Pythia predictions for charmed mesons, baryons, and exotic hadrons. - diff --git a/Upgrade/pythia/case.sh b/Upgrade/pythia/case.sh deleted file mode 100644 index 333b7773..00000000 --- a/Upgrade/pythia/case.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2034 # Ignore unused parameters. - -# x3872_ptdep_Pyhia8monash_pp14p0_absy1p44 -# Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44 -# Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44 -# x3872_ptdep_Pyhia8monash_pp14p0_absy1p44 -# Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44 - -CASE=Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44 -OUTPUTFOLDER=outputtest_chic1 diff --git a/Upgrade/pythia/clean.sh b/Upgrade/pythia/clean.sh deleted file mode 100644 index 4e9b9253..00000000 --- a/Upgrade/pythia/clean.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -rm ./*.exe -rm -rf outputtest diff --git a/Upgrade/pythia/compile_pythia.sh b/Upgrade/pythia/compile_pythia.sh deleted file mode 100755 index 294cb86b..00000000 --- a/Upgrade/pythia/compile_pythia.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2086,SC2154 # Ignore unquoted options, not assigned variable. - -g++ "${1}.cc" \ - -O2 -ansi -W -Wall -std=c++11 -Wshadow -m64 -Wno-shadow \ - -o "${1}.exe" \ - -I$PY8_HEPMC3_INCLUDE -L$PY8_HEPMC3_LIB -lHepMC3 \ - -I$PY8_PYTHIA8_INCLUDE -L$PY8_PYTHIA8_LIB -lpythia8 \ - -I$PY8_ROOT_INCLUDE -L$Py8_ROOT_LIB -EG -lz \ - -I$PY8_FASTJET_INCLUDE -L$PY8_FASTJET_LIB -lfastjet -lRecursiveTools -lfastjettools -lNsubjettiness \ - -L$PY8_YAMLCPP_LIB -I$PY8_YAMLCPP_INCLUDE -lyaml-cpp \ - $PY8_FLAGS diff --git a/Upgrade/pythia/config.yaml b/Upgrade/pythia/config.yaml deleted file mode 100644 index aec4f49d..00000000 --- a/Upgrade/pythia/config.yaml +++ /dev/null @@ -1,133 +0,0 @@ ---- -x3872_ptdep_Pyhia8monash_pp14p0_absy1p44: - outputfile: x3872_ptdep_Pyhia8monash_pp14p0_absy1p44.root - myhadronname: x3872 - myhadronlatex: X(3872) - pdgparticle: 100443 # this is the psi(2s)! PDG of the particle for which we want the simulation - maxneventsperjob: 40000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: Charmonium:all = on - extramode: none # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 0.84585366 # in case you are using pythia from another hadron, 0.1*0.3468/0.041 - -Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44: - outputfile: Jpsi_ptdep_Pyhia8monash_pp14p0_absy1p44.root - myhadronname: Jpsi - myhadronlatex: J/psi - pdgparticle: 443 # this is the psi(2s)! PDG of the particle for which we want the simulation - maxneventsperjob: 10000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: Charmonium:all = on - extramode: none # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 1. - -Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44: - outputfile: Chic1_ptdep_Pyhia8monash_pp14p0_absy1p44.root - myhadronname: Chic1 - myhadronlatex: chic1 - pdgparticle: 20443 - maxneventsperjob: 10000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: Charmonium:all = on - extramode: none # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 1. - -Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44: - outputfile: Lambda_c_ptdep_Pyhia8mode2_pp14p0_absy1p44.root - myhadronname: Lc - myhadronlatex: Lc - pdgparticle: 4122 - maxneventsperjob: 10000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: SoftQCD:all = on - extramode: mode2 # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 1. - -Xicc_ptdep_Pyhia8mode2_pp14p0_absy1p44: - outputfile: Xicc_ptdep_Pyhia8mode2_pp14p0_absy1p44.root - myhadronname: Xicc - myhadronlatex: Xicc - pdgparticle: 4424 - maxneventsperjob: 1000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: SoftQCD:all = on - extramode: mode2 # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 1. - -Omegaccc_ptdep_Pyhia8mode2_pp14p0_absy1p44: - outputfile: Omegaccc_ptdep_Pyhia8mode2_pp14p0_absy1p44.root - myhadronname: Omegaccc - myhadronlatex: Omegaccc - pdgparticle: 4444 - maxneventsperjob: 500000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: SoftQCD:all = on - extramode: mode2 # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 1. - -Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44: - outputfile: Bplus_ptdep_Pyhia8mode2_pp14p0_absy1p44.root - myhadronname: Bplus - myhadronlatex: B^{+} - pdgparticle: 521 - maxneventsperjob: 50000 # max events per file/process - tune: 14 # monash - beamidA: 2212 # incoming hadron - beamidB: 2212 # incoming hadron - eCM: 14000 - pythiamode: SoftQCD:all = on - extramode: mode2 # in case extra tuning is needed - nptbins: 100 - ptmin: 0. - ptmax: 50. - ymin: -1.44 - ymax: 1.44 - correction: 1. diff --git a/Upgrade/pythia/examplehadron.cc b/Upgrade/pythia/examplehadron.cc deleted file mode 100644 index 2758841c..00000000 --- a/Upgrade/pythia/examplehadron.cc +++ /dev/null @@ -1,186 +0,0 @@ -// This is a simple macro to generate pythia predictions - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "Pythia8/Pythia.h" -#include "TTree.h" -#include "THnSparse.h" -#include "TProfile.h" -#include "TH1F.h" -#include "TH2F.h" -#include "TFile.h" -#include "TClonesArray.h" -#include "TFile.h" -#include "TList.h" -#include "TVector3.h" -#include "TMath.h" -#include "TNtuple.h" -#include "TString.h" -#include "TRandom3.h" -#include "TH1D.h" -#include "fastjet/PseudoJet.hh" -//#include "fastjet/ClusterSequence.hh" -//#include "fastjet/ClusterSequenceArea.hh" -#include -#include // needed for io -#include // needed for io -#include -#include /* time */ -//#include -//include -//include -#include - -using namespace Pythia8; - -int main(int argc, char* argv[]) -{ - (void)argc; - std::string mycase = argv[1]; - int cislo = -1; //unique number for each file - cislo = atoi(argv[2]); - // number of parallel jobs to be run. Be aware that each single file - // will be normalized by this number to make sure that the merged output - // file has the proper normalization! - int n_jobs = -1; - n_jobs = atoi(argv[3]); - - YAML::Node node = YAML::LoadFile("config.yaml"); - YAML::Node nodecase = node[mycase.data()]; - - const std::string myhadronname = nodecase["myhadronname"].as(); - const std::string myhadronlatex = nodecase["myhadronlatex"].as(); - int pdgparticle = nodecase["pdgparticle"].as(); - float correction = nodecase["correction"].as(); - int maxnevents = nodecase["maxneventsperjob"].as(); - int tune = nodecase["tune"].as(); - int beamidA = nodecase["beamidA"].as(); - int beamidB = nodecase["beamidB"].as(); - float eCM = nodecase["eCM"].as(); - const std::string pythiamode = nodecase["pythiamode"].as(); - const std::string outputfile = nodecase["outputfile"].as(); - double nptbins = nodecase["nptbins"].as(); - double ptmin = nodecase["ptmin"].as(); - double ptmax = nodecase["ptmax"].as(); - double ymin = nodecase["ymin"].as(); - double ymax = nodecase["ymax"].as(); - const std::string extramode = nodecase["extramode"].as(); - - //END OF CONFIGURATION - - // Generator. Process selection. LHC initialization. Histogram. - Pythia pythia; - pythia.readString(Form("%s", pythiamode.data())); - pythia.readString(Form("Main:numberOfEvents = %d", maxnevents)); - pythia.readString("Next:numberShowEvent = 0"); - pythia.readString(Form("Tune:pp = %d", tune)); - pythia.readString(Form("Beams:idA = %d", beamidA)); - pythia.readString(Form("Beams:idB = %d", beamidB)); - pythia.readString(Form("Beams:eCM = %f", eCM)); - - pythia.readString("Random:setSeed = on"); - pythia.readString(Form("Random:seed = %d", cislo)); - - if (extramode == "mode2") { - std::cout << "Running with mode2" << std::endl; - pythia.readString("ColourReconnection:mode = 1"); - pythia.readString("ColourReconnection:allowDoubleJunRem = off"); - pythia.readString("ColourReconnection:m0 = 0.3"); - pythia.readString("ColourReconnection:allowJunctions = on"); - pythia.readString("ColourReconnection:junctionCorrection = 1.20"); - pythia.readString("ColourReconnection:timeDilationMode = 2"); - pythia.readString("ColourReconnection:timeDilationPar = 0.18"); - pythia.readString("StringPT:sigma = 0.335"); - pythia.readString("StringZ:aLund = 0.36"); - pythia.readString("StringZ:bLund = 0.56"); - pythia.readString("StringFlav:probQQtoQ = 0.078"); - pythia.readString("StringFlav:ProbStoUD = 0.2"); - pythia.readString("StringFlav:probQQ1toQQ0join = 0.0275,0.0275,0.0275,0.0275"); - pythia.readString("MultiPartonInteractions:pT0Ref = 2.15"); - pythia.readString("BeamRemnants:remnantMode = 1"); - pythia.readString("BeamRemnants:saturation =5"); - } - pythia.init(); - - TFile* fout = new TFile(outputfile.data(), "recreate"); - - fout->cd(); - TH1F* hparticlept = new TH1F("hchargedparticles_pt", ";p_{T};charged particle dN/dp_{T}", nptbins, ptmin, ptmax); - TH1F* hptyields_unnorm = new TH1F(Form("h%syieldsvspt_unnorm", myhadronname.data()), ";p_{T} (GeV);unnormalized yield (particle+anti)", nptbins, ptmin, ptmax); - TH1F* hptcross = new TH1F(Form("h%scrossvspt", myhadronname.data()), Form(";p_{T} (GeV);%s d#sigma^{PYTHIA}/dp_{T} (#mu b/GeV)", myhadronlatex.data()), nptbins, ptmin, ptmax); - TH1F* hycharmcross = new TH1F("hycharmcross", ";y;%s d#sigma_{c}^{PYTHIA}/dy (#mu b)", 61, -30.5, 30.5); - TH1F* hycross = new TH1F("hycross", ";y;%s d#sigma_{HF}^{PYTHIA}/dy (#mu b)", 61, -30.5, 30.5); - TH2F* hptycharmcross = new TH2F("hptcharmcross", ";p_{T} (GeV); y", 100, 0., 100., 60, -30., 30.); - - // Begin event loop. Generate event. Skip if error. List first one. - int nmyhadron = 0; - for (int iEvent = 0; iEvent < maxnevents; ++iEvent) { - - pythia.next(); - - for (int i = 0; i < pythia.event.size(); ++i) { - if (pythia.event[i].pT() < 0 || pythia.event[i].pT() > 1.e+5) - continue; - if (pythia.event[i].idAbs() == 4) { - hycharmcross->Fill(pythia.event[i].y()); - hptycharmcross->Fill(pythia.event[i].pT(), pythia.event[i].y()); - } - if (pythia.event[i].idAbs() == pdgparticle) { - hycross->Fill(pythia.event[i].y()); - } - if (pythia.event[i].y() < ymin || pythia.event[i].y() > ymax) - continue; - - hparticlept->Fill(pythia.event[i].pT()); - if (pythia.event[i].idAbs() == pdgparticle) { - ++nmyhadron; - hptyields_unnorm->Fill(pythia.event[i].pT()); - } - // End of event loop. Statistics. Histogram. Done. - } - } - pythia.stat(); - int nbinspT = hptcross->GetNbinsX(); - double norm_fact = correction * pythia.info.sigmaGen() * 1000 / (2 * n_jobs * pythia.info.nAccepted()); - printf("norm fact %f\n", norm_fact); - double contentmyhadron[nbinspT], binwidthmyhadron[nbinspT]; - - for (int ibin = 0; ibin < nbinspT; ibin++) { - contentmyhadron[ibin] = hptyields_unnorm->GetBinContent(ibin); - binwidthmyhadron[ibin] = hptyields_unnorm->GetBinWidth(ibin); - printf("bin %d, Content %f, binwidth %f\n", ibin, contentmyhadron[ibin], binwidthmyhadron[ibin]); - hptcross->SetBinContent(ibin, contentmyhadron[ibin] * norm_fact / binwidthmyhadron[ibin]); - } - const int nbinx = hptycharmcross->GetNbinsX(); - const int nbiny = hptycharmcross->GetNbinsY(); - - double contentmyhadronxy[nbinx][nbinx]; - double binwidthmyhadronxy[nbinx][nbinx]; - for (int ibinx = 0; ibinx < nbinx; ibinx++) { - for (int ibiny = 0; ibiny < nbiny; ibiny++) { - contentmyhadronxy[ibinx][ibiny] = hptycharmcross->GetBinContent(ibinx + 1, ibiny + 1); - binwidthmyhadronxy[ibinx][ibiny] = hptycharmcross->GetXaxis()->GetBinWidth(ibinx + 1) * hptycharmcross->GetYaxis()->GetBinWidth(ibiny + 1); - hptycharmcross->SetBinContent(ibinx + 1, ibiny + 1, contentmyhadronxy[ibinx][ibiny] * norm_fact / binwidthmyhadronxy[ibinx][ibiny]); - } - } - hycharmcross->Scale(norm_fact); - hycross->Scale(norm_fact); - printf("nAccepted %ld, nTried %ld\n", pythia.info.nAccepted(), pythia.info.nTried()); - printf("pythia.info.sigmaGen() %f\n", pythia.info.sigmaGen()); - printf("N myhadron %d", nmyhadron); - hptcross->Write(); - hptyields_unnorm->Write(); - hptycharmcross->Write(); - hycharmcross->Write(); - hycross->Write(); - fout->Write(); - return 0; -} diff --git a/Upgrade/pythia/merge.sh b/Upgrade/pythia/merge.sh deleted file mode 100644 index 2b1141dd..00000000 --- a/Upgrade/pythia/merge.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC1090 # Ignore non-constant source. - -export CASEFILE=case.sh -source $CASEFILE -rm "$OUTPUTFOLDER/$CASE.root" -rm "../InputsTheory/$CASE.root" -hadd "$OUTPUTFOLDER/$CASE.root" "$OUTPUTFOLDER"/file_*/"$CASE".root -cp "$OUTPUTFOLDER/$CASE.root" "../InputsTheory/$CASE.root" diff --git a/Upgrade/pythia/runhadron.sh b/Upgrade/pythia/runhadron.sh deleted file mode 100755 index 43d12217..00000000 --- a/Upgrade/pythia/runhadron.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC1090 # Ignore non-constant source. - -###### PLEASE CONFIGURE THESE PARAMETERS ##### -SETUPFILE=/home/pyadmin/software/setup_scripts/setup-pythia8.sh #contains env. variables -COMPILER=compile_pythia.sh -export CASEFILE=case.sh -source $CASEFILE -NJOBS=50 #WARNING: BE AWARE THAT THE FILES PRODUCED BY EACH JOB WILL HAVE - #1/NJOBS AS NORMALIZATION, TO PRODUCE MERGED FILES PROPERLY NORMALIZED. -echo "----------------------------------" -echo "----------------------------------" -echo "----------------------------------" -echo "$CASE" -echo "----------------------------------" -echo "----------------------------------" -echo "----------------------------------" - -###### -rm ./*.root ./*.exe -source $SETUPFILE -./$COMPILER examplehadron - -rm -rf "$OUTPUTFOLDER" -mkdir "$OUTPUTFOLDER" -cd "$OUTPUTFOLDER" || exit -for i in $(eval "echo {1..$NJOBS}"); do - mkdir "file_$i" - cd "file_$i" || exit - cp ../../examplehadron.exe . - cp ../../config.yaml . - echo "$RANDOM" - ./examplehadron.exe "$CASE" "$RANDOM" "$NJOBS" & - cd .. -done diff --git a/Upgrade/quickcalculations/geometry.py b/Upgrade/quickcalculations/geometry.py deleted file mode 100644 index 2ac20ba4..00000000 --- a/Upgrade/quickcalculations/geometry.py +++ /dev/null @@ -1,49 +0,0 @@ -# pylint: disable=missing-docstring -import math - - -def geometrybarrel(): - radius_list = [ - 0.0050, - 0.0120, - 0.0250, - 0.0375, - 0.0700, - 0.1200, - 0.2000, - 0.3000, - 0.4500, - 0.6000, - 0.8000, - 1.0000, - ] - halflength_list = [ - 0.15, - 0.15, - 0.15, - 0.62, - 0.62, - 0.62, - 0.62, - 0.62, - 1.32, - 1.32, - 1.32, - 1.32, - ] - theta_list = [] - eta_list = [] - for i, _ in enumerate(radius_list): - angle = math.atan(radius_list[i] / halflength_list[i]) - - eta = -math.log(math.tan(angle / 2.0)) - theta_list.append(angle) - eta_list.append(eta) - - print( - "layer=%d, radius=%.2f, halflength=%.2f, angle=%.2f, etamax =%.2f" - % (i, radius_list[i], halflength_list[i], theta_list[i], eta_list[i]) - ) - - -geometrybarrel() diff --git a/codeHF/Compare.C b/codeHF/Compare.C index a7e0b91f..bdf94d00 100644 --- a/codeHF/Compare.C +++ b/codeHF/Compare.C @@ -1,79 +1,62 @@ -// Comparison of AliPhysics and O2 histograms - -#include "utils_plot.h" +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. -// vectors of histogram specifications -using VecSpecHis = std::vector>; +// Comparison of AliPhysics and O2 histograms -// 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)); -} +#include "../exec/utilitiesValidation.h" -Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = "AnalysisResults_ALI.root", TString options = "", bool doRatio = false) +Int_t Compare(TString pathFileO2 = "AnalysisResults_O2.root", TString pathFileAli = "AnalysisResults_ALI.root", TString options = "", bool doRatio = false) { - 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 = "HFVertices/clistHFVertices"; - 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; - } - + TString pathListAli = "HFVertices/clistHFVertices"; TString labelParticle = ""; // Histogram specification: axis label, AliPhysics name, O2Physics path/name, rebin, log scale histogram, log scale ratio, projection axis VecSpecHis vecHisEvents; - // AddHistogram(vecHisEvents, "primary vtx x (cm)", "hPrimVertX", "hf-tag-sel-collisions/hPrimVtxX", 1, 1, 0); - // AddHistogram(vecHisEvents, "primary vtx y (cm)", "hPrimVertY", "hf-tag-sel-collisions/hPrimVtxY", 1, 1, 0); - // AddHistogram(vecHisEvents, "primary vtx z (cm)", "hPrimVertZ", "hf-tag-sel-collisions/hPrimVtxZ", 1, 1, 0); - AddHistogram(vecHisEvents, "primary vtx N contributors", "fHistPrimVertContr", "hf-tag-sel-collisions/hNContributors", 1, 1, 0); + AddHistogram(vecHisEvents, "primary vtx x (cm)", "hPrimVertX", "hf-track-index-skim-creator-tag-sel-collisions/hPosXAfterEvSel", 1, 1, 0); + AddHistogram(vecHisEvents, "primary vtx y (cm)", "hPrimVertY", "hf-track-index-skim-creator-tag-sel-collisions/hPosYAfterEvSel", 1, 1, 0); + AddHistogram(vecHisEvents, "primary vtx z (cm)", "hPrimVertZ", "hf-track-index-skim-creator-tag-sel-collisions/hPosZAfterEvSel", 1, 1, 0); + AddHistogram(vecHisEvents, "primary vtx N contributors", "fHistPrimVertContr", "hf-track-index-skim-creator-tag-sel-collisions/hNumPvContributorsAfterSel", 1, 1, 0); VecSpecHis vecHisTracks; - AddHistogram(vecHisTracks, "#it{p}_{T} before selections (GeV/#it{c})", "hPtAllTracks", "hf-tag-sel-tracks/hPtNoCuts", 2, 1, 0); - AddHistogram(vecHisTracks, "#it{p}_{T} (2-prong sel.)", "hPtSelTracks2prong", "hf-tag-sel-tracks/hPtCuts2Prong", 2, 1, 0); - AddHistogram(vecHisTracks, "#it{p}_{T} (3-prong sel.)", "hPtSelTracks3prong", "hf-tag-sel-tracks/hPtCuts3Prong", 2, 1, 0); - AddHistogram(vecHisTracks, "#it{p}_{T} (bachelor sel.)", "hPtSelTracksbachelor", "hf-tag-sel-tracks/hPtCutsV0bachelor", 2, 1, 0); - AddHistogram(vecHisTracks, "DCA XY to prim. vtx. (2-prong sel.) (cm)", "hImpParSelTracks2prong", "hf-tag-sel-tracks/hDCAToPrimXYVsPtCuts2Prong", 2, 1, 0, "y"); - AddHistogram(vecHisTracks, "DCA XY to prim. vtx. (3-prong sel.) (cm)", "hImpParSelTracks3prong", "hf-tag-sel-tracks/hDCAToPrimXYVsPtCuts3Prong", 2, 1, 0, "y"); - AddHistogram(vecHisTracks, "DCA XY to prim. vtx. (bachelor sel.) (cm)", "hImpParSelTracksbachelor", "hf-tag-sel-tracks/hDCAToPrimXYVsPtCutsV0bachelor", 2, 1, 0, "y"); - AddHistogram(vecHisTracks, "#it{#eta} (2-prong sel.)", "hEtaSelTracks2prong", "hf-tag-sel-tracks/hEtaCuts2Prong", 2, 0, 0); - AddHistogram(vecHisTracks, "#it{#eta} (3-prong sel.)", "hEtaSelTracks3prong", "hf-tag-sel-tracks/hEtaCuts3Prong", 2, 0, 0); - AddHistogram(vecHisTracks, "#it{#eta} (bachelor sel.)", "hEtaSelTracksbachelor", "hf-tag-sel-tracks/hEtaCutsV0bachelor", 2, 0, 0); + AddHistogram(vecHisTracks, "#it{p}_{T} before selections (GeV/#it{c})", "hPtAllTracks", "hf-track-index-skim-creator-tag-sel-tracks/hPtNoCuts", 2, 1, 0); + AddHistogram(vecHisTracks, "#it{p}_{T} (2-prong sel.)", "hPtSelTracks2prong", "hf-track-index-skim-creator-tag-sel-tracks/hPtCuts2Prong", 2, 1, 0); + AddHistogram(vecHisTracks, "#it{p}_{T} (3-prong sel.)", "hPtSelTracks3prong", "hf-track-index-skim-creator-tag-sel-tracks/hPtCuts3Prong", 2, 1, 0); + AddHistogram(vecHisTracks, "#it{p}_{T} (bachelor sel.)", "hPtSelTracksbachelor", "hf-track-index-skim-creator-tag-sel-tracks/hPtCutsV0bachelor", 2, 1, 0); + AddHistogram(vecHisTracks, "DCA XY to prim. vtx. (2-prong sel.) (cm)", "hImpParSelTracks2prong", "hf-track-index-skim-creator-tag-sel-tracks/hDCAToPrimXYVsPtCuts2Prong", 2, 1, 0, "y"); + AddHistogram(vecHisTracks, "DCA XY to prim. vtx. (3-prong sel.) (cm)", "hImpParSelTracks3prong", "hf-track-index-skim-creator-tag-sel-tracks/hDCAToPrimXYVsPtCuts3Prong", 2, 1, 0, "y"); + AddHistogram(vecHisTracks, "DCA XY to prim. vtx. (bachelor sel.) (cm)", "hImpParSelTracksbachelor", "hf-track-index-skim-creator-tag-sel-tracks/hDCAToPrimXYVsPtCutsV0bachelor", 2, 1, 0, "y"); + AddHistogram(vecHisTracks, "#it{#eta} (2-prong sel.)", "hEtaSelTracks2prong", "hf-track-index-skim-creator-tag-sel-tracks/hEtaCuts2Prong", 2, 0, 0); + AddHistogram(vecHisTracks, "#it{#eta} (3-prong sel.)", "hEtaSelTracks3prong", "hf-track-index-skim-creator-tag-sel-tracks/hEtaCuts3Prong", 2, 0, 0); + AddHistogram(vecHisTracks, "#it{#eta} (bachelor sel.)", "hEtaSelTracksbachelor", "hf-track-index-skim-creator-tag-sel-tracks/hEtaCutsV0bachelor", 2, 0, 0); VecSpecHis vecHisSkim; - AddHistogram(vecHisSkim, "secondary vtx x - 2prong (cm)", "h2ProngVertX", "hf-track-index-skims-creator/hVtx2ProngX", 5, 1, 0); - AddHistogram(vecHisSkim, "secondary vtx y - 2prong (cm)", "h2ProngVertY", "hf-track-index-skims-creator/hVtx2ProngY", 5, 1, 0); - AddHistogram(vecHisSkim, "secondary vtx z - 2prong (cm)", "h2ProngVertZ", "hf-track-index-skims-creator/hVtx2ProngZ", 5, 1, 0); - AddHistogram(vecHisSkim, "secondary vtx x - 3prong (cm)", "h3ProngVertX", "hf-track-index-skims-creator/hVtx3ProngX", 5, 1, 0); - AddHistogram(vecHisSkim, "secondary vtx y - 3prong (cm)", "h3ProngVertY", "hf-track-index-skims-creator/hVtx3ProngY", 5, 1, 0); - AddHistogram(vecHisSkim, "secondary vtx z - 3prong (cm)", "h3ProngVertZ", "hf-track-index-skims-creator/hVtx3ProngZ", 5, 1, 0); + AddHistogram(vecHisSkim, "secondary vtx x - 2prong (cm)", "h2ProngVertX", "hf-track-index-skim-creator/hVtx2ProngX", 5, 1, 0); + AddHistogram(vecHisSkim, "secondary vtx y - 2prong (cm)", "h2ProngVertY", "hf-track-index-skim-creator/hVtx2ProngY", 5, 1, 0); + AddHistogram(vecHisSkim, "secondary vtx z - 2prong (cm)", "h2ProngVertZ", "hf-track-index-skim-creator/hVtx2ProngZ", 5, 1, 0); + AddHistogram(vecHisSkim, "secondary vtx x - 3prong (cm)", "h3ProngVertX", "hf-track-index-skim-creator/hVtx3ProngX", 5, 1, 0); + AddHistogram(vecHisSkim, "secondary vtx y - 3prong (cm)", "h3ProngVertY", "hf-track-index-skim-creator/hVtx3ProngY", 5, 1, 0); + AddHistogram(vecHisSkim, "secondary vtx z - 3prong (cm)", "h3ProngVertZ", "hf-track-index-skim-creator/hVtx3ProngZ", 5, 1, 0); VecSpecHis vecHisCand2; - AddHistogram(vecHisCand2, "XX element of PV cov. matrix (cm^{2})", "hCovMatPrimVXX2Prong", "hf-cand-creator-2prong/hCovPVXX", 1, 1, 0); - AddHistogram(vecHisCand2, "XX element of SV cov. matrix (cm^{2})", "hCovMatSecVXX2Prong", "hf-cand-creator-2prong/hCovSVXX", 1, 1, 0); + AddHistogram(vecHisCand2, "XX element of PV cov. matrix (cm^{2})", "hCovMatPrimVXX2Prong", "hf-candidate-creator-2prong/hCovPVXX", 1, 1, 0); + AddHistogram(vecHisCand2, "XX element of SV cov. matrix (cm^{2})", "hCovMatSecVXX2Prong", "hf-candidate-creator-2prong/hCovSVXX", 1, 1, 0); VecSpecHis vecHisCand3; - AddHistogram(vecHisCand3, "XX element of PV cov. matrix (cm^{2})", "hCovMatPrimVXX3Prong", "hf-cand-creator-3prong/hCovPVXX", 1, 1, 0); - AddHistogram(vecHisCand3, "XX element of SV cov. matrix (cm^{2})", "hCovMatSecVXX3Prong", "hf-cand-creator-3prong/hCovSVXX", 1, 1, 0); + AddHistogram(vecHisCand3, "XX element of PV cov. matrix (cm^{2})", "hCovMatPrimVXX3Prong", "hf-candidate-creator-3prong/hCovPVXX", 1, 1, 0); + AddHistogram(vecHisCand3, "XX element of SV cov. matrix (cm^{2})", "hCovMatSecVXX3Prong", "hf-candidate-creator-3prong/hCovSVXX", 1, 1, 0); + AddHistogram(vecHisCand3, "YY element of PV cov. matrix (cm^{2})", "hCovMatPrimVYY3Prong", "hf-candidate-creator-3prong/hCovPVYY", 1, 1, 0); + AddHistogram(vecHisCand3, "YY element of SV cov. matrix (cm^{2})", "hCovMatSecVYY3Prong", "hf-candidate-creator-3prong/hCovSVYY", 1, 1, 0); + AddHistogram(vecHisCand3, "ZZ element of PV cov. matrix (cm^{2})", "hCovMatPrimVZZ3Prong", "hf-candidate-creator-3prong/hCovPVZZ", 1, 1, 0); + AddHistogram(vecHisCand3, "ZZ element of SV cov. matrix (cm^{2})", "hCovMatSecVZZ3Prong", "hf-candidate-creator-3prong/hCovSVZZ", 1, 1, 0); VecSpecHis vecHisD0; AddHistogram(vecHisD0, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtD0Dau0", "hf-task-d0/hPtProng0", 2, 1, 0); @@ -83,7 +66,8 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " AddHistogram(vecHisD0, "d0d0 (cm^{2})", "hd0Timesd0", "hf-task-d0/hd0d0", 2, 1, 0); AddHistogram(vecHisD0, "d0 prong 0 (cm)", "hImpParD0Dau0", "hf-task-d0/hd0Prong0", 2, 1, 0); AddHistogram(vecHisD0, "d0 prong 1 (cm)", "hImpParD0Dau1", "hf-task-d0/hd0Prong1", 2, 1, 0); - AddHistogram(vecHisD0, "impact parameter error (cm)", "hImpParErrD0Dau", "hf-task-d0/hImpParErr", 1, 1, 0); + AddHistogram(vecHisD0, "impact parameter error prong 0 (cm)", "hImpParErrD0Dau0", "hf-task-d0/hd0ErrProng0", 1, 1, 0); + AddHistogram(vecHisD0, "impact parameter error prong 1 (cm)", "hImpParErrD0Dau1", "hf-task-d0/hd0ErrProng1", 1, 1, 0); AddHistogram(vecHisD0, "decay length (cm)", "hDecLenD0", "hf-task-d0/hDecLength", 2, 1, 0); AddHistogram(vecHisD0, "decay length XY (cm)", "hDecLenXYD0", "hf-task-d0/hDecLengthxy", 2, 1, 0); AddHistogram(vecHisD0, "decay length error (cm)", "hDecLenErrD0", "hf-task-d0/hDecLenErr", 1, 1, 0); @@ -98,10 +82,21 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " AddHistogram(vecHisD0MC, labelParticle + ", gen. non-prompt: #it{p}_{T}^{gen} (GeV/#it{c})", "hPtGenLimAccFeeddwD0Kpi", "hf-task-d0/hPtGenNonPrompt", 2, 1, 0); VecSpecHis vecHisDs; - AddHistogram(vecHisDs, "#it{p}_{T} D_{s}^{#pm} (GeV/#it{c})", "hPtDs", "hf-task-ds/hPt", 2, 1, 0); + AddHistogram(vecHisDs, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtDsDau0", "hf-task-ds/hPtProng0", 2, 1, 0); + AddHistogram(vecHisDs, "#it{p}_{T} prong 1 (GeV/#it{c})", "hPtDsDau1", "hf-task-ds/hPtProng1", 2, 1, 0); + AddHistogram(vecHisDs, "#it{p}_{T} prong 2 (GeV/#it{c})", "hPtDsDau2", "hf-task-ds/hPtProng2", 2, 1, 0); + AddHistogram(vecHisDs, "#it{p}_{T} D_{s}^{+} (GeV/#it{c})", "hPtDs", "hf-task-ds/hPt", 2, 1, 0); AddHistogram(vecHisDs, "3-prong mass (K K #pi) (GeV/#it{c}^{2})", "hInvMassDs", "hf-task-ds/hMass", 5, 0, 0); + AddHistogram(vecHisDs, "impact par. XY (cm)", "hImpParXYDs", "hf-task-ds/hImpactParameterXY", 4, 1, 0); AddHistogram(vecHisDs, "decay length (cm)", "hDecLenDs", "hf-task-ds/hDecayLength", 4, 1, 0); + AddHistogram(vecHisDs, "decay length XY (cm)", "hDecLenXYDs", "hf-task-ds/hDecayLengthXY", 4, 1, 0); + AddHistogram(vecHisDs, "norm. decay length XY", "hNormDecLenXYDs", "hf-task-ds/hNormalisedDecayLengthXY", 2, 1, 0); AddHistogram(vecHisDs, "cos pointing angle", "hCosPointDs", "hf-task-ds/hCPA", 2, 1, 0); + AddHistogram(vecHisDs, "cos pointing angle XY", "hCosPointXYDs", "hf-task-ds/hCPAxy", 2, 1, 0); + AddHistogram(vecHisDs, "norm. IP", "hNormIPDs", "hf-task-ds/hMaxNormalisedDeltaIP", 4, 1, 0); + AddHistogram(vecHisDs, "|M(KK) - M(#phi)| (GeV/#it{c}^{2})", "hDeltaMassPhiDs", "hf-task-ds/hDeltaMassPhi", 1, 1, 0); + AddHistogram(vecHisDs, "cos^{3} #theta'(K)", "hCos3PiKDs", "hf-task-ds/hCos3PiK", 2, 1, 0); + AddHistogram(vecHisDs, "|cos^{3} #theta'(K)|", "hAbsCos3PiKDs", "hf-task-ds/hAbsCos3PiK", 2, 2, 0); VecSpecHis vecHisDPlus; AddHistogram(vecHisDPlus, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtDplusDau0", "hf-task-dplus/hPtProng0", 2, 1, 0); @@ -125,20 +120,68 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " AddHistogram(vecHisDPlus, "sq. sum of prong imp. par. (cm^{2})", "hSumSqImpParDplusDau", "hf-task-dplus/hImpactParameterProngSqSum", 2, 1, 0); VecSpecHis vecHisLc; - AddHistogram(vecHisLc, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtLcDau0", "hf-task-lc/hPtProng0", 2, 1, 0); - AddHistogram(vecHisLc, "#it{p}_{T} prong 1 (GeV/#it{c})", "hPtLcDau1", "hf-task-lc/hPtProng1", 2, 1, 0); - AddHistogram(vecHisLc, "#it{p}_{T} prong 2 (GeV/#it{c})", "hPtLcDau2", "hf-task-lc/hPtProng2", 2, 1, 0); - AddHistogram(vecHisLc, "#it{p}_{T} #Lambda_{c}^{#plus} (GeV/#it{c})", "hPtLc", "hf-task-lc/hPtCand", 2, 1, 0); - AddHistogram(vecHisLc, "3-prong mass (p K #pi) (GeV/#it{c}^{2})", "hInvMassLc", "hf-task-lc/hMass", 2, 0, 0, "x"); - AddHistogram(vecHisLc, "decay length (cm)", "hDecLenLc", "hf-task-lc/hDecLength", 2, 1, 0); - AddHistogram(vecHisLc, "cos pointing angle", "hCosPointLc", "hf-task-lc/hCPA", 2, 1, 0); + AddHistogram(vecHisLc, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtLcDau0", "hf-task-lc/Data/hPtProng0", 2, 1, 0); + AddHistogram(vecHisLc, "#it{p}_{T} prong 1 (GeV/#it{c})", "hPtLcDau1", "hf-task-lc/Data/hPtProng1", 2, 1, 0); + AddHistogram(vecHisLc, "#it{p}_{T} prong 2 (GeV/#it{c})", "hPtLcDau2", "hf-task-lc/Data/hPtProng2", 2, 1, 0); + AddHistogram(vecHisLc, "#it{p}_{T} #Lambda_{c}^{#plus} (GeV/#it{c})", "hPtLc", "hf-task-lc/Data/hPt", 2, 1, 0); + AddHistogram(vecHisLc, "3-prong mass (p K #pi) (GeV/#it{c}^{2})", "hInvMassLc", "hf-task-lc/Data/hMass", 2, 0, 0, "x"); + AddHistogram(vecHisLc, "prong 0 DCAxy to prim. vertex (cm)", "hImpParLcDau0", "hf-task-lc/Data/hd0Prong0", 2, 1, 0); + AddHistogram(vecHisLc, "prong 1 DCAxy to prim. vertex (cm)", "hImpParLcDau1", "hf-task-lc/Data/hd0Prong1", 2, 1, 0); + AddHistogram(vecHisLc, "prong 2 DCAxy to prim. vertex (cm)", "hImpParLcDau2", "hf-task-lc/Data/hd0Prong2", 2, 1, 0); + AddHistogram(vecHisLc, "decay length (cm)", "hDecLenLc", "hf-task-lc/Data/hDecLength", 2, 1, 0); + AddHistogram(vecHisLc, "decay length xy (cm)", "hDecLenLcXY", "hf-task-lc/Data/hDecLengthxy", 2, 1, 0); + AddHistogram(vecHisLc, "proper lifetime (#Lambda_{c}) * #it{c} (cm)", "hCt", "hf-task-lc/Data/hCt", 2, 1, 0); + AddHistogram(vecHisLc, "cos pointing angle", "hCosPointLc", "hf-task-lc/Data/hCPA", 2, 1, 0); + AddHistogram(vecHisLc, "cos pointing angle xy", "hCosPointXYLc", "hf-task-lc/Data/hCPAxy", 2, 1, 0); + AddHistogram(vecHisLc, "#it{#eta}", "hEtaLc", "hf-task-lc/Data/hEta", 2, 1, 0); + AddHistogram(vecHisLc, "#it{#varphi}", "hPhiLc", "hf-task-lc/Data/hPhi", 2, 1, 0); labelParticle = "#Lambda_{c}^{#plus} #rightarrow p K #pi"; - VecSpecHis vecHisLcMC; - AddHistogram(vecHisLcMC, labelParticle + ", matched prompt: #it{p}_{T}^{rec} (GeV/#it{c})", "hPtRecoPromptLcpKpi", "hf-task-lc/hPtRecSigPrompt", 2, 1, 0); - AddHistogram(vecHisLcMC, labelParticle + ", gen. prompt: #it{p}_{T}^{gen} (GeV/#it{c})", "hPtGenLimAccPromptLcpKpi", "hf-task-lc/hPtGenPrompt", 2, 1, 0); - AddHistogram(vecHisLcMC, labelParticle + ", matched non-prompt: #it{p}_{T}^{rec} (GeV/#it{c})", "hPtRecoFeeddwLcpKpi", "hf-task-lc/hPtRecSigNonPrompt", 2, 1, 0); - AddHistogram(vecHisLcMC, labelParticle + ", gen. non-prompt: #it{p}_{T}^{gen} (GeV/#it{c})", "hPtGenLimAccFeeddwLcpKpi", "hf-task-lc/hPtGenNonPrompt", 2, 1, 0); + VecSpecHis vecHisLcMCPt; + AddHistogram(vecHisLcMCPt, labelParticle + ", matched prompt: #it{p}_{T}^{rec} (GeV/#it{c})", "hPtRecoPromptLcpKpi", "hf-task-lc/MC/reconstructed/prompt/hPtRecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPt, labelParticle + ", gen. prompt: #it{p}_{T}^{gen} (GeV/#it{c})", "hPtGenLimAccPromptLcpKpi", "hf-task-lc/MC/generated/prompt/hPtGenPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPt, labelParticle + ", matched non-prompt: #it{p}_{T}^{rec} (GeV/#it{c})", "hPtRecoFeeddwLcpKpi", "hf-task-lc/MC/reconstructed/nonprompt/hPtRecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPt, labelParticle + ", gen. non-prompt: #it{p}_{T}^{gen} (GeV/#it{c})", "hPtGenLimAccFeeddwLcpKpi", "hf-task-lc/MC/generated/nonprompt/hPtGenNonPrompt", 2, 1, 0); + + VecSpecHis vecHisLcMCEta; + AddHistogram(vecHisLcMCEta, labelParticle + ", matched prompt: #it{#eta}", "hEtaLcPrompt", "hf-task-lc/MC/reconstructed/prompt/hEtaRecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCEta, labelParticle + ", gen. prompt: #it{#eta}", "hEtaGenLimAccPromptLcpKpi", "hf-task-lc/MC/generated/prompt/hEtaGenPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCEta, labelParticle + ", matched non-prompt: #it{#eta}", "hEtaLcNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hEtaRecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCEta, labelParticle + ", gen. non-prompt: #it{#eta}", "hEtaGenLimAccFeeddwLcpKpi", "hf-task-lc/MC/generated/nonprompt/hEtaGenNonPrompt", 2, 1, 0); + + VecSpecHis vecHisLcMCPhi; + AddHistogram(vecHisLcMCPhi, labelParticle + ", matched prompt: #it{#varphi}", "hPhiLcPrompt", "hf-task-lc/MC/reconstructed/prompt/hPhiRecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPhi, labelParticle + ", gen. prompt: #it{#varphi}", "hPhiGenLimAccPromptLcpKpi", "hf-task-lc/MC/generated/prompt/hPhiGenPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPhi, labelParticle + ", matched non-prompt: #it{#varphi}", "hPhiLcNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hPhiRecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPhi, labelParticle + ", gen. non-prompt: #it{#varphi}", "hPhiGenLimAccFeeddwLcpKpi", "hf-task-lc/MC/generated/nonprompt/hPhiGenNonPrompt", 2, 1, 0); + + VecSpecHis vecHisLcMCPrompt; + AddHistogram(vecHisLcMCPrompt, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtLcDau0Prompt", "hf-task-lc/MC/reconstructed/prompt/hPtRecProng0SigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "#it{p}_{T} prong 1 (GeV/#it{c})", "hPtLcDau1Prompt", "hf-task-lc/MC/reconstructed/prompt/hPtRecProng1SigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "#it{p}_{T} prong 2 (GeV/#it{c})", "hPtLcDau2Prompt", "hf-task-lc/MC/reconstructed/prompt/hPtRecProng2SigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "3-prong mass (p K #pi) (GeV/#it{c}^{2})", "hInvMassLcPrompt", "hf-task-lc/MC/reconstructed/prompt/hMassRecSigPrompt", 2, 0, 0, "x"); + AddHistogram(vecHisLcMCPrompt, "prong 0 DCAxy to prim. vertex (cm)", "hImpParLcDau0Prompt", "hf-task-lc/MC/reconstructed/prompt/hd0RecProng0SigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "prong 1 DCAxy to prim. vertex (cm)", "hImpParLcDau1Prompt", "hf-task-lc/MC/reconstructed/prompt/hd0RecProng1SigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "prong 2 DCAxy to prim. vertex (cm)", "hImpParLcDau2Prompt", "hf-task-lc/MC/reconstructed/prompt/hd0RecProng2SigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "decay length (cm)", "hDecLenLcPrompt", "hf-task-lc/MC/reconstructed/prompt/hDecLengthRecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "decay length xy (cm)", "hDecLenLcXYPrompt", "hf-task-lc/MC/reconstructed/prompt/hDecLengthxyRecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "proper lifetime (#Lambda_{c}) * #it{c} (cm)", "hCtPrompt", "hf-task-lc/MC/reconstructed/prompt/hCtRecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "cos pointing angle", "hCosPointLcPrompt", "hf-task-lc/MC/reconstructed/prompt/hCPARecSigPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCPrompt, "cos pointing angle xy", "hCosPointXYLcPrompt", "hf-task-lc/MC/reconstructed/prompt/hCPAxyRecSigPrompt", 2, 1, 0); + + VecSpecHis vecHisLcMCNonPrompt; + AddHistogram(vecHisLcMCNonPrompt, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtLcDau0NonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hPtRecProng0SigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "#it{p}_{T} prong 1 (GeV/#it{c})", "hPtLcDau1NonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hPtRecProng1SigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "#it{p}_{T} prong 2 (GeV/#it{c})", "hPtLcDau2NonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hPtRecProng2SigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "3-prong mass (p K #pi) (GeV/#it{c}^{2})", "hInvMassLcNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hMassRecSigNonPrompt", 2, 0, 0, "x"); + AddHistogram(vecHisLcMCNonPrompt, "prong 0 DCAxy to prim. vertex (cm)", "hImpParLcDau0NonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hd0RecProng0SigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "prong 1 DCAxy to prim. vertex (cm)", "hImpParLcDau1NonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hd0RecProng1SigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "prong 2 DCAxy to prim. vertex (cm)", "hImpParLcDau2NonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hd0RecProng2SigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "decay length (cm)", "hDecLenLcNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hDecLengthRecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "decay length xy (cm)", "hDecLenLcXYNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hDecLengthxyRecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "proper lifetime (#Lambda_{c}) * #it{c} (cm)", "hCtNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hCtRecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "cos pointing angle", "hCosPointLcNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hCPARecSigNonPrompt", 2, 1, 0); + AddHistogram(vecHisLcMCNonPrompt, "cos pointing angle xy", "hCosPointXYLcNonPrompt", "hf-task-lc/MC/reconstructed/nonprompt/hCPAxyRecSigNonPrompt", 2, 1, 0); VecSpecHis vecHisJpsi; AddHistogram(vecHisJpsi, "#it{p}_{T} prong 0 (GeV/#it{c})", "hPtJpsiDau0", "hf-task-jpsi/hPtProng0", 2, 1, 0); @@ -154,8 +197,40 @@ 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, "#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-d0-data/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "#it{R}_{g}", "fHistJetRg", "jet-substructure-d0-data/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructure, "#it{n}_{SD}", "fHistJetNsd", "jet-substructure-d0-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-d0-mcd/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{z}_{g,gen}", "fHistJetZg_Part", "jet-substructure-d0-mcp/h_jet_zg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{R}_{g,det}", "fHistJetRg", "jet-substructure-d0-mcd/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{R}_{g,gen}", "fHistJetRg_Part", "jet-substructure-d0-mcp/h_jet_rg", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{n}_{SD,det}", "fHistJetNsd", "jet-substructure-d0-mcd/h_jet_nsd", 1, 0, 0); + AddHistogram(vecHisJetSubstructureMC, "#it{n}_{SD,gen}", "fHistJetNsd_Part", "jet-substructure-d0-mcp/h_jet_nsd", 1, 0, 0); + // vector of specifications of vectors: name, VecSpecHis, pads X, pads Y - std::vector> vecSpecVecSpec; + VecSpecVecSpec vecSpecVecSpec; // Add vector specifications in the vector. if (options.Contains(" events ")) @@ -173,146 +248,31 @@ Int_t Compare(TString filerun3 = "AnalysisResults_O2.root", TString filerun2 = " if (options.Contains(" d0-mc ")) vecSpecVecSpec.push_back(std::make_tuple("d0-mc", vecHisD0MC, 2, 2)); if (options.Contains(" ds ")) - vecSpecVecSpec.push_back(std::make_tuple("ds", vecHisDs, 2, 2)); + vecSpecVecSpec.push_back(std::make_tuple("ds", vecHisDs, 5, 3)); if (options.Contains(" dplus ")) vecSpecVecSpec.push_back(std::make_tuple("dplus", vecHisDPlus, 5, 4)); if (options.Contains(" lc ")) vecSpecVecSpec.push_back(std::make_tuple("lc", vecHisLc, 5, 3)); - if (options.Contains(" lc-mc ")) - vecSpecVecSpec.push_back(std::make_tuple("lc-mc", vecHisLcMC, 2, 2)); + if (options.Contains(" lc-mc-pt ")) + vecSpecVecSpec.push_back(std::make_tuple("lc-mc-pt", vecHisLcMCPt, 2, 2)); + if (options.Contains(" lc-mc-eta ")) + vecSpecVecSpec.push_back(std::make_tuple("lc-mc-eta", vecHisLcMCEta, 2, 2)); + if (options.Contains(" lc-mc-phi ")) + vecSpecVecSpec.push_back(std::make_tuple("lc-mc-phi", vecHisLcMCPhi, 2, 2)); + if (options.Contains(" lc-mc-prompt ")) + vecSpecVecSpec.push_back(std::make_tuple("lc-mc-prompt", vecHisLcMCPrompt, 5, 3)); + if (options.Contains(" lc-mc-nonprompt ")) + 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)); - - // 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); - hRun2->Rebin(rebin); - hRun3->Rebin(rebin); - hRun2->SetLineColor(1); - hRun2->SetLineWidth(2); - hRun3->SetLineColor(2); - hRun3->SetLineWidth(1); - hRun2->SetTitle(Form("Entries: Run2: %d, Run3: %d;%s;Entries", nRun2, nRun3, labelAxis.Data())); - 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("same"); - TLegend* legend = new TLegend(0.8, 0.72, 1., 0.92); - legend->AddEntry(hRun2, "Run2", "L"); - legend->AddEntry(hRun3, "Run3", "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(Form("Entries ratio: %g;%s;Run3/Run2", (double)nRun3 / (double)nRun2, labelAxis.Data())); - yMin = hRatio->GetMinimum(0); - yMax = hRatio->GetMaximum(); - 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; + 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)); + + return MakePlots(vecSpecVecSpec, pathFileO2, pathFileAli, pathListAli, doRatio); } diff --git a/codeHF/MC_d0_eff_ref.pdf b/codeHF/MC_d0_eff_ref.pdf deleted file mode 100644 index 48708611..00000000 Binary files a/codeHF/MC_d0_eff_ref.pdf and /dev/null differ diff --git a/codeHF/MC_d0_pT_ref.pdf b/codeHF/MC_d0_pT_ref.pdf deleted file mode 100644 index 9b817207..00000000 Binary files a/codeHF/MC_d0_pT_ref.pdf and /dev/null differ diff --git a/codeHF/PlotEfficiency.C b/codeHF/PlotEfficiency.C index 6df98528..dfdda396 100644 --- a/codeHF/PlotEfficiency.C +++ b/codeHF/PlotEfficiency.C @@ -1,6 +1,17 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + // Plotting of reconstruction efficiency -#include "utils_plot.h" +#include "../exec/utilitiesPlot.h" Int_t PlotEfficiency(TString pathFile = "AnalysisResults.root", TString particles = "d0") { @@ -24,8 +35,8 @@ Int_t PlotEfficiency(TString pathFile = "AnalysisResults.root", TString particle // binning Int_t iNRebin = 4; - //Double_t* dRebin = nullptr; - //const Int_t NRebin = 1; + // Double_t* dRebin = nullptr; + // const Int_t NRebin = 1; Double_t dRebin[] = {0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 8, 10}; const Int_t NRebin = sizeof(dRebin) / sizeof(dRebin[0]) - 1; @@ -50,11 +61,21 @@ Int_t PlotEfficiency(TString pathFile = "AnalysisResults.root", TString particle Printf("\nPlotting efficiency for: %s", particle.Data()); TString outputDir = Form("hf-task-%s", particle.Data()); // analysis output directory with histograms + TString outputDirLc = "hf-task-lc/MC/"; + + TString nameHistRec; + TString nameHistgen; // inclusive candidates - TString nameHistRec = outputDir + "/hPtRecSig"; // reconstruction level pT of matched candidates - //nameHistRec = outputDir + "/hPtGenSig"; // generator level pT of matched candidates (no pT smearing) - TString nameHistgen = outputDir + "/hPtGen"; // generator level pT of generated particles + if (particle == "lc") { + nameHistRec = outputDirLc + "reconstructed/signal/hPtRecSig"; // reconstruction level pT of matched candidates + nameHistgen = outputDirLc + "generated/signal/hPtGen"; // generator level pT of generated particles + } else { + nameHistRec = outputDir + "/hPtRecSig"; // reconstruction level pT of matched candidates + // nameHistRec = outputDir + "/hPtGenSig"; // generator level pT of matched candidates (no pT smearing) + nameHistgen = outputDir + "/hPtGen"; // generator level pT of generated particles + } + TH1F* hPtRecIncl = (TH1F*)file->Get(nameHistRec.Data()); if (!hPtRecIncl) { Printf("Error: Failed to load %s from %s", nameHistRec.Data(), pathFile.Data()); @@ -67,32 +88,44 @@ Int_t PlotEfficiency(TString pathFile = "AnalysisResults.root", TString particle } // prompt candidates + if (particle == "lc") { + nameHistRec = outputDirLc + "reconstructed/prompt/hPtRecSigPrompt"; + nameHistgen = outputDirLc + "generated/prompt/hPtGenPrompt"; + } else { + nameHistRec = outputDir + "/hPtRecSigPrompt"; + nameHistgen = outputDir + "/hPtGenPrompt"; + } + bool okPrompt = true; - nameHistRec = outputDir + "/hPtRecSigPrompt"; TH1F* hPtRecPrompt = (TH1F*)file->Get(nameHistRec.Data()); if (!hPtRecPrompt) { - Printf("Warning: Failed to load %s from %s", nameHistRec.Data(), pathFile.Data()); + Warning("PlotEfficiency", "Failed to load %s from %s", nameHistRec.Data(), pathFile.Data()); okPrompt = false; } - nameHistgen = outputDir + "/hPtGenPrompt"; TH1F* hPtGenPrompt = (TH1F*)file->Get(nameHistgen.Data()); if (!hPtGenPrompt) { - Printf("Warning: Failed to load %s from %s", nameHistgen.Data(), pathFile.Data()); + Warning("PlotEfficiency", "Failed to load %s from %s", nameHistgen.Data(), pathFile.Data()); okPrompt = false; } // non-prompt candidates + if (particle == "lc") { + nameHistRec = outputDirLc + "reconstructed/nonprompt/hPtRecSigNonPrompt"; + nameHistgen = outputDirLc + "generated/nonprompt/hPtGenNonPrompt"; + } else { + nameHistRec = outputDir + "/hPtRecSigNonPrompt"; + nameHistgen = outputDir + "/hPtGenNonPrompt"; + } + bool okNonPrompt = true; - nameHistRec = outputDir + "/hPtRecSigNonPrompt"; TH1F* hPtRecNonPrompt = (TH1F*)file->Get(nameHistRec.Data()); if (!hPtRecNonPrompt) { - Printf("Warning: Failed to load %s from %s", nameHistRec.Data(), pathFile.Data()); + Warning("PlotEfficiency", "Failed to load %s from %s", nameHistRec.Data(), pathFile.Data()); okNonPrompt = false; } - nameHistgen = outputDir + "/hPtGenNonPrompt"; TH1F* hPtGenNonPrompt = (TH1F*)file->Get(nameHistgen.Data()); if (!hPtGenNonPrompt) { - Printf("Warning: Failed to load %s from %s", nameHistgen.Data(), pathFile.Data()); + Warning("PlotEfficiency", "Failed to load %s from %s", nameHistgen.Data(), pathFile.Data()); okNonPrompt = false; } @@ -211,7 +244,9 @@ Int_t PlotEfficiency(TString pathFile = "AnalysisResults.root", TString particle legendEff->Draw(); canPt->SaveAs(Form("MC_%s_pT.pdf", particle.Data())); + canPt->SaveAs(Form("MC_%s_pT.png", particle.Data())); canEff->SaveAs(Form("MC_%s_eff.pdf", particle.Data())); + canEff->SaveAs(Form("MC_%s_eff.png", particle.Data())); } delete arrayParticle; return 0; diff --git a/codeHF/PlotEfficiencyRecoStep.C b/codeHF/PlotEfficiencyRecoStep.C deleted file mode 100644 index e4045203..00000000 --- a/codeHF/PlotEfficiencyRecoStep.C +++ /dev/null @@ -1,410 +0,0 @@ -// Computation and plotting of reconstruction efficiency step-by-step -// Four steps defined: RecoHFFlag, RecoTopol, RecoCand, RecoPID -// RecoHFFlag: candidates properly flagged (e.g. in HFD0CandidateSelector --> hfflag() is D0ToPiK) -// RecoTopol: candidates which satisfy conjugate-independent topological selection -// RecoCand: candidates which satisfy conjugate-dependent topological selection -// RecoPID: candidates which satisfy conjugate-dependent topological selection and track-level PID selection - -// Macros input: AnalysisResults.root from O2 with TH2F (pt vs y) distributions for generated and reconstructed candidates -// TString particles can contain multiple particle strings -// .L PlotEfficiencyRecoStep.C -// PlotEfficiencyRecoStep("InputName.root","particlename",true); - -#include "utils_plot.h" - -void SetProperAxisRange(TH1F** histo, int NIteration, float marginHigh, float marginLow, bool logScaleH); - -Int_t PlotEfficiencyRecoStep(TString pathFile = "AnalysisResults_O2.root", TString particles = "d0") -{ - gStyle->SetOptStat(0); - gStyle->SetPalette(0); - gStyle->SetCanvasColor(0); - gStyle->SetFrameFillColor(0); - - // vertical margins of the pT spectra plot - float marginHigh = 0.05; - float marginLow = 0.05; - bool logScaleH = true; - // vertical margins of the efficiency plot - float marginRHigh = 0.05; - float marginRLow = 0.05; - bool logScaleR = false; - double yMin = 999.; - double yMax = -999.; - int nRec, nGen; - int colours[] = {1, 2, 3, 4}; - int markers[] = {24, 25, 46, 28}; - float markersize[] = {1., 1., 1., 1.}; - int lineWidth = 1; - - // binning - Int_t iNRebin = 4; - //Double_t* dRebin = nullptr; - //const Int_t NRebin = 1; - Double_t dRebin[] = {0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 8, 10}; - const Int_t NRebin = sizeof(dRebin) / sizeof(dRebin[0]) - 1; - - TFile* file = new TFile(pathFile.Data()); - if (file->IsZombie()) { - Printf("Error: Failed to open file %s", pathFile.Data()); - return 1; - } - - // get list of particles - TObjArray* arrayParticle = 0; - arrayParticle = particles.Tokenize(" "); - TString particle = ""; - - // compute efficiency at each reconstruction step - TString recoStep[4] = {"RecoHFFlag", "RecoTopol", "RecoCand", "RecoPID"}; - TString labelsSteps[4] = {"skimming", "topol. gen.", "topol. conj.", "PID"}; - const int NRecoStep = sizeof(recoStep) / sizeof(recoStep[0]); - TString partType[3] = {"Incl", "Prompt", "NonPrompt"}; - const int NPartType = sizeof(partType) / sizeof(partType[0]); - - // Generated distributions - TCanvas* canGenSbyS = new TCanvas("canGenSbyS", "canGenSbyS", 800, 600); - TCanvas* canGenSbySPt = new TCanvas("canGenSbySPt", "canGenSbySPt", 800, 600); - TCanvas* canGenSbySY = new TCanvas("canGenSbySY", "canGenSbySY", 800, 600); - // Reconstructed distributions (inclusive) - TCanvas* canRecoSbyS = new TCanvas("canRecoSbyS", "canRecoSbyS", 800, 600); - TCanvas* canRecoSbySPt = new TCanvas("canRecoSbySPt", "canRecoSbySPt", 800, 600); - TCanvas* canRecoSbySY = new TCanvas("canRecoSbySY", "canRecoSbySY", 800, 600); - // Reconstructed distributions (prompt) - TCanvas* canRecoSbySPrompt = new TCanvas("canRecoSbySPrompt", "canRecoSbySPrompt", 800, 600); - TCanvas* canRecoSbySPromptPt = new TCanvas("canRecoSbySPromptPt", "canRecoSbySPromptPt", 800, 600); - TCanvas* canRecoSbySPromptY = new TCanvas("canRecoSbySPromptY", "canRecoSbySPromptY", 800, 600); - // Reconstructed distributions (non-prompt) - TCanvas* canRecoSbySNonPrompt = new TCanvas("canRecoSbySNonPrompt", "canRecoSbySNonPrompt", 800, 600); - TCanvas* canRecoSbySNonPromptPt = new TCanvas("canRecoSbySNonPromptPt", "canRecoSbySNonPromptPt", 800, 600); - TCanvas* canRecoSbySNonPromptY = new TCanvas("canRecoSbySNonPromptY", "canRecoSbySNonPromptY", 800, 600); - - if (NRecoStep == 4) { - canGenSbyS->Divide(2, 2); - canGenSbySPt->Divide(2, 2); - canGenSbySY->Divide(2, 2); - canRecoSbyS->Divide(2, 2); - canRecoSbySPt->Divide(2, 2); - canRecoSbySY->Divide(2, 2); - canRecoSbySPrompt->Divide(2, 2); - canRecoSbySPromptPt->Divide(2, 2); - canRecoSbySPromptY->Divide(2, 2); - canRecoSbySNonPrompt->Divide(2, 2); - canRecoSbySNonPromptPt->Divide(2, 2); - canRecoSbySNonPromptY->Divide(2, 2); - } - - TCanvas* canEffSbySPt = new TCanvas(Form("canEffSbySPt_%s", particle.Data()), "EffPt", 800, 600); - canEffSbySPt->Divide(2, 2); - - TCanvas* canEffSbySY = new TCanvas(Form("canEffSbySY_%s", particle.Data()), "EffY", 800, 600); - canEffSbySY->Divide(2, 2); - - // Efficiency (inclusive) - TH1F** hEffPtIncl = new TH1F*[NRecoStep]; - TH1F** hEffYIncl = new TH1F*[NRecoStep]; - - // Efficiency (prompt) - TH1F** hEffPtPrompt = new TH1F*[NRecoStep]; - TH1F** hEffYPrompt = new TH1F*[NRecoStep]; - - // Efficiency (non-propmt) - TH1F** hEffPtNonPrompt = new TH1F*[NRecoStep]; - TH1F** hEffYNonPrompt = new TH1F*[NRecoStep]; - - TLegend* legendSbyS = new TLegend(0.15, 0.65, 0.45, 0.9); - legendSbyS->SetFillColorAlpha(0, kWhite); - legendSbyS->SetLineWidth(0); - - // loop over particles - for (int iP = 0; iP < arrayParticle->GetEntriesFast(); iP++) { - particle = ((TObjString*)(arrayParticle->At(iP)))->GetString(); - if (!particle.Length()) { - Printf("Error: Empty particle string"); - return 1; - } - Printf("\nPlotting efficiency step-by-step for: %s", particle.Data()); - - TString outputDir = Form("hf-task-%s-mc", particle.Data()); // analysis output directory with histograms - - // inclusive generated - TString nameHistgen = outputDir + "/hPtVsYGen"; // generator level pT of generated particles - TH2F* hPtVsYGenIncl = (TH2F*)file->Get(nameHistgen.Data()); - if (!hPtVsYGenIncl) { - Printf("Error: Failed to load %s from %s", nameHistgen.Data(), pathFile.Data()); - return 1; - } - canGenSbyS->cd(1); - hPtVsYGenIncl->Draw("colz"); - - TH1F* hGenPtIncl = (TH1F*)hPtVsYGenIncl->ProjectionX("hGen_Pt", 1, hPtVsYGenIncl->GetXaxis()->GetLast(), "e"); - TH1F* hGenYIncl = (TH1F*)hPtVsYGenIncl->ProjectionY("hGen_Y", 1, hPtVsYGenIncl->GetYaxis()->GetLast(), "e"); - - if (iNRebin > 1) { - hGenPtIncl->Rebin(iNRebin); - hGenYIncl->Rebin(iNRebin); - } else if (NRebin > 1) { - hGenPtIncl = (TH1F*)hGenPtIncl->Rebin(NRebin, "hGenPtInclR", dRebin); - hGenYIncl = (TH1F*)hGenYIncl->Rebin(NRebin, "hGenYInclR", dRebin); - } - - canGenSbySPt->cd(1); - hGenPtIncl->Draw("pe"); - - canGenSbySY->cd(1); - hGenYIncl->Draw("pe"); - - // prompt generated - TString nameHistgenPrompt = outputDir + "/hPtVsYGenPrompt"; // generator level pT of generated particles - TH2F* hPtVsYGenPrompt = (TH2F*)file->Get(nameHistgenPrompt.Data()); - if (!hPtVsYGenPrompt) { - Printf("Error: Failed to load %s from %s", nameHistgenPrompt.Data(), pathFile.Data()); - return 1; - } - canGenSbyS->cd(2); - hPtVsYGenPrompt->Draw("colz"); - - TH1F* hGenPtPrompt = (TH1F*)hPtVsYGenPrompt->ProjectionX("hGenPrompt_Pt", 1, hPtVsYGenPrompt->GetXaxis()->GetLast(), "e"); - TH1F* hGenYPrompt = (TH1F*)hPtVsYGenPrompt->ProjectionY("hGenPrompt_Y", 1, hPtVsYGenPrompt->GetYaxis()->GetLast(), "e"); - - if (iNRebin > 1) { - hGenPtPrompt->Rebin(iNRebin); - hGenYPrompt->Rebin(iNRebin); - } else if (NRebin > 1) { - hGenPtPrompt = (TH1F*)hGenPtPrompt->Rebin(NRebin, "hGenPtPromptR", dRebin); - hGenYPrompt = (TH1F*)hGenYPrompt->Rebin(NRebin, "hGenYPromptR", dRebin); - } - - canGenSbySPt->cd(2); - hGenPtPrompt->Draw("pe"); - - canGenSbySY->cd(2); - hGenYPrompt->Draw("pe"); - - // non-prompt generated - TString nameHistgenNonPrompt = outputDir + "/hPtVsYGenNonPrompt"; // generator level pT of generated particles - TH2F* hPtVsYGenNonPrompt = (TH2F*)file->Get(nameHistgenNonPrompt.Data()); - if (!hPtVsYGenNonPrompt) { - Printf("Error: Failed to load %s from %s", nameHistgenNonPrompt.Data(), pathFile.Data()); - return 1; - } - canGenSbyS->cd(3); - hPtVsYGenNonPrompt->Draw("colz"); - - TH1F* hGenPtNonPrompt = (TH1F*)hPtVsYGenNonPrompt->ProjectionX("hGenNonPrompt_Pt", 1, hPtVsYGenNonPrompt->GetXaxis()->GetLast(), "e"); - TH1F* hGenYNonPrompt = (TH1F*)hPtVsYGenNonPrompt->ProjectionY("hGenNonPrompt_Y", 1, hPtVsYGenNonPrompt->GetYaxis()->GetLast(), "e"); - - if (iNRebin > 1) { - hGenPtNonPrompt->Rebin(iNRebin); - hGenYNonPrompt->Rebin(iNRebin); - } else if (NRebin > 1) { - hGenPtNonPrompt = (TH1F*)hGenPtNonPrompt->Rebin(NRebin, "hGenPtNonPromptR", dRebin); - hGenYNonPrompt = (TH1F*)hGenYNonPrompt->Rebin(NRebin, "hGenYNonPromptR", dRebin); - } - - canGenSbySPt->cd(3); - hGenPtNonPrompt->Draw("pe"); - - canGenSbySY->cd(3); - hGenYNonPrompt->Draw("pe"); - - for (int iRs = 0; iRs < NRecoStep; iRs++) { - //inclusive - TString nameHistRec = outputDir + "/hPtVsYRecSig" + recoStep[iRs]; // reconstruction level pT of matched candidates - cout << nameHistRec.Data() << endl; - - TH2F* hPtVsYRecIncl = (TH2F*)file->Get(nameHistRec.Data()); - if (!hPtVsYRecIncl) { - Printf("Error: Failed to load %s from %s", nameHistRec.Data(), pathFile.Data()); - return 1; - } - hPtVsYRecIncl->SetTitle(Form("k%s", recoStep[iRs].Data())); - canRecoSbyS->cd(iRs + 1); - hPtVsYRecIncl->Draw("colz"); - - TH1F* hRecoPtIncl = (TH1F*)hPtVsYRecIncl->ProjectionX(Form("h%s_Pt", recoStep[iRs].Data()), 1, hPtVsYRecIncl->GetXaxis()->GetLast(), "e"); - canRecoSbySPt->cd(iRs + 1); - hRecoPtIncl->Draw("pe"); - - TH1F* hRecoYIncl = (TH1F*)hPtVsYRecIncl->ProjectionY(Form("h%s_Y", recoStep[iRs].Data()), 1, hPtVsYRecIncl->GetYaxis()->GetLast(), "e"); - canRecoSbySY->cd(iRs + 1); - hRecoYIncl->Draw("pe"); - - if (iNRebin > 1) { - hRecoPtIncl->Rebin(iNRebin); - hRecoYIncl->Rebin(iNRebin); - } else if (NRebin > 1) { - hRecoPtIncl = (TH1F*)hRecoPtIncl->Rebin(NRebin, "hRecoPtInclR", dRebin); - hRecoYIncl = (TH1F*)hRecoYIncl->Rebin(NRebin, "hRecoYInclR", dRebin); - } - - hEffPtIncl[iRs] = (TH1F*)hRecoPtIncl->Clone(Form("hEffPtIncl%s", recoStep[iRs].Data())); - hEffPtIncl[iRs]->Divide(hEffPtIncl[iRs], hGenPtIncl, 1., 1., "B"); - hEffPtIncl[iRs]->SetTitle("inclusive ;#it{p}^{rec.}_{T} (GeV/#it{c}); efficiency"); - SetHistogramStyle(hEffPtIncl[iRs], colours[iRs], markers[iRs], markersize[iRs], lineWidth); - legendSbyS->AddEntry(hEffPtIncl[iRs], labelsSteps[iRs].Data(), "P"); - - hEffYIncl[iRs] = (TH1F*)hRecoYIncl->Clone(Form("hEffYIncl%s", recoStep[iRs].Data())); - hEffYIncl[iRs]->Divide(hEffYIncl[iRs], hGenYIncl, 1., 1., "B"); - hEffYIncl[iRs]->SetTitle("inclusive ;#it{y}; efficiency"); - SetHistogramStyle(hEffYIncl[iRs], colours[iRs], markers[iRs], markersize[iRs], lineWidth); - - //prompt - TString nameHistRecPrompt = outputDir + "/hPtVsYRecSigPrompt" + recoStep[iRs]; // reconstruction level pT of matched candidates - TH2F* hPtVsYRecPrompt = (TH2F*)file->Get(nameHistRecPrompt.Data()); - if (!hPtVsYRecPrompt) { - Printf("Error: Failed to load %s from %s", nameHistRecPrompt.Data(), pathFile.Data()); - return 1; - } - hPtVsYRecPrompt->SetTitle(Form("k%s prompt", recoStep[iRs].Data())); - canRecoSbySPrompt->cd(iRs + 1); - hPtVsYRecPrompt->Draw("colz"); - - TH1F* hRecoPtPrompt = (TH1F*)hPtVsYRecPrompt->ProjectionX(Form("h%s_PtPrompt", recoStep[iRs].Data()), 1, hPtVsYRecPrompt->GetXaxis()->GetLast(), "e"); - canRecoSbySPromptPt->cd(iRs + 1); - hRecoPtPrompt->Draw("pe"); - - TH1F* hRecoYPrompt = (TH1F*)hPtVsYRecPrompt->ProjectionY(Form("h%s_YPrompt", recoStep[iRs].Data()), 1, hPtVsYRecPrompt->GetYaxis()->GetLast(), "e"); - canRecoSbySPromptY->cd(iRs + 1); - hRecoYPrompt->Draw("pe"); - - if (iNRebin > 1) { - hRecoPtPrompt->Rebin(iNRebin); - hRecoYPrompt->Rebin(iNRebin); - } else if (NRebin > 1) { - hRecoPtPrompt = (TH1F*)hRecoPtPrompt->Rebin(NRebin, "hRecoPtPromptR", dRebin); - hRecoYPrompt = (TH1F*)hRecoYPrompt->Rebin(NRebin, "hRecoYPromptR", dRebin); - } - - hEffPtPrompt[iRs] = (TH1F*)hRecoPtPrompt->Clone(Form("hEffPtPrompt%s", recoStep[iRs].Data())); - hEffPtPrompt[iRs]->Divide(hEffPtPrompt[iRs], hGenPtPrompt, 1., 1., "B"); - hEffPtPrompt[iRs]->SetTitle("prompt ;#it{p}^{rec.}_{T} (GeV/#it{c}); efficiency"); - SetHistogramStyle(hEffPtPrompt[iRs], colours[iRs], markers[iRs], markersize[iRs], lineWidth); - - hEffYPrompt[iRs] = (TH1F*)hRecoYPrompt->Clone(Form("hEffYPrompt%s", recoStep[iRs].Data())); - hEffYPrompt[iRs]->Divide(hEffYPrompt[iRs], hGenYPrompt, 1., 1., "B"); - hEffYPrompt[iRs]->SetTitle("prompt ;#it{y}; efficiency"); - SetHistogramStyle(hEffYPrompt[iRs], colours[iRs], markers[iRs], markersize[iRs], lineWidth); - - // non-prompt - TString nameHistRecNonPrompt = outputDir + "/hPtVsYRecSigNonPrompt" + recoStep[iRs]; // reconstruction level pT of matched candidates - TH2F* hPtVsYRecNonPrompt = (TH2F*)file->Get(nameHistRecNonPrompt.Data()); - if (!hPtVsYRecNonPrompt) { - Printf("Error: Failed to load %s from %s", nameHistRecNonPrompt.Data(), pathFile.Data()); - return 1; - } - hPtVsYRecNonPrompt->SetTitle(Form("k%s non-prompt", recoStep[iRs].Data())); - canRecoSbySNonPrompt->cd(iRs + 1); - hPtVsYRecNonPrompt->Draw("colz"); - - TH1F* hRecoPtNonPrompt = (TH1F*)hPtVsYRecNonPrompt->ProjectionX(Form("h%s_PtNonPrompt", recoStep[iRs].Data()), 1, hPtVsYRecNonPrompt->GetXaxis()->GetLast(), "e"); - canRecoSbySNonPromptPt->cd(iRs + 1); - hRecoPtNonPrompt->Draw("pe"); - - TH1F* hRecoYNonPrompt = (TH1F*)hPtVsYRecNonPrompt->ProjectionY(Form("h%s_YNonPrompt", recoStep[iRs].Data()), 1, hPtVsYRecNonPrompt->GetYaxis()->GetLast(), "e"); - canRecoSbySNonPromptY->cd(iRs + 1); - hRecoYNonPrompt->Draw("pe"); - - if (iNRebin > 1) { - hRecoPtNonPrompt->Rebin(iNRebin); - hRecoYNonPrompt->Rebin(iNRebin); - } else if (NRebin > 1) { - hRecoPtNonPrompt = (TH1F*)hRecoPtNonPrompt->Rebin(NRebin, "hRecoPtNonPromptR", dRebin); - hRecoYNonPrompt = (TH1F*)hRecoYNonPrompt->Rebin(NRebin, "hRecoYNonPromptR", dRebin); - } - - hEffPtNonPrompt[iRs] = (TH1F*)hRecoPtNonPrompt->Clone(Form("hEffPtNonPrompt%s", recoStep[iRs].Data())); - hEffPtNonPrompt[iRs]->Divide(hEffPtNonPrompt[iRs], hGenPtNonPrompt, 1., 1., "B"); - hEffPtNonPrompt[iRs]->SetTitle("non-prompt ;#it{p}^{rec.}_{T} (GeV/#it{c}); efficiency"); - SetHistogramStyle(hEffPtNonPrompt[iRs], colours[iRs], markers[iRs], markersize[iRs], lineWidth); - - hEffYNonPrompt[iRs] = (TH1F*)hRecoYNonPrompt->Clone(Form("hEffYNonPrompt%s", recoStep[iRs].Data())); - hEffYNonPrompt[iRs]->Divide(hEffYNonPrompt[iRs], hGenYNonPrompt, 1., 1., "B"); - hEffYNonPrompt[iRs]->SetTitle("non-prompt ;#it{y}; efficiency"); - SetHistogramStyle(hEffYNonPrompt[iRs], colours[iRs], markers[iRs], markersize[iRs], lineWidth); - } - } - - // Finding yMax and yMin for the different efficiency histograms - SetProperAxisRange(hEffPtIncl, NRecoStep, marginRHigh, marginRLow, logScaleH); - SetProperAxisRange(hEffYIncl, NRecoStep, marginRHigh, marginRLow, logScaleH); - SetProperAxisRange(hEffPtPrompt, NRecoStep, marginRHigh, marginRLow, logScaleH); - SetProperAxisRange(hEffYPrompt, NRecoStep, marginRHigh, marginRLow, logScaleH); - SetProperAxisRange(hEffPtNonPrompt, NRecoStep, marginRHigh, marginRLow, logScaleH); - SetProperAxisRange(hEffYNonPrompt, NRecoStep, marginRHigh, marginRLow, logScaleH); - - // Plotting - for (int iRs = 0; iRs < NRecoStep; iRs++) { - auto padEffSbySPt = canEffSbySPt->cd(1); - if (iRs == 0) { - SetPad(padEffSbySPt, logScaleH); - hEffPtIncl[iRs]->Draw("pe"); - } else - hEffPtIncl[iRs]->Draw("pesame"); - legendSbyS->Draw("same"); - - auto padEffSbySY = canEffSbySY->cd(1); - if (iRs == 0) { - SetPad(padEffSbySY, logScaleH); - hEffYIncl[iRs]->Draw("pe"); - } else - hEffYIncl[iRs]->Draw("pesame"); - legendSbyS->Draw("same"); - - auto padEffPromptSbySPt = canEffSbySPt->cd(2); - if (iRs == 0) { - SetPad(padEffPromptSbySPt, logScaleH); - hEffPtPrompt[iRs]->Draw("pe"); - } else - hEffPtPrompt[iRs]->Draw("pesame"); - legendSbyS->Draw("same"); - - auto padEffPromptSbySY = canEffSbySY->cd(2); - if (iRs == 0) { - SetPad(padEffPromptSbySY, logScaleH); - hEffYPrompt[iRs]->Draw("pe"); - } else - hEffYPrompt[iRs]->Draw("pesame"); - legendSbyS->Draw("same"); - - auto padEffNonPromptSbySPt = canEffSbySPt->cd(3); - if (iRs == 0) { - SetPad(padEffNonPromptSbySPt, logScaleH); - hEffPtNonPrompt[iRs]->Draw("pe"); - } else - hEffPtNonPrompt[iRs]->Draw("pesame"); - legendSbyS->Draw("same"); - - auto padEffNonPromptSbySY = canEffSbySY->cd(3); - if (iRs == 0) { - SetPad(padEffNonPromptSbySY, logScaleH); - hEffYNonPrompt[iRs]->Draw("pe"); - } else - hEffYNonPrompt[iRs]->Draw("pesame"); - legendSbyS->Draw("same"); - } - - canEffSbySPt->SaveAs(Form("MC_%s_eff_stepbystep_pT.pdf", particle.Data())); - canEffSbySY->SaveAs(Form("MC_%s_eff_stepbystepY.pdf", particle.Data())); - canEffSbySPt->SaveAs(Form("MC_%s_eff_stepbystep_pT.png", particle.Data())); - canEffSbySY->SaveAs(Form("MC_%s_eff_stepbystepY.png", particle.Data())); - - delete arrayParticle; - return 0; -} - -void SetProperAxisRange(TH1F** histo, int NIteration, float marginHigh, float marginLow, bool logScaleH) -{ - double yMin = 999.; - double yMax = -999.; - for (int iRs = 0; iRs < NIteration; iRs++) { - - if (histo[iRs]->GetMinimum(0) < yMin) { - yMin = histo[iRs]->GetMinimum(0); - } - if (histo[iRs]->GetMaximum() > yMax) { - yMax = histo[iRs]->GetMaximum(); - } - SetHistogram(histo[0], yMin, yMax, marginLow, marginHigh, logScaleH); - } -} \ No newline at end of file diff --git a/codeHF/README.md b/codeHF/README.md index b7abd23c..eddef1eb 100644 --- a/codeHF/README.md +++ b/codeHF/README.md @@ -3,20 +3,20 @@ ## HF decay reconstruction tasks The prepared HF example allows you to run reconstruction of 2-prong secondary vertices and a simple analysis of D0 mesons. The entire data processing procedure in O2 involves several steps: 1. Pre-selection of secondary tracks - * Performed by the [HFTrackIndexSkimsCreator](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/HFTrackIndexSkimsCreator.cxx) class - in the `o2-analysis-hf-track-index-skims-creator` binary. + * Performed by the [trackIndexSkimCreator](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/trackIndexSkimCreator.cxx) class + in the `o2-analysis-hf-track-index-skim-creator` binary. * Includes track selection, candidate preselection, and secondary vertex reconstruction. 1. Reconstruction of 2-prong decay candidates - * Performed by the [HFCandidateCreator2Prong](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/HFCandidateCreator2Prong.cxx) class + * Performed by the [candidateCreator2Prong](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/candidateCreator2Prong.cxx) class in the `o2-analysis-hf-candidate-creator-2prong` binary. * Reconstructs the secondary vertices again and creates 2-prong decay candidates. * Performs MC matching of the reconstructed candidates and of the generated particles. 1. Final selection of candidates - * Performed by the [HFD0CandidateSelector](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/HFD0CandidateSelector.cxx) class - in the `o2-analysis-hf-d0-candidate-selector` binary. + * Performed by the [candidateSelectorD0](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/TableProducer/candidateSelectorD0.cxx) class + in the `o2-analysis-hf-candidate-selector-d0` binary. * Appplies cuts on the parameters of the decay topology and track PID cuts. 1. D0 analysis task - * Performed by the [TaskD0](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/Tasks/taskD0.cxx) class + * Performed by the [taskD0](https://github.com/AliceO2Group/O2Physics/blob/master/PWGHF/D2H/Tasks/taskD0.cxx) class in the `o2-analysis-hf-task-d0` binary. * Fills histograms with kinematic properties of selected candidates (and matched particles). @@ -45,13 +45,7 @@ You can use the [`download_from_grid.sh`](../exec/download_from_grid.sh) script Enter the `codeHF` directory and execute the steering script: ```bash -bash runtest.sh +./run_analysis.sh ``` -Running all the steps with `INPUT_CASE=2` takes about 40 seconds in total. - The postprocessing step produces several plots `comparison_histos_(...).pdf`, `MC_(...).pdf`. - -To confirm that the output of the default settings looks as expected, compare the produced plots with their reference counterparts `(...)_ref.pdf`. - -The complete list of commit hashes used to produce the reference plots can be found in `versions_ref.txt`. diff --git a/codeHF/RunHFTaskLocal.C b/codeHF/RunHFTaskLocal.C index fee7ea87..3fabb6b2 100644 --- a/codeHF/RunHFTaskLocal.C +++ b/codeHF/RunHFTaskLocal.C @@ -1,10 +1,36 @@ -TChain* CreateLocalChain(const char* txtfile); +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// Macro to run the HF AliPhysics task that produces validation histograms + +#include "../exec/utilitiesAli.h" + +#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 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"); @@ -23,7 +49,7 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt", TChain* chainESD = CreateLocalChain(txtfile.Data()); if (!chainESD) { - Error("CreateLocalChain", "Failed to create chain from file %s", txtfile.Data()); + Fatal("CreateLocalChain", "Failed to create chain from file %s", txtfile.Data()); return -1; } @@ -32,9 +58,15 @@ Long64_t RunHFTaskLocal(TString txtfile = "./list_ali.txt", // esdH->SetNeedField(kTRUE); mgr->SetInputEventHandler(esdH); - AliMCEventHandler* handler = new AliMCEventHandler; - handler->SetReadTR(kFALSE); - mgr->SetMCtruthEventHandler(handler); + if (isMC) { + AliMCEventHandler* 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))); @@ -47,39 +79,11 @@ 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(); 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/codeHF/clean.sh b/codeHF/clean.sh old mode 100644 new mode 100755 index d3c4b820..02e842dc --- a/codeHF/clean.sh +++ b/codeHF/clean.sh @@ -12,7 +12,11 @@ comparison_histos_d0.* comparison_ratios_d0.* \ comparison_histos_d0-mc.* comparison_ratios_d0-mc.* \ comparison_histos_dplus.* comparison_ratios_dplus.* \ comparison_histos_lc.* comparison_ratios_lc.* \ -comparison_histos_lc-mc.* comparison_ratios_lc-mc.* \ +comparison_histos_lc-mc-pt.* comparison_ratios_lc-mc-pt.* \ +comparison_histos_lc-mc-eta.* comparison_ratios_lc-mc-eta.* \ +comparison_histos_lc-mc-phi.* comparison_ratios_lc-mc-phi.* \ +comparison_histos_lc-mc-prompt.* comparison_ratios_lc-mc-prompt.* \ +comparison_histos_lc-mc-nonprompt.* comparison_ratios_lc-mc-nonprompt.* \ comparison_histos_jpsi.* comparison_ratios_jpsi.* \ MC_d0_eff.* MC_d0_pT.* \ MC_dplus_eff.* MC_dplus_pT.* \ diff --git a/codeHF/compare.py b/codeHF/compare.py deleted file mode 100755 index e5bc0a54..00000000 --- a/codeHF/compare.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python3 - -""" -Comparison script. -Comparing different files with same structure and same plot names. -To run your comparison between AnalysisResults1.root AnalysisResults2.root you can use: -./compare.py AnalysisResults1.root AnalysisResults2.root -b -""" - -import argparse - -from ROOT import TH1, TCanvas, TColor, TFile, TLegend, gPad - -# import itertools - - -def compare(objs, add_leg_title=True, normalize=True): - print("Comparing") - cols = ["#e41a1c", "#377eb8", "#4daf4a"] - colors = {} - drawn = {} - for i in objs: - print("Entry", len(colors), i) - colors[i] = TColor.GetColor(cols[len(colors)]) - # Drawing objects - for i in objs: - for j in objs[i]: - obj = objs[i][j] - opt = "" - if drawn.setdefault(j, None) is None: - drawn[j] = [TCanvas(j, j)] - else: - opt += "same" - drawn[j][0].cd() - print("Drawing", obj, "with opt", opt, "on canvas", gPad.GetName()) - obj.SetLineColor(colors[i]) - obj.SetBit(TH1.kNoTitle) - obj.SetBit(TH1.kNoStats) - obj.SetTitle(i) - if normalize: - drawn[j].append(obj.DrawNormalized(opt)) - else: - drawn[j].append(obj.DrawClone(opt)) - for i in drawn: - d = drawn[i] - can = d[0] - can.cd() - gPad.SetLogy() - leg = TLegend(0.1, 0.9, 0.9, 0.99, can.GetName()) - leg.SetNColumns(2) - d.append(leg) - for j in can.GetListOfPrimitives(): - leg.AddEntry(j) - leg.Draw() - return drawn - - -def main(files, th1=True, th2=False, th3=False): - f = [TFile(i) for i in files] - h = {} - - def extract(directory): - def accept_obj(entry): - if not th1 and "TH1" in entry.ClassName(): - return False - if not th2 and "TH2" in entry.ClassName(): - return False - if not th3 and "TH3" in entry.ClassName(): - return False - return True - - o = [] - print("Dir", directory) - for i in directory.GetListOfKeys(): - obj = directory.Get(i.GetName()) - if not accept_obj(obj): - continue - if "TDirectory" in obj.ClassName(): - for j in obj.GetListOfKeys(): - if not accept_obj(obj.Get(j.GetName())): - continue - o.append(f"{directory.GetName()}/{i.GetName()}/{j.GetName()}") - continue - o.append(f"{directory.GetName()}/{i.GetName()}") - return o - - for i in f: - fn = i.GetName() - fn = fn.replace(".root", "") - fn = fn.replace("AnalysisResults_O2_Run5_", "") - fn = fn.split("/")[-1] - h[fn] = {} - lk = i.GetListOfKeys() - for j in lk: - # h[fn] = list(itertools.chain(*extract(i.Get(j.GetName())))) - o = extract(i.Get(j.GetName())) - for k in o: - h[fn][k] = i.Get(k) - drawn = compare(h) - first = True - for i in drawn: - obj = drawn[i][0] - print(i) - if first: - first_obj = obj - obj.SaveAs("Comparison.pdf[") - obj.SaveAs("Comparison.pdf") - first = False - first_obj.SaveAs("Comparison.pdf]") - fout = TFile("Comparison.root", "RECREATE") - for i in drawn: - obj = drawn[i][0] - print("Writing", obj.GetName()) - obj.Write(obj.GetName().replace("/", "_folder_")) - fout.Close() - - -if __name__ == "__main__": - pass - parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument("files", type=str, nargs="+", help="Input files") - parser.add_argument("-v", action="store_true", help="Verbose mode") - parser.add_argument("-b", action="store_true", help="Background mode") - args = parser.parse_args() - - main(files=args.files) diff --git a/codeHF/comparison_histos_cand2_ref.pdf b/codeHF/comparison_histos_cand2_ref.pdf deleted file mode 100644 index 2876cb89..00000000 Binary files a/codeHF/comparison_histos_cand2_ref.pdf and /dev/null differ diff --git a/codeHF/comparison_histos_cand3_ref.pdf b/codeHF/comparison_histos_cand3_ref.pdf deleted file mode 100644 index ed2d3a1f..00000000 Binary files a/codeHF/comparison_histos_cand3_ref.pdf and /dev/null differ diff --git a/codeHF/comparison_histos_d0-mc_ref.pdf b/codeHF/comparison_histos_d0-mc_ref.pdf deleted file mode 100644 index bc350a96..00000000 Binary files a/codeHF/comparison_histos_d0-mc_ref.pdf and /dev/null differ diff --git a/codeHF/comparison_histos_d0_ref.pdf b/codeHF/comparison_histos_d0_ref.pdf deleted file mode 100644 index 57fdc610..00000000 Binary files a/codeHF/comparison_histos_d0_ref.pdf and /dev/null differ diff --git a/codeHF/comparison_histos_skim_ref.pdf b/codeHF/comparison_histos_skim_ref.pdf deleted file mode 100644 index 6b27eb2a..00000000 Binary files a/codeHF/comparison_histos_skim_ref.pdf and /dev/null differ diff --git a/codeHF/comparison_histos_tracks_ref.pdf b/codeHF/comparison_histos_tracks_ref.pdf deleted file mode 100644 index 07623f00..00000000 Binary files a/codeHF/comparison_histos_tracks_ref.pdf and /dev/null differ diff --git a/codeHF/config_input.sh b/codeHF/config_input.sh index 0aa60343..b328162e 100644 --- a/codeHF/config_input.sh +++ b/codeHF/config_input.sh @@ -1,85 +1,145 @@ #!/bin/bash # shellcheck disable=SC2034 # Ignore unused parameters. -# Input specification for runtest.sh +# Input specification for run_analysis.sh # (Modifies input parameters.) -INPUT_CASE=2 # Input case +INPUT_CASE=7 # 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.) +# Number of input files per job. (Will be automatically optimised if set to 0.) NFILESPERJOB_CONVERT=0 # Conversion NFILESPERJOB_ALI=0 # AliPhysics NFILESPERJOB_O2=1 # O2 -# Maximum number of simultaneously running O2 jobs +# Maximum number of simultaneously running O2 jobs. (Adjust it based on available memory.) NJOBSPARALLEL_O2=$(python3 -c "print(min(10, round($(nproc) / 2)))") -JSONRUN3="dpl-config_run3.json" # Run 3 tasks parameters -# Run 5 tasks parameters for open HF study -JSONRUN5_HF="dpl-config_run5_hf.json" -# Run 5 tasks parameters for onia studies: -# J/psi and X (higher pt cut on 2-prong decay tracks and no DCA cut on single track) -JSONRUN5_ONIAX="dpl-config_run5_oniaX.json" -JSON="$JSONRUN3" - # Default settings: -# INPUT_FILES="AliESDs.root" -# INPUT_SYS="pp" -# INPUT_RUN=2 -# ISINPUTO2=0 -# ISALICE3=0 -# ISMC=0 -# JSON="$JSONRUN3" +# INPUT_LABEL="nothing" # Input description +# INPUT_DIR="$PWD" # Input directory +# INPUT_FILES="AO2D.root" # Input file pattern +# INPUT_SYS="pp" # Collision system ("pp", "PbPb") +# INPUT_RUN=3 # LHC Run (2, 3, 5) +# INPUT_IS_O2=1 # Input files are in O2 format. +# INPUT_IS_MC=0 # Input files are MC data. +# INPUT_PARENT_MASK="" # Path replacement mask for the input directory of parent files in case of linked derived O2 input. Set to ";" if no replacement needed. Syntax: "alien:///path/in/alien;/local/path" +# INPUT_TASK_CONFIG="" # Input-specific task configuration (e.g. enabling converters), overriding the task configuration in CONFIG_TASKS. String of space-separated commands. +# JSON="dpl-config.json" # O2 device configuration 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";; + INPUT_DIR="$INPUT_BASE/Run2/pp_5.02TeV/real/LHC17p_pass1_CENT_woSDD" + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + ;; 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" - ISMC=1;; + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + 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" - ISMC=1;; + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + 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";; + INPUT_FILES="AliESDs.root" + INPUT_SYS="PbPb" + INPUT_RUN=2 + INPUT_IS_O2=0 + INPUT_TASK_CONFIG="DOO2_CONV_BC=1" + ;; 5) INPUT_LABEL="Run 2, Pb-Pb 5.02 TeV LHC15o, MC LHC15k1a3" INPUT_DIR="$INPUT_BASE/Run2/PbPb_5.02TeV/sim/LHC15k1a3" + INPUT_FILES="AliESDs.root" INPUT_SYS="PbPb" - ISMC=1;; + INPUT_RUN=2 + INPUT_IS_O2=0 + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_BC=1" + ;; 6) INPUT_LABEL="Run 2, p-p 13 TeV LHC16p, MC LHC19g6f3, dedicated Ξc" INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC19g6f3" - ISMC=1;; + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + INPUT_IS_MC=1 + ;; 7) - INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC21k6, general purpose" - INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC21k6/302028/AOD" - INPUT_FILES="AO2D.root" - ISINPUTO2=1 - INPUT_RUN=3 - ISMC=1;; + INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass4, real" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass4_minBias_small" + INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1 DOO2_CONV_MFT=1" + ;; 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_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1" + ;; + 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_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1" + ;; + 10) INPUT_LABEL="Run 2, p-p 13 TeV LHC18f, MC LHC20f4a (ESD)" INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC20f4a" - ISMC=1;; - 9) + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + 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" - ISINPUTO2=1 - ISMC=1;; - 10) + INPUT_RUN=2 + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_BCINFO=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=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" - ISINPUTO2=1;; + INPUT_RUN=2 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_BCINFO=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1" + ;; + 13) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC22b1b, D2H enriched" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC22b1b" + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1" + ;; + 14) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC23f4b2, general purpose" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC23f4b2" + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1" + ;; + 15) + INPUT_LABEL="Run 3, Pb-Pb 5.36 TeV LHC23zzi_pass2" + INPUT_DIR="$INPUT_BASE/Run3/PbPb_5.36TeV/real/LHC23zzi" + INPUT_SYS="PbPb" + INPUT_TASK_CONFIG="DOO2_CONV_TRKEX_1_2=1" + ;; + 16) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC24d3, anchored" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC24d3" + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_1_2=1" + ;; esac diff --git a/codeHF/config_tasks.sh b/codeHF/config_tasks.sh index 2bdfac0c..29f7a218 100644 --- a/codeHF/config_tasks.sh +++ b/codeHF/config_tasks.sh @@ -1,7 +1,7 @@ #!/bin/bash # shellcheck disable=SC2034 # Ignore unused parameters. -# Configuration of tasks for runtest.sh +# Configuration of tasks for run_analysis.sh # (Cleans directory, modifies step activation, modifies JSON, generates step scripts.) # Mandatory functions: @@ -13,6 +13,12 @@ #################################################################################################### +# Here you can select the AliPhysics and O2Physics Git branches to load. (You need to have them built with aliBuild.) +# BRANCH_ALI="master" +# ENV_ALI="alienv setenv AliPhysics/latest-${BRANCH_ALI}-o2 -c" +# BRANCH_O2="master" +# ENV_O2="alienv setenv O2Physics/latest-${BRANCH_O2}-o2 -c" + # Steps DOCLEAN=1 # Delete created files (before and after running tasks). DOCONVERT=1 # Convert AliESDs.root to AO2D.root. @@ -21,91 +27,118 @@ DOO2=1 # Run O2 tasks. DOPOSTPROCESS=1 # Run output postprocessing. (Comparison plots. Requires DOALI=1 and/or DOO2=1) # Disable incompatible steps. -[ "$ISINPUTO2" -eq 1 ] && { DOCONVERT=0; DOALI=0; } +[ "$INPUT_IS_O2" -eq 1 ] && { DOCONVERT=0; DOALI=0; } -# O2 database -DATABASE_O2="workflows.yml" -MAKE_GRAPH=0 # Make topology graph. +DATABASE_O2="workflows.yml" # Workflow specification database +MAKE_GRAPH=0 # Make topology graph. +MAKE_PERF_STATS=0 # Produce performance profiling stats. # Activation of O2 workflows # Trigger selection -DOO2_TRIGSEL=0 # event-selection -# QA -DOO2_REJ_ALICE3=0 # hf-qa-rejection -DOO2_QA_EFF=0 # qa-efficiency -DOO2_QA_EVTRK=0 # qa-event-track -DOO2_MC_VALID=0 # hf-mc-validation -# PID -DOO2_PID_TPC=0 # pid-tpc-full -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 +DOO2_TRIGSEL=0 # event-selection-service # Vertexing -DOO2_SKIM=1 # hf-track-index-skims-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_X=0 # hf-candidate-creator-x -DOO2_CAND_CHIC=0 # hf-candidate-creator-chic -DOO2_CAND_XICC=0 # hf-candidate-creator-xicc +DOO2_CAND_LB=0 # hf-candidate-creator-lb +DOO2_CAND_B0=0 # hf-candidate-creator-b0 DOO2_CAND_BPLUS=0 # hf-candidate-creator-bplus DOO2_CAND_DSTAR=0 # hf-candidate-creator-dstar +DOO2_CAND_XIC0OC0=0 # hf-candidate-creator-xic0-omegac0 +DOO2_CAND_XIC_XIPIPI=0 # hf-candidate-creator-xic-to-xi-pi-pi # Selectors -DOO2_SEL_D0=0 # hf-d0-candidate-selector -DOO2_SEL_DS=0 # hf-ds-tokkpi-candidate-selector -DOO2_SEL_DPLUS=0 # hf-dplus-topikpi-candidate-selector -DOO2_SEL_LC=0 # hf-lc-candidate-selector -DOO2_SEL_XIC=0 # hf-xic-topkpi-candidate-selector -DOO2_SEL_JPSI=0 # hf-jpsi-candidate-selector -DOO2_SEL_X=0 # hf-x-tojpsipipi-candidate-selector -DOO2_SEL_CHIC=0 # hf-chic-tojpsigamma-candidate-selector -DOO2_SEL_LCK0SP=0 # hf-lc-tok0sp-candidate-selector -DOO2_SEL_XICC=0 # hf-xicc-topkpipi-candidate-selector -DOO2_SEL_BPLUS=0 # hf-bplus-tod0pi-candidate-selector -# User tasks +DOO2_SEL_D0=0 # 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 +DOO2_SEL_LB=0 # hf-candidate-selector-lb-to-lc-pi +DOO2_SEL_XIC=0 # hf-candidate-selector-xic-to-p-k-pi +DOO2_SEL_LCK0SP=0 # hf-candidate-selector-lc-to-k0s-p +DOO2_SEL_B0=0 # hf-candidate-selector-b0-to-d-pi +DOO2_SEL_BPLUS=0 # hf-candidate-selector-bplus-to-d0-pi +DOO2_SEL_DSTAR=0 # hf-candidate-selector-dstar +DOO2_SEL_TOXIPI=0 # hf-candidate-selector-to-xi-pi +DOO2_SEL_XIC_XIPIPI=0 # hf-candidate-selector-xic-to-xi-pi-pi +# Analysis tasks 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_LB=0 # hf-task-lb DOO2_TASK_XIC=0 # hf-task-xic -DOO2_TASK_JPSI=0 # hf-task-jpsi -DOO2_TASK_X=0 # hf-task-x -DOO2_TASK_CHIC=0 # hf-task-chic -DOO2_TASK_LCK0SP=0 # hf-task-lc-tok0sp -DOO2_TASK_XICC=0 # hf-task-xicc +DOO2_TASK_LCK0SP=0 # hf-task-lc-to-k0s-p +DOO2_TASK_B0=0 # hf-task-b0 DOO2_TASK_BPLUS=0 # hf-task-bplus +DOO2_TASK_DSTAR=0 # hf-task-dstar-to-d0-pi +DOO2_TASK_XIC_XIPIPI=0 # hf-task-xic-to-xi-pi-pi # Tree creators -DOO2_TREE_D0=0 # hf-tree-creator-d0-tokpi -DOO2_TREE_LC=0 # hf-tree-creator-lc-topkpi -DOO2_TREE_X=0 # hf-tree-creator-x-tojpsipipi -DOO2_TREE_XICC=0 # hf-tree-creator-xicc-topkpipi -DOO2_TREE_CHIC=0 # hf-tree-creator-chic-tojpsigamma -DOO2_TREE_BPLUS=0 # hf-tree-creator-bplus-tod0pi +DOO2_TREE_D0=0 # hf-tree-creator-d0-to-k-pi +DOO2_TREE_LC=0 # hf-tree-creator-lc-to-p-k-pi (only Run 3) +DOO2_TREE_LB=0 # hf-tree-creator-lb-to-lc-pi (only Run 5) +DOO2_TREE_BPLUS=0 # hf-tree-creator-bplus-to-d0-pi +DOO2_TREE_LCK0SP=0 # hf-tree-creator-lc-to-k0s-p +DOO2_TREE_TOXIPI=0 # hf-tree-creator-to-xi-pi +DOO2_TREE_XIC_XIPIPI=0 # hf-tree-creator-xic-to-xi-pi-pi +# Derived-data creators +DOO2_DATA_D0=0 # hf-derived-data-creator-d0-to-k-pi +DOO2_DATA_LC=0 # hf-derived-data-creator-lc-to-p-k-pi +DOO2_DATA_BPLUS=0 # hf-derived-data-creator-bplus-to-d0-pi +DOO2_DATA_B0=0 # hf-derived-data-creator-b0-to-d-pi +DOO2_DATA_DPLUS=0 # hf-derived-data-creator-dplus-to-pi-k-pi +DOO2_DATA_DS=0 # hf-derived-data-creator-ds-to-k-k-pi +DOO2_DATA_LCK0SP=0 # hf-derived-data-creator-lc-to-k0s-p # Correlations -DOO2_D0D0BAR_DATA=0 # hf-correlator-d0d0bar -DOO2_D0D0BAR_MCREC=0 # hf-correlator-d0d0bar-mc-rec -DOO2_D0D0BAR_MCGEN=0 # hf-correlator-d0d0bar-mc-gen -DOO2_DPLUSDMINUS_DATA=0 # hf-correlator-dplusdminus -DOO2_DPLUSDMINUS_MCREC=0 # hf-correlator-dplusdminus-mc-rec -DOO2_DPLUSDMINUS_MCGEN=0 # hf-correlator-dplusdminus-mc-gen -DOO2_TASK_FLOW=0 # hf-task-flow -# Other -DOO2_MCCONV=0 # mc-converter -DOO2_FDDCONV=0 # fdd-converter -DOO2_TRKPROP=0 # track-propagation +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_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_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-d0-qa +DOO2_JET_MATCH=0 # je-jet-matching-mc-d0-ch +DOO2_JET_SUB=0 # je-jet-substructure-d0 +DOO2_JET_SUB_OUT=0 # je-jet-substructure-d0-output +# QA +DOO2_QA_EFF=0 # qa-efficiency +DOO2_QA_EVTRK=0 # qa-event-track +DOO2_MC_VALID=0 # hf-task-mc-validation +# PID +DOO2_PID_TPC=0 # pid-tpc +DOO2_PID_TOF=0 # pid-tof +DOO2_PID_TOF_QA=0 # pid-tof-qa-mc +DOO2_PID_BAYES=0 # pid-bayes +# Converters (Consider setting these per input case via INPUT_TASK_CONFIG.) +DOO2_CONV_MC=0 # mc-converter +DOO2_CONV_FDD=0 # fdd-converter +DOO2_CONV_COLL=0 # collision-converter +DOO2_CONV_MCCOLL=0 # mccollision-converter +DOO2_CONV_ZDC=0 # zdc-converter +DOO2_CONV_BC=0 # bc-converter +DOO2_CONV_BCINFO=0 # run2bcinfos-converter +DOO2_CONV_TRKEX_0_1=0 # tracks-extra-converter (0→1) +DOO2_CONV_TRKEX_0_2=0 # tracks-extra-v002-converter (0→2) +DOO2_CONV_TRKEX_1_2=0 # tracks-extra-v002-converter (1→2) +DOO2_CONV_V0=0 # v0converter +DOO2_CONV_MFT=0 # mft-tracks-converter # Selection cuts APPLYCUTS_D0=1 # Apply D0 selection cuts. -APPLYCUTS_DS=0 # Apply Ds selection cuts. -APPLYCUTS_DPLUS=0 # Apply D+ selection cuts. +APPLYCUTS_DS=1 # Apply Ds selection cuts. +APPLYCUTS_DPLUS=1 # Apply D+ selection cuts. APPLYCUTS_LC=1 # Apply Λc selection cuts. -APPLYCUTS_XIC=0 # Apply Ξc selection cuts. -APPLYCUTS_JPSI=0 # Apply J/ψ selection cuts. -APPLYCUTS_X=0 # Apply X selection cuts. -APPLYCUTS_CHIC=0 # Apply χc(1p) selection cuts. -APPLYCUTS_LCK0SP=0 # Apply Λc → K0S p selection cuts. -APPLYCUTS_XICC=0 # Apply Ξcc selection cuts. -APPLYCUTS_BPLUS=0 # Apply B+ selection cuts. +APPLYCUTS_LB=1 # Apply Λb selection cuts. +APPLYCUTS_XIC=1 # Apply Ξc selection cuts. +APPLYCUTS_LCK0SP=1 # Apply Λc → K0S p selection cuts. +APPLYCUTS_B0=1 # Apply B0 selection cuts. +APPLYCUTS_BPLUS=1 # Apply B+ selection cuts. SAVETREES=0 # Save O2 tables to trees. USEO2VERTEXER=1 # Use the O2 vertexer in AliPhysics. @@ -136,267 +169,335 @@ function AdjustJson { cp "$JSON" "$JSON_EDIT" || ErrExit "Failed to cp $JSON $JSON_EDIT." JSON="$JSON_EDIT" - # Collision system + # Collision system (pp, PbPb) MsgWarn "Setting collision system $INPUT_SYS" + ReplaceString "\"syst\": \"pp\"" "\"syst\": \"$INPUT_SYS\"" "$JSON" || ErrExit "Failed to edit $JSON." # event-selection - # Run 2/3/5 + # LHC Run (2, 3, 5) MsgWarn "Using Run $INPUT_RUN" if [ "$INPUT_RUN" -eq 2 ]; then + ReplaceString "\"isRun2\": \"false\"" "\"isRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." # hf-track-index-skim-creator..., hf-candidate-creator-... ReplaceString "\"processRun2\": \"false\"" "\"processRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processRun3\": \"true\"" "\"processRun3\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun2BetaM\": \"false\"" "\"processRun2BetaM\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3BetaM\": \"true\"" "\"processRun3BetaM\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun2\": \"0\"" "\"processRun2\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"1\"" "\"processRun3\": \"0\"" "$JSON" || ErrExit "Failed to edit $JSON." elif [ "$INPUT_RUN" -eq 3 ]; then + ReplaceString "\"isRun2\": \"true\"" "\"isRun2\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." # hf-track-index-skim-creator..., hf-candidate-creator-... ReplaceString "\"processRun2\": \"true\"" "\"processRun2\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"processRun3\": \"false\"" "\"processRun3\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." - DOO2_TRKPROP=1 + ReplaceString "\"processRun2BetaM\": \"true\"" "\"processRun2BetaM\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3BetaM\": \"false\"" "\"processRun3BetaM\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun2\": \"1\"" "\"processRun2\": \"0\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRun3\": \"0\"" "\"processRun3\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + # 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 - # MC - if [ "$ISMC" -eq 1 ]; then + # Data type (real, MC) + if [ "$INPUT_IS_MC" -eq 1 ]; then MsgWarn "Using MC data" - ReplaceString "\"processMC\": \"false\"" "\"processMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"isMC\": \"false\"" "\"isMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMc\": \"false\"" "\"processMc\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcStd\": \"false\"" "\"processMcStd\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcWithDCAFitterAll\": \"false\"" "\"processMcWithDCAFitterAll\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcWithDCAFitterN\": \"false\"" "\"processMcWithDCAFitterN\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcAll\": \"false\"" "\"processMcAll\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMC\": \"false\"" "\"processMC\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMC\": \"0\"" "\"processMC\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMonteCarlo\": \"false\"" "\"processMonteCarlo\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processData\": \"true\"" "\"processData\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDataStd\": \"true\"" "\"processDataStd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDataWithDCAFitterN\": \"true\"" "\"processDataWithDCAFitterN\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRealData\": \"true\"" "\"processRealData\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." else MsgWarn "Using real data" - ReplaceString "\"processMC\": \"true\"" "\"processMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." ReplaceString "\"isMC\": \"true\"" "\"isMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMc\": \"true\"" "\"processMc\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcStd\": \"true\"" "\"processMcStd\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcWithDCAFitterAll\": \"true\"" "\"processMcWithDCAFitterAll\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcWithDCAFitterN\": \"true\"" "\"processMcWithDCAFitterN\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMcAll\": \"true\"" "\"processMcAll\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMC\": \"true\"" "\"processMC\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMC\": \"1\"" "\"processMC\": \"0\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processMonteCarlo\": \"true\"" "\"processMonteCarlo\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processData\": \"false\"" "\"processData\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDataStd\": \"false\"" "\"processDataStd\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processDataWithDCAFitterN\": \"false\"" "\"processDataWithDCAFitterN\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processRealData\": \"false\"" "\"processRealData\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - # event-selection - ReplaceString "\"syst\": \"pp\"" "\"syst\": \"$INPUT_SYS\"" "$JSON" || ErrExit "Failed to edit $JSON." - - # hf-tag-sel-collisions + # trigger selection if [ $DOO2_TRIGSEL -eq 1 ]; then - # trigger selection + # hf-track-index-skim-creator-tag-sel-collisions 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 - # hf-tag-sel-tracks, hf-track-index-skims-cascades-creator - if [ "$INPUT_RUN" -eq 3 ]; then - # do not perform track quality cuts for Run 3 until they are updated - ReplaceString "\"doCutQuality\": \"true\"" "\"doCutQuality\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + # D*+ + if [[ $DOO2_CAND_DSTAR -eq 1 ]]; then + # hf-track-index-skim-creator + ReplaceString "\"doDstar\": \"false\"" "\"doDstar\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - # timestamp-task - if [[ "$ISMC" -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." + # Λc → K0S p + if [[ $DOO2_CAND_CASC -eq 1 || $DOO2_SEL_LCK0SP -eq 1 || $DOO2_TASK_LCK0SP -eq 1 || $DOO2_TREE_LCK0SP -eq 1 || $DOO2_DATA_LCK0SP -eq 1 ]]; then + # hf-track-index-skim-creator-cascades + ReplaceString "\"processCascades\": \"false\"" "\"processCascades\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processNoCascades\": \"true\"" "\"processNoCascades\": \"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." + # Ξc0, Ωc0, Ξc+ + if [[ $DOO2_CAND_XIC0OC0 -eq 1 || $DOO2_SEL_TOXIPI -eq 1 || $DOO2_TREE_TOXIPI -eq 1 || $DOO2_CAND_XIC_XIPIPI -eq 1 || $DOO2_SEL_XIC_XIPIPI -eq 1 || $DOO2_TASK_XIC_XIPIPI -eq 1 || $DOO2_TREE_XIC_XIPIPI -eq 1 ]]; then + # hf-track-index-skim-creator-lf-cascades + ReplaceString "\"processLfCascades\": \"false\"" "\"processLfCascades\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processNoLfCascades\": \"true\"" "\"processNoLfCascades\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - # lambdakzero-builder - if [ "$INPUT_RUN" -eq 2 ]; then - ReplaceString "\"isRun2\": \"0\"" "\"isRun2\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." - else - ReplaceString "\"isRun2\": \"1\"" "\"isRun2\": \"0\"" "$JSON" || ErrExit "Failed to edit $JSON." + # tracks-extra-v002-converter + if [ $DOO2_CONV_TRKEX_0_2 -eq 1 ]; then + ReplaceString "\"processV000ToV002\": \"false\"" "\"processV000ToV002\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processV001ToV002\": \"true\"" "\"processV001ToV002\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + elif [ $DOO2_CONV_TRKEX_1_2 -eq 1 ]; then + ReplaceString "\"processV000ToV002\": \"true\"" "\"processV000ToV002\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processV001ToV002\": \"false\"" "\"processV001ToV002\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - # tof-event-time - if [ "$INPUT_RUN" -eq 3 ]; then - ReplaceString "\"processNoFT0\": \"false\"" "\"processNoFT0\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + # jet-finder-... + if [ "$INPUT_IS_MC" -eq 1 ]; then + ReplaceString "\"processJetsData\": \"true\"" "\"processJetsData\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." else - ReplaceString "\"processNoFT0\": \"true\"" "\"processNoFT0\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processJetsMCD\": \"true\"" "\"processJetsMCD\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"processJetsMCP\": \"true\"" "\"processJetsMCP\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - # hf-task-flow - if [ "$INPUT_RUN" -eq 3 ]; then - ReplaceString "\"processSameRun3\": \"false\"" "\"processSameRun3\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." - ReplaceString "\"processSameRun2\": \"true\"" "\"processSameRun2\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." + # 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 "\"processSameRun3\": \"true\"" "\"processSameRun3\": \"false\"" "$JSON" || ErrExit "Failed to edit $JSON." - ReplaceString "\"processSameRun2\": \"false\"" "\"processSameRun2\": \"true\"" "$JSON" || ErrExit "Failed to edit $JSON." + 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" - ReplaceString "\"d_selectionFlagD0\": \"0\"" "\"d_selectionFlagD0\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." - ReplaceString "\"d_selectionFlagD0bar\": \"0\"" "\"d_selectionFlagD0bar\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagD0\": \"0\"" "\"selectionFlagD0\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagD0bar\": \"0\"" "\"selectionFlagD0bar\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # Enable Ds selection. if [ $APPLYCUTS_DS -eq 1 ]; then MsgWarn "Using Ds selection cuts" - ReplaceString "\"d_selectionFlagDs\": \"0\"" "\"d_selectionFlagDs\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagDs\": \"0\"" "\"selectionFlagDs\": \"7\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # Enable D+ selection. if [ $APPLYCUTS_DPLUS -eq 1 ]; then MsgWarn "Using D+ selection cuts" - ReplaceString "\"d_selectionFlagDPlus\": \"0\"" "\"d_selectionFlagDPlus\": \"7\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagDplus\": \"0\"" "\"selectionFlagDplus\": \"7\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # Enable Λc selection. if [ $APPLYCUTS_LC -eq 1 ]; then MsgWarn "Using Λc selection cuts" - ReplaceString "\"d_selectionFlagLc\": \"0\"" "\"d_selectionFlagLc\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagLc\": \"0\"" "\"selectionFlagLc\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # Enable Λb selection. + if [ $APPLYCUTS_LB -eq 1 ]; then + MsgWarn "Using Λb selection cuts" + ReplaceString "\"selectionFlagLb\": \"0\"" "\"selectionFlagLb\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # Enable Ξc selection. if [ $APPLYCUTS_XIC -eq 1 ]; then MsgWarn "Using Ξc selection cuts" - ReplaceString "\"d_selectionFlagXic\": \"0\"" "\"d_selectionFlagXic\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." - fi - - # Enable J/ψ selection. - if [ $APPLYCUTS_JPSI -eq 1 ]; then - MsgWarn "Using J/ψ selection cuts" - ReplaceString "\"d_selectionFlagJpsi\": \"0\"" "\"d_selectionFlagJpsi\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." - fi - - # Enable X(3872) selection. - if [ $APPLYCUTS_X -eq 1 ]; then - MsgWarn "Using X(3872) selection cuts" - ReplaceString "\"d_selectionFlagX\": \"0\"" "\"d_selectionFlagX\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." - fi - - # Enable χc(1p) selection. - if [ $APPLYCUTS_CHIC -eq 1 ]; then - MsgWarn "Using χc(1p) selection cuts" - ReplaceString "\"d_selectionFlagChic\": \"0\"" "\"d_selectionFlagChic\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagXic\": \"0\"" "\"selectionFlagXic\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # Enable Λc → K0S p selection. if [ $APPLYCUTS_LCK0SP -eq 1 ]; then MsgWarn "Using Λc → K0S p selection cuts" - ReplaceString "\"selectionFlagLcK0sp\": \"0\"" "\"selectionFlagLcK0sp\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagLcToK0sP\": \"0\"" "\"selectionFlagLcToK0sP\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + ReplaceString "\"selectionFlagLcbarToK0sP\": \"0\"" "\"selectionFlagLcbarToK0sP\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - # Enable Ξcc selection. - if [ $APPLYCUTS_XICC -eq 1 ]; then - MsgWarn "Using Ξcc selection cuts" - ReplaceString "\"d_selectionFlagXicc\": \"0\"" "\"d_selectionFlagXicc\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + # Enable B0 selection. + if [ $APPLYCUTS_B0 -eq 1 ]; then + MsgWarn "Using B0 selection cuts" + ReplaceString "\"selectionFlagB0\": \"0\"" "\"selectionFlagB0\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi # Enable B+ selection. if [ $APPLYCUTS_BPLUS -eq 1 ]; then - MsgWarn "\nUsing B+ selection cuts" - ReplaceString "\"selectionFlagBPlus\": \"0\"" "\"selectionFlagBPlus\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + MsgWarn "Using B+ selection cuts" + ReplaceString "\"selectionFlagBplus\": \"0\"" "\"selectionFlagBplus\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." fi - } # Generate the O2 script containing the full workflow specification. function MakeScriptO2 { - # Enable cascade reconstruction in case of Λc → K0S p tasks - [[ $DOO2_CAND_CASC -eq 1 || $DOO2_SEL_LCK0SP -eq 1 || $DOO2_TASK_LCK0SP -eq 1 ]] && DOO2_CASC=1 || DOO2_CASC=0 - # Cascade reconstruction - [ $DOO2_CASC -eq 1 ] && SUFFIX_CASC="-v0" || SUFFIX_CASC="" - # ALICE 3 input - [ "$ISALICE3" -eq 1 ] && SUFFIX_ALICE3="-alice3" || SUFFIX_ALICE3="" + # Suffix to distinguish versions of the track index skim creator in the workflow database + SUFFIX_SKIM_MASK="_skimX" # suffix mask to be replaced in the workflow names + SUFFIX_SKIM="" # the actual suffix to be used instead of the mask + # Λc → K0S p cascade reconstruction + [[ $DOO2_CAND_CASC -eq 1 || $DOO2_SEL_LCK0SP -eq 1 || $DOO2_TASK_LCK0SP -eq 1 || $DOO2_TREE_LCK0SP -eq 1 || $DOO2_DATA_LCK0SP -eq 1 ]] && SUFFIX_SKIM="_v0" + # Ξc0/Ωc0 → Ξ π LF cascade reconstruction + [[ $DOO2_CAND_XIC0OC0 -eq 1 || $DOO2_SEL_TOXIPI -eq 1 || $DOO2_TREE_TOXIPI -eq 1 || $DOO2_CAND_XIC_XIPIPI -eq 1 || $DOO2_SEL_XIC_XIPIPI -eq 1 || $DOO2_TASK_XIC_XIPIPI -eq 1 || $DOO2_TREE_XIC_XIPIPI -eq 1 ]] && SUFFIX_SKIM="_casc-lf" + + # 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 + + # Suffix to distinguish the workflows that run on derived data with parent access (skims) + SUFFIX_DER_MASK="_derX" # suffix mask to be replaced in the workflow names + [ "$INPUT_PARENT_MASK" ] && SUFFIX_DER="_derived" || SUFFIX_DER="" # the actual suffix to be used instead of the mask WORKFLOWS="" # Trigger selection - [ $DOO2_TRIGSEL -eq 1 ] && WORKFLOWS+=" o2-analysis-event-selection" - # QA - [ $DOO2_REJ_ALICE3 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-qa-rejection" - [ $DOO2_QA_EFF -eq 1 ] && WORKFLOWS+=" o2-analysis-qa-efficiency" - [ $DOO2_QA_EVTRK -eq 1 ] && WORKFLOWS+=" o2-analysis-qa-event-track" - [ $DOO2_MC_VALID -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-mc-validation" - # PID - [ $DOO2_PID_TPC -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tpc-full" - [ $DOO2_PID_BAYES -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-bayes" - WF_TOF="o2-analysis-pid-tof-full" - [ $DOO2_PID_TOF -eq 1 ] && WORKFLOWS+=" ${WF_TOF}${SUFFIX_ALICE3}" - [ $DOO2_PID_TOF_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tof-qa-mc" + [ $DOO2_TRIGSEL -eq 1 ] && WORKFLOWS+=" o2-analysis-event-selection-service${SUFFIX_SKIM}" # Vertexing - WF_SKIM="o2-analysis-hf-track-index-skims-creator" - [ $DOO2_SKIM -eq 1 ] && WORKFLOWS+=" ${WF_SKIM}${SUFFIX_CASC}" - [ $DOO2_CAND_2PRONG -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-2prong" - [ $DOO2_CAND_3PRONG -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-3prong" - [ $DOO2_CAND_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-x" - [ $DOO2_CAND_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-chic" - [ $DOO2_CAND_CASC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-cascade" - [ $DOO2_CAND_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xicc" + [ $DOO2_SKIM -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-track-index-skim-creator${SUFFIX_SKIM}" + [ $DOO2_CAND_2PRONG -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-2prong${SUFFIX_DER}" + [ $DOO2_CAND_3PRONG -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-3prong${SUFFIX_DER}" + [ $DOO2_CAND_LB -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-lb" + [ $DOO2_CAND_CASC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-cascade${SUFFIX_DER}" + [ $DOO2_CAND_B0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-b0" [ $DOO2_CAND_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-bplus" [ $DOO2_CAND_DSTAR -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-dstar" + [ $DOO2_CAND_XIC0OC0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xic0-omegac0${SUFFIX_DER}" + [ $DOO2_CAND_XIC_XIPIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xic-to-xi-pi-pi${SUFFIX_DER}" # Selectors - [ $DOO2_SEL_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-d0-candidate-selector" - WF_SEL_JPSI="o2-analysis-hf-jpsi-candidate-selector" - [ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" ${WF_SEL_JPSI}${SUFFIX_ALICE3}" - [ $DOO2_SEL_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-ds-tokkpi-candidate-selector" - [ $DOO2_SEL_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-dplus-topikpi-candidate-selector" - [ $DOO2_SEL_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-lc-candidate-selector" - [ $DOO2_SEL_XIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-xic-topkpi-candidate-selector" - [ $DOO2_SEL_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-x-tojpsipipi-candidate-selector" - [ $DOO2_SEL_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-chic-tojpsigamma-candidate-selector" - [ $DOO2_SEL_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-lc-tok0sp-candidate-selector" - [ $DOO2_SEL_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-xicc-topkpipi-candidate-selector" - [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-bplus-tod0pi-candidate-selector" - # User tasks + [ $DOO2_SEL_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-d0" + [ $DOO2_SEL_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-ds-to-k-k-pi" + [ $DOO2_SEL_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi" + [ $DOO2_SEL_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-lc" + [ $DOO2_SEL_LB -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-lb-to-lc-pi" + [ $DOO2_SEL_XIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-xic-to-p-k-pi" + [ $DOO2_SEL_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-lc-to-k0s-p" + [ $DOO2_SEL_B0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-b0-to-d-pi" + [ $DOO2_SEL_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-bplus-to-d0-pi" + [ $DOO2_SEL_DSTAR -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-dstar-to-d0-pi" + [ $DOO2_SEL_TOXIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-to-xi-pi" + [ $DOO2_SEL_XIC_XIPIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-xic-to-xi-pi-pi" + # Analysis tasks [ $DOO2_TASK_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-d0" - [ $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" [ $DOO2_TASK_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-lc" + [ $DOO2_TASK_LB -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-lb" [ $DOO2_TASK_XIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-xic" - [ $DOO2_TASK_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-x" - [ $DOO2_TASK_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-chic" - [ $DOO2_TASK_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-lc-tok0sp" - [ $DOO2_TASK_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-xicc" + [ $DOO2_TASK_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-lc-to-k0s-p" + [ $DOO2_TASK_B0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-b0" [ $DOO2_TASK_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-bplus" + [ $DOO2_TASK_DSTAR -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-dstar-to-d0-pi" + [ $DOO2_TASK_XIC_XIPIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-xic-to-xi-pi-pi" + # Tree creators + [ $DOO2_TREE_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-d0-to-k-pi" + [ $DOO2_TREE_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-lc-to-p-k-pi" + [ $DOO2_TREE_LB -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-lb-to-lc-pi" + [ $DOO2_TREE_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-bplus-to-d0-pi" + [ $DOO2_TREE_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-lc-to-k0s-p" + [ $DOO2_TREE_TOXIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-to-xi-pi" + [ $DOO2_TREE_XIC_XIPIPI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xic-to-xi-pi-pi" + # Derive-data creators + [ $DOO2_DATA_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-d0-to-k-pi" + [ $DOO2_DATA_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-lc-to-p-k-pi" + [ $DOO2_DATA_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-bplus-to-d0-pi" + [ $DOO2_DATA_B0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-b0-to-d-pi" + [ $DOO2_DATA_DPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-dplus-to-pi-k-pi" + [ $DOO2_DATA_DS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-ds-to-k-k-pi" + [ $DOO2_DATA_LCK0SP -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-derived-data-creator-lc-to-k0s-p" # Correlations WF_CORR="" - [ $DOO2_D0D0BAR_DATA -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0d0bar o2-analysis-hf-task-correlation-ddbar" - [ $DOO2_D0D0BAR_MCREC -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0d0bar-mc-rec o2-analysis-hf-task-correlation-ddbar-mc-rec" - [ $DOO2_D0D0BAR_MCGEN -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-d0d0bar-mc-gen o2-analysis-hf-task-correlation-ddbar-mc-gen" - [ $DOO2_DPLUSDMINUS_DATA -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplusdminus o2-analysis-hf-task-correlation-ddbar" - [ $DOO2_DPLUSDMINUS_MCREC -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplusdminus-mc-rec o2-analysis-hf-task-correlation-ddbar-mc-rec" - [ $DOO2_DPLUSDMINUS_MCGEN -eq 1 ] && WF_CORR="o2-analysis-hf-correlator-dplusdminus-mc-gen o2-analysis-hf-task-correlation-ddbar-mc-gen" + [ $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_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" [ "$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" + [ $DOO2_CORR_DSHADRON -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-correlator-ds-hadrons" + [ $DOO2_TASK_D0HADRON -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-correlation-d0-hadrons" [ $DOO2_TASK_FLOW -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-flow" - # Tree creators - [ $DOO2_TREE_D0 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-d0-tokpi" - [ $DOO2_TREE_LC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-lc-topkpi" - [ $DOO2_TREE_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-x-tojpsipipi" - [ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-topkpipi" - [ $DOO2_TREE_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-chic-tojpsigamma" - [ $DOO2_TREE_BPLUS -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-bplus-tod0pi" - # Other - [ $DOO2_MCCONV -eq 1 ] && WORKFLOWS+=" o2-analysis-mc-converter" - [ $DOO2_FDDCONV -eq 1 ] && WORKFLOWS+=" o2-analysis-fdd-converter" - [ $DOO2_TRKPROP -eq 1 ] && WORKFLOWS+=" o2-analysis-track-propagation" + # 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-d0-qa_mc" + [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-d0_mc" + [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-d0-output_mc" + 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-d0-qa_data" + [ $DOO2_JET_SUB -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-d0_data" + [ $DOO2_JET_SUB_OUT -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-substructure-d0-output_data" + fi + [ $DOO2_JET_MATCH -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-matching-mc-d0-ch" + # QA + [ $DOO2_QA_EFF -eq 1 ] && WORKFLOWS+=" o2-analysis-qa-efficiency" + [ $DOO2_QA_EVTRK -eq 1 ] && WORKFLOWS+=" o2-analysis-qa-event-track" + [ $DOO2_MC_VALID -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-mc-validation" + # PID + [ $DOO2_PID_TPC -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tpc${SUFFIX_RUN}" + [ $DOO2_PID_BAYES -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-bayes" + [ $DOO2_PID_TOF -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tof${SUFFIX_RUN}" + [ $DOO2_PID_TOF_QA -eq 1 ] && WORKFLOWS+=" o2-analysis-pid-tof-qa-mc" + # 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_MCCOLL -eq 1 ] && WORKFLOWS+=" o2-analysis-mccollision-converter" + [ $DOO2_CONV_ZDC -eq 1 ] && WORKFLOWS+=" o2-analysis-zdc-converter" + [ $DOO2_CONV_BC -eq 1 ] && WORKFLOWS+=" o2-analysis-bc-converter" + [ $DOO2_CONV_BCINFO -eq 1 ] && WORKFLOWS+=" o2-analysis-run2bcinfos-converter" + [ $DOO2_CONV_TRKEX_0_1 -eq 1 ] && WORKFLOWS+=" o2-analysis-tracks-extra-converter" + [[ $DOO2_CONV_TRKEX_0_2 -eq 1 || $DOO2_CONV_TRKEX_1_2 -eq 1 ]] && WORKFLOWS+=" o2-analysis-tracks-extra-v002-converter" + [ $DOO2_CONV_V0 -eq 1 ] && WORKFLOWS+=" o2-analysis-v0converter" + [ $DOO2_CONV_MFT -eq 1 ] && WORKFLOWS+=" o2-analysis-mft-tracks-converter" # Translate options into arguments of the generating script. OPT_MAKECMD="" - [ "$ISMC" -eq 1 ] && OPT_MAKECMD+=" --mc" + [ "$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_PERF_STATS -eq 1 ] && OPT_MAKECMD+=" -p" # Make a copy of the default workflow database file before modifying it. - DATABASE_O2_EDIT="" - if [[ $DOO2_CASC -eq 1 || "$ISALICE3" -eq 1 ]]; then - 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" - - # Adjust workflow database in case of ALICE 3 input. - [ "$ISALICE3" -eq 1 ] && { - ReplaceString "- $WF_SEL_JPSI" "- ${WF_SEL_JPSI}${SUFFIX_ALICE3}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." - ReplaceString "- $WF_TOF" "- ${WF_TOF}${SUFFIX_ALICE3}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." - WF_TRKEXT="o2-analysis-trackextension" - ReplaceString "- $WF_TRKEXT" "- ${WF_TRKEXT}${SUFFIX_ALICE3}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." - WF_TRKSEL="o2-analysis-trackselection" - ReplaceString "- $WF_TRKSEL" "- ${WF_TRKSEL}${SUFFIX_ALICE3}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." - } - - # Adjust workflow database in case of cascades enabled. - [ $DOO2_CASC -eq 1 ] && { - ReplaceString "- $WF_SKIM" "- ${WF_SKIM}${SUFFIX_CASC}" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." - } + 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." + ReplaceString "$SUFFIX_SKIM_MASK" "$SUFFIX_SKIM" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." + ReplaceString "$SUFFIX_DER_MASK" "$SUFFIX_DER" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." + # Derived AO2D input + if [ "$INPUT_PARENT_MASK" ]; then + ReplaceString "PARENT_PATH_MASK" "$INPUT_PARENT_MASK" "$DATABASE_O2" || ErrExit "Failed to edit $DATABASE_O2." fi # Generate the O2 command. @@ -410,12 +511,13 @@ function MakeScriptO2 { #!/bin/bash FileIn="\$1" JSON="\$2" +time \ $O2EXEC 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\\\", $INPUT_IS_MC, $USEO2VERTEXER, $USEALIEVCUTS, $DOO2_JET_FIND, $DOO2_JET_MATCH, $DOO2_JET_SUB)\"" cat << EOF > "$SCRIPT_ALI" #!/bin/bash FileIn="\$1" @@ -432,25 +534,28 @@ function MakeScriptPostprocess { [ $DOO2_SKIM -eq 1 ] && OPT_COMPARE+=" events tracks skim " [ $DOO2_CAND_2PRONG -eq 1 ] && OPT_COMPARE+=" cand2 " [ $DOO2_CAND_3PRONG -eq 1 ] && OPT_COMPARE+=" cand3 " - [ $DOO2_TASK_D0 -eq 1 ] && { OPT_COMPARE+=" d0 "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" d0-mc "; } + [ $DOO2_TASK_D0 -eq 1 ] && { OPT_COMPARE+=" d0 "; [ "$INPUT_IS_MC" -eq 1 ] && OPT_COMPARE+=" d0-mc "; } [ $DOO2_TASK_DS -eq 1 ] && OPT_COMPARE+=" ds " [ $DOO2_TASK_DPLUS -eq 1 ] && OPT_COMPARE+=" dplus " - [ $DOO2_TASK_LC -eq 1 ] && { OPT_COMPARE+=" lc "; [ "$ISMC" -eq 1 ] && OPT_COMPARE+=" lc-mc "; } + [ $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. - [[ $DOO2 -eq 1 && $ISMC -eq 1 ]] && { + [[ $DOO2 -eq 1 && $INPUT_IS_MC -eq 1 ]] && { PARTICLES="" [ $DOO2_TASK_D0 -eq 1 ] && PARTICLES+=" d0 " [ $DOO2_TASK_DS -eq 1 ] && PARTICLES+=" ds " [ $DOO2_TASK_DPLUS -eq 1 ] && PARTICLES+=" dplus " [ $DOO2_TASK_LC -eq 1 ] && PARTICLES+=" lc " + [ $DOO2_TASK_LB -eq 1 ] && PARTICLES+=" lb " [ $DOO2_TASK_XIC -eq 1 ] && PARTICLES+=" xic " - [ $DOO2_TASK_JPSI -eq 1 ] && PARTICLES+=" jpsi " [ $DOO2_TASK_LCK0SP -eq 1 ] && PARTICLES+=" lc-tok0sP " - [ $DOO2_TASK_XICC -eq 1 ] && PARTICLES+=" xicc-mc " + [ $DOO2_TASK_B0 -eq 1 ] && PARTICLES+=" b0-mc " [ $DOO2_TASK_BPLUS -eq 1 ] && PARTICLES+=" bplus " [ "$PARTICLES" ] && POSTEXEC+=" && root -b -q -l \"$DIR_TASKS/PlotEfficiency.C(\\\"\$FileO2\\\", \\\"$PARTICLES\\\")\"" } diff --git a/codeHF/config_tasks_run5.sh b/codeHF/config_tasks_run5.sh new file mode 100644 index 00000000..c564ddfe --- /dev/null +++ b/codeHF/config_tasks_run5.sh @@ -0,0 +1,99 @@ +#!/bin/bash +# shellcheck disable=SC2034 # Ignore unused parameters. + +DATABASE_O2="workflows_run5.yml" # Workflow specification database + +# Activation of O2 workflows +DOO2_CAND_X=0 # hf-candidate-creator-x +DOO2_CAND_CHIC=0 # hf-candidate-creator-chic +DOO2_CAND_XICC=0 # hf-candidate-creator-xicc +# Selectors +DOO2_SEL_JPSI=0 # hf-candidate-selector-jpsi +DOO2_SEL_X=0 # hf-candidate-selector-x-to-jpsi-pi-pi +DOO2_SEL_CHIC=0 # hf-candidate-selector-chic-to-jpsi-gamma +DOO2_SEL_XICC=0 # hf-candidate-selector-xicc-to-p-k-pi-pi +# Analysis tasks +DOO2_TASK_JPSI=0 # hf-task-jpsi +DOO2_TASK_X=0 # hf-task-x +DOO2_TASK_CHIC=0 # hf-task-chic +DOO2_TASK_XICC=0 # hf-task-xicc +# Tree creators +DOO2_TREE_X=0 # hf-tree-creator-x-to-jpsi-pi-pi +DOO2_TREE_CHIC=0 # hf-tree-creator-chic-to-jpsi-gamma +DOO2_TREE_XICC=0 # hf-tree-creator-xicc-to-p-k-pi-pi +# QA +DOO2_REJ_ALICE3=0 # hf-task-qa-pid-rejection + +# Selection cuts +APPLYCUTS_JPSI=0 # Apply J/ψ selection cuts. +APPLYCUTS_X=0 # Apply X selection cuts. +APPLYCUTS_CHIC=0 # Apply χc(1p) selection cuts. +APPLYCUTS_XICC=0 # Apply Ξcc selection cuts. + +#################################################################################################### + +# Modify the JSON file. +function AdjustJson { + # Enable J/ψ selection. + if [ $APPLYCUTS_JPSI -eq 1 ]; then + MsgWarn "Using J/ψ selection cuts" + ReplaceString "\"selectionFlagJpsi\": \"0\"" "\"selectionFlagJpsi\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # Enable X(3872) selection. + if [ $APPLYCUTS_X -eq 1 ]; then + MsgWarn "Using X(3872) selection cuts" + ReplaceString "\"selectionFlagX\": \"0\"" "\"selectionFlagX\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # Enable χc(1p) selection. + if [ $APPLYCUTS_CHIC -eq 1 ]; then + MsgWarn "Using χc(1p) selection cuts" + ReplaceString "\"selectionFlagChic\": \"0\"" "\"selectionFlagChic\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # Enable Ξcc selection. + if [ $APPLYCUTS_XICC -eq 1 ]; then + MsgWarn "Using Ξcc selection cuts" + ReplaceString "\"selectionFlagXicc\": \"0\"" "\"selectionFlagXicc\": \"1\"" "$JSON" || ErrExit "Failed to edit $JSON." + fi +} + +# Generate the O2 script containing the full workflow specification. +function MakeScriptO2 { + WORKFLOWS="" + # Vertexing + [ $DOO2_CAND_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-x" + [ $DOO2_CAND_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-chic" + [ $DOO2_CAND_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-creator-xicc" + # Selectors + [ $DOO2_SEL_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-jpsi${SUFFIX_RUN}" + [ $DOO2_SEL_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-x-to-jpsi-pi-pi" + [ $DOO2_SEL_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma" + [ $DOO2_SEL_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-candidate-selector-xicc-to-p-k-pi-pi" + # Analysis tasks + [ $DOO2_TASK_JPSI -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-jpsi" + [ $DOO2_TASK_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-x" + [ $DOO2_TASK_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-chic" + [ $DOO2_TASK_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-xicc" + # Tree creators + [ $DOO2_TREE_X -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-x-to-jpsi-pi-pi" + [ $DOO2_TREE_CHIC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-chic-to-jpsi-gamma" + [ $DOO2_TREE_XICC -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi" + # QA + [ $DOO2_REJ_ALICE3 -eq 1 ] && WORKFLOWS+=" o2-analysis-hf-task-qa-pid-rejection" +} + +function MakeScriptPostprocess { + # Compare AliPhysics and O2 histograms. + [[ $DOALI -eq 1 && $DOO2 -eq 1 ]] && { + OPT_COMPARE="" + [ $DOO2_TASK_JPSI -eq 1 ] && OPT_COMPARE+=" jpsi " + } + # Plot particle reconstruction efficiencies. + [[ $DOO2 -eq 1 && $INPUT_IS_MC -eq 1 ]] && { + PARTICLES="" + [ $DOO2_TASK_JPSI -eq 1 ] && PARTICLES+=" jpsi " + [ $DOO2_TASK_XICC -eq 1 ] && PARTICLES+=" xicc-mc " + } +} diff --git a/codeHF/dpl-config.json b/codeHF/dpl-config.json new file mode 100644 index 00000000..a197e0d6 --- /dev/null +++ b/codeHF/dpl-config.json @@ -0,0 +1,9602 @@ +{ + "bayes-pid": { + "ccdb-timestamp": "-1", + "ccdb-url": "http://alice-ccdb.cern.ch", + "ccdbPathTOF": "Analysis/PID/TOF", + "ccdbPathTPC": "Analysis/PID/TPC/Response", + "enableTOF": "true", + "enableTPC": "true", + "param-file-TOF": "", + "param-file-TPC": "", + "param-tof-sigma": "TOFReso", + "pid-al": "1", + "pid-de": "1", + "pid-el": "1", + "pid-he": "1", + "pid-ka": "1", + "pid-mu": "1", + "pid-pi": "1", + "pid-pr": "1", + "pid-tr": "1" + }, + "bc-selection-task": { + "ITSROFrameEndBorderMargin": "-1", + "ITSROFrameStartBorderMargin": "-1", + "TimeFrameEndBorderMargin": "-1", + "TimeFrameStartBorderMargin": "-1", + "checkRunDurationLimits": "false", + "maxInactiveChipsPerLayer": { + "values": [ + "8", + "8", + "8", + "111", + "111", + "195", + "195" + ] + }, + "processRun2": "false", + "processRun3": "true", + "triggerBcShift": "999" + }, + "cascade-builder": { + "axisConfigurations": { + "axisTopoVarDCAToPV": { + "values": [ + "200", + "-1", + "1" + ] + }, + "axisTopoVarDCAV0Dau": { + "values": [ + "200", + "0", + "2" + ] + }, + "axisTopoVarDCAV0ToPV": { + "values": [ + "200", + "0", + "5" + ] + }, + "axisTopoVarPointingAngle": { + "values": [ + "50", + "0", + "1" + ] + }, + "axisTopoVarRAP": { + "values": [ + "50", + "0", + "1" + ] + }, + "axisTopoVarV0Radius": { + "values": [ + "500", + "0", + "100" + ] + } + }, + "axisPtQA": { + "values": [ + "0", + "0", + "0.1", + "0.2", + "0.3", + "0.4", + "0.5", + "0.6", + "0.7", + "0.8", + "0.9", + "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.4", + "4.8", + "5.2", + "5.6", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "17", + "19", + "21", + "23", + "25", + "30", + "35", + "40", + "50" + ] + }, + "calculateBachBaryonVars": "false", + "cas_cospaParameter": "0.341715008", + "casccospa": "0.95", + "cascradius": "0.9", + "ccdb-url": "http://alice-ccdb.cern.ch", + "createCascCovMats": "-1", + "createCascTrackXs": "-1", + "d_GenerateOnlyTrackedCascades": "false", + "d_QA_checkMC": "true", + "d_QA_checkdEdx": "false", + "d_UseAbsDCA": "true", + "d_UseAutodetectMode": "false", + "d_UseWeightedPCA": "false", + "d_bz": "-999", + "d_doPtDep_CosPaCut": "false", + "d_doStraTrackQA": "false", + "d_doTrackQA": "false", + "dcaXYCascToPV": "1000000", + "dcaZCascToPV": "1000000", + "dcabachtopv": "0.05", + "dcacascdau": "1", + "geoPath": "GLO/Config/GeometryAligned", + "grpPath": "GLO/GRP/GRP", + "grpmagPath": "GLO/Config/GRPMagField", + "kfConstructMethod": "2", + "kfDoDCAFitterPreMinimCasc": "true", + "kfDoDCAFitterPreMinimV0": "true", + "kfTuneForOmega": "false", + "kfUseCascadeMassConstraint": "false", + "kfUseV0MassConstraint": "true", + "lambdaMassWindow": "0.01", + "lutPath": "GLO/Param/MatLUT", + "maxDaughterEta": "5", + "mlConfigurations": { + "calculateOmegaMinusScores": "false", + "calculateOmegaPlusScores": "false", + "calculateXiMinusScores": "false", + "calculateXiPlusScores": "false", + "enableOptimizations": "false", + "loadModelsFromCCDB": "false", + "localModelPathOmegaMinus": "OmegaMinus_BDTModel.onnx", + "localModelPathOmegaPlus": "OmegaPlus_BDTModel.onnx", + "localModelPathXiMinus": "XiMinus_BDTModel.onnx", + "localModelPathXiPlus": "XiPlus_BDTModel.onnx", + "modelPathCCDB": "", + "thresholdOmegaMinus": "-1", + "thresholdOmegaPlus": "-1", + "thresholdXiMinus": "-1", + "thresholdXiPlus": "-1", + "timestampCCDB": "-1" + }, + "precisionDCAs": "0.01", + "processFindableRun3": "false", + "processFindableRun3withKFParticle": "false", + "processRun2": "false", + "processRun3": "true", + "processRun3withKFParticle": "false", + "processRun3withStrangenessTracking": "false", + "qaConfigurations": { + "dQAMaxChi2": "20", + "dQAMaxCluSize": "10", + "dQAMaxDCA": "1", + "dQAMaxPt": "5", + "dQANBinsChi2": "200", + "dQANBinsCluSize": "200", + "dQANBinsDCAxy": "200", + "dQANBinsMass": "400", + "dQANBinsPtCoarse": "10", + "dQANBinsRadius": "500", + "dQAOmegaMassWindow": "0.005", + "dQAXiMassWindow": "0.005", + "d_doQA": "false" + }, + "rejDiffCollTracks": "0", + "roundDCAVariables": "false", + "tpcrefit": "0", + "useCascadeMomentumAtPrimVtx": "false", + "useMatCorrType": "2", + "useMatCorrTypeCasc": "2" + }, + "cascade-link-builder": { + "processFindable": "false", + "processFound": "true" + }, + "cascade-preselector": { + "dIfMCgenerateOmegaMinus": "true", + "dIfMCgenerateOmegaPlus": "true", + "dIfMCgenerateXiMinus": "true", + "dIfMCgenerateXiPlus": "true", + "dIfMCselectPhysicalPrimary": "true", + "dIfMCselectV0MotherPDG": "0", + "dPreselectOnlyBaryons": "false", + "dTPCNCrossedRows": "50", + "ddEdxPreSelectOmegaMinus": "true", + "ddEdxPreSelectOmegaPlus": "true", + "ddEdxPreSelectXiMinus": "true", + "ddEdxPreSelectXiPlus": "true", + "ddEdxPreSelectionWindow": "7", + "doQA": "false", + "processBuildAll": "true", + "processBuildFindable": "false", + "processBuildMCAssociated": "false", + "processBuildValiddEdx": "false", + "processBuildValiddEdxMCAssociated": "false", + "processSkipCascadesNotUsedInTrackedCascades": "false" + }, + "centrality-table": { + "ccdbpath": "Centrality/Estimators", + "ccdburl": "http://alice-ccdb.cern.ch", + "doNotCrashOnNull": "true", + "embedINELgtZEROselection": "false", + "genname": "", + "processRun2": "false", + "processRun3": "true", + "processRun3FT0": "false" + }, + "collision-converter": { + "debug": "false", + "doNotSwap": "false", + "nbins": "1", + "tolerance": "0.001" + }, + "estimator-rho": { + "applyTrackingEfficiency": "false", + "bkgEtaMax": "0.7", + "bkgEtaMin": "-0.7", + "bkgPhiMax": "6.28299999", + "bkgPhiMin": "-6.28299999", + "bkgjetR": "0.2", + "centralityMax": "999", + "centralityMin": "-999", + "doSparse": "false", + "eventSelections": "", + "ghostArea": "0.005", + "ghostGridScatter": "1", + "ghostKtScatter": "0.1", + "ghostMeanPt": "1e-100", + "ghostRapMax": "0.9", + "ghostRepeat": "0", + "jetAlgorithm": "0", + "jetRecombScheme": "0", + "particleSelections": "PhysicalPrimary", + "performTriggerTrackSelection": "false", + "processB0Collisions": "false", + "processB0McCollisions": "false", + "processBplusCollisions": "false", + "processBplusMcCollisions": "false", + "processChargedCollisions": "false", + "processChargedMcCollisions": "false", + "processD0Collisions": "true", + "processD0McCollisions": "false", + "processDielectronCollisions": "false", + "processDielectronMcCollisions": "false", + "processDplusCollisions": "false", + "processDplusMcCollisions": "false", + "processDsCollisions": "false", + "processDsMcCollisions": "false", + "processDstarCollisions": "false", + "processDstarMcCollisions": "false", + "processLcCollisions": "false", + "processLcMcCollisions": "false", + "processSelectingClusters": "false", + "processSelectingTracks": "false", + "processSetupCollisionSelection": "false", + "processSetupEventTriggering": "false", + "processXicToXiPiPiCollisions": "false", + "processXicToXiPiPiMcCollisions": "false", + "skipMBGapEvents": "true", + "thresholdClusterEnergyMin": "0", + "thresholdTriggerTrackPtMin": "0", + "trackEtaMax": "0.9", + "trackEtaMin": "-0.9", + "trackOccupancyInTimeRangeMax": "999999", + "trackPhiMax": "99", + "trackPhiMin": "-99", + "trackPtMax": "1000", + "trackPtMin": "0.150000006", + "trackSelections": "globalTracks", + "trackingEfficiency": { + "values": [ + "1", + "1" + ] + }, + "trackingEfficiencyPtBinning": { + "values": [ + "0", + "10", + "999" + ] + }, + "triggerMasks": "", + "triggerTrackEtaSelectionMax": "0.9", + "triggerTrackPtSelectionMin": "0.15", + "vertexZCut": "10" + }, + "event-selection-task": { + "EpsilonVzDiffVetoInROF": "0.3", + "FT0CamplPerCollCutVetoOnCollInROF": "5000", + "FT0CamplPerCollCutVetoOnCollInTimeRange": "8000", + "TimeIntervalForOccupancyCalculationMax": "100", + "TimeIntervalForOccupancyCalculationMin": "-40", + "TimeRangeVetoOnCollNarrow": "2", + "TimeRangeVetoOnCollStandard": "10", + "UseWeightsForOccupancyEstimator": "true", + "confSigmaBCforHighPtTracks": "4", + "isMC": "0", + "maxDiffZvtxFT0vsPV": "1", + "muonSelection": "0", + "processRun2": "false", + "processRun3": "true" + }, + "eventselection-run3": { + "bcselOpts": { + "ITSROFrameEndBorderMargin": "-1", + "ITSROFrameStartBorderMargin": "-1", + "NumberOfOrbitsPerTF": "-1", + "TimeFrameEndBorderMargin": "-1", + "TimeFrameStartBorderMargin": "-1", + "amIneeded": "-1", + "checkRunDurationLimits": "false", + "maxInactiveChipsPerLayer": { + "values": [ + "8", + "8", + "8", + "111", + "111", + "195", + "195" + ] + }, + "triggerBcShift": "0" + }, + "ccdburl": "http://alice-ccdb.cern.ch", + "evselOpts": { + "EpsilonVzDiffVetoInROF": "0.3", + "FT0CamplPerCollCutVetoOnCollInROF": "5000", + "FT0CamplPerCollCutVetoOnCollInTimeRange": "8000", + "NumberOfOrbitsPerTF": "-1", + "TimeIntervalForOccupancyCalculationMax": "100", + "TimeIntervalForOccupancyCalculationMin": "-40", + "TimeRangeVetoOnCollNarrow": "0.25", + "TimeRangeVetoOnCollStrict": "10", + "UseWeightsForOccupancyEstimator": "true", + "VzDiffMargin": "0.2", + "VzDiffNsigma": "3", + "amIneeded": "-1", + "confSigmaBCforHighPtTracks": "4", + "isMC": "-1", + "maxDiffZvtxFT0vsPV": "1", + "muonSelection": "0" + }, + "lumiOpts": { + "amIneeded": "-1" + }, + "timestamp": { + "fatalOnInvalidTimestamp": "false", + "isRun2MC": "-1", + "orbit-reset-path": "CTP/Calib/OrbitReset", + "rct-path": "RCT/Info/RunInformation", + "verbose": "false" + } + }, + "ft0-corrected-table": { + "addHistograms": "false", + "ccdb-path-grplhcif": "GLO/Config/GRPLHCIF", + "ccdb-timestamp": "-1", + "ccdb-url": "http://alice-ccdb.cern.ch", + "collisionSystem": "-2", + "processStandard": "true", + "processWithBypassFT0timeInMC": "false", + "resoFT0A": "20", + "resoFT0C": "20" + }, + "hf-candidate-creator-2prong": { + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "constrainKfToPv": "true", + "fillHistograms": "true", + "hfEvSel": { + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/Chunked/", + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "occEstimator": "1", + "occupancyMax": "1000000", + "occupancyMin": "0", + "rctCheckZDC": "false", + "rctLabel": "CBT_hadronPID", + "rctTreatLimitedAcceptanceAsBad": "false", + "requireGoodRct": "false", + "softwareTrigger": "", + "th2ConfigAxisCent": { + "values": [ + "100", + "0", + "100" + ] + }, + "th2ConfigAxisOccupancy": { + "values": [ + "14", + "0", + "140000" + ] + }, + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoCollInRofStandard": "false", + "useNoCollInTimeRangeNarrow": "false", + "useNoCollInTimeRangeStandard": "false", + "useNoSameBunchPileup": "false", + "useOccupancyCut": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCollisions": "true", + "processCollisionsCentFT0C": "false", + "processCollisionsCentFT0M": "false", + "processNoPvRefitWithDCAFitterN": "true", + "processNoPvRefitWithDCAFitterNCentFT0C": "false", + "processNoPvRefitWithDCAFitterNCentFT0M": "false", + "processNoPvRefitWithKFParticle": "false", + "processNoPvRefitWithKFParticleCentFT0C": "false", + "processNoPvRefitWithKFParticleCentFT0M": "false", + "processPvRefitWithDCAFitterN": "false", + "processPvRefitWithDCAFitterNCentFT0C": "false", + "processPvRefitWithDCAFitterNCentFT0M": "false", + "processPvRefitWithKFParticle": "false", + "processPvRefitWithKFParticleCentFT0C": "false", + "processPvRefitWithKFParticleCentFT0M": "false", + "propagateToPCA": "true", + "useAbsDCA": "false", + "useWeightedFinalPCA": "false" + }, + "hf-candidate-creator-2prong-expressions": { + "matchInteractionsWithMaterial": "true", + "matchKinkedDecayTopology": "true", + "processMc": "false", + "processMcCentFT0C": "false", + "processMcCentFT0M": "false", + "rejectBackground": "false" + }, + "hf-candidate-creator-3prong": { + "applyInvMassConstraint": "false", + "applyTopoConstraint": "false", + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "createDplus": "true", + "createDs": "true", + "createLc": "true", + "createXic": "true", + "fillHistograms": "true", + "hfEvSel": { + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/Chunked/", + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "occEstimator": "1", + "occupancyMax": "1000000", + "occupancyMin": "0", + "rctCheckZDC": "false", + "rctLabel": "CBT_hadronPID", + "rctTreatLimitedAcceptanceAsBad": "false", + "requireGoodRct": "false", + "softwareTrigger": "", + "th2ConfigAxisCent": { + "values": [ + "100", + "0", + "100" + ] + }, + "th2ConfigAxisOccupancy": { + "values": [ + "14", + "0", + "140000" + ] + }, + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoCollInRofStandard": "false", + "useNoCollInTimeRangeNarrow": "false", + "useNoCollInTimeRangeStandard": "false", + "useNoSameBunchPileup": "false", + "useOccupancyCut": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCollisions": "true", + "processCollisionsCentFT0C": "false", + "processCollisionsCentFT0M": "false", + "processNoPvRefitWithDCAFitterN": "true", + "processNoPvRefitWithDCAFitterNCentFT0C": "false", + "processNoPvRefitWithDCAFitterNCentFT0M": "false", + "processNoPvRefitWithKFParticle": "false", + "processNoPvRefitWithKFParticleCentFT0C": "false", + "processNoPvRefitWithKFParticleCentFT0M": "false", + "processPvRefitWithDCAFitterN": "false", + "processPvRefitWithDCAFitterNCentFT0C": "false", + "processPvRefitWithDCAFitterNCentFT0M": "false", + "processPvRefitWithKFParticle": "false", + "processPvRefitWithKFParticleCentFT0C": "false", + "processPvRefitWithKFParticleCentFT0M": "false", + "propagateToPCA": "true", + "useAbsDCA": "false", + "useWeightedFinalPCA": "false" + }, + "hf-candidate-creator-3prong-expressions": { + "matchInteractionsWithMaterial": "true", + "matchKinkedDecayTopology": "true", + "processMc": "false", + "processMcCentFT0C": "false", + "processMcCentFT0M": "false", + "rejectBackground": "false" + }, + "hf-candidate-creator-b0": { + "binsPtPion": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "3", + "1000" + ] + }, + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutsTrackPionDCA": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.0025", + "10" + ], + [ + "0.0025", + "10" + ], + [ + "0.0025", + "10" + ], + [ + "0.0025", + "10" + ], + [ + "0", + "10" + ], + [ + "0", + "10" + ] + ] + }, + "invMassWindowB0": "0.3", + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true", + "ptPionMin": "0.5", + "selectionFlagD": "0", + "useAbsDCA": "false", + "usePionIsGlobalTrackWoDCA": "true", + "useWeightedFinalPCA": "false" + }, + "hf-candidate-creator-b0-expressions": { + "processMc": "false" + }, + "hf-candidate-creator-bplus": { + "binsPtPion": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "3", + "1000" + ] + }, + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutsTrackPionDCA": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.0025", + "10" + ], + [ + "0.0025", + "10" + ], + [ + "0.0025", + "10" + ], + [ + "0.0025", + "10" + ], + [ + "0", + "10" + ], + [ + "0", + "10" + ] + ] + }, + "etaTrackMax": "0.8", + "invMassWindowBplus": "0.3", + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true", + "ptPionMin": "0.2", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", + "useAbsDCA": "true", + "usePionIsGlobalTrackWoDCA": "true", + "useWeightedFinalPCA": "false", + "yCandMax": "-1" + }, + "hf-candidate-creator-bplus-expressions": { + "processMc": "false" + }, + "hf-candidate-creator-cascade": { + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "fillHistograms": "true", + "hfEvSel": { + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/Chunked/", + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "occEstimator": "1", + "occupancyMax": "1000000", + "occupancyMin": "0", + "rctCheckZDC": "false", + "rctLabel": "CBT_hadronPID", + "rctTreatLimitedAcceptanceAsBad": "false", + "requireGoodRct": "false", + "softwareTrigger": "", + "th2ConfigAxisCent": { + "values": [ + "100", + "0", + "100" + ] + }, + "th2ConfigAxisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoCollInRofStandard": "false", + "useNoCollInTimeRangeNarrow": "false", + "useNoCollInTimeRangeStandard": "false", + "useNoSameBunchPileup": "false", + "useOccupancyCut": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCentFT0C": "false", + "processCentFT0M": "false", + "processCollisions": "true", + "processCollisionsCentFT0C": "false", + "processCollisionsCentFT0M": "false", + "processNoCent": "true", + "propagateToPCA": "true", + "silenceV0DataWarning": "false", + "useAbsDCA": "true", + "useWeightedFinalPCA": "false" + }, + "hf-candidate-creator-cascade-mc": { + "processMc": "false", + "processMcCentFT0C": "false", + "processMcCentFT0M": "false", + "rejectBackground": "true" + }, + "hf-candidate-creator-dstar": { + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "fillHistograms": "true", + "hfEvSel": { + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/Chunked/", + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "occEstimator": "1", + "occupancyMax": "1000000", + "occupancyMin": "0", + "rctCheckZDC": "false", + "rctLabel": "CBT_hadronPID", + "rctTreatLimitedAcceptanceAsBad": "false", + "requireGoodRct": "false", + "softwareTrigger": "", + "th2ConfigAxisCent": { + "values": [ + "100", + "0", + "100" + ] + }, + "th2ConfigAxisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoCollInRofStandard": "false", + "useNoCollInTimeRangeNarrow": "false", + "useNoCollInTimeRangeStandard": "false", + "useNoSameBunchPileup": "false", + "useOccupancyCut": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCollisions": "true", + "processCollisionsCentFT0C": "false", + "processCollisionsCentFT0M": "false", + "processNoPvRefit": "true", + "processNoPvRefitCentFT0C": "false", + "processNoPvRefitCentFT0M": "false", + "processPvRefit": "false", + "processPvRefitCentFT0C": "false", + "processPvRefitCentFT0M": "false", + "propagateToPCA": "true", + "useAbsDCA": "false", + "useWeightedFinalPCA": "false" + }, + "hf-candidate-creator-dstar-expressions": { + "matchInteractionsWithMaterial": "false", + "matchKinkedDecayTopology": "false", + "processMc": "false", + "processMcCentFT0C": "false", + "processMcCentFT0M": "false", + "rejectBackground": "true" + }, + "hf-candidate-creator-lb": { + "bz": "20", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true", + "ptPionMin": "0.5", + "selectionFlagLc": "0", + "useAbsDCA": "false", + "useWeightedFinalPCA": "false", + "yCandMax": "-1" + }, + "hf-candidate-creator-lb-expressions": { + "processMc": "false" + }, + "hf-candidate-creator-xic-to-xi-pi-pi": { + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "constrainXiToXicPlus": "false", + "constrainXicPlusToPv": "false", + "dcaXYToPVCascadeMax": "3", + "doCascadePreselection": "true", + "fillHistograms": "true", + "hfEvSel": { + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/Chunked/", + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "occEstimator": "1", + "occupancyMax": "1000000", + "occupancyMin": "0", + "rctCheckZDC": "false", + "rctLabel": "CBT_hadronPID", + "rctTreatLimitedAcceptanceAsBad": "false", + "requireGoodRct": "false", + "softwareTrigger": "", + "th2ConfigAxisCent": { + "values": [ + "100", + "0", + "100" + ] + }, + "th2ConfigAxisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoCollInRofStandard": "false", + "useNoCollInTimeRangeNarrow": "false", + "useNoCollInTimeRangeStandard": "false", + "useNoSameBunchPileup": "false", + "useOccupancyCut": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "isRun2": "false", + "kfConstructMethod": "0", + "massToleranceCascade": "0.01", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCentFT0CXicplusWithDcaFitter": "false", + "processCentFT0CXicplusWithKFParticle": "false", + "processCentFT0MXicplusWithDcaFitter": "false", + "processCentFT0MXicplusWithKFParticle": "false", + "processCollisions": "false", + "processCollisionsCentFT0C": "false", + "processCollisionsCentFT0M": "false", + "processNoCentXicplusWithDcaFitter": "true", + "processNoCentXicplusWithKFParticle": "false", + "propagateToPCA": "true", + "rejDiffCollTrack": "true", + "useAbsDCA": "false", + "useWeightedFinalPCA": "false", + "useXiMassConstraint": "true" + }, + "hf-candidate-creator-xic-to-xi-pi-pi-expressions": { + "fillMcHistograms": "true", + "matchDecayedPions": "true", + "matchInteractionsWithMaterial": "true", + "processMc": "false", + "processMcCentFT0C": "false", + "processMcCentFT0M": "false" + }, + "hf-candidate-creator-xic0-omegac0": { + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "hfEvSel": { + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "numTracksInTimeRangeMax": "1000000", + "numTracksInTimeRangeMin": "0", + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoSameBunchPileup": "false", + "useNumTracksInTimeRange": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "isRun2": "false", + "maxChi2": "100", + "maxDXYIni": "4", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCentFT0CToOmegaK": "false", + "processCentFT0CToOmegaPi": "false", + "processCentFT0CToXiPi": "false", + "processCentFT0MToOmegaK": "false", + "processCentFT0MToOmegaPi": "false", + "processCentFT0MToXiPi": "false", + "processCollisions": "true", + "processCollisionsCentFT0C": "false", + "processCollisionsCentFT0M": "false", + "processNoCentToOmegaK": "false", + "processNoCentToOmegaPi": "false", + "processNoCentToXiPi": "true", + "propagateToPCA": "false", + "refitWithMatCorr": "true", + "rejDiffCollTrack": "true", + "useAbsDCA": "true", + "useWeightedFinalPCA": "true" + }, + "hf-candidate-creator-xic0-omegac0-mc": { + "processDoNoMc": "true", + "processMcOmegacToOmegaK": "false", + "processMcOmegacToOmegaPi": "false", + "processMcOmegacToXiPi": "false", + "processMcXicToXiPi": "false" + }, + "hf-candidate-selector-b0-to-d-pi": { + "acceptPIDNotApplicable": "true", + "activateQA": "false", + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "CPA", + "Chi2PCA", + "d0 D", + "d0 Pi", + "pT D", + "pT Pi", + "B0 decLen", + "B0 decLenXY", + "Imp. Par. Product", + "DeltaMD", + "Cos ThetaStar" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ], + [ + "1", + "0.80", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.10", + "0.80" + ] + ] + }, + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "5", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "5", + "ptCandMax": "50", + "ptCandMin": "0", + "ptPidTofMax": "10", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "10", + "ptPidTpcMin": "0.15", + "usePid": "true" + }, + "hf-candidate-selector-bplus-to-d0-pi": { + "acceptPIDNotApplicable": "true", + "activateQA": "false", + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "CPA", + "d0 D0", + "d0 Pi", + "pT D0", + "pT Pi", + "B decLen", + "B decLenXY", + "Imp. Par. Product", + "DeltaMD0", + "Cos ThetaStar" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ], + [ + "1", + "0.8", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.80" + ] + ] + }, + "nSigmaTofCombinedMax": "5000", + "nSigmaTofMax": "5", + "nSigmaTpcCombinedMax": "5000", + "nSigmaTpcMax": "5", + "ptPidTofMax": "999", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "999", + "ptPidTpcMin": "0.3", + "usePid": "true" + }, + "hf-candidate-selector-d0": { + "applyMl": "false", + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "5.5", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "12", + "16", + "20", + "24", + "36", + "50", + "100" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "DCA", + "cos theta*", + "pT K", + "pT Pi", + "d0K", + "d0pi", + "d0d0", + "cos pointing angle", + "cos pointing angle xy", + "min norm decay length XY", + "max decay length", + "max decay length XY", + "min decay length", + "norm dauImpPar XY" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11", + "pT bin 12", + "pT bin 13", + "pT bin 14", + "pT bin 15", + "pT bin 16", + "pT bin 17", + "pT bin 18", + "pT bin 19", + "pT bin 20", + "pT bin 21", + "pT bin 22", + "pT bin 23", + "pT bin 24" + ], + "values": [ + [ + "0.4", + "0.035", + "0.8", + "0.5", + "0.5", + "0.1", + "0.1", + "-5.e-5", + "0.80", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.035", + "0.8", + "0.5", + "0.5", + "0.1", + "0.1", + "-5.e-5", + "0.80", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.4", + "0.4", + "0.1", + "0.1", + "-25.e-5", + "0.80", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.4", + "0.4", + "0.1", + "0.1", + "-25.e-5", + "0.80", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-20.e-5", + "0.90", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-20.e-5", + "0.90", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-12.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-12.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-7.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-7.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "10.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.030", + "1", + "0.6", + "0.6", + "0.1", + "0.1", + "1000.e-5", + "0.80", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "distanceFromD0MassForSidebands": "0.15", + "enableDebugMl": "false", + "hfTrigger2ProngCuts": { + "deltaMassPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "-0.0025", + "9.99999975e-05" + ] + ] + }, + "nSigmaMax": "2", + "ptDeltaMassMax": "10", + "ptMassCutMax": "9999", + "sigmaPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "0.0142400004", + "0.00178000005" + ] + ] + } + }, + "itsChi2PerClusterMax": "1e+10", + "itsNClustersFoundMin": "0", + "keepOnlySidebandCandidates": "false", + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTD0" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "3", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_D0ToKPi.onnx" + ] + }, + "processWithDCAFitterN": "true", + "processWithKFParticle": "false", + "ptCandMax": "50", + "ptCandMin": "0", + "ptPidTofMax": "10", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "10", + "ptPidTpcMin": "0.15", + "timestampCCDB": "-1", + "tpcChi2PerClusterMax": "1e+10", + "tpcNClustersFoundMin": "0", + "tpcNCrossedRowsMin": "0", + "tpcNCrossedRowsOverFindableClustersMin": "0", + "usePid": "true", + "usePidTpcAndTof": "false", + "usePidTpcOnly": "false", + "useTriggerMassCut": "false" + }, + "hf-candidate-selector-dplus-to-pi-k-pi": { + "acceptPIDNotApplicable": "true", + "activateQA": "false", + "applyMl": "false", + "binsPt": { + "values": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "10", + "12", + "16", + "24", + "36" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "binsPtTrack": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "3", + "1000" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "deltaM", + "pT Pi", + "pT K", + "decay length", + "normalized decay length XY", + "cos pointing angle", + "cos pointing angle XY", + "max normalized deltaIP" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.2", + "0.3", + "0.3", + "0.07", + "6", + "0.96", + "0.985", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.07", + "5", + "0.96", + "0.985", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5", + "0.96", + "0.980", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.20", + "5", + "0.94", + "0.000", + "2.5" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "cutsSingleTrack": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ] + ] + }, + "hfTrigger3ProngCuts": { + "deltaMassPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "-0.0025", + "9.99999975e-05" + ] + ] + }, + "nSigmaMax": "2", + "ptDeltaMassMax": "10", + "ptMassCutMax": "9999", + "sigmaPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "0.00796", + "0.00176" + ] + ] + } + }, + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTDPlus" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "3", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_DPlusToKPiPi.onnx" + ] + }, + "ptCandMax": "36", + "ptCandMin": "0", + "ptPidTofMax": "-1", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "-1", + "ptPidTpcMin": "0.15", + "storeDsDplusBkg": "false", + "timestampCCDB": "-1", + "usePidTpcAndTof": "false", + "useTriggerMassCut": "false" + }, + "hf-candidate-selector-ds-to-k-k-pi": { + "activateQA": "false", + "applyMl": "false", + "binsPt": { + "values": [ + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "16", + "24" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "binsPtTrack": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "3", + "1000" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "deltaM", + "pT Pi", + "pT K", + "decay length", + "normalized decay length XY", + "cos pointing angle", + "cos pointing angle XY", + "impact parameter XY", + "deltaM Phi", + "cos^3 theta_PiK", + "chi2PCA" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7" + ], + "values": [ + [ + "0.2", + "0.3", + "0.3", + "0.02", + "4", + "0.92", + "0.92", + "0.014", + "0.010", + "0.10", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.02", + "4", + "0.92", + "0.92", + "0.014", + "0.010", + "0.10", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.03", + "4", + "0.90", + "0.90", + "0.012", + "0.010", + "0.05", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.03", + "4", + "0.90", + "0.90", + "0.012", + "0.010", + "0.05", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.03", + "4", + "0.90", + "0.90", + "0.012", + "0.010", + "0.05", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.03", + "4", + "0.90", + "0.90", + "0.012", + "0.010", + "0.00", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.05", + "4", + "0.85", + "0.85", + "0.012", + "0.015", + "0.00", + "5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.05", + "4", + "0.85", + "0.85", + "0.012", + "0.015", + "0.00", + "5" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "cutsSingleTrack": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ] + ] + }, + "deltaMRegionDplusToPiKPi": "0.03", + "hfTrigger3ProngCuts": { + "deltaMassPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "-0.0025", + "9.99999975e-05" + ] + ] + }, + "nSigmaMax": "2", + "ptDeltaMassMax": "10", + "ptMassCutMax": "9999", + "sigmaPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "0.00796", + "0.00176" + ] + ] + } + }, + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTDs" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "3", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_DsToKKPi.onnx" + ] + }, + "ptCandMax": "24", + "ptCandMin": "2", + "ptPidTofMax": "20", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "20", + "ptPidTpcMin": "0.15", + "rejectCandsInDplusToPiKPiRegion": "false", + "timestampCCDB": "-1", + "usePidTpcAndTof": "false", + "useTriggerMassCut": "false" + }, + "hf-candidate-selector-dstar-to-d0-pi": { + "activateQA": "false", + "applyMl": "false", + "binsPtD0": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "5.5", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "12", + "16", + "20", + "24", + "36", + "50", + "100" + ] + }, + "binsPtDstar": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "5.5", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "12", + "16", + "20", + "24", + "36", + "50", + "100" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cutsD0": { + "labels_cols": [ + "m", + "DCA", + "cos theta*", + "pT K", + "pT Pi", + "d0K", + "d0pi", + "d0d0", + "cos pointing angle", + "cos pointing angle xy", + "min norm decay length XY", + "max decay length", + "max decay length XY", + "min decay length", + "norm dauImpPar XY" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11", + "pT bin 12", + "pT bin 13", + "pT bin 14", + "pT bin 15", + "pT bin 16", + "pT bin 17", + "pT bin 18", + "pT bin 19", + "pT bin 20", + "pT bin 21", + "pT bin 22", + "pT bin 23", + "pT bin 24" + ], + "values": [ + [ + "0.4", + "0.035", + "0.8", + "0.5", + "0.5", + "0.1", + "0.1", + "-5.e-05", + "0.8", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.035", + "0.8", + "0.5", + "0.5", + "0.1", + "0.1", + "-5.e-05", + "0.8", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.4", + "0.4", + "0.1", + "0.1", + "-0.00025", + "0.8", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.4", + "0.4", + "0.1", + "0.1", + "-0.00025", + "0.8", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-0.0002", + "0.9", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-0.0002", + "0.9", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-0.00012", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-0.00012", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-7.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-7.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-05", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "0.0001", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "0.01", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "0.01", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "0.01", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "1", + "0.7", + "0.7", + "0.1", + "0.1", + "0.01", + "0.85", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ], + [ + "0.4", + "0.03", + "1", + "0.6", + "0.6", + "0.1", + "0.1", + "0.01", + "0.8", + "0", + "0", + "10", + "10", + "0.06", + "0.5" + ] + ] + }, + "cutsDstar": { + "labels_cols": [ + "ptSoftPiMin", + "ptSoftPiMax", + "d0SoftPi", + "d0SoftPiNormalised", + "deltaMInvDstar", + "chi2PCA", + "d0Prong0Normalised", + "d0Prong1Normalised" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11", + "pT bin 12", + "pT bin 13", + "pT bin 14", + "pT bin 15", + "pT bin 16", + "pT bin 17", + "pT bin 18", + "pT bin 19", + "pT bin 20", + "pT bin 21", + "pT bin 22", + "pT bin 23", + "pT bin 24" + ], + "values": [ + [ + "0.050", + "0.2", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.2", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.3", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.3", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.4", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.4", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.6", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.6", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "0.6", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ], + [ + "0.050", + "100", + "0.1", + "1000", + "0.2", + "300", + "0", + "0" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "distanceFromDeltaMassForSidebands": "0.050", + "hfTrigger2ProngCuts": { + "deltaMassPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "-0.0025", + "9.99999975e-05" + ] + ] + }, + "nSigmaMax": "2", + "ptDeltaMassMax": "10", + "ptMassCutMax": "9999", + "sigmaPars": { + "labels_cols": [ + "constant", + "linear" + ], + "labels_rows": "", + "values": [ + [ + "0.01424", + "0.00178" + ] + ] + } + }, + "keepOnlySidebandCandidates": "false", + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "3", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "Model.onnx" + ] + }, + "ptD0CandMax": "50", + "ptD0CandMin": "0", + "ptDstarCandMax": "50", + "ptDstarCandMin": "0", + "ptPidTofMax": "5", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "5", + "ptPidTpcMin": "0.15", + "timestampCCDB": "-1", + "usePidTpcAndTof": "false", + "useTriggerMassCut": "false" + }, + "hf-candidate-selector-jpsi": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "15" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "DCA_xy", + "DCA_z", + "pT El", + "chi2PCA" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8" + ], + "values": [ + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ], + [ + "0.5", + "0.2", + "0.4", + "1", + "1" + ] + ] + }, + "nSigmaRichCombinedTofMax": "5", + "nSigmaRichMax": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcMax": "3", + "processAlice2": "true", + "processAlice3": "false", + "ptCandMax": "50", + "ptCandMin": "0", + "ptPidRichMax": "10", + "ptPidRichMin": "0.15", + "ptPidTofMax": "5", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "10", + "ptPidTpcMin": "0.15", + "selectENotPi": "true" + }, + "hf-candidate-selector-lb-to-lc-pi": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "CPA", + "Chi2PCA", + "d0 Lc+", + "d0 Pi", + "pT Lc+", + "pT Pi", + "Lb decLen", + "Lb decLenXY", + "Imp. Par. Product", + "DeltaMLc", + "Cos ThetaStar" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ], + [ + "1", + "0.8", + "1", + "0.01", + "0.01", + "1", + "0.15", + "0.05", + "0.05", + "0", + "0.1", + "0.8" + ] + ] + }, + "impactParameterMaximum": "0.2", + "maxDecayLengthError": "0.015", + "maxDecayLengthXYError": "0.01", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "5", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "5", + "ptCandMax": "50", + "ptCandMin": "0", + "ptPidTofMax": "10", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "10", + "ptPidTpcMin": "0.15", + "selectionFlagLc": "0" + }, + "hf-candidate-selector-lc": { + "activateQA": "false", + "applyKfCuts": "true", + "applyMl": "false", + "applyNonKfCuts": "true", + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24", + "36" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "binsPtTrack": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "3", + "1000" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "pT p", + "pT K", + "pT Pi", + "Chi2PCA", + "decay length", + "cos pointing angle", + "decLengthXY", + "normDecLXY", + "impParXY", + "mass (Kpi)" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9" + ], + "values": [ + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "0.5", + "0.004", + "0", + "0.", + "0.", + "1e+10", + "-1" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "cutsSingleTrack": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ] + ] + }, + "itsChi2PerClusterMax": "1e+10", + "itsNClustersFoundMin": "0", + "kfCuts": { + "labels_cols": [ + "kfChi2PrimPr", + "kfChi2PrimKa", + "kfChi2PrimPi", + "kfChi2GeoKaPi", + "kfChi2GeoPrPi", + "kfChi2GeoPrKa", + "kfDcaKaPi", + "kfDcaPrPi", + "kfDcaPrKa", + "kfChi2Geo", + "kfLdL", + "kfChi2Topo" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9" + ], + "values": [ + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ], + [ + "3", + "3", + "3", + "3", + "3", + "3", + "0.01", + "0.01", + "0.01", + "3", + "5", + "5" + ] + ] + }, + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTLc" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "3", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_LcToPKPi.onnx" + ] + }, + "processBayesPidWithDCAFitterN": "false", + "processBayesPidWithKFParticle": "false", + "processNoBayesPidWithDCAFitterN": "true", + "processNoBayesPidWithKFParticle": "false", + "ptCandMax": "24", + "ptCandMin": "0", + "ptPidBayesMax": "5", + "ptPidBayesMin": "0.1", + "ptPidTofMax": "2", + "ptPidTofMin": "0.5", + "ptPidTpcMax": "1", + "ptPidTpcMin": "0.1", + "timestampCCDB": "-1", + "tpcChi2PerClusterMax": "1e+10", + "tpcNClustersFoundMin": "0", + "tpcNCrossedRowsMin": "0", + "tpcNCrossedRowsOverFindableClustersMin": "0", + "usePid": "false", + "usePidTpcAndTof": "false" + }, + "hf-candidate-selector-lc-to-k0s-p": { + "applyMl": "false", + "binsPt": { + "values": [ + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "mLc", + "mK0s", + "mLambda", + "mGamma", + "ptBach", + "ptV0Dau", + "ptV0", + "d0Bach", + "d0V0" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7" + ], + "values": [ + [ + "0.4", + "0.008", + "0.005", + "0.1", + "0.5", + "0.3", + "0.6", + "0.05", + "999999" + ], + [ + "0.4", + "0.008", + "0.005", + "0.1", + "0.5", + "0.4", + "1.3", + "0.05", + "999999" + ], + [ + "0.4", + "0.009", + "0.005", + "0.1", + "0.6", + "0.4", + "1.3", + "0.05", + "999999" + ], + [ + "0.4", + "0.011", + "0.005", + "0.1", + "0.6", + "0.4", + "1.4", + "0.05", + "999999" + ], + [ + "0.4", + "0.013", + "0.005", + "0.1", + "0.6", + "0.4", + "1.4", + "0.06", + "999999" + ], + [ + "0.4", + "0.013", + "0.005", + "0.1", + "0.9", + "0.4", + "1.6", + "0.09", + "999999" + ], + [ + "0.4", + "0.016", + "0.005", + "0.1", + "0.9", + "0.4", + "1.7", + "0.10", + "999999" + ], + [ + "0.4", + "0.019", + "0.005", + "0.1", + "1", + "0.4", + "1.9", + "0.20", + "999999" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTLc" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMaxHighP": "3", + "nSigmaTofCombinedMaxLowP": "9999", + "nSigmaTofMaxHighP": "3", + "nSigmaTofMaxLowP": "0", + "nSigmaTpcCombinedMaxHighP": "9999", + "nSigmaTpcCombinedMaxLowP": "2", + "nSigmaTpcMaxHighP": "0", + "nSigmaTpcMaxLowP": "2", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_LcToPK0S.onnx" + ] + }, + "pPidThreshold": "1", + "probBayesMinHighP": "0.8", + "probBayesMinLowP": "0.8", + "processWithBayesPID": "false", + "processWithStandardPID": "true", + "ptCandMax": "50", + "ptCandMin": "0", + "timestampCCDB": "-1" + }, + "hf-candidate-selector-to-xi-pi": { + "applyTrkSelLf": "true", + "cascadeMassWindow": "0.01", + "cosPACascMin": "0.97", + "cosPAV0Min": "0.97", + "dcaBachToPvMin": "0.04", + "dcaCascDauMax": "1", + "dcaCharmBaryonDauMax": "2", + "dcaNegToPvMin": "0.06", + "dcaPosToPvMin": "0.06", + "dcaV0DauMax": "1", + "etaTrackCharmBachMax": "0.8", + "etaTrackLFDauMax": "1", + "impactParameterXYCascMax": "10", + "impactParameterXYCascMin": "0", + "impactParameterXYPiFromCharmBaryonMax": "10", + "impactParameterXYPiFromCharmBaryonMin": "0", + "impactParameterZCascMax": "10", + "impactParameterZCascMin": "0", + "impactParameterZPiFromCharmBaryonMax": "10", + "impactParameterZPiFromCharmBaryonMin": "0", + "invMassCharmBaryonMax": "3.1", + "invMassCharmBaryonMin": "2", + "itsChi2PerClusterMax": "36", + "nClustersItsInnBarrMin": "1", + "nClustersItsMin": "3", + "nClustersTpcMin": "70", + "nSigmaTofCombinedPiMax": "0", + "nSigmaTofCombinedPrMax": "0", + "nSigmaTofPiMax": "3", + "nSigmaTofPrMax": "3", + "nSigmaTpcCombinedPiMax": "0", + "nSigmaTpcCombinedPrMax": "0", + "nSigmaTpcPiMax": "3", + "nSigmaTpcPrMax": "3", + "nTpcCrossedRowsMin": "70", + "ptCandMax": "50", + "ptCandMin": "0", + "ptPiFromCascMin": "0.15", + "ptPiFromCharmBaryonMin": "0.2", + "ptPiPidTofMax": "9999.9", + "ptPiPidTofMin": "-1", + "ptPiPidTpcMax": "9999.9", + "ptPiPidTpcMin": "-1", + "ptPrPidTofMax": "9999.9", + "ptPrPidTofMin": "-1", + "ptPrPidTpcMax": "9999.9", + "ptPrPidTpcMin": "-1", + "radiusCascMin": "0.6", + "radiusV0Min": "1.2", + "tpcChi2PerClusterMax": "4", + "tpcCrossedRowsOverFindableClustersRatioMin": "0.8", + "usePidTpcOnly": "false", + "usePidTpcTofCombined": "true", + "v0MassWindow": "0.01" + }, + "hf-candidate-selector-xic-to-p-k-pi": { + "activateQA": "true", + "applyMl": "false", + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24", + "36" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "pT p", + "pT K", + "pT Pi", + "chi2PCA", + "decay length", + "cos pointing angle", + "decLengthXY", + "normDecLXY", + "ct", + "impParXY" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9" + ], + "values": [ + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ], + [ + "0.4", + "0.4", + "0.4", + "0.4", + "1.0e-05", + "0.005", + "0.8", + "0.005", + "4", + "2", + "0" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "decayLengthXYNormalisedMin": "3", + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTXic" + ] + }, + "nClassesMl": "3", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "3", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "3", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_XicToPKPi.onnx" + ] + }, + "ptCandMax": "36", + "ptCandMin": "0", + "ptPidTofMax": "20", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "20", + "ptPidTpcMin": "0.15", + "timestampCCDB": "-1", + "usePid": "false", + "usePidTpcAndTof": "false" + }, + "hf-candidate-selector-xic-to-xi-pi-pi": { + "applyMl": "false", + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + "20" + ] + }, + "binsPtMl": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "16", + "24", + "50" + ] + }, + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutDirMl": { + "values": [ + "0", + "1", + "1" + ] + }, + "cuts": { + "labels_cols": [ + "m", + "y", + "eta", + "eta Pi from XicPlus", + "eta Xi Daughters", + "pT Pi0", + "pT Pi1", + "pT Pi0 + Pi1", + "chi2SV", + "min decay length", + "min decay length XY", + "max inv mass Xi-Pi0", + "max inv mass Xi-Pi1" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11", + "pT bin 12" + ], + "values": [ + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ], + [ + "0.4", + "0.8", + "0.8", + "0.8", + "1", + "0.1", + "0.1", + "0.2", + "100", + "0", + "0", + "2.4", + "2.4" + ] + ] + }, + "cutsMl": { + "labels_cols": [ + "score class 1", + "score class 2", + "score class 3" + ], + "labels_rows": [ + "pT bin 0", + "pT bin 1", + "pT bin 2", + "pT bin 3", + "pT bin 4", + "pT bin 5", + "pT bin 6", + "pT bin 7", + "pT bin 8", + "pT bin 9", + "pT bin 10", + "pT bin 11" + ], + "values": [ + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ], + [ + "0.5", + "0.5", + "0.5" + ] + ] + }, + "doTrackQualitySelection": "true", + "fillQAHistograms": "false", + "itsChi2PerClusterMax": "36", + "loadModelsFromCCDB": "false", + "modelPathsCCDB": { + "values": [ + "EventFiltering/PWGHF/BDTXicToXiPiPi" + ] + }, + "nClassesMl": "3", + "nClustersItsInnBarrMin": "1", + "nClustersItsMin": "3", + "nClustersTpcMin": "70", + "nSigmaTofCombinedMax": "5", + "nSigmaTofMax": "5", + "nSigmaTpcCombinedMax": "5", + "nSigmaTpcMax": "5", + "nTpcCrossedRowsMin": "70", + "namesInputFeatures": { + "values": [ + "feature1", + "feature2" + ] + }, + "onnxFileNames": { + "values": [ + "ModelHandler_onnx_XicToXiPiPi.onnx" + ] + }, + "processData": "true", + "processMc": "false", + "ptPidTofMax": "20", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "20", + "ptPidTpcMin": "0.15", + "timestampCCDB": "-1", + "tpcChi2PerClusterMax": "4", + "tpcCrossedRowsOverFindableClustersRatioMin": "0.8", + "usePid": "true", + "useTpcPidOnly": "false" + }, + "hf-correlator-d0-hadrons": { + "dcaXYTrackMax": "0.0025", + "dcaZTrackMax": "0.0025", + "efficiencyFlagD": "0", + "etaTrackMax": "4", + "multMax": "1000", + "multMin": "0", + "processData": "true", + "processMcGen": "false", + "processMcRec": "false", + "ptBinsForMassAndEfficiency": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24", + "36" + ] + }, + "ptCandMin": "-1", + "ptSoftPionMax": "0.0024", + "ptTrackMin": "-1", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", + "yCandMax": "-1" + }, + "hf-correlator-dplus-hadrons": { + "applyEfficiency": "1", + "binsPt": { + "values": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "10", + "12", + "16", + "24", + "36" + ] + }, + "dcaXYTrackMax": "1", + "dcaZTrackMax": "1", + "efficiencyD": { + "values": [ + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0", + "0" + ] + }, + "etaTrackMax": "0.8", + "multMax": "10000", + "multMin": "0", + "processData": "true", + "processDataMixedEvent": "false", + "processMcGen": "false", + "processMcGenMixedEvent": "false", + "processMcRec": "false", + "processMcRecMixedEvent": "false", + "ptCandMin": "1", + "ptTrackMax": "50", + "ptTrackMin": "0.3", + "selectionFlagDplus": "0", + "yCandMax": "0.8" + }, + "hf-derived-data-creator-b0-to-d-pi": { + "downSampleBkgFactor": "1", + "fillCandidateBase": "true", + "fillCandidateId": "true", + "fillCandidateMc": "true", + "fillCandidateMl": "true", + "fillCandidateMlDplus": "true", + "fillCandidatePar": "true", + "fillCandidateParDplus": "true", + "fillCandidateParE": "true", + "fillCandidateSel": "true", + "fillCollBase": "true", + "fillCollId": "true", + "fillMcCollBase": "true", + "fillMcCollId": "true", + "fillMcRCollId": "true", + "fillParticleBase": "true", + "fillParticleId": "true", + "processData": "true", + "processDataMl": "false", + "processMcAll": "false", + "processMcBkg": "false", + "processMcGenOnly": "false", + "processMcMlAll": "false", + "processMcMlBkg": "false", + "processMcMlSig": "false", + "processMcSig": "false", + "ptMaxForDownSample": "10" + }, + "hf-derived-data-creator-bplus-to-d0-pi": { + "downSampleBkgFactor": "1", + "fillCandidateBase": "true", + "fillCandidateId": "true", + "fillCandidateMc": "true", + "fillCandidateMl": "true", + "fillCandidateMlD0": "true", + "fillCandidatePar": "true", + "fillCandidateParD0": "true", + "fillCandidateParE": "true", + "fillCandidateSel": "true", + "fillCollBase": "true", + "fillCollId": "true", + "fillMcCollBase": "true", + "fillMcCollId": "true", + "fillMcRCollId": "true", + "fillParticleBase": "true", + "fillParticleId": "true", + "processData": "true", + "processDataMl": "false", + "processMcAll": "false", + "processMcBkg": "false", + "processMcGenOnly": "false", + "processMcMlAll": "false", + "processMcMlBkg": "false", + "processMcMlSig": "false", + "processMcSig": "false", + "ptMaxForDownSample": "10" + }, + "hf-derived-data-creator-d0-to-k-pi": { + "downSampleBkgFactor": "1", + "fillCandidateBase": "true", + "fillCandidateId": "true", + "fillCandidateMc": "true", + "fillCandidateMl": "true", + "fillCandidatePar": "true", + "fillCandidateParE": "true", + "fillCandidateSel": "true", + "fillCollBase": "true", + "fillCollId": "true", + "fillMcCollBase": "true", + "fillMcCollId": "true", + "fillMcRCollId": "true", + "fillParticleBase": "true", + "fillParticleId": "true", + "processDataWithDCAFitterN": "true", + "processDataWithDCAFitterNMl": "false", + "processDataWithKFParticle": "false", + "processDataWithKFParticleMl": "false", + "processMcGenOnly": "false", + "processMcWithDCAFitterAll": "false", + "processMcWithDCAFitterBkg": "false", + "processMcWithDCAFitterMlAll": "false", + "processMcWithDCAFitterMlBkg": "false", + "processMcWithDCAFitterMlSig": "false", + "processMcWithDCAFitterSig": "false", + "processMcWithKFParticleAll": "false", + "processMcWithKFParticleBkg": "false", + "processMcWithKFParticleMlAll": "false", + "processMcWithKFParticleMlBkg": "false", + "processMcWithKFParticleMlSig": "false", + "processMcWithKFParticleSig": "false", + "ptMaxForDownSample": "10" + }, + "hf-derived-data-creator-dplus-to-pi-k-pi": { + "downSampleBkgFactor": "1", + "fillCandidateBase": "true", + "fillCandidateId": "true", + "fillCandidateMc": "true", + "fillCandidateMl": "true", + "fillCandidatePar": "true", + "fillCandidateParE": "true", + "fillCandidateSel": "true", + "fillCollBase": "true", + "fillCollId": "true", + "fillMcCollBase": "true", + "fillMcCollId": "true", + "fillMcRCollId": "true", + "fillParticleBase": "true", + "fillParticleId": "true", + "processData": "true", + "processDataMl": "false", + "processMcAll": "false", + "processMcBkg": "false", + "processMcGenOnly": "false", + "processMcMlAll": "false", + "processMcMlBkg": "false", + "processMcMlSig": "false", + "processMcSig": "false", + "ptMaxForDownSample": "10" + }, + "hf-derived-data-creator-lc-to-p-k-pi": { + "downSampleBkgFactor": "1", + "fillCandidateBase": "true", + "fillCandidateId": "true", + "fillCandidateMc": "true", + "fillCandidateMl": "true", + "fillCandidatePar": "true", + "fillCandidateParE": "true", + "fillCandidateSel": "true", + "fillCollBase": "true", + "fillCollId": "true", + "fillMcCollBase": "true", + "fillMcCollId": "true", + "fillParticleBase": "true", + "fillParticleId": "true", + "processData": "true", + "processDataMl": "false", + "processMcAll": "false", + "processMcBkg": "false", + "processMcMlAll": "false", + "processMcMlBkg": "false", + "processMcMlSig": "false", + "processMcSig": "false", + "ptMaxForDownSample": "10" + }, + "hf-derived-data-creator-lc-to-k0s-p": { + "downSampleBkgFactor": "1", + "fillCandidateBase": "true", + "fillCandidateId": "true", + "fillCandidateMc": "true", + "fillCandidateMl": "true", + "fillCandidatePar": "true", + "fillCandidateParE": "true", + "fillCandidateSel": "true", + "fillCollBase": "true", + "fillCollId": "true", + "fillMcCollBase": "true", + "fillMcCollId": "true", + "fillParticleBase": "true", + "fillParticleId": "true", + "processData": "true", + "processDataMl": "false", + "processMcAll": "false", + "processMcBkg": "false", + "processMcMlAll": "false", + "processMcMlBkg": "false", + "processMcMlSig": "false", + "processMcSig": "false", + "ptMaxForDownSample": "10" + }, + "hf-dplus-selection": { + "processDplusSelectionData": "true", + "processDplusSelectionMcGen": "false", + "processDplusSelectionMcRec": "false", + "ptCandMin": "1", + "selectionFlagDplus": "0", + "yCandMax": "0.8" + }, + "hf-pid-creator": { + "processDummy": "false", + "processFullDe": "true", + "processFullEl": "false", + "processFullKa": "true", + "processFullMu": "false", + "processFullPi": "true", + "processFullPr": "true", + "processTinyDe": "false", + "processTinyEl": "false", + "processTinyKa": "false", + "processTinyMu": "false", + "processTinyPi": "false", + "processTinyPr": "false" + }, + "hf-task-b0": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "checkDecayTypeMc": "false", + "etaTrackMax": "0.8", + "processMc": "false", + "ptTrackMin": "0.1", + "selectionFlagB0": "0", + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-bplus": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "etaTrackMax": "0.8", + "processMc": "false", + "ptTrackMin": "0.1", + "selectionFlagBplus": "0", + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-correlation-d0-hadrons": { + "efficiencyFlagD": "0", + "processData": "true", + "processMcGen": "false", + "processMcRec": "false", + "ptBinsForCorrelations": { + "values": [ + "0", + "2", + "4", + "6", + "8", + "12", + "16", + "24" + ] + }, + "sidebandLeftInner": { + "values": [ + "1.642", + "1.642", + "1.642", + "1.642", + "1.642", + "1.642", + "1.642", + "1.642" + ] + }, + "sidebandLeftOuter": { + "values": [ + "1.754", + "1.754", + "1.754", + "1.754", + "1.754", + "1.754", + "1.754", + "1.754" + ] + }, + "sidebandRightInner": { + "values": [ + "1.978", + "1.978", + "1.978", + "1.978", + "1.978", + "1.978", + "1.978", + "1.978" + ] + }, + "sidebandRightOuter": { + "values": [ + "2.090", + "2.090", + "2.090", + "2.090", + "2.090", + "2.090", + "2.090", + "2.090" + ] + }, + "signalRegionInner": { + "values": [ + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810" + ] + }, + "signalRegionOuter": { + "values": [ + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922" + ] + } + }, + "hf-task-d0": { + "applyMl": "false", + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "5.5", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "12", + "16", + "20", + "24", + "36", + "50", + "100" + ] + }, + "centEstimator": "0", + "occEstimator": "0", + "processDataWithDCAFitterN": "true", + "processDataWithDCAFitterNCent": "false", + "processDataWithDCAFitterNMl": "false", + "processDataWithDCAFitterNMlCent": "false", + "processDataWithKFParticle": "false", + "processDataWithKFParticleMl": "false", + "processMcWithDCAFitterN": "false", + "processMcWithDCAFitterNCent": "false", + "processMcWithDCAFitterNMl": "false", + "processMcWithDCAFitterNMlCent": "false", + "processMcWithKFParticle": "false", + "processMcWithKFParticleMl": "false", + "selectionCand": "1", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", + "selectionFlagHf": "1", + "selectionPid": "1", + "selectionTopol": "1", + "storeCentrality": "false", + "storeOccupancy": "false", + "storeTrackQuality": "false", + "thnConfigAxisBkgScore": { + "values": [ + "50", + "0", + "1" + ] + }, + "thnConfigAxisCandType": { + "values": [ + "4", + "-0.5", + "3.5" + ] + }, + "thnConfigAxisCent": { + "values": [ + "110", + "0", + "110" + ] + }, + "thnConfigAxisGenPtB": { + "values": [ + "1000", + "0", + "100" + ] + }, + "thnConfigAxisGenPtD": { + "values": [ + "500", + "0", + "50" + ] + }, + "thnConfigAxisMass": { + "values": [ + "120", + "1.5848", + "2.1848" + ] + }, + "thnConfigAxisMinItsNCls": { + "values": [ + "5", + "3", + "8" + ] + }, + "thnConfigAxisMinTpcNCrossedRows": { + "values": [ + "10", + "70", + "180" + ] + }, + "thnConfigAxisNonPromptScore": { + "values": [ + "50", + "0", + "1" + ] + }, + "thnConfigAxisNumPvContr": { + "values": [ + "200", + "-0.5", + "199.5" + ] + }, + "thnConfigAxisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "thnConfigAxisOrigin": { + "values": [ + "3", + "-0.5", + "2.5" + ] + }, + "thnConfigAxisPromptScore": { + "values": [ + "50", + "0", + "1" + ] + }, + "thnConfigAxisPt": { + "values": [ + "500", + "0", + "50" + ] + }, + "thnConfigAxisPtB": { + "values": [ + "1000", + "0", + "100" + ] + }, + "thnConfigAxisY": { + "values": [ + "20", + "-1", + "1" + ] + }, + "yCandGenMax": "0.5", + "yCandRecoMax": "0.5" + }, + "hf-task-dplus": { + "axisMlScore0": { + "values": [ + "100", + "0", + "1" + ] + }, + "axisMlScore1": { + "values": [ + "100", + "0", + "1" + ] + }, + "axisMlScore2": { + "values": [ + "100", + "0", + "1" + ] + }, + "binsPt": { + "values": [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "10", + "12", + "16", + "24", + "36" + ] + }, + "classMl": { + "values": [ + "0", + "1", + "2" + ] + }, + "processData": "true", + "processDataWithMl": "false", + "processMc": "false", + "processMcWithMl": "false", + "selectionFlagDplus": "0", + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-ds": { + "axisCentrality": { + "values": [ + "100", + "0", + "1" + ] + }, + "axisFlagBHad": { + "values": [ + "5", + "0", + "5" + ] + }, + "axisMlScore0": { + "values": [ + "100", + "0", + "1" + ] + }, + "axisMlScore1": { + "values": [ + "100", + "0", + "1" + ] + }, + "axisMlScore2": { + "values": [ + "100", + "0", + "1" + ] + }, + "axisNPvContributors": { + "values": [ + "200", + "-0.5", + "199.5" + ] + }, + "axisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "axisPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24" + ] + }, + "axisPtBHad": { + "values": [ + "50", + "0", + "100" + ] + }, + "ccdbPath": "Centrality/Calibration", + "ccdburl": "http://alice-ccdb.cern.ch", + "classMl": { + "values": [ + "0", + "2", + "3" + ] + }, + "decayChannel": "1", + "fillDplusMc": "true", + "fillMcBkgHistos": "false", + "fillPercentiles": "true", + "massDplusSignalMax": "1.906", + "massDplusSignalMin": "1.866", + "massDsSignalMax": "1.994", + "massDsSignalMin": "1.934", + "occEstimator": "0", + "processData": "true", + "processDataWithCentFT0C": "false", + "processDataWithCentFT0M": "false", + "processDataWithCentNTracksPV": "false", + "processDataWithMl": "false", + "processDataWithMlAndCentFT0C": "false", + "processDataWithMlAndCentFT0M": "false", + "processDataWithMlAndCentNTracksPV": "false", + "processMc": "false", + "processMcWithCentFT0C": "false", + "processMcWithCentFT0M": "false", + "processMcWithCentNTracksPV": "false", + "processMcWithMl": "false", + "processMcWithMlAndCentFT0C": "false", + "processMcWithMlAndCentFT0M": "false", + "processMcWithMlAndCentNTracksPV": "false", + "reconstructionPass": "", + "selectionFlagDs": "0", + "storeOccupancy": "false", + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-dstar-to-d0-pi": { + "binningBkgBDTScore": { + "values": [ + "100", + "0", + "1" + ] + }, + "binningCentrality": { + "values": [ + "0", + "0", + "1", + "10", + "30", + "50", + "70", + "100" + ] + }, + "binningDecayLength": { + "values": [ + "1000", + "0", + "0.7" + ] + }, + "binningDeltaInvMass": { + "values": [ + "100", + "0.13", + "0.16" + ] + }, + "binningImpactParam": { + "values": [ + "1000", + "0.1", + "-0.1" + ] + }, + "binningNormDecayLength": { + "values": [ + "1000", + "0", + "40" + ] + }, + "binningSigBDTScore": { + "values": [ + "100", + "0", + "1" + ] + }, + "processDataWML": "false", + "processDataWoML": "true", + "processMcWML": "false", + "processMcWoMl": "false", + "ptBins": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "5.5", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "12", + "16", + "20", + "24", + "36", + "50", + "100" + ] + }, + "selectionFlagDstarToD0Pi": "true", + "selectionFlagHfD0ToPiK": "true", + "yCandDstarGenMax": "0.5", + "yCandDstarRecoMax": "0.8" + }, + "hf-task-flow": { + "axisDeltaEta": { + "values": [ + "36", + "-1.8", + "1.8" + ] + }, + "axisDeltaPhi": { + "values": [ + "72", + "-1.5707963705062866", + "4.7123889923095703" + ] + }, + "axisEtaEfficiency": { + "values": [ + "10", + "-1", + "1" + ] + }, + "axisMass": { + "values": [ + "30", + "1.7", + "2" + ] + }, + "axisMultiplicity": { + "values": [ + "0", + "0", + "10", + "20", + "30", + "40", + "50", + "60", + "80", + "100", + "200" + ] + }, + "axisPtAssoc": { + "values": [ + "0", + "0.2", + "3" + ] + }, + "axisPtEfficiency": { + "values": [ + "0", + "0.5", + "0.6", + "0.7", + "0.8", + "0.9", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "6", + "7", + "8" + ] + }, + "axisPtTrigger": { + "values": [ + "0", + "0.2", + "0.5", + "1", + "1.5", + "2", + "3", + "4", + "6" + ] + }, + "axisVertex": { + "values": [ + "10", + "-10", + "10" + ] + }, + "axisVertexEfficiency": { + "values": [ + "10", + "-10", + "10" + ] + }, + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "2.5", + "3", + "3.5", + "4", + "4.5", + "5", + "5.5", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "12", + "16", + "20", + "24", + "36", + "50", + "100" + ] + }, + "etaTrackAssocMax": "0.8", + "nMixedEvents": 5, + "processMc": "false", + "processMixedHfHadrons": "true", + "processMixedTpcTpcHH": "true", + "processRun2": "false", + "processRun3": "true", + "processSameHfHadrons": "true", + "processSameTpcMftHH": "false", + "processSameTpcTpcHH": "true", + "ptTrackAssocMin": "0.2", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", + "yCandMax": "1", + "zVertexMax": "10" + }, + "hf-task-jpsi": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "15" + ] + }, + "modeJpsiToMuMu": "false", + "selectedMid": "false", + "selectedRich": "false", + "selectedTof": "false", + "selectedTofRich": "false", + "selectionFlagJpsi": "0", + "yCandMax": "-1" + }, + "hf-task-lb": { + "DCALengthParameter": "0.02", + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "largeLifetimeBG": "0.01", + "mDiffDelta1232Max": "0.117", + "mDiffKStar892Max": "0.0473", + "mDiffLambda1520Max": "0.032", + "mDiffLcMax": "0.1", + "maximumImpactParameterForLambdaCCrossChecks": "0.2", + "minLikelihoodRatio": "10", + "minLikelihoodRatioLc": "10", + "processData": "true", + "processMc": "false", + "resoCorrectionFactor": "1.1", + "selectionFlagLb": "0", + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-lc": { + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "10", + "12", + "24", + "36" + ] + }, + "fillTHn": "false", + "occEstimator": "2", + "processDataStd": "true", + "processDataStdWithFT0C": "false", + "processDataStdWithFT0M": "false", + "processDataWithMl": "false", + "processDataWithMlWithFT0C": "false", + "processDataWithMlWithFT0M": "false", + "processMcStd": "false", + "processMcStdWithFT0C": "false", + "processMcStdWithFT0M": "false", + "processMcWithMl": "false", + "processMcWithMlWithFT0C": "false", + "processMcWithMlWithFT0M": "false", + "selectionFlagLc": "0", + "storeOccupancy": "true", + "thnAxisRapidity": { + "values": [ + "20", + "-1", + "1" + ] + }, + "thnConfigAxisBdtScoreBkg": { + "values": [ + "1000", + "0", + "1" + ] + }, + "thnConfigAxisBdtScoreSignal": { + "values": [ + "100", + "0", + "1" + ] + }, + "thnConfigAxisCPA": { + "values": [ + "20", + "0.8", + "1" + ] + }, + "thnConfigAxisCanType": { + "values": [ + "5", + "0", + "5" + ] + }, + "thnConfigAxisCentrality": { + "values": [ + "100", + "0", + "100" + ] + }, + "thnConfigAxisChi2PCA": { + "values": [ + "100", + "0", + "20" + ] + }, + "thnConfigAxisDecLength": { + "values": [ + "10", + "0", + "0.05" + ] + }, + "thnConfigAxisGenPtB": { + "values": [ + "1000", + "0", + "100" + ] + }, + "thnConfigAxisMass": { + "values": [ + "300", + "1.98", + "2.58" + ] + }, + "thnConfigAxisNumPvContr": { + "values": [ + "200", + "-0.5", + "199.5" + ] + }, + "thnConfigAxisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "thnConfigAxisPt": { + "values": [ + "72", + "0", + "36" + ] + }, + "thnConfigAxisPtProng": { + "values": [ + "100", + "0", + "20" + ] + }, + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-lc-to-k0s-p": { + "binsPt": { + "values": [ + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24" + ] + }, + "etaCandMax": "-1", + "processMc": "false", + "selectionFlagLcToK0sP": "0", + "selectionFlagLcbarToK0sP": "0" + }, + "hf-task-mc-validation-gen": { + "xVertexMax": "100", + "xVertexMin": "-100", + "yVertexMax": "100", + "yVertexMin": "-100", + "zVertexMax": "100", + "zVertexMin": "-100" + }, + "hf-task-mc-validation-rec": { + "checkAmbiguousTracksWithHfEventsOnly": "false" + }, + "hf-task-xic": { + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24", + "36" + ] + }, + "dcaXYTrackMax": "0.0025", + "dcaZTrackMax": "0.0025", + "enableTHn": "false", + "etaTrackMax": "4", + "processDataStd": "true", + "processDataWithMl": "false", + "processMcStd": "false", + "processMcWithMl": "false", + "selectionFlagXic": "0", + "thnConfigAxisBdtScoreBkg": { + "values": [ + "100", + "0", + "1" + ] + }, + "thnConfigAxisBdtScoreSignal": { + "values": [ + "100", + "0", + "1" + ] + }, + "thnConfigAxisCPA": { + "values": [ + "20", + "0.8", + "1" + ] + }, + "thnConfigAxisChi2PCA": { + "values": [ + "100", + "0", + "20" + ] + }, + "thnConfigAxisDecLength": { + "values": [ + "10", + "0", + "0.05" + ] + }, + "thnConfigAxisDecLengthXY": { + "values": [ + "10", + "0", + "0.05" + ] + }, + "thnConfigAxisMass": { + "values": [ + "300", + "1.98", + "2.58" + ] + }, + "thnConfigAxisPt": { + "values": [ + "36", + "0", + "36" + ] + }, + "thnConfigAxisPtProng": { + "values": [ + "100", + "0", + "20" + ] + }, + "thnConfigAxisYMC": { + "values": [ + "100", + "-2", + "2" + ] + }, + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-task-xic-to-xi-pi-pi": { + "binsChi2": { + "values": [ + "200", + "0", + "0.1" + ] + }, + "binsDCA": { + "values": [ + "100", + "-0.05", + "0.05" + ] + }, + "binsDecLength": { + "values": [ + "200", + "0", + "0.5" + ] + }, + "binsErrDecLength": { + "values": [ + "100", + "0", + "1" + ] + }, + "binsImpParErr": { + "values": [ + "200", + "-0.1", + "0.1" + ] + }, + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24", + "36" + ] + }, + "binsSV": { + "values": [ + "200", + "-5", + "5" + ] + }, + "checkDecayTypeMc": "false", + "enableTHn": "false", + "etaTrackMax": "0.8", + "processMcWithDCAFitter": "false", + "processMcWithDCAFitterAndML": "false", + "processMcWithKFParticle": "false", + "processMcWithKFParticleAndML": "false", + "processWithDCAFitter": "true", + "processWithDCAFitterAndML": "false", + "processWithKFParticle": "false", + "processWithKFParticleAndML": "false", + "ptTrackMin": "0.1", + "selectionFlagXic": "0", + "thnConfigAxisBdtScoreBkg": { + "values": [ + "100", + "0", + "1" + ] + }, + "thnConfigAxisBdtScoreNonPrompt": { + "values": [ + "100", + "0", + "1" + ] + }, + "thnConfigAxisBdtScorePrompt": { + "values": [ + "100", + "0", + "1" + ] + }, + "thnConfigAxisCPA": { + "values": [ + "110", + "-1.1", + "1.1" + ] + }, + "thnConfigAxisChi2PCA": { + "values": [ + "200", + "0", + "20" + ] + }, + "thnConfigAxisDecLength": { + "values": [ + "200", + "0", + "0.5" + ] + }, + "thnConfigAxisDecLengthXY": { + "values": [ + "200", + "0", + "0.5" + ] + }, + "thnConfigAxisMass": { + "values": [ + "300", + "1.8", + "3" + ] + }, + "thnConfigAxisPt": { + "values": [ + "400", + "0", + "40" + ] + }, + "thnConfigAxisPtProng": { + "values": [ + "300", + "0", + "30" + ] + }, + "yCandGenMax": "0.5", + "yCandRecoMax": "0.8" + }, + "hf-track-index-skim-creator": { + "applyKaonPidIn3Prongs": "false", + "applyMlForHfFilters": "false", + "applyProtonPidForLcToPKPi": "true", + "applyProtonPidForXicToPKPi": "true", + "axisPvRefitDeltaX": { + "values": [ + "1000", + "-0.5", + "0.5" + ] + }, + "axisPvRefitDeltaY": { + "values": [ + "1000", + "-0.5", + "0.5" + ] + }, + "axisPvRefitDeltaZ": { + "values": [ + "1000", + "-0.5", + "0.5" + ] + }, + "binsPtD0ToPiK": { + "values": [ + "0", + "5", + "1000" + ] + }, + "binsPtDplusToPiKPi": { + "values": [ + "1", + "5", + "1000" + ] + }, + "binsPtDsToKKPi": { + "values": [ + "1.5", + "5", + "1000" + ] + }, + "binsPtDstarToD0Pi": { + "values": [ + "0", + "5", + "1000" + ] + }, + "binsPtJpsiToEE": { + "values": [ + "0", + "5", + "1000" + ] + }, + "binsPtJpsiToMuMu": { + "values": [ + "0", + "5", + "1000" + ] + }, + "binsPtLcToPKPi": { + "values": [ + "4", + "5", + "1000" + ] + }, + "binsPtXicToPKPi": { + "values": [ + "4", + "5", + "1000" + ] + }, + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutsD0ToPiK": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "d0d0" + ], + "labels_rows": "", + "values": [ + [ + "1.61", + "2.12", + "0.5", + "0" + ], + [ + "1.61", + "2.12", + "0.5", + "0" + ] + ] + }, + "cutsDplusToPiKPi": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "decL" + ], + "labels_rows": "", + "values": [ + [ + "1.67", + "2.07", + "0.7", + "0.03" + ], + [ + "1.67", + "2.07", + "0.7", + "0.03" + ] + ] + }, + "cutsDsToKKPi": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "decL", + "deltaMassKK" + ], + "labels_rows": "", + "values": [ + [ + "1.7", + "2.15", + "0.7", + "0.02", + "0.02" + ], + [ + "1.7", + "2.15", + "0.5", + "0.02", + "0.02" + ] + ] + }, + "cutsDstarToD0Pi": { + "labels_cols": [ + "deltaMassMax", + "deltaMassD0" + ], + "labels_rows": "", + "values": [ + [ + "0.17", + "0.08" + ], + [ + "0.17", + "0.12" + ] + ] + }, + "cutsJpsiToEE": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "d0d0" + ], + "labels_rows": "", + "values": [ + [ + "2.5", + "4.1", + "-2", + "1000" + ], + [ + "2.5", + "4.1", + "-2", + "1000" + ] + ] + }, + "cutsJpsiToMuMu": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "d0d0" + ], + "labels_rows": "", + "values": [ + [ + "2.5", + "4.1", + "-2", + "1000" + ], + [ + "2.5", + "4.1", + "-2", + "1000" + ] + ] + }, + "cutsLcToPKPi": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "decL" + ], + "labels_rows": "", + "values": [ + [ + "1.98", + "2.58", + "-2", + "0" + ], + [ + "1.98", + "2.58", + "-2", + "0" + ] + ] + }, + "cutsXicToPKPi": { + "labels_cols": [ + "massMin", + "massMax", + "cosp", + "decL" + ], + "labels_rows": "", + "values": [ + [ + "2.1", + "2.8", + "-2", + "0" + ], + [ + "2.1", + "2.8", + "-2", + "0" + ] + ] + }, + "debug": "false", + "debugPvRefit": "false", + "do3Prong": "true", + "doDstar": "true", + "fillHistograms": "true", + "isRun2": "false", + "loadMlModelsFromCCDB": "true", + "maxDZIni": "4", + "maxR": "200", + "maxTwoTrackChi2PcaFor3Prongs": "10000000000", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "minTwoTrackDecayLengthFor3Prongs": "0", + "mlModelPathCCDB": "EventFiltering/PWGHF/BDTSmeared", + "onnxFileNames": { + "labels_cols": [ + "Model path" + ], + "labels_rows": [ + "D0", + "Dplus", + "Lc", + "Ds", + "Xic" + ], + "values": [ + [ + "ModelHandler_onnx_D0ToKPi.onnx" + ], + [ + "ModelHandler_onnx_DplusToPiKPi.onnx" + ], + [ + "ModelHandler_onnx_LcToPKPi.onnx" + ], + [ + "ModelHandler_onnx_DsToKKPi.onnx" + ], + [ + "" + ] + ] + }, + "process2And3ProngsNoPvRefit": "true", + "process2And3ProngsNoPvRefitWithPidForHfFiltersBdt": "false", + "process2And3ProngsWithPvRefit": "false", + "process2And3ProngsWithPvRefitWithPidForHfFiltersBdt": "false", + "processNo2And3Prongs": "false", + "propagateToPCA": "true", + "ptTolerance": "0.1", + "thresholdMlScoreD0ToKPi": { + "labels_cols": [ + "BDTbkg", + "BDTprompt", + "BDTnonprompt" + ], + "labels_rows": "", + "values": [ + [ + "0.1", + "0.5", + "0.5" + ] + ] + }, + "thresholdMlScoreDplusToPiKPi": { + "labels_cols": [ + "BDTbkg", + "BDTprompt", + "BDTnonprompt" + ], + "labels_rows": "", + "values": [ + [ + "0.1", + "0.5", + "0.5" + ] + ] + }, + "thresholdMlScoreDsToPiKK": { + "labels_cols": [ + "BDTbkg", + "BDTprompt", + "BDTnonprompt" + ], + "labels_rows": "", + "values": [ + [ + "0.1", + "0.5", + "0.5" + ] + ] + }, + "thresholdMlScoreLcToPiKP": { + "labels_cols": [ + "BDTbkg", + "BDTprompt", + "BDTnonprompt" + ], + "labels_rows": "", + "values": [ + [ + "0.1", + "0.5", + "0.5" + ] + ] + }, + "thresholdMlScoreXicToPiKP": { + "labels_cols": [ + "BDTbkg", + "BDTprompt", + "BDTnonprompt" + ], + "labels_rows": "", + "values": [ + [ + "0.1", + "0.5", + "0.5" + ] + ] + }, + "timestampCcdbForHfFilters": "1657032422771", + "useAbsDCA": "false", + "useWeightedFinalPCA": "false" + }, + "hf-track-index-skim-creator-cascades": { + "applyProtonPid": "true", + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cpaV0Min": "0.995", + "cutInvMassCascLc": "1", + "cutInvMassV0": "0.05", + "etaMaxV0Daugh": "1.1", + "etaMinV0Daugh": "-99999", + "fillHistograms": "true", + "isRun2": "false", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processCascades": "false", + "processNoCascades": "true", + "propagateToPCA": "true", + "ptCascCandMin": "-1", + "ptMinV0Daugh": "0.05", + "useAbsDCA": "true", + "useDCAFitter": "true", + "useWeightedFinalPCA": "false" + }, + "hf-track-index-skim-creator-lf-cascades": { + "cascCosPA": "0.95", + "cascTransvRadius": "0.4", + "cascadeMassWindow": "0.01", + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "dcaBachToPv": "0.05", + "dcaCascDau": "1", + "dcaNegToPv": "0.05", + "dcaPosToPv": "0.05", + "dcaV0Dau": "2", + "dcaV0ToPv": "0.05", + "decayLengthXicMin": "-1", + "do3Prong": "true", + "fillHistograms": "true", + "isRun2": "false", + "massOmegaCharmBachelorMax": "3", + "massOmegaCharmBachelorMin": "2.4", + "massXiPiMax": "3", + "massXiPiMin": "2.1", + "massXiPiPiMax": "2.9", + "massXiPiPiMin": "2.1", + "maxChi2": "100", + "maxDXYIni": "4", + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "processLfCascades": "false", + "processNoLfCascades": "true", + "propagateToPCA": "true", + "ptMinOmegacZeroToOmegaPiLfCasc": "0", + "ptMinOmegaczeroToOmegaKaLfCasc": "0", + "ptMinXicZeroOmegacZeroToXiPiLfCasc": "0", + "ptMinXicplusLfCasc": "0", + "ptTolerance": "0.1", + "refitWithMatCorr": "true", + "rejDiffCollTrack": "true", + "useAbsDCA": "true", + "useWeightedFinalPCA": "true", + "v0CosPA": "0.95", + "v0MassWindow": "0.008", + "v0TransvRadius": "1", + "xicCosPA": "-2" + }, + "hf-track-index-skim-creator-tag-sel-collisions": { + "fillHistograms": "true", + "hfEvSel": { + "bcMarginForSoftwareTrigger": "100", + "ccdbPathSoftwareTrigger": "Users/m/mpuccio/EventFiltering/OTS/", + "centralityMax": "100", + "centralityMin": "0", + "chi2PvMax": "-1", + "nPvContributorsMin": "0", + "occEstimator": "1", + "occupancyMax": "1000000", + "occupancyMin": "0", + "rctCheckZDC": "false", + "rctLabel": "CBT_hadronPID", + "rctTreatLimitedAcceptanceAsBad": "false", + "requireGoodRct": "false", + "softwareTrigger": "", + "th2ConfigAxisCent": { + "values": [ + "100", + "0", + "100" + ] + }, + "th2ConfigAxisOccupancy": { + "values": [ + "14", + "0", + "14000" + ] + }, + "triggerClass": "-1", + "useIsGoodZvtxFT0vsPV": "false", + "useItsRofBorderCut": "true", + "useNoCollInRofStandard": "false", + "useNoCollInTimeRangeNarrow": "false", + "useNoCollInTimeRangeStandard": "false", + "useNoSameBunchPileup": "false", + "useOccupancyCut": "false", + "useSel8Trigger": "true", + "useTimeFrameBorderCut": "true", + "useTvxTrigger": "true", + "zPvPosMax": "10", + "zPvPosMin": "-10" + }, + "processNoTrigSel": "true", + "processTrigAndCentFT0ASel": "false", + "processTrigAndCentFT0CSel": "false", + "processTrigAndCentFT0MSel": "false", + "processTrigAndCentFV0ASel": "false", + "processTrigSel": "false", + "triggerClassName": "kINT7" + }, + "hf-track-index-skim-creator-tag-sel-tracks": { + "axisPvRefitDeltaX": { + "values": [ + "1000", + "-0.5", + "0.5" + ] + }, + "axisPvRefitDeltaY": { + "values": [ + "1000", + "-0.5", + "0.5" + ] + }, + "axisPvRefitDeltaZ": { + "values": [ + "1000", + "-0.5", + "0.5" + ] + }, + "binsPtTrack": { + "values": [ + "0", + "0.5", + "1", + "1.5", + "2", + "3", + "100" + ] + }, + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "cutsTrack2Prong": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.00", + "10", + "0", + "100" + ], + [ + "0.00", + "10", + "0", + "100" + ] + ] + }, + "cutsTrack3Prong": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.03", + "1", + "0", + "100" + ], + [ + "0.00", + "10", + "0", + "100" + ], + [ + "0.00", + "10", + "0", + "100" + ] + ] + }, + "cutsTrackBach": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.00", + "1", + "0", + "100" + ], + [ + "0.00", + "1", + "0", + "100" + ], + [ + "0.00", + "1", + "0", + "100" + ], + [ + "0.00", + "1", + "0", + "100" + ], + [ + "0.00", + "1", + "0", + "100" + ], + [ + "0.00", + "1", + "0", + "100" + ] + ] + }, + "cutsTrackBachLfCasc": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0.0025", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ], + [ + "0", + "10", + "0", + "100" + ] + ] + }, + "cutsTrackDstar": { + "labels_cols": [ + "min_dcaxytoprimary", + "max_dcaxytoprimary", + "min_dcaztoprimary", + "max_dcaztoprimary" + ], + "labels_rows": "", + "values": [ + [ + "0", + "2", + "0", + "100" + ], + [ + "0", + "2", + "0", + "100" + ], + [ + "0", + "2", + "0", + "100" + ], + [ + "0", + "2", + "0", + "100" + ], + [ + "0", + "2", + "0", + "100" + ], + [ + "0", + "2", + "0", + "100" + ] + ] + }, + "debugPvRefit": "false", + "doCutQuality": "true", + "doPvRefit": "false", + "etaMaxSoftPionForDstar": "0.8", + "etaMaxTrack2Prong": "0.8", + "etaMaxTrack3Prong": "0.8", + "etaMaxTrackBach": "0.8", + "etaMaxTrackBachLfCasc": "1.1", + "etaMinSoftPionForDstar": "-99999", + "etaMinTrack2Prong": "-99999", + "etaMinTrack3Prong": "-99999", + "etaMinTrackBach": "-99999", + "etaMinTrackBachLfCasc": "-99999", + "fillHistograms": "true", + "isRun2": "false", + "processNoPid": "true", + "processProtonPidTof": "false", + "processProtonPidTpc": "false", + "processProtonPidTpcAndTof": "false", + "processProtonPidTpcOrTof": "false", + "ptMinSoftPionForDstar": "0.05", + "ptMinTrack2Prong": "0.4", + "ptMinTrack3Prong": "0.4", + "ptMinTrackBach": "0.3", + "ptMinTrackBachLfCasc": "0.1", + "selectionsPid": { + "labels_cols": [ + "minPtTpc", + "maxPtTpc", + "nSigmaMaxTpc", + "minPtTof", + "maxPtTof", + "nSigmaMaxTof" + ], + "labels_rows": [ + "ProtonInLcToPKPi", + "ProtonInXicToPKPi", + "ProtonInLcToPK0S", + "KaonIn3Prongs" + ], + "values": [ + [ + "0", + "1000", + "5", + "0", + "1000", + "5" + ], + [ + "0", + "1000", + "5", + "0", + "1000", + "5" + ], + [ + "0", + "1000", + "5", + "0", + "1000", + "5" + ], + [ + "0", + "1000", + "5", + "0", + "1000", + "5" + ] + ] + }, + "tpcNClsFoundMin": "70", + "useIsGlobalTrack": "false", + "useIsGlobalTrackForBachLfCasc": "false", + "useIsGlobalTrackForSoftPion": "false", + "useIsGlobalTrackWoDCA": "true", + "useIsGlobalTrackWoDCAForBachLfCasc": "false", + "useIsGlobalTrackWoDCAForSoftPion": "true", + "useIsQualityTrackITSForBachLfCasc": "true", + "useIsQualityTrackITSForSoftPion": "false" + }, + "hf-tree-creator-bplus-to-d0-pi": { + "isSignal": "1" + }, + "hf-tree-creator-d0-to-k-pi": { + "downSampleBkgFactor": "1", + "fillCandidateLiteTable": "false", + "processDataWithDCAFitterN": "true", + "processDataWithKFParticle": "false", + "processMcWithDCAFitterAll": "false", + "processMcWithDCAFitterOnlyBkg": "false", + "processMcWithDCAFitterOnlySig": "false", + "processMcWithKFParticleAll": "false", + "processMcWithKFParticleOnlyBkg": "false", + "processMcWithKFParticleOnlySig": "false", + "ptMaxForDownSample": "10" + }, + "hf-tree-creator-lc-to-k0s-p": { + "downSampleBkgFactor": "1", + "fillCandidateLiteTable": "false", + "processData": "true", + "processMc": "false", + "ptMaxForDownSample": "24" + }, + "hf-tree-creator-lc-to-p-k-pi": { + "downSampleBkgFactor": "1", + "processData": "true", + "processMc": "false" + }, + "hf-tree-creator-to-xi-pi": { + "processDataFull": "true", + "processDataLite": "false", + "processMcFullOmegac0": "false", + "processMcFullXic0": "false", + "processMcLiteOmegac0": "false", + "processMcLiteXic0": "false", + "zPvCut": "10" + }, + "hf-tree-creator-xic-to-xi-pi-pi": { + "downSampleBkgFactor": "1", + "fillCandidateDauIndexTable": "false", + "fillCandidateLiteTable": "false", + "fillOnlyBackground": "false", + "fillOnlySignal": "false", + "processData": "true", + "processDataKf": "false", + "processMc": "false", + "processMcKf": "false", + "ptMaxForDownSample": "10", + "selectionXic": "1" + }, + "internal-dpl-aod-reader": { + "aod-file-private": "@list_o2.txt", + "end-value-enumeration": "-1", + "orbit-multiplier-enumeration": "0", + "orbit-offset-enumeration": "0", + "start-value-enumeration": "0", + "step-value-enumeration": "1", + "time-limit": "0" + }, + "jet-deriveddata-producer": { + "ccdb-url": "http://alice-ccdb.cern.ch", + "ccdbPathGrp": "GLO/GRP/GRP", + "ccdbPathGrpMag": "GLO/Config/GRPMagField", + "ccdbPathLut": "GLO/Param/MatLUT", + "ccdbUrl": "http://alice-ccdb.cern.ch", + "dcaZMax": "0.2", + "includeHadronicRate": "true", + "includeTriggers": "false", + "processBplus": "false", + "processBplusCollisions": "false", + "processBplusMC": "false", + "processBplusMcCollisions": "false", + "processBunchCrossings": "false", + "processClearMaps": "true", + "processClusters": "false", + "processCollisions": "true", + "processCollisionsALICE3": "false", + "processCollisionsRun2": "false", + "processCollisionsWithoutCentralityAndMultiplicity": "false", + "processD0": "true", + "processD0Collisions": "true", + "processD0MC": "false", + "processD0McCollisions": "false", + "processDielectron": "false", + "processDielectronCollisions": "false", + "processDielectronMc": "false", + "processDplus": "false", + "processDplusCollisions": "false", + "processDplusMC": "false", + "processDplusMcCollisions": "false", + "processEMCalCollisionLabels": "false", + "processLc": "false", + "processLcCollisions": "false", + "processLcMC": "false", + "processLcMcCollisions": "false", + "processMcClusterLabels": "false", + "processMcCollisionLabels": "false", + "processMcCollisions": "false", + "processMcCollisionsWithXsection": "false", + "processMcTrackLabels": "false", + "processMcTrackLabelsWithCollisionAssociator": "false", + "processParticles": "false", + "processTracks": "true", + "processTracksRun2": "false", + "processTracksWithCollisionAssociator": "false", + "processV0": "false", + "processV0MC": "false", + "processWithoutEMCalCollisionLabels": "false" + }, + "jet-finder-charged-d0-qa": { + "centralityMax": "999", + "centralityMin": "-999", + "eventSelections": "sel8", + "jetAreaFractionMin": "-99", + "jetEtaMax": "99", + "jetEtaMin": "-99", + "jetPtMax": "200", + "jetRadii": { + "values": [ + "0.4" + ] + }, + "leadingConstituentPtMin": "-99", + "pTHatExponent": "6", + "pTHatMaxMCD": "999", + "pTHatMaxMCP": "999", + "processCandidates": "false", + "processDummy": "false", + "processEvtWiseConstSubJetsData": "false", + "processHFTriggeredData": "false", + "processJetsData": "false", + "processJetsMCD": "true", + "processJetsMCDWeighted": "false", + "processJetsMCP": "true", + "processJetsMCPMCDMatched": "false", + "processJetsMCPMCDMatchedWeighted": "false", + "processJetsMCPWeighted": "false", + "processJetsRhoAreaSubData": "false", + "processJetsRhoAreaSubMCD": "false", + "processJetsSubMatched": "false", + "processMCCollisionsWeighted": "false", + "processRandomConeData": "false", + "processRandomConeMCD": "false", + "processRho": "false", + "processTracks": "false", + "processTracksSub": "false", + "processTracksWeighted": "false", + "processTriggeredData": "false", + "randomConeR": "0.4", + "selectedJetsRadius": "0.4", + "trackEtaMax": "0.9", + "trackEtaMin": "-0.9", + "trackPtMax": "100", + "trackPtMin": "0.15", + "trackSelections": "globalTracks", + "vertexZCut": "10" + }, + "jet-finder-d0-data-charged": { + "DoTriggering": "false", + "applyTrackingEfficiency": "false", + "candPtMax": "100", + "candPtMin": "0", + "candYMax": "0.8", + "candYMin": "-0.8", + "centralityMax": "999", + "centralityMin": "-999", + "clusterDefinition": "kV3Default", + "clusterEnergyMin": "0.5", + "clusterEtaMax": "0.71", + "clusterEtaMin": "-0.71", + "clusterPhiMax": "3.27", + "clusterPhiMin": "1.39", + "clusterRejectExotics": "true", + "clusterTimeMax": "25", + "clusterTimeMin": "-25", + "eventSelections": "sel8", + "fillTHnSparse": "true", + "ghostRepeat": "0", + "jetAlgorithm": "2", + "jetAreaFractionMin": "-99", + "jetEWSPtMax": "1000", + "jetEWSPtMin": "0", + "jetEtaMax": "99", + "jetEtaMin": "-99", + "jetExtraParam": "-99", + "jetGhostArea": "0.005", + "jetPtBinWidth": "5", + "jetPtMax": "1000", + "jetPtMin": "0", + "jetRadius": { + "values": [ + "0.4" + ] + }, + "jetRecombScheme": "0", + "jetTypeParticleLevel": "1", + "particleSelections": "PhysicalPrimary", + "processChargedEvtWiseSubJetsData": "false", + "processChargedEvtWiseSubJetsMCD": "false", + "processChargedEvtWiseSubJetsMCP": "false", + "processChargedJetsData": "true", + "processChargedJetsMCD": "false", + "processChargedJetsMCP": "false", + "processDummy": "true", + "rejectBackgroundMCDCandidates": "false", + "rejectIncorrectDecaysMCP": "true", + "skipMBGapEvents": "true", + "trackEtaMax": "0.9", + "trackEtaMin": "-0.9", + "trackOccupancyInTimeRangeMax": "999999", + "trackPhiMax": "999", + "trackPhiMin": "-999", + "trackPtMax": "1000", + "trackPtMin": "0.15", + "trackSelections": "globalTracks", + "trackingEfficiency": { + "values": [ + "1", + "1" + ] + }, + "trackingEfficiencyPtBinning": { + "values": [ + "0", + "10", + "999" + ] + }, + "triggerMasks": "", + "vertexZCut": "10" + }, + "jet-matching-mc-d0-ch": { + "doMatchingGeo": "true", + "doMatchingHf": "true", + "doMatchingPt": "true", + "maxMatchingDistance": "0.4", + "minPtFraction": "0", + "processDummy": "false", + "processJets": "true" + }, + "jet-substructure-d0": { + "alpha": "1", + "applyTrackingEfficiency": "false", + "beta": "0", + "doPairBkg": "false", + "kappa": "1", + "pairConstituentPtMin": "1", + "processChargedJetsData": "true", + "processChargedJetsDataSub": "false", + "processChargedJetsMCD": "false", + "processChargedJetsMCP": "false", + "trackSelections": "globalTracks", + "trackingEfficiency": { + "values": [ + "1", + "1" + ] + }, + "trackingEfficiencyPtBinning": { + "values": [ + "0", + "10", + "999" + ] + }, + "zCut": "0.1" + }, + "jet-substructure-d0-output": { + "jetEtaMax": "99", + "jetEtaMin": "-99", + "jetPtMinData": "0", + "jetPtMinDataSub": "0", + "jetPtMinMCD": "0", + "jetPtMinMCP": "0", + "jetRadii": { + "values": [ + "0.4" + ] + }, + "processClearMaps": "true", + "processClearMapsMCP": "false", + "processOutputCandidatesData": "true", + "processOutputCandidatesDataSub": "false", + "processOutputCandidatesMCD": "false", + "processOutputCandidatesMCP": "false", + "processOutputCollisionsData": "true", + "processOutputCollisionsDataSub": "false", + "processOutputCollisionsMCPOnly": "false", + "processOutputCollisionsMc": "false", + "processOutputJetMatchingData": "false", + "processOutputJetMatchingMC": "false", + "processOutputJetsData": "true", + "processOutputJetsDataSub": "false", + "processOutputJetsMCD": "false", + "processOutputJetsMCP": "false", + "processOutputSubstructureMatchingData": "false", + "processOutputSubstructureMatchingMC": "false", + "trackEtaMax": "0.9", + "trackEtaMin": "-0.9" + }, + "lambdakzero-builder": { + "axisConfigurations": { + "axisDCACHI2": { + "values": [ + "500", + "0", + "50" + ] + }, + "axisDCAXY": { + "values": [ + "500", + "-50", + "50" + ] + }, + "axisDeltaDistanceRadii": { + "values": [ + "500", + "-50", + "50" + ] + }, + "axisPositionGuess": { + "values": [ + "240", + "0", + "120" + ] + }, + "axisPtQA": { + "values": [ + "0", + "0", + "0.1", + "0.2", + "0.3", + "0.4", + "0.5", + "0.6", + "0.7", + "0.8", + "0.9", + "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.4", + "4.8", + "5.2", + "5.6", + "6", + "6.5", + "7", + "7.5", + "8", + "9", + "10", + "11", + "12", + "13", + "14", + "15", + "17", + "19", + "21", + "23", + "25", + "30", + "35", + "40", + "50" + ] + }, + "axisRadius": { + "values": [ + "500", + "0", + "50" + ] + }, + "axisTopoVarDCAToPV": { + "values": [ + "200", + "-1", + "1" + ] + }, + "axisTopoVarDCAV0Dau": { + "values": [ + "200", + "0", + "2" + ] + }, + "axisTopoVarDCAV0ToPV": { + "values": [ + "200", + "0", + "5" + ] + }, + "axisTopoVarPointingAngle": { + "values": [ + "50", + "0", + "1" + ] + }, + "axisTopoVarRAP": { + "values": [ + "50", + "0", + "1" + ] + }, + "axisTopoVarV0Radius": { + "values": [ + "500", + "0", + "100" + ] + }, + "axisX": { + "values": [ + "200", + "0", + "200" + ] + } + }, + "ccdbConfigurations": { + "ccdb-url": "http://alice-ccdb.cern.ch", + "geoPath": "GLO/Config/GeometryAligned", + "grpPath": "GLO/GRP/GRP", + "grpmagPath": "GLO/Config/GRPMagField", + "lutPath": "GLO/Param/MatLUT", + "mVtxPath": "GLO/Calib/MeanVertex" + }, + "createV0CovMats": "-1", + "createV0DauCovMats": "-1", + "createV0PosAtDCAs": "0", + "createV0PosAtIUs": "0", + "d_UseAutodetectMode": "false", + "dcaFitterConfigurations": { + "d_UseAbsDCA": "true", + "d_UseCollinearFit": "false", + "d_UseWeightedPCA": "false", + "d_bz": "-999", + "d_maxDXYIni": "4", + "d_maxDZIni": "1e+09", + "rejDiffCollTracks": "0", + "useMatCorrType": "2" + }, + "dcanegtopv": "0.1", + "dcapostopv": "0.1", + "dcav0dau": "1", + "downscalingOptions": { + "downscaleFactor": "2", + "downscale_adaptive": "false", + "downscale_factor1Pt": "1", + "downscale_factorPt": "1", + "downscale_factorUniform": "0.001", + "downscale_mass": "0.14", + "downscale_sqrts": "13.6", + "downscale_triggerMaskSelection": "0" + }, + "lifetimecut": { + "labels_cols": [ + "lifetimecutLambda", + "lifetimecutK0S" + ], + "labels_rows": "", + "values": [ + [ + "1000000", + "1000000" + ] + ] + }, + "massCutK0": { + "labels_cols": [ + "constant", + "linear", + "expoConstant", + "expoRelax" + ], + "labels_rows": "", + "values": [ + [ + "0.00281882007", + "0.00114057004", + "0.00172138005", + "0.500262022" + ] + ] + }, + "massCutLambda": { + "labels_cols": [ + "constant", + "linear", + "expoConstant", + "expoRelax" + ], + "labels_rows": "", + "values": [ + [ + "0.00117517996", + "0.000124098995", + "0.00547936978", + "0.308008999" + ] + ] + }, + "massCutPhoton": "0.2", + "massWindowSafetyMargin": "0.001", + "massWindowWithTPCPID": "false", + "massWindownumberOfSigmas": "5000000", + "maxDaughterEta": "5", + "maximumPt": "1000", + "minimumPt": "0", + "mlConfigurations": { + "calculateAntiLambdaScores": "false", + "calculateGammaScores": "false", + "calculateK0ShortScores": "false", + "calculateLambdaScores": "false", + "enableOptimizations": "false", + "loadModelsFromCCDB": "false", + "localModelPathAntiLambda": "AntiLambda_BDTModel.onnx", + "localModelPathGamma": "Gamma_BDTModel.onnx", + "localModelPathK0Short": "KZeroShort_BDTModel.onnx", + "localModelPathLambda": "Lambda_BDTModel.onnx", + "modelPathCCDB": "", + "thresholdAntiLambda": "-1", + "thresholdGamma": "-1", + "thresholdK0Short": "-1", + "thresholdLambda": "-1", + "timestampCCDB": "-1" + }, + "precisionDCAs": "0.01", + "processFindableRun3": "false", + "processRun2": "false", + "processRun3": "true", + "qaConfigurations": { + "dQAGammaMassWindow": "0.05", + "dQAK0ShortMassWindow": "0.005", + "dQALambdaMassWindow": "0.005", + "dQAMaxPt": "5", + "dQANBinsMass": "400", + "dQANBinsPtCoarse": "10", + "dQANBinsRadius": "500", + "d_QA_checkMC": "true", + "d_QA_checkdEdx": "false", + "d_doQA": "false", + "d_doTrackQA": "false" + }, + "roundDCAVariables": "false", + "storePhotonCandidates": "false", + "tpcrefit": "0", + "v0cospa": "0.995", + "v0radius": "0.9" + }, + "lambdakzero-preselector": { + "dIfMCgenerateAntiHypertriton": "false", + "dIfMCgenerateAntiLambda": "true", + "dIfMCgenerateGamma": "false", + "dIfMCgenerateHypertriton": "false", + "dIfMCgenerateK0Short": "true", + "dIfMCgenerateLambda": "true", + "dIfMCselectPhysicalPrimary": "true", + "dIfMCselectV0MotherPDG": "0", + "dPreselectOnlyBaryons": "false", + "dTPCNCrossedRows": "50", + "ddEdxPreSelectAntiHypertriton": "false", + "ddEdxPreSelectAntiLambda": "true", + "ddEdxPreSelectGamma": "false", + "ddEdxPreSelectHypertriton": "false", + "ddEdxPreSelectK0Short": "true", + "ddEdxPreSelectLambda": "true", + "ddEdxPreSelectionWindow": "7", + "forceITSOnlyMesons": "false", + "minITSCluITSOnly": "0", + "processBuildAll": "true", + "processBuildFindable": "false", + "processBuildMCAssociated": "false", + "processBuildValiddEdx": "false", + "processBuildValiddEdxMCAssociated": "false", + "processSkipV0sNotUsedInCascades": "false", + "processSkipV0sNotUsedInTrackedCascades": "false", + "qaCollisionAssociation": "false" + }, + "lambdakzero-v0-data-link-builder": { + "processFindable": "false", + "processFound": "true" + }, + "mc-centrality": { + "binsPercentile": { + "values": [ + "0", + "0", + "0.001", + "0.01", + "1", + "5", + "10", + "15", + "20", + "25", + "30", + "40", + "50", + "60", + "70", + "80", + "90", + "100" + ] + }, + "ccdb-timestamp": "-1", + "ccdb-url": "http://alice-ccdb.cern.ch", + "path": "ccdb://Users/n/njacazio/MCCentrality", + "selectPrimaries": "true" + }, + "multiplicity-table": { + "autoSetupFromMetadata": "true", + "ccdbPath": "Centrality/Calibration", + "ccdburl": "http://alice-ccdb.cern.ch", + "doVertexZeq": "1", + "enabledTables": { + "labels_cols": [ + "Enable" + ], + "labels_rows": [ + "FV0Mults", + "FT0Mults", + "FDDMults", + "ZDCMults", + "TrackletMults", + "TPCMults", + "PVMults", + "MultsExtra", + "MultSelections", + "FV0MultZeqs", + "FT0MultZeqs", + "FDDMultZeqs", + "PVMultZeqs", + "MultMCExtras", + "MFTMults" + ], + "values": [ + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ] + ] + }, + "fractionOfEvents": "2", + "maxPtGlobalTrack": "1e+10", + "minNclsITSGlobalTrack": "5", + "minNclsITSibGlobalTrack": "1", + "minPtGlobalTrack": "0.15", + "processGlobalTrackingCounters": "false", + "processMC": "false", + "processMC2Mults": "false", + "processRun2": "false", + "processRun3": "true", + "processRun3MFT": "false", + "produceHistograms": "false", + "reconstructionPass": "" + }, + "pid-multiplicity": { + "processIU": "false", + "processStandard": "true" + }, + "pid-tpc-service": { + "ccdburl": "http://alice-ccdb.cern.ch", + "pidTPC": { + "autofetchNetworks": "true", + "ccdb-path-grplhcif": "GLO/Config/GRPLHCIF", + "ccdb-timestamp": "0", + "ccdbPath": "Analysis/PID/TPC/Response", + "devicesRequiringTPCOnlyPID": { + "values": [ + "photon-conversion-builder" + ] + }, + "enableNetworkOptimizations": "false", + "enableTuneOnDataTable": "-1", + "networkBetaGammaCutoff": "0.45", + "networkPathCCDB": "Analysis/PID/TPC/ML", + "networkPathLocally": "network.onnx", + "networkSetNumThreads": "0", + "param-file": "", + "pid-full-al": "-1", + "pid-full-de": "-1", + "pid-full-el": "-1", + "pid-full-he": "-1", + "pid-full-ka": "-1", + "pid-full-mu": "-1", + "pid-full-pi": "-1", + "pid-full-pr": "-1", + "pid-full-tr": "-1", + "pid-tiny-al": "-1", + "pid-tiny-de": "-1", + "pid-tiny-el": "-1", + "pid-tiny-he": "-1", + "pid-tiny-ka": "-1", + "pid-tiny-mu": "-1", + "pid-tiny-pi": "-1", + "pid-tiny-pr": "-1", + "pid-tiny-tr": "-1", + "recoPass": "", + "savedEdxsCorrected": "-1", + "skipTPCOnly": "-1", + "useCorrecteddEdx": "false", + "useNetworkAl": "0", + "useNetworkCorrection": "false", + "useNetworkDe": "0", + "useNetworkEl": "1", + "useNetworkHe": "0", + "useNetworkKa": "1", + "useNetworkMu": "0", + "useNetworkPi": "1", + "useNetworkPr": "1", + "useNetworkTr": "0" + }, + "processTracksIU": "true", + "processTracksIUWithTracksQA": "false", + "processTracksMCIU": "false" + }, + "propagation-service": { + "cascadeBuilderOpts": { + "casccospa": "0.95", + "cascradius": "0.9", + "dcabachtopv": "0.05", + "dcacascdau": "1", + "kfConstructMethod": "2", + "kfDoDCAFitterPreMinimCasc": "true", + "kfDoDCAFitterPreMinimV0": "true", + "kfTuneForOmega": "false", + "kfUseCascadeMassConstraint": "false", + "kfUseV0MassConstraint": "true", + "lambdaMassWindow": "0.01", + "maxDaughterEta": "5", + "mc_addGeneratedOmegaMinus": "true", + "mc_addGeneratedOmegaPlus": "true", + "mc_addGeneratedXiMinus": "true", + "mc_addGeneratedXiPlus": "true", + "mc_findableDetachedCascade": "false", + "mc_keepOnlyPhysicalPrimary": "false", + "mc_populateCascMCCoresAsymmetric": "false", + "mc_populateCascMCCoresSymmetric": "true", + "mc_rapidityWindow": "0.5", + "mc_treatPiToMuDecays": "true", + "minCrossedRows": "50", + "useCascadeMomentumAtPrimVtx": "false" + }, + "ccdb": { + "ccdb-url": "http://alice-ccdb.cern.ch", + "grpPath": "GLO/GRP/GRP", + "grpmagPath": "GLO/Config/GRPMagField", + "lutPath": "GLO/Param/MatLUTInner", + "mVtxPath": "GLO/Calib/MeanVertex" + }, + "ccdburl": "http://alice-ccdb.cern.ch", + "deduplicationAlgorithm": "1", + "enabledTables": { + "labels_cols": [ + "enable" + ], + "labels_rows": [ + "V0Indices", + "V0CoresBase", + "V0Covs", + "CascIndices", + "KFCascIndices", + "TraCascIndices", + "StoredCascCores", + "StoredKFCascCores", + "StoredTraCascCores", + "CascCovs", + "KFCascCovs", + "TraCascCovs", + "V0TrackXs", + "CascTrackXs", + "CascBBs", + "V0DauCovs", + "V0DauCovIUs", + "V0TraPosAtDCAs", + "V0TraPosAtIUs", + "V0Ivanovs", + "McV0Labels", + "V0MCCores", + "V0CoreMCLabels", + "V0MCCollRefs", + "McCascLabels", + "McKFCascLabels", + "McTraCascLabels", + "McCascBBTags", + "CascMCCores", + "CascCoreMCLabels", + "CascMCCollRefs", + "CascToTraRefs", + "CascToKFRefs", + "TraToCascRefs", + "KFToCascRefs", + "V0FoundTags", + "CascFoundTags" + ], + "values": [ + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ], + [ + "-1" + ] + ] + }, + "mc_findableMode": "0", + "preSelectOpts": { + "lifetimeCut": { + "labels_cols": [ + "lifetimeCutK0S", + "lifetimeCutLambda", + "lifetimeCutXi", + "lifetimeCutOmega" + ], + "labels_rows": "", + "values": [ + [ + "20", + "60", + "40", + "20" + ] + ] + }, + "massCutK0": { + "labels_cols": [ + "constant", + "linear", + "expoConstant", + "expoRelax" + ], + "labels_rows": "", + "values": [ + [ + "0.00281882007", + "0.00114057004", + "0.00172138005", + "0.500262022" + ] + ] + }, + "massCutLambda": { + "labels_cols": [ + "constant", + "linear", + "expoConstant", + "expoRelax" + ], + "labels_rows": "", + "values": [ + [ + "0.00117517996", + "0.000124098995", + "0.00547936978", + "0.308008999" + ] + ] + }, + "massCutOm": { + "labels_cols": [ + "constant", + "linear", + "expoConstant", + "expoRelax" + ], + "labels_rows": "", + "values": [ + [ + "0.00143209996", + "0.000203560994", + "0.00243186997", + "0.799668014" + ] + ] + }, + "massCutPhoton": "0.3", + "massCutXi": { + "labels_cols": [ + "constant", + "linear", + "expoConstant", + "expoRelax" + ], + "labels_rows": "", + "values": [ + [ + "0.00143209996", + "0.000203560994", + "0.00243186997", + "0.799668014" + ] + ] + }, + "massWindowSafetyMargin": "0.001", + "massWindownumberOfSigmas": "20", + "maxTPCpidNsigma": "5", + "preselectOnlyDesiredCascades": "false", + "preselectOnlyDesiredV0s": "false" + }, + "processMonteCarlo": "true", + "processMonteCarloWithPID": "false", + "processRealData": "false", + "processRealDataWithPID": "false", + "refitWithMaterialCorrection": "false", + "trackPropagation": { + "axisPtQA": { + "values": [ + "0", + "0", + "0.1", + "0.2", + "0.3", + "0.4", + "0.5", + "0.6", + "0.7", + "0.8", + "0.9", + "1.0", + "1.1", + "1.2", + "1.3", + "1.4", + "1.5", + "1.6", + "1.7", + "1.8", + "1.9", + "2.0", + "2.2", + "2.4", + "2.6", + "2.8", + "3.0", + "3.2", + "3.4", + "3.6", + "3.8", + "4.0", + "4.4", + "4.8", + "5.2", + "5.6", + "6.0", + "6.5", + "7.0", + "7.5", + "8.0", + "9.0", + "10.0", + "11.0", + "12.0", + "13.0", + "14.0", + "15.0", + "17.0", + "19.0", + "21.0", + "23.0", + "25.0", + "30.0", + "35.0", + "40.0", + "50.0" + ] + }, + "fillTrackTunerTable": "false", + "minPropagationDistance": "5", + "trackTunerConfigSource": "1", + "trackTunerParams": "debugInfo=0|updateTrackDCAs=1|updateTrackCovMat=1|updateCurvature=0|updateCurvatureIU=0|updatePulls=0|isInputFileFromCCDB=1|pathInputFile=Users/m/mfaggin/test/inputsTrackTuner/PbPb2022|nameInputFile=trackTuner_DataLHC22sPass5_McLHC22l1b2_run529397.root|pathFileQoverPt=Users/h/hsharma/qOverPtGraphs|nameFileQoverPt=D0sigma_Data_removal_itstps_MC_LHC22b1b.root|usePvRefitCorrections=0|qOverPtMC=-1.|qOverPtData=-1.", + "useTrackTuner": "false", + "useTrkPid": "false" + }, + "trackTuner": { + "autoDetectDcaCalib": "false", + "debugInfo": "false", + "isInputFileFromCCDB": "false", + "nPhiBins": "0", + "nameFileQoverPt": "", + "nameInputFile": "", + "pathFileQoverPt": "", + "pathInputFile": "", + "qOverPtData": "-1", + "qOverPtMC": "-1", + "updateCurvature": "false", + "updateCurvatureIU": "false", + "updatePulls": "false", + "updateTrackCovMat": "false", + "updateTrackDCAs": "false", + "usePvRefitCorrections": "false" + }, + "useV0BufferForCascades": "false", + "v0BuilderOpts": { + "dcanegtopv": "0.05", + "dcapostopv": "0.05", + "dcav0dau": "1", + "generatePhotonCandidates": "false", + "maxDaughterEta": "5", + "mc_addGeneratedAntiLambda": "true", + "mc_addGeneratedGamma": "false", + "mc_addGeneratedGammaMakeCollinear": "true", + "mc_addGeneratedK0Short": "true", + "mc_addGeneratedLambda": "true", + "mc_findableDetachedV0": "false", + "mc_keepOnlyPhysicalPrimary": "false", + "mc_populateV0MCCoresAsymmetric": "false", + "mc_populateV0MCCoresSymmetric": "true", + "mc_rapidityWindow": "0.5", + "mc_treatPiToMuDecays": "true", + "minCrossedRows": "50", + "moveTPCOnlyTracks": "true", + "v0cospa": "0.95", + "v0radius": "0.9" + } + }, + "qa-efficiency": { + "applyEvSel": "0", + "do-al": "true", + "do-de": "true", + "do-el": "true", + "do-he": "true", + "do-ka": "true", + "do-mu": "true", + "do-pi": "true", + "do-pr": "true", + "do-tr": "true", + "do-un-id": "true", + "doNegativePDG": "true", + "doPositivePDG": "true", + "doPtEta": "true", + "etaBins": { + "values": [ + "100", + "-0.8", + "0.8" + ] + }, + "globalTrackSelection": "0", + "log-pt": "0", + "make-eff": "true", + "nMinNumberOfContributors": "2", + "noFakesHits": "false", + "phiBins": { + "values": [ + "100", + "0", + "6.284" + ] + }, + "processData": "true", + "processMC": "false", + "ptBins": { + "values": [ + "20", + "0.1", + "10" + ] + }, + "trackSelection": "true", + "vertex-z-max": "10", + "vertex-z-min": "-10", + "yBins": { + "values": [ + "100", + "-0.5", + "0.5" + ] + } + }, + "timestamp-task": { + "ccdb-url": "http://alice-ccdb.cern.ch", + "fatalOnInvalidTimestamp": "false", + "isRun2MC": "-1", + "orbit-reset-path": "CTP/Calib/OrbitReset", + "rct-path": "RCT/Info/RunInformation", + "verbose": "false" + }, + "tof-event-time": { + "computeEvTimeWithFT0": "1", + "computeEvTimeWithTOF": "1", + "maxEvTimeTOF": "100000", + "maxMomentum": "2", + "maxNtracksInSet": "10", + "minMomentum": "0.5", + "processRun2": "false", + "processRun3": "true", + "sel8TOFEvTime": "false" + }, + "tof-pid-merge": { + "enableParticle": { + "labels_cols": [ + "Enable", + "EnableFull" + ], + "labels_rows": [ + "El", + "Mu", + "Pi", + "Ka", + "Pr", + "De", + "Tr", + "He", + "Al" + ], + "values": [ + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ], + [ + "-1", + "-1" + ] + ] + }, + "enableQaHistograms": "false", + "enableTOFParamsForBetaMass": "false", + "processRun2": "false", + "processRun2BetaM": "false", + "processRun3": "true", + "processRun3BetaM": "true" + }, + "tof-signal": { + "autoSetProcessFunctions": "true", + "ccdb-path-grplhcif": "GLO/Config/GRPLHCIF", + "ccdb-timestamp": "-1", + "ccdb-url": "http://alice-ccdb.cern.ch", + "collisionSystem": "-1", + "enableQaHistograms": "false", + "enableTimeDependentResponse": "true", + "fatalOnPassNotAvailable": "false", + "paramFileName": "", + "parametrizationPath": "TOF/Calib/Params", + "processRun2": "false", + "processRun3": "true", + "reconstructionPass": "metadata", + "reconstructionPassDefault": "unanchored", + "timeShiftCCDBPathNeg": "Analysis/PID/TOFOffsetPos", + "timeShiftCCDBPathNegMC": "", + "timeShiftCCDBPathPos": "Analysis/PID/TOFOffsetPos", + "timeShiftCCDBPathPosMC": "" + }, + "track-selection": { + "compatibilityIU": "false", + "dcaSetup": "0", + "etaMax": "0.8", + "etaMin": "-0.8", + "isRun3": "true", + "itsMatching": "0", + "produceFBextendedTable": "-1", + "produceTable": "-1", + "ptMax": "1e+10", + "ptMin": "0.1" + }, + "track-to-collision-association": { + "bcWindowForOneSigma": "60", + "fillTableOfCollIdsPerTrack": "false", + "includeUnassigned": "false", + "nSigmaForTimeCompat": "4", + "processAssocWithTime": "false", + "processStandardAssoc": "true", + "setTrackSelections": "1", + "timeMargin": "0", + "usePVAssociation": "true" + }, + "tracks-extra-v002-converter": { + "processV000ToV002": "false", + "processV001ToV002": "true" + } +} diff --git a/codeHF/dpl-config_run3.json b/codeHF/dpl-config_run3.json deleted file mode 100644 index e916b61a..00000000 --- a/codeHF/dpl-config_run3.json +++ /dev/null @@ -1,1460 +0,0 @@ -{ - "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": "", - "internal-dpl-aod-index-builder": "", - "timestamp-task": { - "verbose": "false", - "rct-path": "RCT/RunInformation", - "orbit-reset-path": "CTP/Calib/OrbitReset", - "ccdb-url": "http://alice-ccdb.cern.ch", - "isRun2MC": "true" - }, - "bc-selection-task": { - "processRun2": "true", - "processRun3": "false" - }, - "tof-signal": "", - "track-extension": { - "processRun2": "true", - "processRun3": "false" - }, - "lambdakzero-builder": { - "dcanegtopv": "0.1", - "dcapostopv": "0.1", - "mincrossedrows": "70", - "isRun2": "1", - "d_bz": "-999", - "v0cospa": "0.995", - "dcav0dau": "1", - "v0radius": "0.9", - "useMatCorrType": "0", - "rejDiffCollTracks": "0", - "processRun2": "true", - "processRun3": "false" - }, - "event-selection-task": { - "syst": "pp", - "muonSelection": "0", - "customDeltaBC": "300", - "isMC": "true", - "processRun2": "true", - "processRun3": "false" - }, - "track-selection": { - "isRun3": "false" - }, - "track-propagation": { - "processStandard": "false", - "processCovariance": "true" - }, - "hf-tag-sel-tracks": { - "fillHistograms": "true", - "debug": "true", - "bz": "5", - "doPvRefit": "false", - "doCutQuality": "true", - "useIsGlobalTrack": "false", - "tpcNClsFound": "71", - "pTBinsTrack": { - "values": [ - "0.", - "0.5", - "1.", - "1.5", - "2.", - "3.", - "100." - ] - }, - "pTMinTrack2Prong": "0.4", - "cutsTrack2Prong": { - "values": [ - ["0.03", "1.0"], - ["0.03", "1.0"], - ["0.03", "1.0"], - ["0.03", "1.0"], - ["0.00", "10."], - ["0.00", "10."] - ] - }, - "etaMax2Prong": "0.8", - "pTMinTrack3Prong": "0.4", - "cutsTrack3Prong": { - "values": [ - ["0.03", "1.0"], - ["0.03", "1.0"], - ["0.03", "1.0"], - ["0.03", "1.0"], - ["0.00", "10."], - ["0.00", "10."] - ] - }, - "etaMax3Prong": "0.8", - "ptMinTrackBach": "0.3", - "cutsTrackBach": { - "values": [ - ["0.00", "1.0"], - ["0.00", "1.0"], - ["0.00", "1.0"], - ["0.00", "1.0"], - ["0.00", "1.0"], - ["0.00", "1.0"] - ] - }, - "etaMaxBach": "0.8", - "axisPvRefitDeltaX": { - "values": [ - "1000", - "-0.5", - "0.5" - ] - }, - "axisPvRefitDeltaY": { - "values": [ - "1000", - "-0.5", - "0.5" - ] - }, - "axisPvRefitDeltaZ": { - "values": [ - "1000", - "-0.5", - "0.5" - ] - } - }, - "hf-tag-sel-collisions": { - "fillHistograms": "true", - "xVertexMin": "-100", - "xVertexMax": "100", - "yVertexMin": "-100", - "yVertexMax": "100", - "zVertexMin": "-100", - "zVertexMax": "100", - "nContribMin": "0", - "chi2Max": "0", - "triggerClassName": "kINT7", - "useSel8Trigger": "false", - "processTrigSel": "false", - "processNoTrigSel": "true" - }, - "multiplicity-table": { - "doVertexZeq": "1", - "processRun2": "true", - "processRun3": "false" - }, - "tof-event-time": { - "param-file": "", - "param-sigma": "TOFReso", - "ccdb-url": "http://alice-ccdb.cern.ch", - "ccdbPath": "Analysis/PID/TOF", - "ccdb-timestamp": "-1", - "processRun2": "true", - "processNoFT0": "false", - "processFT0": "false", - "processOnlyFT0": "false" - }, - "lambdakzero-initializer": "", - "tof-pid-full": { - "param-file": "", - "param-sigma": "TOFResoParams", - "ccdb-url": "http://alice-ccdb.cern.ch", - "ccdbPath": "Analysis/PID/TOF", - "ccdb-timestamp": "-1", - "enableTimeDependentResponse": "false", - "pid-el": "-1", - "pid-mu": "-1", - "pid-pi": "-1", - "pid-ka": "-1", - "pid-pr": "-1", - "pid-de": "-1", - "pid-tr": "-1", - "pid-he": "-1", - "pid-al": "-1", - "processWSlice": "true", - "processWoSlice": "false" - }, - "tpc-pid-full": { - "param-file": "", - "ccdb-url": "http://alice-ccdb.cern.ch", - "ccdbPath": "Analysis/PID/TPC/Response", - "ccdb-timestamp": "0", - "useNetworkCorrection": "false", - "autofetchNetworks": "true", - "networkPathLocally": "network.onnx", - "enableNetworkOptimizations": "true", - "networkPathCCDB": "Analysis/PID/TPC/ML", - "pid-el": "-1", - "pid-mu": "-1", - "pid-pi": "-1", - "pid-ka": "-1", - "pid-pr": "-1", - "pid-de": "-1", - "pid-tr": "-1", - "pid-he": "-1", - "pid-al": "-1" - }, - "bayes-pid": { - "param-file-TOF": "", - "param-file-TPC": "", - "param-tof-sigma": "TOFReso", - "enableTOF": "true", - "enableTPC": "true", - "ccdb-url": "http://alice-ccdb.cern.ch", - "ccdbPathTOF": "Analysis/PID/TOF", - "ccdbPathTPC": "Analysis/PID/TPC/Response", - "ccdb-timestamp": "-1", - "pid-el": "1", - "pid-mu": "1", - "pid-pi": "1", - "pid-ka": "1", - "pid-pr": "1", - "pid-de": "1", - "pid-tr": "1", - "pid-he": "1", - "pid-al": "1" - }, - "hf-track-index-skims-creator": { - "debug": "false", - "fillHistograms": "true", - "do3prong": "1", - "doPvRefit": "false", - "pTTolerance": "0.1", - "bz": "5", - "propToDCA": "true", - "useAbsDCA": "true", - "maxRad": "5", - "maxDZIni": "999", - "minParamChange": "0.001", - "minRelChi2Change": "0.9", - "pTBinsD0ToPiK": { - "values": [ - "0.", - "5.", - "1000." - ] - }, - "cutsD0ToPiK": { - "values": [ - ["1.61", "2.12", "0.5", "0.00"], - ["1.61", "2.12", "0.5", "0.00"] - ] - }, - "pTBinsJpsiToEE": { - "values": [ - "0.", - "5.", - "1000." - ] - }, - "cutsJpsiToEE": { - "values": [ - ["2.5", "4.1", "-2.", "1000.00"], - ["2.5", "4.1", "-2.", "1000.00"] - ] - }, - "pTBinsJpsiToMuMu": { - "values": [ - "0.", - "5.", - "1000." - ] - }, - "cutsJpsiToMuMu": { - "values": [ - ["2.5", "4.1", "-2.", "1000.00"], - ["2.5", "4.1", "-2.", "1000.00"] - ] - }, - "pTBinsDPlusToPiKPi": { - "values": [ - "1.", - "5.", - "1000." - ] - }, - "cutsDPlusToPiKPi": { - "values": [ - ["1.67", "2.07", "0.7", "0.03"], - ["1.67", "2.07", "0.7", "0.03"] - ] - }, - "pTBinsDsToKKPi": { - "values": [ - "1.5", - "5.", - "1000." - ] - }, - "cutsDsToKKPi": { - "values": [ - ["1.74", "2.18", "0.94", "0.02"], - ["1.74", "2.18", "0.94", "0.02"] - ] - }, - "pTBinsLcToPKPi": { - "values": [ - "4.", - "5.", - "1000." - ] - }, - "cutsLcToPKPi": { - "values": [ - ["1.98", "2.58", "-2.", "0.0"], - ["1.98", "2.58", "-2.", "0.0"] - ] - }, - "pTBinsXicToPKPi": { - "values": [ - "4.", - "5.", - "1000." - ] - }, - "cutsXicToPKPi": { - "values": [ - ["2.10", "2.80", "-2.", "0.0"], - ["2.10", "2.80", "-2.", "0.0"] - ] - }, - "axisPvRefitDeltaX": { - "values": [ - "1000", - "-0.5", - "0.5" - ] - }, - "axisPvRefitDeltaY": { - "values": [ - "1000", - "-0.5", - "0.5" - ] - }, - "axisPvRefitDeltaZ": { - "values": [ - "1000", - "-0.5", - "0.5" - ] - } - }, - "hf-track-index-skims-creator-cascades": { - "doValPlots": "true", - "bZ": "5", - "propDCA": "true", - "maxR": "200", - "maxDZIni": "4", - "minParamChange": "0.001", - "minRelChi2Change": "0.9", - "UseAbsDCA": "true", - "doCutQuality": "true", - "TPCRefitBach": "true", - "minCrossedRowsBach": "50", - "TPCRefitV0Daugh": "true", - "minCrossedRowsV0Daugh": "50", - "etaMax": "1.1", - "ptMin": "0.05", - "cosPAV0": "0.995", - "dcaXYNegToPV": "0.1", - "dcaXYPosToPV": "0.1", - "cutInvMassV0": "0.05", - "cutCascPtCandMin": "-1", - "cutCascInvMassLc": "1" - }, - "hf-cand-creator-2prong": { - "doPvRefit": "false", - "d_bz": "5", - "b_propdca": "true", - "d_maxr": "5", - "d_maxdzini": "999", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true" - }, - "hf-cand-creator-3prong": { - "doPvRefit": "false", - "d_bz": "5", - "b_propdca": "true", - "d_maxr": "5", - "d_maxdzini": "999", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true" - }, - "hf-cand-creator-cascade": { - "bZ": "5", - "propDCA": "true", - "maxR": "200", - "maxDZIni": "4", - "minParamChange": "0.001", - "minRelChi2Change": "0.9", - "doValPlots": "true" - }, - "hf-candidate-creator-bplus": { - "bz": "5.", - "propdca": "true", - "maxr": "5.", - "maxdzini": "999.", - "minparamchange": "0.001", - "minrelchi2change": "0.9", - "useabsdca": "true", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "cutEtaTrkMax": "1.44" - }, - "hf-cand-creator-2prong-expressions": { - "processMC": "true" - }, - "hf-cand-creator-3prong-expressions": { - "processMC": "true" - }, - "hf-cand-creator-cascade-mc": { - "processMC": "true" - }, - "hf-d0-candidate-selector": { - "d_pTCandMin": "0", - "d_pTCandMax": "50", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "10", - "d_nSigmaTPC": "3", - "d_nSigmaTPCCombined": "5", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "10", - "d_nSigmaTOF": "3", - "d_nSigmaTOFCombined": "5", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "1.5", - "2", - "2.5", - "3", - "3.5", - "4", - "4.5", - "5", - "5.5", - "6", - "6.5", - "7", - "7.5", - "8", - "9", - "10", - "12", - "16", - "20", - "24", - "36", - "50", - "100" - ] - }, - "D0_to_pi_K_cuts": { - "labels_rows": [ - "pT bin 0", - "pT bin 1", - "pT bin 2", - "pT bin 3", - "pT bin 4", - "pT bin 5", - "pT bin 6", - "pT bin 7", - "pT bin 8", - "pT bin 9", - "pT bin 10", - "pT bin 11", - "pT bin 12", - "pT bin 13", - "pT bin 14", - "pT bin 15", - "pT bin 16", - "pT bin 17", - "pT bin 18", - "pT bin 19", - "pT bin 20", - "pT bin 21", - "pT bin 22", - "pT bin 23", - "pT bin 24" - ], - "labels_cols": [ - "m", - "DCA", - "cos theta*", - "pT K", - "pT Pi", - "d0K", - "d0pi", - "d0d0", - "cos pointing angle", - "cos pointing angle xy", - "normalized decay length XY", - "decay length", - "decay length XY", - "minimum decay length" - ], - "values": [ - [ "0.4", "0.035", "0.8", "0.5", "0.5", "0.1", "0.1", "-5.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.035", "0.8", "0.5", "0.5", "0.1", "0.1", "-5.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.4", "0.4", "0.1", "0.1", "-25.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.4", "0.4", "0.1", "0.1", "-25.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-20.e-5", "0.90", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-20.e-5", "0.90", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-12.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-12.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-7.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-7.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.9", "0.7", "0.7", "0.1", "0.1", "-5.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.9", "0.7", "0.7", "0.1", "0.1", "-5.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.9", "0.7", "0.7", "0.1", "0.1", "-5.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "10.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.6", "0.6", "0.1", "0.1", "1000.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ] - ] - } - }, - "hf-ds-tokkpi-candidate-selector": { - "d_pTCandMin": "2.", - "d_pTCandMax": "36.", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "20.", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "20.", - "d_nSigmaTPC": "3.", - "d_nSigmaTOF": "3.", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - }, - "Ds_to_K_K_Pi_cuts": { - "labels_rows": [ - "pT bin 0", - "pT bin 1", - "pT bin 2", - "pT bin 3", - "pT bin 4", - "pT bin 5", - "pT bin 6", - "pT bin 7", - "pT bin 8", - "pT bin 9", - "pT bin 10", - "pT bin 11" - ], - "labels_cols": [ - "deltaM", - "pT Pi", - "pT K", - "decay length", - "normalized decay length XY", - "cos pointing angle", - "cos pointing angle XY", - "max normalized deltaIP" - ], - "values": [ - ["0.2", "0.3", "0.3", "0.07", "6.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.07", "5.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.980", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.20", "5.", "0.94", "0.000", "2.5"] - ] - } - }, - "hf-dplus-topikpi-candidate-selector": { - "d_pTCandMin": "0", - "d_pTCandMax": "36", - "b_requireTPC": "true", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "-1", - "d_nSigmaTPC": "3", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "-1", - "d_nSigmaTOF": "3", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - }, - "DPlus_to_Pi_K_Pi_cuts": { - "labels_rows": [ - "pT bin 0", - "pT bin 1", - "pT bin 2", - "pT bin 3", - "pT bin 4", - "pT bin 5", - "pT bin 6", - "pT bin 7", - "pT bin 8", - "pT bin 9", - "pT bin 10", - "pT bin 11" - ], - "labels_cols": [ - "deltaM", - "pT Pi", - "pT K", - "decay length", - "normalized decay length XY", - "cos pointing angle", - "cos pointing angle XY", - "max normalized deltaIP" - ], - "values": [ - ["0.2", "0.3", "0.3", "0.07", "6.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.07", "5.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.980", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.20", "5.", "0.94", "0.000", "2.5"] - ] - } - }, - "hf-lc-candidate-selector": { - "d_pTCandMin": "0", - "d_pTCandMax": "24", - "d_FilterPID": "false", - "d_pidTPCMinpT": "0.1", - "d_pidTPCMaxpT": "1", - "d_nSigmaTPC": "3", - "d_nSigmaTPCCombined": "5", - "d_pidTOFMinpT": "0.5", - "d_pidTOFMaxpT": "2", - "d_nSigmaTOF": "3", - "d_nSigmaTOFCombined": "5", - "d_BayesPID": "false", - "d_pidBayesMinpT": "0.1", - "d_pidBayesMaxpT": "5.", - "pTBins": { - "values": [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "8", - "12", - "24", - "36" - ] - }, - "Lc_to_p_K_pi_cuts": { - "labels_rows": [ - "pT bin 0", - "pT bin 1", - "pT bin 2", - "pT bin 3", - "pT bin 4", - "pT bin 5", - "pT bin 6", - "pT bin 7", - "pT bin 8", - "pT bin 9" - ], - "labels_cols": [ - "m", - "pT p", - "pT K", - "pT Pi", - "Chi2PCA", - "decay length", - "cos pointing angle" - ], - "values": [ - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."], - [ "0.300", "0.4", "0.4", "0.4", "0.5", "0.004", "0."] - ] - } - }, - "hf-lc-tok0sp-candidate-selector": { - "pTCandMin": "0", - "pTCandMax": "50", - "applyPidTPCMinPt": "4", - "pidTPCMinPt": "0", - "pidTPCMaxPt": "100", - "pidCombMaxP": "4", - "nSigmaTPC": "3", - "TPCNClsFindablePIDCut": "50", - "requireTPC": "true", - "pTBins": { - "values": [ - "1", - "2", - "3", - "4", - "5", - "6", - "8", - "12", - "24" - ] - }, - "Lc_to_K0s_p_cuts": { - "labels_rows": [ - "pT bin 0", - "pT bin 1", - "pT bin 2", - "pT bin 3", - "pT bin 4", - "pT bin 5", - "pT bin 6", - "pT bin 7" - ], - "labels_cols": [ - "mK0s", - "mLambda", - "mGamma", - "ptBach", - "ptV0Dau", - "ptV0", - "d0Bach", - "d0V0" - ], - "values": [ - [ "0.008", "0.005", "0.1", "0.5", "0.3", "0.6", "0.05", "999999."], - [ "0.008", "0.005", "0.1", "0.5", "0.4", "1.3", "0.05", "999999."], - [ "0.009", "0.005", "0.1", "0.6", "0.4", "1.3", "0.05", "999999."], - [ "0.011", "0.005", "0.1", "0.6", "0.4", "1.4", "0.05", "999999."], - [ "0.013", "0.005", "0.1", "0.6", "0.4", "1.4", "0.06", "999999."], - [ "0.013", "0.005", "0.1", "0.9", "0.4", "1.6", "0.09", "999999."], - [ "0.016", "0.005", "0.1", "0.9", "0.4", "1.7", "0.10", "999999."], - [ "0.019", "0.005", "0.1", "1.0", "0.4", "1.9", "0.20", "999999."] - ] - } - }, - "hf-xic-topkpi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_FilterPID": "false", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "1.0", - "d_pidTOFMinpT": "0.5", - "d_pidTOFMaxpT": "4.0", - "d_TPCNClsFindablePIDCut": "70.", - "d_nSigmaTPC": "3.", - "d_nSigmaTPCCombined": "5.", - "d_nSigmaTOF": "3.", - "d_nSigmaTOFCombined": "5." - }, - "hf-jpsi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "5.0", - "d_TPCNClsFindablePIDCut": "70.", - "d_nSigmaTPC": "3.", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "15" - ] - }, - "Jpsi_to_ee_cuts": { - "values": [ - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."] - ] - } - }, - "hf-x-tojpsipipi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "0.", - "d_pidTOFMaxpT": "10.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "3.", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "15" - ] - }, - "X_to_jpsipipi_cuts": { - "values": [ - ["0.5", "0.80", "0.001", "0.001", "0.0", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "0.0", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "0.2", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "0.9", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "1.5", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "2.3", "0.15", "1."], - ["0.5", "0.90", "0.001", "0.001", "3.0", "0.15", "1."], - ["0.5", "0.90", "0.001", "0.001", "4.2", "0.15", "1."], - ["0.5", "0.90", "0.001", "0.001", "6.2", "0.15", "1."] - ] - } - }, - "hf-bplus-tod0pi-candidate-selector": { - "pTCandMin": "0.", - "pTCandMax": "50.", - "filterPID": "true", - "pidTPCMinpT": "0.3", - "pidTPCMaxpT": "999.", - "pidTOFMinpT": "0.15", - "pidTOFMaxpT": "999.", - "nSigmaTPC": "5.", - "nSigmaTPCCombined": "5000.", - "nSigmaTOF": "5.", - "nSigmaTOFCombined": "5000.", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "cutYCandMax": "0.8", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "13.0", - "16.0", - "20.0", - "24.0" - ] - }, - "BPlus_to_d0pi_cuts": { - "values": [ - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.8", "0.01", "0.01", "1.0", "0.15", "0.05", "0.05", "0.0", "0.1", "0.80"] - ] - } - }, - "hf-task-d0": { - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", - "cutYCandMax": "0.8", - "d_selectionHFFlag": "1", - "d_selectionTopol": "1", - "d_selectionCand": "1", - "d_selectionPID": "1", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "1.5", - "2", - "2.5", - "3", - "3.5", - "4", - "4.5", - "5", - "5.5", - "6", - "6.5", - "7", - "7.5", - "8", - "9", - "10", - "12", - "16", - "20", - "24", - "36", - "50", - "100" - ] - }, - "processMC": "true" - }, - "hf-task-ds": { - "d_selectionFlagDs": "0", - "cutYCandMax": "0.8", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - }, - "processMC": "true" - }, - "hf-task-dplus": { - "d_selectionFlagDPlus": "0", - "cutYCandMax": "0.8", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - }, - "processMC": "true" - }, - "hf-task-lc": { - "d_selectionFlagLc": "0", - "cutYCandMax": "0.8", - "pTBins": { - "values": [ - "0.0", - "0.1", - "0.2", - "0.3", - "0.4", - "0.5", - "0.6", - "0.7", - "0.8", - "0.9", - "1.0", - "1.1", - "1.2", - "1.3", - "1.4", - "1.5", - "1.6", - "1.7", - "1.8", - "1.9", - "2.0", - "2.1", - "2.2", - "2.3", - "2.4", - "2.5", - "2.6", - "2.7", - "2.8", - "2.9", - "3.0", - "3.1", - "3.2", - "3.3", - "3.4", - "3.5", - "3.6", - "3.7", - "3.8", - "3.9", - "4.0", - "4.1", - "4.2", - "4.3", - "4.4", - "4.5", - "4.6", - "4.7", - "4.8", - "4.9", - "5.0", - "5.1", - "5.2", - "5.3", - "5.4", - "5.5", - "5.6", - "5.7", - "5.8", - "5.9", - "6.0", - "6.1", - "6.2", - "6.3", - "6.4", - "6.5", - "6.6", - "6.7", - "6.8", - "6.9", - "7.0", - "7.1", - "7.2", - "7.3", - "7.4", - "7.5", - "7.6", - "7.7", - "7.8", - "7.9", - "8.0", - "8.1", - "8.2", - "8.3", - "8.4", - "8.5", - "8.6", - "8.7", - "8.8", - "8.9", - "9.0", - "9.1", - "9.2", - "9.3", - "9.4", - "9.5", - "9.6", - "9.7", - "9.8", - "9.9", - "10.0" - ] - }, - "processMC": "true" - }, - "hf-task-xic": { - "d_selectionFlagXic": "0", - "cutEtaCandMax": "0.8", - "pTBins": { - "values": [ - "0", - "1", - "2", - "3", - "4", - "5", - "6", - "8", - "12", - "24", - "36" - ] - }, - "processMC": "true" - }, - "hf-task-jpsi": { - "cutYCandMax": "0.8", - "d_selectionFlagJpsi": "0", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "15" - ] - } - }, - "hf-task-jpsi-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagJpsi": "0" - }, - "hf-candidate-creator-x": { - "cutYCandMax": "0.8", - "d_selectionFlagJpsi": "0" - }, - "hf-task-x": { - "cutYCandMax": "0.8", - "d_selectionFlagX": "0" - }, - "hf-task-x-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagX": "0" - }, - "hf-task-lc-tok0sP": { - "selectionFlagLc": "0", - "selectionFlagLcbar": "0", - "cutEtaCandMax": "-1", - "processMC": "true" - }, - "hf-task-bplus": { - "cutYCandMax": "0.8", - "selectionFlagBPlus": "1", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "13.0", - "16.0", - "20.0", - "24.0" - ] - }, - "processMC": "true" - }, - "hf-task-flow": { - "cfgCutVertex": "10.0", - "cfgCutEta": "0.8", - "cfgCutPt": "0.2", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", - "cutYCandMax": "1.0", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "1.5", - "2", - "2.5", - "3", - "3.5", - "4", - "4.5", - "5", - "5.5", - "6", - "6.5", - "7", - "7.5", - "8", - "9", - "10", - "12", - "16", - "20", - "24", - "36", - "50", - "100" - ] - }, - "axisVertex": { - "values": [ - "10", - "-10", - "10" - ] - }, - "axisDeltaPhi": { - "values": [ - "72", - "-1.5707963705062866", - "4.7123889923095703" - ] - }, - "axisDeltaEta": { - "values": [ - "36", - "-1.8", - "1.8" - ] - }, - "axisPtTrigger": { - "values": [ - "0", - "0.2", - "0.5", - "1", - "1.5", - "2", - "3", - "4", - "6" - ] - }, - "axisPtAssoc": { - "values": [ - "0", - "0.2", - "3" - ] - }, - "axisMultiplicity": { - "values": [ - "0", - "0", - "10", - "20", - "30", - "40", - "50", - "60", - "80", - "100", - "200" - ] - }, - "axisMass": { - "values": [ - "30", - "1.7", - "2.0" - ] - }, - "axisVertexEfficiency": { - "values": [ - "10", - "-10", - "10" - ] - }, - "axisEtaEfficiency": { - "values": [ - "10", - "-1", - "1" - ] - }, - "axisPtEfficiency": { - "values": [ - "0", - "0.5", - "0.6", - "0.7", - "0.8", - "0.9", - "1", - "1.5", - "2", - "2.5", - "3", - "3.5", - "4", - "4.5", - "5", - "6", - "7", - "8" - ] - }, - "processSameTPCTPChh": "true", - "processSameTPCMFThh": "false", - "processSameHFHadrons": "true", - "processMC": "true", - "cfgNoMixedEvents": 5, - "processMixedTPCTPChh": "true", - "processMixedHFHadrons": "true", - "processRun2": "true", - "processRun3": "false" - }, - "qa-tracking-efficiency-electron": { - "eta-min": "-3", - "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", - "log-pt": "0", - "eta-bins": "500", - "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" - }, - "qa-tracking-efficiency-kaon": { - "eta-min": "-3", - "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", - "log-pt": "0", - "eta-bins": "500", - "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" - }, - "qa-tracking-efficiency-muon": { - "eta-min": "-3", - "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", - "log-pt": "0", - "eta-bins": "500", - "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" - }, - "qa-tracking-efficiency-pion": { - "eta-min": "-3", - "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", - "log-pt": "0", - "eta-bins": "500", - "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" - }, - "qa-tracking-efficiency-proton": { - "eta-min": "-3", - "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", - "log-pt": "0", - "eta-bins": "500", - "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" - }, - "qa-global-observables": { - "nMinNumberOfContributors": "0", - "nBinsNumberOfTracks": "2000", - "RangeMinNumberOfTracks": "0", - "RangeMaxNumberOfTracks": "2000", - "nBinsVertexPosition": "100", - "RangeMinVertexPositionZ": "-20", - "RangeMaxVertexPositionZ": "20", - "RangeMinVertexPositionXY": "-0.01", - "RangeMaxVertexPositionXY": "0.01", - "nBinsNumberOfContributorsVertex": "200", - "RangeMaxNumberOfContributorsVertex": "200", - "nBinsVertexCovarianceMatrix": "100", - "RangeMinVertexCovarianceMatrix": "-0.01", - "RangeMaxVertexCovarianceMatrix": "0.01" - }, - "qa-tracking-kine": { - "nBinsPt": "100", - "nBinsEta": "100", - "nBinsPhi": "100" - }, - "qa-tracking-resolution": { - "useOnlyPhysicsPrimary": "1", - "pdgCode": "0", - "nBinsPt": "100", - "nBinsEta": "60", - "nBinsPhi": "50", - "nBinsDeltaPt": "100", - "nBinsDeltaPhi": "100", - "nBinsDeltaEta": "100", - "nBinsImpactParameter": "2000" - }, - "internal-dpl-aod-global-analysis-file-sink": "", - "internal-dpl-aod-writer": "" -} diff --git a/codeHF/dpl-config_run5_hf.json b/codeHF/dpl-config_run5_hf.json index 7a64f9b5..30b5aba0 100644 --- a/codeHF/dpl-config_run5_hf.json +++ b/codeHF/dpl-config_run5_hf.json @@ -1,253 +1,272 @@ { - "internal-dpl-clock": "", - "internal-dpl-aod-reader": { - "start-value-enumeration": "0", - "end-value-enumeration": "-1", - "step-value-enumeration": "1", - "aod-file": "@list_o2.txt" - }, - "timestamp-task": { - "isRun2MC": "false" - }, "bc-selection-task": { "processRun2": "false", "processRun3": "true" }, "event-selection-task": { - "syst": "pp", - "muonSelection": "0", "isMC": "true", + "muonSelection": "0", "processRun2": "false", - "processRun3": "true" + "processRun3": "true", + "syst": "pp" }, - "track-extension": { - "processRun2": "false", - "processRun3": "true" + "hf-candidate-creator-2prong": { + "bz": "5.", + "fillHistograms": "true", + "maxDZIni": "999.", + "maxR": "5.", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true" + }, + "hf-candidate-creator-2prong-expressions": { + "processMc": "true" }, - "hf-tag-sel-collisions": { + "hf-candidate-creator-3prong": { + "bz": "5.", "fillHistograms": "true", - "xVertexMin": "-100", - "xVertexMax": "100", - "yVertexMin": "-100", - "yVertexMax": "100", - "zVertexMin": "-100", - "zVertexMax": "100", - "nContribMin": "0", - "chi2Max": "0", - "triggerClassName": "", - "processTrigSel": "false", - "processNoTrigSel": "true" + "maxDZIni": "999.", + "maxR": "5.", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true" + }, + "hf-candidate-creator-3prong-expressions": { + "processMc": "true" + }, + "hf-candidate-creator-bplus": { + "bz": "20.", + "etaTrackMax": "1.44", + "maxDZIni": "999.", + "maxR": "5.", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "useAbsDCA": "true", + "yCandMax": "1.44" }, - "hf-tag-sel-tracks": { + "hf-candidate-creator-cascade": { + "bz": "5", "fillHistograms": "true", - "bz": "5.", - "doCutQuality": "false", - "tpcNClsFound": "-999999", - "pTBinsTrack": { - "values": [ - "0.", - "0.5", - "1.", - "1.5", - "2.", - "3.", - "100." - ] - }, - "pTMinTrack2Prong": ".3", - "etaMax2Prong": "1.44", - "cutsTrack2Prong": { - "values": [ - ["0.001", "1.0"], - ["0.001", "1.0"], - ["0.001", "1.0"], - ["0.001", "1.0"], - ["0.000", "10."], - ["0.000", "10."] - ] - }, - "pTMinTrack3Prong": ".3", - "etaMax3Prong": "1.44", - "cutsTrack3Prong": { - "values": [ - ["0.001", "1.0"], - ["0.001", "1.0"], - ["0.001", "1.0"], - ["0.001", "1.0"], - ["0.000", "10."], - ["0.000", "10."] - ] - } + "maxDZIni": "4", + "maxR": "200", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "propagateToPCA": "true" + }, + "hf-candidate-creator-x": { + "selectionFlagJpsi": "0", + "yCandMax": "1.44" }, - "hf-track-index-skims-creator": { + "hf-candidate-creator-xicc": { + "bz": "20", + "cutPtPionMin": "0.2", "fillHistograms": "true", - "do3prong": "1", - "bz": "5.", - "propToDCA": "true", - "maxRad": "5.", "maxDZIni": "999.", + "maxR": "5.", "minParamChange": "0.001", "minRelChi2Change": "0.9", - - "pTBinsD0ToPiK": { - "values": [ - "0.", - "5.", - "1000." - ] - }, - "cutsD0ToPiK": { - "values": [ - ["1.61", "2.12", "0.5", "0.00"], - ["1.61", "2.12", "0.5", "0.00"] - ] - }, - - "pTBinsJpsiToEE": { - "values": [ - "0.", - "5.", - "1000." - ] - }, - "cutsJpsiToEE": { - "values": [ - ["2.5", "4.1", "-2.", "1000.00"], - ["2.5", "4.1", "-2.", "1000.00"] - ] - }, - - "pTBinsJpsiToMuMu": { - "values": [ - "0.", - "5.", - "1000." - ] - }, - "cutsJpsiToMuMu": { - "values": [ - ["2.5", "4.1", "-2.", "1000.00"], - ["2.5", "4.1", "-2.", "1000.00"] - ] - }, - - "pTBinsDPlusToPiKPi": { - "values": [ - "2.", - "5.", - "1000." - ] - }, - "cutsDPlusToPiKPi": { - "values": [ - ["1.67", "2.07", "0.95", "0.05"], - ["1.67", "2.07", "0.95", "0.05"] - ] - }, - - "pTBinsDsToKKPi": { - "values": [ - "1.5", - "5.", - "1000." - ] - }, - "cutsDsToKKPi": { - "values": [ - ["1.74", "2.18", "0.94", "0.02"], - ["1.74", "2.18", "0.94", "0.02"] - ] - }, - - "pTBinsLcToPKPi": { + "propagateToPCA": "true", + "selectionFlagXic": "1" + }, + "hf-candidate-selector-bplus-to-d0-pi": { + "binsPt": { "values": [ + "0", "0.5", - "5.", - "1000." - ] - }, - "cutsLcToPKPi": { - "values": [ - ["1.98", "2.58", "0.8", "0.0"], - ["1.98", "2.58", "0.8", "0.0"] + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13.0", + "16.0", + "20.0", + "24.0" ] }, - - "pTBinsXicToPKPi": { - "values": [ - "1.", - "5.", - "1000." + "cuts": { + "values": [ + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.00", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.00", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.01", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.02", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.03", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.03", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.05", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.98", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.05", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.99", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.05", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.99", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.05", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.99", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.05", + "0.0", + "0.1", + "0.80" + ], + [ + "1.0", + "0.99", + "0.05", + "0.001", + "1.0", + "0.15", + "0.00", + "0.05", + "0.0", + "0.1", + "0.80" + ] ] }, - "cutsXicToPKPi": { - "values": [ - ["2.10", "2.80", "-2.", "0.0"], - ["2.10", "2.80", "-2.", "0.0"] - ] - } - }, - "hf-cand-creator-2prong": { - "d_bz": "5.", - "b_propdca": "true", - "d_maxr": "5.", - "d_maxdzini": "999.", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true" - }, - "hf-cand-creator-2prong-expressions": { - "processMC": "true" - }, - "hf-cand-creator-3prong": { - "d_bz": "5.", - "b_propdca": "true", - "d_maxr": "5.", - "d_maxdzini": "999.", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true" - }, - "hf-cand-creator-3prong-expressions": { - "processMC": "true" - }, - "hf-cand-creator-xicc": { - "d_bz": "20", - "b_propdca": "true", - "d_maxr": "5.", - "d_maxdzini": "999.", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true", - "d_selectionFlagXic": "1", - "cutPtPionMin": "0.2" - }, - "hf-candidate-creator-bplus": { - "bz": "20.", - "propdca": "true", - "maxr": "5.", - "maxdzini": "999.", - "minparamchange": "0.001", - "minrelchi2change": "0.9", - "useabsdca": "true", + "nSigmaTofCombinedMax": "5000.", + "nSigmaTofMax": "5.", + "nSigmaTpcCombinedMax": "5000.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "50.", + "ptCandMin": "0.", + "ptPidTofMax": "999.", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000.", "selectionFlagD0": "1", "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "cutEtaTrkMax": "1.44" - }, - "hf-d0-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "1000.", - "d_pidTOFMaxpT": "2000.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTPCCombined": "500.", - "d_nSigmaTOF": "300.", - "d_nSigmaTOFCombined": "5000.", - "pTBins": { + "usePid": "true", + "yCandMax": "1.44" + }, + "hf-candidate-selector-d0": { + "TPCNClsFindableMin": "-9999", + "binsPt": { "values": [ "0", "0.5", @@ -277,46 +296,424 @@ "100" ] }, - "D0_to_pi_K_cuts": { - "values": [ - [ "0.4", "0.035", "0.8", "0.5", "0.5", "0.1", "0.1", "-5.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.035", "0.8", "0.5", "0.5", "0.1", "0.1", "-5.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.4", "0.4", "0.1", "0.1", "-25.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.4", "0.4", "0.1", "0.1", "-25.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-20.e-5", "0.90", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-20.e-5", "0.90", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-12.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-12.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-8.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-7.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.8", "0.7", "0.7", "0.1", "0.1", "-7.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.9", "0.7", "0.7", "0.1", "0.1", "-5.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.9", "0.7", "0.7", "0.1", "0.1", "-5.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "0.9", "0.7", "0.7", "0.1", "0.1", "-5.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "10.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.7", "0.7", "0.1", "0.1", "1000.e-5", "0.85", "0.", "0.", "10.0", "10.0", "0.06" ], - [ "0.4", "0.030", "1.0", "0.6", "0.6", "0.1", "0.1", "1000.e-5", "0.80", "0.", "0.", "10.0", "10.0", "0.06" ] + "cuts": { + "values": [ + [ + "0.4", + "0.035", + "0.8", + "0.5", + "0.5", + "0.1", + "0.1", + "-5.e-5", + "0.80", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.035", + "0.8", + "0.5", + "0.5", + "0.1", + "0.1", + "-5.e-5", + "0.80", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.4", + "0.4", + "0.1", + "0.1", + "-25.e-5", + "0.80", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.4", + "0.4", + "0.1", + "0.1", + "-25.e-5", + "0.80", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-20.e-5", + "0.90", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-20.e-5", + "0.90", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-12.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-12.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-8.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-7.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.8", + "0.7", + "0.7", + "0.1", + "0.1", + "-7.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "0.9", + "0.7", + "0.7", + "0.1", + "0.1", + "-5.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "1.0", + "0.7", + "0.7", + "0.1", + "0.1", + "10.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "1.0", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "1.0", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "1.0", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "1.0", + "0.7", + "0.7", + "0.1", + "0.1", + "1000.e-5", + "0.85", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ], + [ + "0.4", + "0.030", + "1.0", + "0.6", + "0.6", + "0.1", + "0.1", + "1000.e-5", + "0.80", + "0.", + "0.", + "10.0", + "10.0", + "0.06" + ] ] - } - }, - "hf-ds-tokkpi-candidate-selector": { - "d_pTCandMin": "2.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "20.", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "20.", - "d_nSigmaTPC": "3.", - "d_nSigmaTOF": "3.", - "pTBins": { + }, + "nSigmaTofCombinedMax": "5000.", + "nSigmaTofMax": "300.", + "nSigmaTpcCombinedMax": "500.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "50.", + "ptCandMin": "0.", + "ptPidTofMax": "2000.", + "ptPidTofMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000." + }, + "hf-candidate-selector-dplus-to-pi-k-pi": { + "TPCNClsFindableMin": "-9999", + "binsPt": { "values": [ "1.", "2.", @@ -333,34 +730,141 @@ "36." ] }, - "Ds_to_K_K_Pi_cuts": { - "values": [ - ["0.2", "0.3", "0.3", "0.07", "6.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.07", "5.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.980", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.20", "5.", "0.94", "0.000", "2.5"] + "cuts": { + "values": [ + [ + "0.2", + "0.3", + "0.3", + "0.07", + "6.", + "0.96", + "0.985", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.07", + "5.", + "0.96", + "0.985", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.980", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.20", + "5.", + "0.94", + "0.000", + "2.5" + ] ] - } - }, - "hf-dplus-topikpi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "1000.", - "d_pidTOFMaxpT": "2000.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "300.", - "pTBins": { + }, + "nSigmaTofMax": "300.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "36.", + "ptCandMin": "0.", + "ptPidTofMax": "2000.", + "ptPidTofMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000." + }, + "hf-candidate-selector-ds-to-k-k-pi": { + "binsPt": { "values": [ "1.", "2.", @@ -377,161 +881,571 @@ "36." ] }, - "DPlus_to_Pi_K_Pi_cuts": { - "values": [ - ["0.2", "0.3", "0.3", "0.07", "6.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.07", "5.", "0.96", "0.985", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.980", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.10", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.12", "5.", "0.96", "0.000", "2.5"], - ["0.2", "0.3", "0.3", "0.20", "5.", "0.94", "0.000", "2.5"] + "cuts": { + "values": [ + [ + "0.2", + "0.3", + "0.3", + "0.07", + "6.", + "0.96", + "0.985", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.07", + "5.", + "0.96", + "0.985", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.980", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.10", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.12", + "5.", + "0.96", + "0.000", + "2.5" + ], + [ + "0.2", + "0.3", + "0.3", + "0.20", + "5.", + "0.94", + "0.000", + "2.5" + ] ] - } - }, - "hf-lc-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_FilterPID": "false", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "1000.", - "d_pidTOFMaxpT": "2000.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTPCCombined": "500.", - "d_nSigmaTOF": "300.", - "d_nSigmaTOFCombined": "5000.", - "pTBins": { + }, + "nSigmaTofMax": "3.", + "nSigmaTpcMax": "3.", + "ptCandMax": "50.", + "ptCandMin": "2.", + "ptPidTofMax": "20.", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "20.", + "ptPidTpcMin": "0.15" + }, + "hf-candidate-selector-jpsi": { + "TPCNClsFindableMin": "-9999", + "binsPt": { "values": [ "0", + "0.5", "1", "2", "3", "4", "5", - "6", - "8", + "7", "10", - "24", - "36" + "15" ] }, - "Lc_to_p_K_pi_cuts": { - "values": [ - [ "0.300", "0.1", "0.1", "0.1", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.1", "0.1", "0.1", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.2", "0.2", "0.2", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.3", "0.3", "0.3", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "5.e-5", "0.004", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "5.e-5", "0.004", "0.8"] + "cuts": { + "values": [ + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ], + [ + "0.5", + "0.2", + "0.4", + "0.5", + "1." + ] ] - } - }, - "hf-xic-topkpi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_FilterPID": "true", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "1.0", - "d_pidTOFMinpT": "0.5", - "d_pidTOFMaxpT": "4.0", - "d_TPCNClsFindablePIDCut": "70.", - "d_nSigmaTPC": "3.", - "d_nSigmaTPCCombined": "5.", - "d_nSigmaTOF": "3.", - "d_nSigmaTOFCombined": "5.", - "pTBins": { + }, + "nSigmaRichMax": "3.", + "nSigmaTofMax": "3.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "50.", + "ptCandMin": "0.", + "ptPidRichMax": "15.", + "ptPidRichMin": "0.15", + "ptPidTofMax": "15.", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000." + }, + "hf-candidate-selector-lb-to-lc-pi": { + "TPCNClsFindableMin": "-9999", + "binsPt": { "values": [ "0", + "0.5", "1", "2", "3", "4", "5", - "6", - "8", - "12", - "24", - "36" + "7", + "10", + "13", + "16", + "20", + "24" ] }, - "Xic_to_p_K_pi_cuts": { - "values": [ - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"], - [ "0.300", "0.4", "0.4", "0.4", "1.e-5", "0.005", "0.8"] + "cuts": { + "values": [ + [ + "1.", + "0.98", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.98", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.98", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.98", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.99", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.003", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.002", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.002", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.002", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ], + [ + "1.", + "0.994", + "0.0001", + "0.002", + "0.0015", + "1.0", + "0.5", + "0.05", + "0.05", + "0.02", + "0.5", + "0.8" + ] ] - } - }, - "hf-jpsi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "15.", - "d_pidRICHMinpT": "0.15", - "d_pidRICHMaxpT": "15.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "3.", - "d_nSigmaRICH": "3.", - "pTBins": { + }, + "nSigmaTofMax": "3.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "50.", + "ptCandMin": "3.", + "ptPidTofMax": "10.", + "ptPidTofMin": "0.", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000." + }, + "hf-candidate-selector-lc": { + "TPCNClsFindableMin": "-9999", + "binsPt": { "values": [ "0", - "0.5", "1", "2", "3", "4", "5", - "7", + "6", + "8", "10", - "15" + "24", + "36" ] }, - "Jpsi_to_ee_cuts": { - "values": [ - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."], - ["0.5", "0.2", "0.4", "0.5", "1."] + "cuts": { + "values": [ + [ + "0.300", + "0.1", + "0.1", + "0.1", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.1", + "0.1", + "0.1", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.2", + "0.2", + "0.2", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.3", + "0.3", + "0.3", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "5.e-5", + "0.004", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "5.e-5", + "0.004", + "0.8" + ] ] - } - }, - "hf-x-tojpsipipi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "0.", - "d_pidTOFMaxpT": "10.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "3.", - "pTBins": { + }, + "nSigmaTofCombinedMax": "5000.", + "nSigmaTofMax": "300.", + "nSigmaTpcCombinedMax": "500.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "36.", + "ptCandMin": "0.", + "ptPidTofMax": "2000.", + "ptPidTofMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000.", + "usePid": "false" + }, + "hf-candidate-selector-lc-to-k0s-p": { + "TPCNClsFindablePIDCut": "50", + "nSigmaTpcMax": "3", + "pPidCombMax": "4", + "ptCandMax": "50", + "ptCandMin": "0", + "ptPidTpcApplyMin": "4", + "ptPidTpcMax": "100", + "ptPidTpcMin": "0", + "requireTpc": "true" + }, + "hf-candidate-selector-x-to-jpsi-pi-pi": { + "TPCNClsFindableMin": "-9999", + "binsPt": { "values": [ "0", "0.5", @@ -545,33 +1459,103 @@ "15" ] }, - "X_to_jpsipipi_cuts": { - "values": [ - ["0.5", "0.80", "0.001", "0.001", "0.0", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "0.0", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "0.2", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "0.9", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "1.5", "0.15", "1."], - ["0.5", "0.80", "0.001", "0.001", "2.3", "0.15", "1."], - ["0.5", "0.90", "0.001", "0.001", "3.0", "0.15", "1."], - ["0.5", "0.90", "0.001", "0.001", "4.2", "0.15", "1."], - ["0.5", "0.90", "0.001", "0.001", "6.2", "0.15", "1."] + "cuts": { + "values": [ + [ + "0.5", + "0.80", + "0.001", + "0.001", + "0.0", + "0.15", + "1." + ], + [ + "0.5", + "0.80", + "0.001", + "0.001", + "0.0", + "0.15", + "1." + ], + [ + "0.5", + "0.80", + "0.001", + "0.001", + "0.2", + "0.15", + "1." + ], + [ + "0.5", + "0.80", + "0.001", + "0.001", + "0.9", + "0.15", + "1." + ], + [ + "0.5", + "0.80", + "0.001", + "0.001", + "1.5", + "0.15", + "1." + ], + [ + "0.5", + "0.80", + "0.001", + "0.001", + "2.3", + "0.15", + "1." + ], + [ + "0.5", + "0.90", + "0.001", + "0.001", + "3.0", + "0.15", + "1." + ], + [ + "0.5", + "0.90", + "0.001", + "0.001", + "4.2", + "0.15", + "1." + ], + [ + "0.5", + "0.90", + "0.001", + "0.001", + "6.2", + "0.15", + "1." + ] ] - } - }, - "hf-xicc-to-p-k-pi-pi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_FilterPID": "true", - "d_pidTPCMinpT": "9999.", - "d_pidTPCMaxpT": "99999.", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "5.", - "d_nSigmaTPC": "9999.", - "d_nSigmaTPCCombined": "9999.", - "d_nSigmaTOF": "3.", - "d_nSigmaTOFCombined": "5.", - "pTBins": { + }, + "nSigmaTofMax": "3.", + "nSigmaTpcMax": "1000.", + "ptCandMax": "50.", + "ptCandMin": "0.", + "ptPidTofMax": "10.", + "ptPidTofMin": "0.", + "ptPidTpcMax": "2000.", + "ptPidTpcMin": "1000." + }, + "hf-candidate-selector-xic-to-p-k-pi": { + "TPCNClsFindableMin": "70.", + "binsPt": { "values": [ "0", "1", @@ -586,339 +1570,341 @@ "36" ] }, - "Xicc_to_p_K_pi_pi_cuts": { - "values": [ - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"], - [ "0.100", "0.5", "0.2", "1.e-3", "10.0", "1.e-3", "10.0", "9999.", "1.e-3", "0.001", "50", "50", "0.985", "0.9"] + "cuts": { + "values": [ + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ], + [ + "0.300", + "0.4", + "0.4", + "0.4", + "1.e-5", + "0.005", + "0.8" + ] ] - } - }, - "hf-bplus-tod0pi-candidate-selector": { - "pTCandMin": "0.", - "pTCandMax": "50.", - "filterPID": "true", - "pidTPCMinpT": "1000.", - "pidTPCMaxpT": "2000.", - "pidTOFMinpT": "0.15", - "pidTOFMaxpT": "999.", - "nSigmaTPC": "1000.", - "nSigmaTPCCombined": "5000.", - "nSigmaTOF": "5.", - "nSigmaTOFCombined": "5000.", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "pTBins": { + }, + "nSigmaTofCombinedMax": "5.", + "nSigmaTofMax": "3.", + "nSigmaTpcCombinedMax": "5.", + "nSigmaTpcMax": "3.", + "ptCandMax": "36.", + "ptCandMin": "0.", + "ptPidTofMax": "4.0", + "ptPidTofMin": "0.5", + "ptPidTpcMax": "1.0", + "ptPidTpcMin": "0.15", + "usePid": "true" + }, + "hf-candidate-selector-xicc-to-p-k-pi-pi": { + "binsPt": { "values": [ "0", - "0.5", "1", "2", "3", "4", "5", - "7", - "10", - "13.0", - "16.0", - "20.0", - "24.0" + "6", + "8", + "12", + "24", + "36" ] }, - "BPlus_to_d0pi_cuts": { - "values": [ - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.00", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.00", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.01", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.02", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.03", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.03", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.98", "0.05", "0.001", "1.0", "0.15", "0.00", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.99", "0.05", "0.001", "1.0", "0.15", "0.00", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.99", "0.05", "0.001", "1.0", "0.15", "0.00", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.99", "0.05", "0.001", "1.0", "0.15", "0.00", "0.05", "0.0", "0.1", "0.80"], - ["1.0", "0.99", "0.05", "0.001", "1.0", "0.15", "0.00", "0.05", "0.0", "0.1", "0.80"] + "cuts": { + "values": [ + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ], + [ + "0.100", + "0.5", + "0.2", + "1.e-3", + "10.0", + "1.e-3", + "10.0", + "9999.", + "1.e-3", + "0.001", + "50", + "50", + "0.985", + "0.9" + ] ] - } + }, + "nSigmaTofCombinedMax": "5.", + "nSigmaTofMax": "3.", + "nSigmaTpcCombinedMax": "9999.", + "nSigmaTpcMax": "9999.", + "ptCandMax": "36.", + "ptCandMin": "0.", + "ptPidTofMax": "5.", + "ptPidTofMin": "0.15", + "ptPidTpcMax": "99999.", + "ptPidTpcMin": "9999.", + "usePid": "true" }, - "hf-task-d0": { - "cutYCandMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", - "pTBins": { + "hf-correlator-c-cbar-mc-gen": { + "ptBinsForMass": { "values": [ "0", - "0.5", - "1", - "1.5", "2", - "2.5", - "3", - "3.5", "4", - "4.5", - "5", - "5.5", "6", - "6.5", - "7", - "7.5", "8", - "9", - "10", "12", "16", - "20", "24", - "36", - "50", - "100" + "99" ] }, - "processMC": "true" + "ptCandMin": "-1", + "yCandMax": "1.44" }, - "hf-task-ds": { - "cutYCandMax": "0.8", - "d_selectionFlagDs": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - }, - "processMC": "true" - }, - "hf-task-dplus": { - "cutYCandMax": "0.8", - "d_selectionFlagDPlus": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - } - }, - "hf-task-dplus-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagDPlus": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - } - }, - "hf-task-lc": { - "cutYCandMax": "2.0", - "d_selectionFlagLc": "0", - "pTBins": { + "hf-correlator-c-cbar-mc-gen-ls": { + "ptBinsForMass": { "values": [ "0", - "1", "2", - "3", "4", - "5", "6", "8", "12", + "16", "24", - "36" - ] - }, - "processMC": "true" - }, - "hf-task-xic": { - "cutEtaCandMax": "-1", - "d_selectionFlagXic": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - } - }, - "hf-task-xic-mc": { - "cutEtaCandMax": "-1", - "d_selectionFlagXic": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - } - }, - "hf-task-jpsi": { - "cutYCandMax": "1.44", - "d_selectionFlagJpsi": "0", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "15" - ] - } - }, - "hf-task-jpsi-mc": { - "cutYCandMax": "1.44", - "d_selectionFlagJpsi": "0" - }, - "hf-candidate-creator-x": { - "cutYCandMax": "1.44", - "d_selectionFlagJpsi": "0" - }, - "hf-task-x": { - "cutYCandMax": "1.44", - "d_selectionFlagX": "0" - }, - "hf-task-x-mc": { - "cutYCandMax": "1.44", - "d_selectionFlagX": "0" - }, - "hf-task-xicc": { - "cutYCandMax": "-1", - "d_selectionFlagXicc": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - } - }, - "hf-task-xicc-mc": { - "cutYCandMax": "-1", - "d_selectionFlagXicc": "0", - "pTBins": { - "values": [ - "1.", - "2.", - "3.", - "4.", - "5.", - "6.", - "7.", - "8.", - "10.", - "12.", - "16.", - "24.", - "36." - ] - } - }, - "hf-task-bplus": { - "cutYCandMax": "1.44", - "selectionFlagBPlus": "1", - "pTBins": { - "values": [ - "0", - "0.5", - "1", - "2", - "3", - "4", - "5", - "7", - "10", - "13.0", - "16.0", - "20.0", - "24.0" + "99" ] }, - "processMC": "true" + "ptCandMin": "-1", + "yCandMax": "1.44" }, "hf-correlator-d0-d0bar": { - "efficiencyFlagD": "1", - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "multMin": "0.", - "multMax": "100000.", - "efficiencyDmeson": { + "applyEfficiency": "1", + "efficiencyD": { "values": [ "0.030", "0.045", @@ -946,70 +1932,17 @@ "0.600", "0.600" ] - } - }, - "hf-correlator-d0-d0bar-mc-rec": { - "efficiencyFlagD": "1", + }, + "multMax": "100000.", + "multMin": "0.", + "ptCandMin": "-1", "selectionFlagD0": "1", "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "multMin": "0.", - "multMax": "100000.", - "efficiencyDmeson": { - "values": [ - "0.030", - "0.045", - "0.059", - "0.077", - "0.097", - "0.119", - "0.137", - "0.149", - "0.167", - "0.179", - "0.197", - "0.210", - "0.228", - "0.242", - "0.263", - "0.289", - "0.335", - "0.380", - "0.420", - "0.510", - "0.550", - "0.600", - "0.600", - "0.600", - "0.600" - ] - } - }, - "hf-correlator-d0-d0bar-mc-gen": { - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "ptBinsForMass": { - "values": [ - "0", - "2", - "4", - "6", - "8", - "12", - "16", - "24", - "99" - ] - } + "yCandMax": "1.44" }, "hf-correlator-d0-d0bar-ls": { - "selectionFlagD0": "1", - "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "multMin": "0.", "multMax": "100000.", + "multMin": "0.", "ptBinsForMass": { "values": [ "0", @@ -1022,15 +1955,13 @@ "24", "99" ] - } - }, - "hf-correlator-d0-d0bar-mc-rec-ls": { + }, + "ptCandMin": "-1", "selectionFlagD0": "1", "selectionFlagD0bar": "1", - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "multMin": "0.", - "multMax": "100000.", + "yCandMax": "1.44" + }, + "hf-correlator-d0-d0bar-mc-gen": { "ptBinsForMass": { "values": [ "0", @@ -1043,11 +1974,11 @@ "24", "99" ] - } + }, + "ptCandMin": "-1", + "yCandMax": "1.44" }, "hf-correlator-d0-d0bar-mc-gen-ls": { - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", "ptBinsForMass": { "values": [ "0", @@ -1060,40 +1991,72 @@ "24", "99" ] - } + }, + "ptCandMin": "-1", + "yCandMax": "1.44" }, - "hf-correlator-dplus-dminus": { - "efficiencyFlagD": "1", - "selectionFlagDplus": "1", - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "multMin": "0.", - "multMax": "100000.", - "efficiencyDmeson": { + "hf-correlator-d0-d0bar-mc-rec": { + "applyEfficiency": "1", + "efficiencyD": { "values": [ - "-999.", - "0.019", - "0.060", - "0.079", - "0.136", - "0.195", - "0.248", - "0.299", - "0.310", - "0.384", - "0.450", - "0.500" - ] - } - }, - "hf-correlator-dplus-dminus-mc-rec": { - "efficiencyFlagD": "1", - "selectionFlagDplus": "1", - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", + "0.030", + "0.045", + "0.059", + "0.077", + "0.097", + "0.119", + "0.137", + "0.149", + "0.167", + "0.179", + "0.197", + "0.210", + "0.228", + "0.242", + "0.263", + "0.289", + "0.335", + "0.380", + "0.420", + "0.510", + "0.550", + "0.600", + "0.600", + "0.600", + "0.600" + ] + }, + "multMax": "100000.", "multMin": "0.", + "ptCandMin": "-1", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "yCandMax": "1.44" + }, + "hf-correlator-d0-d0bar-mc-rec-ls": { "multMax": "100000.", - "efficiencyDmeson": { + "multMin": "0.", + "ptBinsForMass": { + "values": [ + "0", + "2", + "4", + "6", + "8", + "12", + "16", + "24", + "99" + ] + }, + "ptCandMin": "-1", + "selectionFlagD0": "1", + "selectionFlagD0bar": "1", + "yCandMax": "1.44" + }, + "hf-correlator-dplus-dminus": { + "applyEfficiency": "1", + "efficiencyD": { "values": [ "-999.", "0.019", @@ -1108,11 +2071,14 @@ "0.450", "0.500" ] - } + }, + "multMax": "100000.", + "multMin": "0.", + "ptCandMin": "-1", + "selectionFlagDplus": "1", + "yCandMax": "1.44" }, "hf-correlator-dplus-dminus-mc-gen": { - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", "ptBinsForMass": { "values": [ "0", @@ -1125,45 +2091,59 @@ "24", "99" ] - } + }, + "ptCandMin": "-1", + "yCandMax": "1.44" }, - "hf-correlator-c-cbar-mc-gen": { - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "ptBinsForMass": { + "hf-correlator-dplus-dminus-mc-rec": { + "applyEfficiency": "1", + "efficiencyD": { "values": [ - "0", - "2", - "4", - "6", - "8", - "12", - "16", - "24", - "99" + "-999.", + "0.019", + "0.060", + "0.079", + "0.136", + "0.195", + "0.248", + "0.299", + "0.310", + "0.384", + "0.450", + "0.500" ] - } + }, + "multMax": "100000.", + "multMin": "0.", + "ptCandMin": "-1", + "selectionFlagDplus": "1", + "yCandMax": "1.44" }, - "hf-correlator-c-cbar-mc-gen-ls": { - "cutYCandMax": "1.44", - "cutPtCandMin": "-1", - "ptBinsForMass": { + "hf-task-bplus": { + "binsPt": { "values": [ "0", + "0.5", + "1", "2", + "3", "4", - "6", - "8", - "12", - "16", - "24", - "99" + "5", + "7", + "10", + "13.0", + "16.0", + "20.0", + "24.0" ] - } + }, + "processMc": "true", + "selectionFlagBplus": "1", + "yCandMax": "1.44" }, "hf-task-correlation-d-dbar": { - "efficiencyFlagD": "1", - "ptBinsForCorrelations": { + "applyEfficiency": "1", + "binsPtCorrelations": { "values": [ "0", "2", @@ -1176,28 +2156,33 @@ "99" ] }, - "signalRegionInner": { - "values": [ - "1.810", - "1.810", - "1.810", - "1.810", - "1.810", - "1.810", - "1.810", - "1.810" - ] - }, - "signalRegionOuter": { + "efficiencyD": { "values": [ - "1.922", - "1.922", - "1.922", - "1.922", - "1.922", - "1.922", - "1.922", - "1.922" + "0.030", + "0.045", + "0.059", + "0.077", + "0.097", + "0.119", + "0.137", + "0.149", + "0.167", + "0.179", + "0.197", + "0.210", + "0.228", + "0.242", + "0.263", + "0.289", + "0.335", + "0.380", + "0.420", + "0.510", + "0.550", + "0.600", + "0.600", + "0.600", + "0.600" ] }, "sidebandLeftInner": { @@ -1248,7 +2233,62 @@ "2.090" ] }, - "efficiencyDmeson": { + "signalRegionInner": { + "values": [ + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810" + ] + }, + "signalRegionOuter": { + "values": [ + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922" + ] + } + }, + "hf-task-correlation-d-dbar-mc-gen": { + "binsPtCorrelations": { + "values": [ + "0", + "2", + "4", + "6", + "8", + "12", + "16", + "24", + "99" + ] + } + }, + "hf-task-correlation-d-dbar-mc-rec": { + "applyEfficiency": "1", + "binsPtCorrelations": { + "values": [ + "0", + "2", + "4", + "6", + "8", + "12", + "16", + "24", + "99" + ] + }, + "efficiencyD": { "values": [ "0.030", "0.045", @@ -1276,46 +2316,6 @@ "0.600", "0.600" ] - } - }, - "hf-task-correlation-d-dbar-mc-rec": { - "efficiencyFlagD": "1", - "ptBinsForCorrelations": { - "values": [ - "0", - "2", - "4", - "6", - "8", - "12", - "16", - "24", - "99" - ] - }, - "signalRegionInner": { - "values": [ - "1.810", - "1.810", - "1.810", - "1.810", - "1.810", - "1.810", - "1.810", - "1.810" - ] - }, - "signalRegionOuter": { - "values": [ - "1.922", - "1.922", - "1.922", - "1.922", - "1.922", - "1.922", - "1.922", - "1.922" - ] }, "sidebandLeftInner": { "values": [ @@ -1365,203 +2365,707 @@ "2.090" ] }, - "efficiencyDmeson": { + "signalRegionInner": { "values": [ - "0.030", - "0.045", - "0.059", - "0.077", - "0.097", - "0.119", - "0.137", - "0.149", - "0.167", - "0.179", - "0.197", - "0.210", - "0.228", - "0.242", - "0.263", - "0.289", - "0.335", - "0.380", - "0.420", - "0.510", - "0.550", - "0.600", - "0.600", - "0.600", - "0.600" + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810", + "1.810" + ] + }, + "signalRegionOuter": { + "values": [ + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922", + "1.922" ] } }, - "hf-task-correlation-d-dbar-mc-gen": { - "ptBinsForCorrelations": { + "hf-task-d0": { + "binsPt": { "values": [ "0", + "0.5", + "1", + "1.5", "2", + "2.5", + "3", + "3.5", "4", + "4.5", + "5", + "5.5", "6", + "6.5", + "7", + "7.5", "8", + "9", + "10", "12", "16", + "20", "24", - "99" + "36", + "50", + "100" ] - } + }, + "processMc": "true", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", + "yCandMax": "0.8" }, - "hf-track-index-skims-cascades-creator": { - "doValPlots": "true", - "bZ": "5", - "propDCA": "true", - "maxR": "200", - "maxDZIni": "4", + "hf-task-dplus": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "selectionFlagDplus": "0", + "yCandMax": "0.8" + }, + "hf-task-dplus-mc": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "selectionFlagDplus": "0", + "yCandMax": "0.8" + }, + "hf-task-ds": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "processMc": "true", + "selectionFlagDs": "0", + "yCandMax": "0.8" + }, + "hf-task-jpsi": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "15" + ] + }, + "selectionFlagJpsi": "0", + "yCandMax": "1.44" + }, + "hf-task-jpsi-mc": { + "selectionFlagJpsi": "0", + "yCandMax": "1.44" + }, + "hf-task-lb": { + "binsPt": { + "values": [ + "0", + "0.5", + "1", + "2", + "3", + "4", + "5", + "7", + "10", + "13", + "16", + "20", + "24" + ] + }, + "processMc": "true", + "selectionFlagLb": "0", + "yCandMax": "2.0" + }, + "hf-task-lc": { + "binsPt": { + "values": [ + "0", + "1", + "2", + "3", + "4", + "5", + "6", + "8", + "12", + "24", + "36" + ] + }, + "processMc": "true", + "selectionFlagLc": "0", + "yCandMax": "2.0" + }, + "hf-task-lc-to-k0s-p": { + "etaCandMax": "-1", + "selectionFlagLcToK0sP": "0" + }, + "hf-task-lc-to-k0s-p-mc": { + "etaCandMax": "-1", + "selectionFlagLcToK0sP": "0", + "selectionFlagLcbarToK0sP": "0" + }, + "hf-task-x": { + "selectionFlagX": "0", + "yCandMax": "1.44" + }, + "hf-task-x-mc": { + "selectionFlagX": "0", + "yCandMax": "1.44" + }, + "hf-task-xic": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "etaCandMax": "-1", + "selectionFlagXic": "0" + }, + "hf-task-xic-mc": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "etaCandMax": "-1", + "selectionFlagXic": "0" + }, + "hf-task-xicc": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "selectionFlagXicc": "0", + "yCandMax": "-1" + }, + "hf-task-xicc-mc": { + "binsPt": { + "values": [ + "1.", + "2.", + "3.", + "4.", + "5.", + "6.", + "7.", + "8.", + "10.", + "12.", + "16.", + "24.", + "36." + ] + }, + "selectionFlagXicc": "0", + "yCandMax": "-1" + }, + "hf-track-index-skim-creator": { + "binsPtD0ToPiK": { + "values": [ + "0.", + "5.", + "1000." + ] + }, + "binsPtDplusToPiKPi": { + "values": [ + "2.", + "5.", + "1000." + ] + }, + "binsPtDsToKKPi": { + "values": [ + "1.5", + "5.", + "1000." + ] + }, + "binsPtJpsiToEE": { + "values": [ + "0.", + "5.", + "1000." + ] + }, + "binsPtJpsiToMuMu": { + "values": [ + "0.", + "5.", + "1000." + ] + }, + "binsPtLcToPKPi": { + "values": [ + "0.5", + "5.", + "1000." + ] + }, + "binsPtXicToPKPi": { + "values": [ + "1.", + "5.", + "1000." + ] + }, + "bz": "5.", + "cutsD0ToPiK": { + "values": [ + [ + "1.61", + "2.12", + "0.5", + "0.00" + ], + [ + "1.61", + "2.12", + "0.5", + "0.00" + ] + ] + }, + "cutsDplusToPiKPi": { + "values": [ + [ + "1.67", + "2.07", + "0.95", + "0.05" + ], + [ + "1.67", + "2.07", + "0.95", + "0.05" + ] + ] + }, + "cutsDsToKKPi": { + "values": [ + [ + "1.74", + "2.18", + "0.94", + "0.02" + ], + [ + "1.74", + "2.18", + "0.94", + "0.02" + ] + ] + }, + "cutsJpsiToEE": { + "values": [ + [ + "2.5", + "4.1", + "-2.", + "1000.00" + ], + [ + "2.5", + "4.1", + "-2.", + "1000.00" + ] + ] + }, + "cutsJpsiToMuMu": { + "values": [ + [ + "2.5", + "4.1", + "-2.", + "1000.00" + ], + [ + "2.5", + "4.1", + "-2.", + "1000.00" + ] + ] + }, + "cutsLcToPKPi": { + "values": [ + [ + "1.98", + "2.58", + "0.8", + "0.0" + ], + [ + "1.98", + "2.58", + "0.8", + "0.0" + ] + ] + }, + "cutsXicToPKPi": { + "values": [ + [ + "2.10", + "2.80", + "-2.", + "0.0" + ], + [ + "2.10", + "2.80", + "-2.", + "0.0" + ] + ] + }, + "do3Prong": "1", + "fillHistograms": "true", + "maxDZIni": "999.", + "maxR": "5.", "minParamChange": "0.001", "minRelChi2Change": "0.9", - "UseAbsDCA": "true", - "doCutQuality": "true", - "TPCRefit": "true", - "i_minCrossedRows": "50", - "etaMax": "1.1", - "ptMin": "0.05", - "cosPAV0": "0.995", - "dcaXYNegToPV": "0.1", - "dcaXYPosToPVS": "0.1", - "cutInvMassV0": "0.05", - "cutCascPtCandMin": "-1", - "cutCascInvMassLc": "1" + "propagateToPCA": "true" }, - "hf-cand-creator-cascade": { - "bZ": "5", - "propDCA": "true", - "maxR": "200", + "hf-track-index-skim-creator-cascades": { + "bz": "5", + "cpaV0Min": "0.995", + "cutInvMassCascLc": "1", + "cutInvMassV0": "0.05", + "dcaXYNegToPvMin": "0.1", + "dcaXYPosToPVS": "0.1", + "doCutQuality": "true", + "etaMaxV0Daugh": "1.1", + "fillHistograms": "true", "maxDZIni": "4", + "maxR": "200", "minParamChange": "0.001", "minRelChi2Change": "0.9", - "doValPlots": "true" - }, - "hf-lc-tok0sp-candidate-selector": { - "pTCandMin": "0", - "pTCandMax": "50", - "applyPidTPCMinPt": "4", - "pidTPCMinPt": "0", - "pidTPCMaxPt": "100", - "pidCombMaxP": "4", - "nSigmaTPC": "3", - "TPCNClsFindablePIDCut": "50", - "requireTPC": "true" + "nCrossedRowsMinBach": "50", + "propagateToPCA": "true", + "ptCascCandMin": "-1", + "ptMinV0Daugh": "0.05", + "tpcRefitV0Daugh": "true", + "useAbsDCA": "true" + }, + "hf-track-index-skim-creator-tag-sel-collisions": { + "chi2Max": "0", + "fillHistograms": "true", + "nContribMin": "0", + "processNoTrigSel": "true", + "processTrigSel": "false", + "triggerClassName": "", + "xVertexMax": "100", + "xVertexMin": "-100", + "yVertexMax": "100", + "yVertexMin": "-100", + "zVertexMax": "100", + "zVertexMin": "-100" }, - "hf-task-lc-tok0sP": { - "selectionFlagLcK0sp": "0", - "cutEtaCandMax": "-1" + "hf-track-index-skim-creator-tag-sel-tracks": { + "binsPtTrack": { + "values": [ + "0.", + "0.5", + "1.", + "1.5", + "2.", + "3.", + "100." + ] + }, + "bz": "5.", + "cutsTrack2Prong": { + "values": [ + [ + "0.001", + "1.0" + ], + [ + "0.001", + "1.0" + ], + [ + "0.001", + "1.0" + ], + [ + "0.001", + "1.0" + ], + [ + "0.000", + "10." + ], + [ + "0.000", + "10." + ] + ] + }, + "cutsTrack3Prong": { + "values": [ + [ + "0.001", + "1.0" + ], + [ + "0.001", + "1.0" + ], + [ + "0.001", + "1.0" + ], + [ + "0.001", + "1.0" + ], + [ + "0.000", + "10." + ], + [ + "0.000", + "10." + ] + ] + }, + "doCutQuality": "false", + "etaMaxTrack2Prong": "1.44", + "etaMaxTrack3Prong": "1.44", + "fillHistograms": "true", + "ptMinTrack2Prong": ".3", + "ptMinTrack3Prong": ".3", + "tpcNClsFoundMin": "-999999" + }, + "hf-track-to-collision-association": { + "applyIsGlobalTrack": "true", + "applyTrackSelForRun2": "false", + "nSigmaForTimeCompat": "4.", + "processAssocWithAmb": "false", + "processAssocWithTime": "false", + "processStandardAssoc": "true", + "timeMargin": "0." + }, + "hf-tree-creator-d0-to-k-pi": { + "processData": "true", + "processMc": "false" }, - "hf-task-lc-tok0sP-mc": { - "selectionFlagLc": "0", - "selectionFlagLcbar": "0", - "cutEtaCandMax": "-1" + "internal-dpl-aod-reader": { + "aod-file": "@list_o2.txt", + "end-value-enumeration": "-1", + "start-value-enumeration": "0", + "step-value-enumeration": "1" + }, + "internal-dpl-aod-writer": {}, + "internal-dpl-clock": "", + "qa-global-observables": { + "RangeMaxNumberOfContributorsVertex": "200", + "RangeMaxNumberOfTracks": "2000", + "RangeMaxVertexCovarianceMatrix": "0.01", + "RangeMaxVertexPositionXY": "0.01", + "RangeMaxVertexPositionZ": "20", + "RangeMinNumberOfTracks": "0", + "RangeMinVertexCovarianceMatrix": "-0.01", + "RangeMinVertexPositionXY": "-0.01", + "RangeMinVertexPositionZ": "-20", + "nBinsNumberOfContributorsVertex": "200", + "nBinsNumberOfTracks": "2000", + "nBinsVertexCovarianceMatrix": "100", + "nBinsVertexPosition": "100", + "nMinNumberOfContributors": "0" }, "qa-tracking-efficiency-electron": { - "eta-min": "-3", + "eta-bins": "500", "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", + "eta-min": "-3", "log-pt": "0", - "eta-bins": "500", + "make-eff": "0", "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" + "phi-max": "6.28318977", + "phi-min": "0", + "pt-bins": "500", + "pt-max": "5", + "pt-min": "0", + "sel-prim": "1" }, "qa-tracking-efficiency-kaon": { - "eta-min": "-3", + "eta-bins": "500", "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", + "eta-min": "-3", "log-pt": "0", - "eta-bins": "500", + "make-eff": "0", "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" + "phi-max": "6.28318977", + "phi-min": "0", + "pt-bins": "500", + "pt-max": "5", + "pt-min": "0", + "sel-prim": "1" }, "qa-tracking-efficiency-muon": { - "eta-min": "-3", + "eta-bins": "500", "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", + "eta-min": "-3", "log-pt": "0", - "eta-bins": "500", + "make-eff": "0", "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" + "phi-max": "6.28318977", + "phi-min": "0", + "pt-bins": "500", + "pt-max": "5", + "pt-min": "0", + "sel-prim": "1" }, "qa-tracking-efficiency-pion": { - "eta-min": "-3", + "eta-bins": "500", "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", + "eta-min": "-3", "log-pt": "0", - "eta-bins": "500", + "make-eff": "0", "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" + "phi-max": "6.28318977", + "phi-min": "0", + "pt-bins": "500", + "pt-max": "5", + "pt-min": "0", + "sel-prim": "1" }, "qa-tracking-efficiency-proton": { - "eta-min": "-3", + "eta-bins": "500", "eta-max": "3", - "phi-min": "0", - "phi-max": "6.28318977", - "pt-min": "0", - "pt-max": "5", - "pt-bins": "500", + "eta-min": "-3", "log-pt": "0", - "eta-bins": "500", + "make-eff": "0", "phi-bins": "500", - "sel-prim": "1", - "make-eff": "0" - }, - "qa-global-observables": { - "nMinNumberOfContributors": "0", - "nBinsNumberOfTracks": "2000", - "RangeMinNumberOfTracks": "0", - "RangeMaxNumberOfTracks": "2000", - "nBinsVertexPosition": "100", - "RangeMinVertexPositionZ": "-20", - "RangeMaxVertexPositionZ": "20", - "RangeMinVertexPositionXY": "-0.01", - "RangeMaxVertexPositionXY": "0.01", - "nBinsNumberOfContributorsVertex": "200", - "RangeMaxNumberOfContributorsVertex": "200", - "nBinsVertexCovarianceMatrix": "100", - "RangeMinVertexCovarianceMatrix": "-0.01", - "RangeMaxVertexCovarianceMatrix": "0.01" + "phi-max": "6.28318977", + "phi-min": "0", + "pt-bins": "500", + "pt-max": "5", + "pt-min": "0", + "sel-prim": "1" }, "qa-tracking-kine": { - "nBinsPt": "100", "nBinsEta": "100", - "nBinsPhi": "100" + "nBinsPhi": "100", + "nBinsPt": "100" }, "qa-tracking-resolution": { - "useOnlyPhysicsPrimary": "1", - "pdgCode": "0", - "nBinsPt": "100", + "nBinsDeltaEta": "100", + "nBinsDeltaPhi": "100", + "nBinsDeltaPt": "100", "nBinsEta": "60", + "nBinsImpactParameter": "2000", "nBinsPhi": "50", - "nBinsDeltaPt": "100", - "nBinsDeltaPhi": "100", - "nBinsDeltaEta": "100", - "nBinsImpactParameter": "2000" + "nBinsPt": "100", + "pdgCode": "0", + "useOnlyPhysicsPrimary": "1" + }, + "timestamp-task": { + "isRun2MC": "false" }, - "internal-dpl-aod-writer": { + "track-extension": { + "processRun2": "false", + "processRun3": "true" } } diff --git a/codeHF/dpl-config_run5_oniaX.json b/codeHF/dpl-config_run5_oniaX.json index ef4ee670..c1db819e 100644 --- a/codeHF/dpl-config_run5_oniaX.json +++ b/codeHF/dpl-config_run5_oniaX.json @@ -24,7 +24,16 @@ "processRun2": "false", "processRun3": "true" }, - "hf-tag-sel-collisions": { + "hf-track-to-collision-association": { + "nSigmaForTimeCompat": "4.", + "timeMargin": "0.", + "processAssocWithTime": "false", + "processAssocWithAmb": "false", + "processStandardAssoc": "true", + "applyIsGlobalTrack": "true", + "applyTrackSelForRun2": "false" + }, + "hf-track-index-skim-creator-tag-sel-collisions": { "fillHistograms": "true", "xVertexMin": "-100", "xVertexMax": "100", @@ -38,12 +47,12 @@ "processTrigSel": "false", "processNoTrigSel": "true" }, - "hf-tag-sel-tracks": { + "hf-track-index-skim-creator-tag-sel-tracks": { "fillHistograms": "true", "bz": "20.", "doCutQuality": "false", - "tpcNClsFound": "-999999", - "pTBinsTrack": { + "tpcNClsFoundMin": "-999999", + "binsPtTrack": { "values": [ "0.", "0.5", @@ -54,8 +63,8 @@ "100." ] }, - "pTMinTrack2Prong": "1.0", - "etaMax2Prong": "1.44", + "ptMinTrack2Prong": "1.0", + "etaMaxTrack2Prong": "1.44", "cutsTrack2Prong": { "values": [ ["0.000", "10."], @@ -66,8 +75,8 @@ ["0.000", "10."] ] }, - "pTMinTrack3Prong": ".3", - "etaMax3Prong": "1.44", + "ptMinTrack3Prong": ".3", + "etaMaxTrack3Prong": "1.44", "cutsTrack3Prong": { "values": [ ["0.001", "1.0"], @@ -79,17 +88,17 @@ ] } }, - "hf-track-index-skims-creator": { + "hf-track-index-skim-creator": { "fillHistograms": "true", - "do3prong": "0", + "do3Prong": "0", "bz": "20.", - "propToDCA": "true", - "maxRad": "5.", + "propagateToPCA": "true", + "maxR": "5.", "maxDZIni": "999.", "minParamChange": "0.001", "minRelChi2Change": "0.9", - "pTBinsD0ToPiK": { + "binsPtD0ToPiK": { "values": [ "0.", "5.", @@ -103,7 +112,7 @@ ] }, - "pTBinsJpsiToEE": { + "binsPtJpsiToEE": { "values": [ "0.", "5.", @@ -117,7 +126,7 @@ ] }, - "pTBinsJpsiToMuMu": { + "binsPtJpsiToMuMu": { "values": [ "0.", "5.", @@ -131,14 +140,14 @@ ] }, - "pTBinsDPlusToPiKPi": { + "binsPtDplusToPiKPi": { "values": [ "2.", "5.", "1000." ] }, - "cutsDPlusToPiKPi": { + "cutsDplusToPiKPi": { "values": [ ["1.67", "2.07", "0.95", "0.05"], ["1.67", "2.07", "0.95", "0.05"] @@ -159,7 +168,7 @@ ] }, - "pTBinsLcToPKPi": { + "binsPtLcToPKPi": { "values": [ "0.5", "5.", @@ -173,7 +182,7 @@ ] }, - "pTBinsXicToPKPi": { + "binsPtXicToPKPi": { "values": [ "4.", "5.", @@ -187,43 +196,43 @@ ] } }, - "hf-cand-creator-2prong": { - "d_bz": "20.", - "b_propdca": "true", - "d_maxr": "5.", - "d_maxdzini": "999.", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true" - }, - "hf-cand-creator-2prong-expressions": { - "processMC": "true" - }, - "hf-cand-creator-3prong": { - "d_bz": "20.", - "b_propdca": "true", - "d_maxr": "5.", - "d_maxdzini": "999.", - "d_minparamchange": "0.001", - "d_minrelchi2change": "0.9", - "b_dovalplots": "true" - }, - "hf-cand-creator-3prong-expressions": { - "processMC": "true" - }, - "hf-d0-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "1000.", - "d_pidTOFMaxpT": "2000.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTPCCombined": "500.", - "d_nSigmaTOF": "300.", - "d_nSigmaTOFCombined": "5000.", - "pTBins": { + "hf-candidate-creator-2prong": { + "bz": "20.", + "propagateToPCA": "true", + "maxR": "5.", + "maxDZIni": "999.", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "fillHistograms": "true" + }, + "hf-candidate-creator-2prong-expressions": { + "processMc": "true" + }, + "hf-candidate-creator-3prong": { + "bz": "20.", + "propagateToPCA": "true", + "maxR": "5.", + "maxDZIni": "999.", + "minParamChange": "0.001", + "minRelChi2Change": "0.9", + "fillHistograms": "true" + }, + "hf-candidate-creator-3prong-expressions": { + "processMc": "true" + }, + "hf-candidate-selector-d0": { + "ptCandMin": "0.", + "ptCandMax": "50.", + "ptPidTpcMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTofMin": "1000.", + "ptPidTofMax": "2000.", + "TPCNClsFindableMin": "-9999", + "nSigmaTpcMax": "1000.", + "nSigmaTpcCombinedMax": "500.", + "nSigmaTofMax": "300.", + "nSigmaTofCombinedMax": "5000.", + "binsPt": { "values": [ "0", "0.5", @@ -253,7 +262,7 @@ "100" ] }, - "D0_to_pi_K_cuts": { + "cuts": { "values": [ [ "0.4", "0.035", "0.8", "0.5", "0.5", "0.1", "0.1", "-5.e-5", "0.80", "0.", "0." ], [ "0.4", "0.035", "0.8", "0.5", "0.5", "0.1", "0.1", "-5.e-5", "0.80", "0.", "0." ], @@ -283,17 +292,17 @@ ] } }, - "hf-dplus-topikpi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "1000.", - "d_pidTOFMaxpT": "2000.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "300.", - "pTBins": { + "hf-candidate-selector-dplus-to-pi-k-pi": { + "ptCandMin": "0.", + "ptCandMax": "36.", + "ptPidTpcMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTofMin": "1000.", + "ptPidTofMax": "2000.", + "TPCNClsFindableMin": "-9999", + "nSigmaTpcMax": "1000.", + "nSigmaTofMax": "300.", + "binsPt": { "values": [ "1.", "2.", @@ -310,7 +319,7 @@ "36." ] }, - "DPlus_to_Pi_K_Pi_cuts": { + "cuts": { "values": [ ["0.2", "0.3", "0.3", "0.07", "6.", "0.96", "0.985", "2.5"], ["0.2", "0.3", "0.3", "0.07", "5.", "0.96", "0.985", "2.5"], @@ -327,20 +336,20 @@ ] } }, - "hf-lc-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_FilterPID": "false", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "1000.", - "d_pidTOFMaxpT": "2000.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTPCCombined": "500.", - "d_nSigmaTOF": "300.", - "d_nSigmaTOFCombined": "5000.", - "pTBins": { + "hf-candidate-selector-lc": { + "ptCandMin": "0.", + "ptCandMax": "36.", + "usePid": "false", + "ptPidTpcMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTofMin": "1000.", + "ptPidTofMax": "2000.", + "TPCNClsFindableMin": "-9999", + "nSigmaTpcMax": "1000.", + "nSigmaTpcCombinedMax": "500.", + "nSigmaTofMax": "300.", + "nSigmaTofCombinedMax": "5000.", + "binsPt": { "values": [ "0", "1", @@ -355,7 +364,7 @@ "36" ] }, - "Lc_to_p_K_pi_cuts": { + "cuts": { "values": [ [ "0.300", "0.1", "0.1", "0.1", "5.e-5", "0.004", "0.8"], [ "0.300", "0.1", "0.1", "0.1", "5.e-5", "0.004", "0.8"], @@ -370,37 +379,37 @@ ] } }, - "hf-xic-topkpi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "36.", - "d_FilterPID": "false", - "d_pidTPCMinpT": "0.15", - "d_pidTPCMaxpT": "1.0", - "d_pidTOFMinpT": "0.5", - "d_pidTOFMaxpT": "4.0", - "d_TPCNClsFindablePIDCut": "70.", - "d_nSigmaTPC": "3.", - "d_nSigmaTPCCombined": "5.", - "d_nSigmaTOF": "3.", - "d_nSigmaTOFCombined": "5." - }, - "hf-jpsi-candidate-selector": { + "hf-candidate-selector-xic-to-p-k-pi": { + "ptCandMin": "0.", + "ptCandMax": "36.", + "usePid": "false", + "ptPidTpcMin": "0.15", + "ptPidTpcMax": "1.0", + "ptPidTofMin": "0.5", + "ptPidTofMax": "4.0", + "TPCNClsFindableMin": "70.", + "nSigmaTpcMax": "3.", + "nSigmaTpcCombinedMax": "5.", + "nSigmaTofMax": "3.", + "nSigmaTofCombinedMax": "5." + }, + "hf-candidate-selector-jpsi": { "isALICE3": "true", - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "1.", - "d_nSigmaTOFCombined": "0.", - "d_pidRICHMinpT": "0.5", - "d_pidRICHMaxpT": "15.", - "d_nSigmaRICHCombinedTOF": "0.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "3.", - "d_nSigmaRICH": "3.", - "pTBins": { + "ptCandMin": "0.", + "ptCandMax": "50.", + "ptPidTpcMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTofMin": "0.15", + "ptPidTofMax": "1.", + "nSigmaTofCombinedMax": "0.", + "ptPidRichMin": "0.5", + "ptPidRichMax": "15.", + "nSigmaRichCombinedTofMax": "0.", + "TPCNClsFindableMin": "-9999", + "nSigmaTpcMax": "1000.", + "nSigmaTofMax": "3.", + "nSigmaRichMax": "3.", + "binsPt": { "values": [ "0", "0.5", @@ -414,7 +423,7 @@ "15" ] }, - "Jpsi_to_ee_cuts": { + "cuts": { "values": [ ["0.5", "0.2", "0.4", "0.5", "1."], ["0.5", "0.2", "0.4", "0.5", "1."], @@ -428,17 +437,17 @@ ] } }, - "hf-x-tojpsipipi-candidate-selector": { - "d_pTCandMin": "0.", - "d_pTCandMax": "50.", - "d_pidTPCMinpT": "1000.", - "d_pidTPCMaxpT": "2000.", - "d_pidTOFMinpT": "0.15", - "d_pidTOFMaxpT": "10.", - "d_TPCNClsFindablePIDCut": "-9999", - "d_nSigmaTPC": "1000.", - "d_nSigmaTOF": "3.", - "pTBins": { + "hf-candidate-selector-x-to-jpsi-pi-pi": { + "ptCandMin": "0.", + "ptCandMax": "50.", + "ptPidTpcMin": "1000.", + "ptPidTpcMax": "2000.", + "ptPidTofMin": "0.15", + "ptPidTofMax": "10.", + "TPCNClsFindableMin": "-9999", + "nSigmaTpcMax": "1000.", + "nSigmaTofMax": "3.", + "binsPt": { "values": [ "0", "0.5", @@ -452,7 +461,7 @@ "15" ] }, - "X_to_jpsipipi_cuts": { + "cuts": { "values": [ ["0.5", "0.80", "0.001", "0.001", "0.0", "0.15", "1."], ["0.5", "0.80", "0.001", "0.001", "0.0", "0.15", "1."], @@ -466,11 +475,15 @@ ] } }, + "hf-tree-creator-d0-to-k-pi": { + "processData": "true", + "processMc": "false" + }, "hf-task-d0": { - "cutYCandMax": "0.8", - "d_selectionFlagD0": "0", - "d_selectionFlagD0bar": "0", - "pTBins": { + "yCandMax": "0.8", + "selectionFlagD0": "0", + "selectionFlagD0bar": "0", + "binsPt": { "values": [ "0", "0.5", @@ -500,12 +513,12 @@ "100" ] }, - "processMC": "true" + "processMc": "true" }, "hf-task-dplus": { - "cutYCandMax": "0.8", - "d_selectionFlagDPlus": "0", - "pTBins": { + "yCandMax": "0.8", + "selectionFlagDplus": "0", + "binsPt": { "values": [ "1.", "2.", @@ -524,9 +537,9 @@ } }, "hf-task-dplus-mc": { - "cutYCandMax": "0.8", - "d_selectionFlagDPlus": "0", - "pTBins": { + "yCandMax": "0.8", + "selectionFlagDplus": "0", + "binsPt": { "values": [ "1.", "2.", @@ -545,9 +558,9 @@ } }, "hf-task-lc": { - "cutYCandMax": "2.0", - "d_selectionFlagLc": "0", - "pTBins": { + "yCandMax": "2.0", + "selectionFlagLc": "0", + "binsPt": { "values": [ "0", "1", @@ -562,25 +575,25 @@ "36" ] }, - "processMC": "true" + "processMc": "true" }, "hf-task-xic": { - "cutEtaCandMax": "0.8", - "d_selectionFlagXic": "0" + "etaCandMax": "0.8", + "selectionFlagXic": "0" }, "hf-task-xic-mc": { - "cutEtaCandMax": "0.8", - "d_selectionFlagXic": "0" + "etaCandMax": "0.8", + "selectionFlagXic": "0" }, "hf-task-jpsi": { - "cutYCandMax": "1.44", - "d_selectionFlagJpsi": "0", - "d_modeJpsiToMuMu": "false", + "yCandMax": "1.44", + "selectionFlagJpsi": "0", + "modeJpsiToMuMu": "false", "selectedRich": "false", "selectedTofRich": "false", "selectedTof": "false", "selectedMid": "false", - "pTBins": { + "binsPt": { "values": [ "0", "0.5", @@ -596,76 +609,76 @@ } }, "hf-task-jpsi-mc": { - "cutYCandMax": "1.44", - "d_selectionFlagJpsi": "0", - "d_modeJpsiToMuMu": "false", + "yCandMax": "1.44", + "selectionFlagJpsi": "0", + "modeJpsiToMuMu": "false", "selectedRich": "false", "selectedTofRich": "false", "selectedTof": "false", "selectedMid": "false" }, "hf-candidate-creator-x": { - "cutYCandMax": "1.44", - "d_selectionFlagJpsi": "0", + "yCandMax": "1.44", + "selectionFlagJpsi": "0", "ptPionMin": "0.15" }, "hf-task-x": { - "cutYCandMax": "1.44", - "d_selectionFlagX": "0" + "yCandMax": "1.44", + "selectionFlagX": "0" }, "hf-task-x-mc": { - "cutYCandMax": "1.44", - "d_selectionFlagX": "0" + "yCandMax": "1.44", + "selectionFlagX": "0" }, - "hf-track-index-skims-cascades-creator": { - "doValPlots": "true", - "bZ": "20.", - "propDCA": "true", + "hf-track-index-skim-creator-cascades": { + "fillHistograms": "true", + "bz": "20.", + "propagateToPCA": "true", "maxR": "200", "maxDZIni": "4", "minParamChange": "0.001", "minRelChi2Change": "0.9", - "UseAbsDCA": "true", + "useAbsDCA": "true", "doCutQuality": "true", - "TPCRefit": "true", - "i_minCrossedRows": "50", - "etaMax": "1.1", - "ptMin": "0.05", - "cosPAV0": "0.995", - "dcaXYNegToPV": "0.1", + "tpcRefitV0Daugh": "true", + "nCrossedRowsMinBach": "50", + "etaMaxV0Daugh": "1.1", + "ptMinV0Daugh": "0.05", + "cpaV0Min": "0.995", + "dcaXYNegToPvMin": "0.1", "dcaXYPosToPVS": "0.1", "cutInvMassV0": "0.05", - "cutCascPtCandMin": "-1", - "cutCascInvMassLc": "1" + "ptCascCandMin": "-1", + "cutInvMassCascLc": "1" }, - "hf-cand-creator-cascade": { - "bZ": "20.", - "propDCA": "true", + "hf-candidate-creator-cascade": { + "bz": "20.", + "propagateToPCA": "true", "maxR": "200", "maxDZIni": "4", "minParamChange": "0.001", "minRelChi2Change": "0.9", - "doValPlots": "true" - }, - "hf-lc-tok0sp-candidate-selector": { - "pTCandMin": "0", - "pTCandMax": "50", - "applyPidTPCMinPt": "4", - "pidTPCMinPt": "0", - "pidTPCMaxPt": "100", - "pidCombMaxP": "4", - "nSigmaTPC": "3", + "fillHistograms": "true" + }, + "hf-candidate-selector-lc-to-k0s-p": { + "ptCandMin": "0", + "ptCandMax": "50", + "ptPidTpcApplyMin": "4", + "ptPidTpcMin": "0", + "ptPidTpcMax": "100", + "pPidCombMax": "4", + "nSigmaTpcMax": "3", "TPCNClsFindablePIDCut": "50", - "requireTPC": "true" + "requireTpc": "true" }, - "hf-task-lc-tok0sP": { - "selectionFlagLcK0sp": "0", - "cutEtaCandMax": "-1" + "hf-task-lc-to-k0s-p": { + "selectionFlagLcToK0sP": "0", + "etaCandMax": "-1" }, - "hf-task-lc-tok0sP-mc": { - "selectionFlagLc": "0", - "selectionFlagLcbar": "0", - "cutEtaCandMax": "-1" + "hf-task-lc-to-k0s-p-mc": { + "selectionFlagLcToK0sP": "0", + "selectionFlagLcbarToK0sP": "0", + "etaCandMax": "-1" }, "qa-tracking-efficiency-electron": { "eta-min": "-3", diff --git a/codeHF/plottogether.py b/codeHF/plottogether.py deleted file mode 100755 index 9bb361b9..00000000 --- a/codeHF/plottogether.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python3 - -""" -Script to plot together canvases in different files -""" - -from sys import argv - -from ROOT import TColor, TFile # , TLegend - - -def main(filename, canvases): - f = TFile(filename, "READ") - f.ls() - cols = ["#e41a1c", "#377eb8", "#4daf4a"] - cols = [TColor.GetColor(i) for i in cols] - print("Canvases", canvases) - canname = canvases[0] - canname.split("_folder_")[-1] - can = f.Get(canname) - lcan = can.GetListOfPrimitives() - lcan.FindObject("TPave").SetHeader("") - can.Draw() - print(can) - # leg = TLegend(0.7, 0.7, 0.9, 0.9) - for i in canvases[1:]: - print("Getting", i) - c = f.Get(i) - lp = c.GetListOfPrimitives() - # lp.ls() - for j in lp: - if "TH1" not in j.ClassName(): - continue - print(j) - can.cd() - j.Draw("sameHIST") - can.Update() - return can - - -res = main(argv[1], argv[2:]) - -input("Press enter to continue") diff --git a/codeHF/qamacro.C b/codeHF/qamacro.C deleted file mode 100644 index 7b2ba7a1..00000000 --- a/codeHF/qamacro.C +++ /dev/null @@ -1,15 +0,0 @@ -void qamacro() -{ - TFile f("AnalysisResults.root"); - TH2F* hptDResvspt = (TH2F*)f.Get("qa-tracking-resolution/ptDResvspt"); - TH2F* hptDResvseta = (TH2F*)f.Get("qa-tracking-resolution/ptDResvseta"); - TProfile* pptDResvspt = hptDResvspt->ProfileX(); - TProfile* pptDResvseta = hptDResvseta->ProfileX(); - TCanvas* ctrackres = new TCanvas("ctrackres", "ctrackres", 1000, 500); - ctrackres->Divide(2, 1); - ctrackres->cd(1); - pptDResvspt->Draw(); - ctrackres->cd(2); - pptDResvseta->Draw(); - ctrackres->SaveAs("ctrackres.pdf"); -} diff --git a/codeHF/run_analysis.sh b/codeHF/run_analysis.sh new file mode 120000 index 00000000..dcb9d813 --- /dev/null +++ b/codeHF/run_analysis.sh @@ -0,0 +1 @@ +../exec/run_analysis.sh \ No newline at end of file diff --git a/codeHF/runtest.sh b/codeHF/runtest.sh deleted file mode 120000 index 09762e57..00000000 --- a/codeHF/runtest.sh +++ /dev/null @@ -1 +0,0 @@ -../exec/runtest.sh \ No newline at end of file diff --git a/codeHF/utils_plot.h b/codeHF/utils_plot.h deleted file mode 100644 index 94f98bf3..00000000 --- a/codeHF/utils_plot.h +++ /dev/null @@ -1,45 +0,0 @@ -// Plotting utilities - -void SetCanvas(TCanvas* can, int nPadsX, int nPadsY) -{ - can->Divide(nPadsX, nPadsY, 0.005, 0.005); -} - -void SetPad(TVirtualPad* pad, bool logScale) -{ - pad->SetBottomMargin(0.11); - pad->SetLeftMargin(0.1); - pad->SetTopMargin(0.08); - pad->SetRightMargin(0.08); - if (logScale) { - pad->SetLogy(); - } -} - -void SetHistogram(TH1* his, Float_t yMin, Float_t yMax, Float_t marginLow, Float_t marginHigh, bool& logScale) -{ - Float_t textsize = 0.05; - his->GetYaxis()->SetTitleSize(textsize); - his->GetXaxis()->SetTitleSize(textsize); - his->GetYaxis()->SetTitleOffset(1.0); - his->GetXaxis()->SetTitleOffset(1.0); - Float_t k = 1. - marginHigh - marginLow; - Float_t yRange; - if (logScale && yMin > 0 && yMax > 0) { - yRange = yMax / yMin; - his->GetYaxis()->SetRangeUser(yMin / std::pow(yRange, marginLow / k), yMax * std::pow(yRange, marginHigh / k)); - } else { - logScale = false; - yRange = yMax - yMin; - his->GetYaxis()->SetRangeUser(yMin - marginLow / k * yRange, yMax + marginHigh / k * yRange); - } -} - -void SetHistogramStyle(TH1* his, Int_t colour = 1, Int_t markerStyle = 1, Float_t markerSize = 1, Float_t lineWidth = 1) -{ - his->SetLineColor(colour); - his->SetLineWidth(lineWidth); - his->SetMarkerColor(colour); - his->SetMarkerStyle(markerStyle); - his->SetMarkerSize(markerSize); -} diff --git a/codeHF/versions_ref.txt b/codeHF/versions_ref.txt deleted file mode 100644 index 937d4a10..00000000 --- a/codeHF/versions_ref.txt +++ /dev/null @@ -1,5 +0,0 @@ -alidist: master 2021-09-08 11:06:29 +0200 315bc6d Fix O2PHYSICS_ROOT declaration (#3296) -AliPhysics: master 2021-09-08 16:49:46 +0200 66466c30f97f Merge pull request #18445 from rosarioturrisi/master -O2: dev 2021-09-08 19:06:13 +0200 e5739cc8ae Use MCTruthContainer in the CA tracker (#6971) -O2Physics: master 2021-09-08 18:22:02 +0200 8fd2775 PWGHF: Add Ξcc tree creator (#56) -Run 3 validation: master 2021-09-08 17:44:24 +0200 bf171ec Add Ξcc tree creator workflow (#288) diff --git a/codeHF/workflows.yml b/codeHF/workflows.yml index 4a9c5430..7402a41a 100644 --- a/codeHF/workflows.yml +++ b/codeHF/workflows.yml @@ -1,358 +1,666 @@ --- options: - global: "" - local: - - "-b" - - "--configuration json://$JSON" + global: # used once at the end of the command - "--aod-memory-rate-limit 2000000000" - "--shm-segment-size 16000000000" - - "--min-failure-level error" + - "--aod-parent-base-path-replacement \"PARENT_PATH_MASK\"" + - "--aod-parent-access-level 1" + - "--resources-monitoring 2" + - "--aod-file \"@list_o2.txt\"" + local: # used for every workflow + - "-b" + - "--configuration json://\"$JSON\"" + # - "--min-failure-level error" workflows: + # dummy workflow with the full list of options + o2-analysis-workflow: + executable: o2-analysis-workflow # workflow command, if different from the dictionary node name above + dependencies: [] # dictionary nodes that this workflow needs as direct dependencies (format: str, list) + requires_mc: no # yes/no whether the workflow can only run on MC or not + options: "--option" # command line options (format: str, list), see more detailed format below + # options: + # default: "" + # real: "" + # mc: "--doMC" + tables: [] # descriptions of output tables to be saved as trees (format: str, list), see more detailed format below + # tables: + # default: [] + # real: [] + # mc: [] # Skimming - o2-analysis-hf-track-index-skims-creator: &skim_creator - executable: o2-analysis-hf-track-index-skims-creator + o2-analysis-hf-track-index-skim-creator: &skim_creator + executable: o2-analysis-hf-track-index-skim-creator + dependencies: + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX + - o2-analysis-track-to-collision-associator + # - o2-analysis-centrality_runX + - o2-analysis-multiplicity-table_runX + # - o2-analysis-pid-tpc_runX + tables: [HF2PRONG/1, HF3PRONG/1, HFDSTAR, HFCASCADE/1, HFCASCLF2PRONG, HFCASCLF3PRONG, HFCUTSTATUS2P, HFCUTSTATUS3P, HFPVREFIT2PRONG, HFPVREFIT3PRONG, HFPVREFITTRACK, HFSELCOLLISION, HFSELTRACK] + + o2-analysis-hf-track-index-skim-creator_v0: + <<: *skim_creator dependencies: - - o2-analysis-trackextension - - o2-analysis-trackselection - tables: [HFSELCOLLISION, HFSELTRACK, HF2PRONG, HF3PRONG] + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX + - o2-analysis-track-to-collision-associator - o2-analysis-hf-track-index-skims-creator-v0: + o2-analysis-hf-track-index-skim-creator_casc-lf: <<: *skim_creator dependencies: - - o2-analysis-trackextension - - o2-analysis-trackselection - - o2-analysis-lf-lambdakzerobuilder - options: "--doCascades" - tables: [HFSELCOLLISION, HFSELTRACK, HF2PRONG, HF3PRONG, HFCASCADE] + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX + - o2-analysis-track-to-collision-associator # Candidate creators - o2-analysis-hf-candidate-creator-2prong: &cand_creator + o2-analysis-hf-candidate-creator-2prong: &cand_creator_2p + executable: o2-analysis-hf-candidate-creator-2prong dependencies: - - o2-analysis-hf-track-index-skims-creator + - o2-analysis-hf-track-index-skim-creator_skimX + - o2-analysis-track-dca_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX tables: - default: [HFCANDP2BASE, HFCANDP2EXT] - mc: [HFCANDP2MCREC, HFCANDP2MCGEN] + default: [HFCAND2PBASE, DYN/HFCAND2PEXT] + mc: [HFCAND2PMCREC, HFCAND2PMCGEN] - o2-analysis-hf-candidate-creator-3prong: - <<: *cand_creator + o2-analysis-hf-candidate-creator-2prong_derived: + <<: *cand_creator_2p + dependencies: + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX + + o2-analysis-hf-candidate-creator-3prong: &cand_creator_3p + <<: *cand_creator_2p + executable: o2-analysis-hf-candidate-creator-3prong tables: - default: [HFCANDP3BASE, HFCANDP3EXT] - mc: [HFCANDP3MCREC, HFCANDP3MCGEN] + default: [HFCAND3PBASE, DYN/HFCAND3PEXT] + mc: [HFCAND3PMCREC, HFCAND3PMCGEN] - o2-analysis-hf-candidate-creator-dstar: {} + o2-analysis-hf-candidate-creator-3prong_derived: + <<: *cand_creator_3p + dependencies: + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX - o2-analysis-hf-candidate-creator-cascade: - <<: *cand_creator + o2-analysis-hf-candidate-creator-dstar: &cand_creator_dstar + <<: *cand_creator_2p + executable: o2-analysis-hf-candidate-creator-dstar tables: - default: [HFCANDCASCBASE, HFCANDCASCEXT] - mc: [HFCANDCASCMCREC, HFCANDCASCMCGEN] + default: [HFDSTARCANDBASE, DYN/HFDSTAREXT, HFD0FROMDSTAR, DYN/HFD0FRMDSTREXT] + mc: [HFDSTARMCREC, HFDSTARMCGEN] - o2-analysis-hf-candidate-creator-x: - <<: *cand_creator + o2-analysis-hf-candidate-creator-dstar_derived: + <<: *cand_creator_dstar dependencies: - - o2-analysis-hf-jpsi-candidate-selector - tables: - default: [HFCANDXBASE, HFCANDXEXT] - mc: [HFCANDXMCREC, HFCANDXMCGEN] + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX - o2-analysis-hf-candidate-creator-xicc: - <<: *cand_creator - dependencies: o2-analysis-hf-xic-topkpi-candidate-selector + o2-analysis-hf-candidate-creator-cascade: &cand_creator_cascade + <<: *cand_creator_2p + executable: o2-analysis-hf-candidate-creator-cascade + dependencies: + - o2-analysis-hf-track-index-skim-creator_skimX + - o2-analysis-track-dca_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX tables: - default: [HFCANDXICCBASE, HFCANDXICCEXT] - mc: [HFCANDXICCMCREC, HFCANDXICCMCGEN] + default: [HFCANDCASCBASE, DYN/HFCANDCASCEXT] + mc: [HFCANDCASCMCREC, HFCANDCASCMCGEN] - o2-analysis-hf-candidate-creator-chic: - <<: *cand_creator + o2-analysis-hf-candidate-creator-cascade_derived: + <<: *cand_creator_cascade dependencies: - - o2-analysis-hf-jpsi-candidate-selector + - o2-analysis-track-dca_runX + - o2-analysis-trackselection_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + + o2-analysis-hf-candidate-creator-b0: + dependencies: o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi tables: - default: [HFCANDCHICBASE, HFCANDCHICEXT] - mc: [HFCANDCHICMCREC, HFCANDCHICMCGEN] + default: [HFCANDB0BASE, DYN/HFCANDB0EXT] + mc: [HFCANDB0MCREC, HFCANDB0MCGEN] o2-analysis-hf-candidate-creator-bplus: - <<: *cand_creator - dependencies: o2-analysis-hf-d0-candidate-selector + dependencies: o2-analysis-hf-candidate-selector-d0 tables: - default: [HFCANDBPLUSBASE, HFCANDBPLUSEXT] + default: [HFCANDBPLUSBASE, DYN/HFCANDBPLUSEXT] mc: [HFCANDBPMCREC, HFCANDBPMCGEN] - # Selectors + o2-analysis-hf-candidate-creator-lb: + dependencies: o2-analysis-hf-candidate-selector-lc + tables: + default: [HFCANDLB, DYN/HFCANDLBEXT] + mc: [HFCANDLBMCREC, HFCANDLBMCGEN] + + o2-analysis-hf-candidate-creator-xic0-omegac0: &cand_creator_xic0-omegac0 + <<: *cand_creator_2p + executable: o2-analysis-hf-candidate-creator-xic0-omegac0 + dependencies: + - o2-analysis-hf-track-index-skim-creator_skimX + - o2-analysis-track-dca_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: + default: [HFCANDTOXIPI, HFCANDTOOMEGAPI, HFCANDTOOMEGAK] + mc: [HFXICXIPIMCREC, HFOMCXIPIMCREC, HFTOOMEPIMCREC, HFTOOMEKMCREC, HFXICXIPIMCGEN, HFOMECXIPIMCGEN, HFTOOMEPIMCGEN, HFTOOMEKMCGEN] - o2-analysis-hf-d0-candidate-selector: &selector_2prong + o2-analysis-hf-candidate-creator-xic0-omegac0_derived: + <<: *cand_creator_xic0-omegac0 dependencies: - - o2-analysis-hf-candidate-creator-2prong - - o2-analysis-pid-tpc-full - - o2-analysis-pid-tof-full - tables: HFSELD0CAND + - o2-analysis-track-dca_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + + o2-analysis-hf-candidate-creator-xic-to-xi-pi-pi: &cand_creator_xic-to-xi-pi-pi + <<: *cand_creator_2p + executable: o2-analysis-hf-candidate-creator-xic-to-xi-pi-pi + dependencies: + - o2-analysis-hf-track-index-skim-creator_skimX + - o2-analysis-track-dca_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [] + + o2-analysis-hf-candidate-creator-xic-to-xi-pi-pi_derived: + <<: *cand_creator_xic-to-xi-pi-pi + dependencies: + - o2-analysis-track-dca_runX + - o2-analysis-event-selection-service_runX + - o2-analysis-hf-pid-creator + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX - o2-analysis-hf-jpsi-candidate-selector: &selector_jpsi - <<: *selector_2prong - executable: o2-analysis-hf-jpsi-candidate-selector - tables: HFSELJPSICAND + # Selectors - o2-analysis-hf-jpsi-candidate-selector-alice3: - <<: *selector_jpsi - options: --isAlice3 + o2-analysis-hf-candidate-selector-d0: &selector_2prong + dependencies: + - o2-analysis-hf-candidate-creator-2prong_derX + - o2-analysis-pid-tpc_runX + - o2-analysis-pid-tof_runX + - o2-analysis-hf-pid-creator + tables: HFSELD0 - o2-analysis-hf-dplus-topikpi-candidate-selector: &selector_3prong + o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi: &selector_3prong dependencies: - - o2-analysis-hf-candidate-creator-3prong - - o2-analysis-pid-tpc-full - - o2-analysis-pid-tof-full - - o2-analysis-pid-bayes - tables: HFSELDPLUSCAND + - o2-analysis-hf-candidate-creator-3prong_derX + - o2-analysis-pid-tpc_runX + - o2-analysis-pid-tof_runX + - o2-analysis-hf-pid-creator + tables: HFSELDPLUS - o2-analysis-hf-ds-tokkpi-candidate-selector: + o2-analysis-hf-candidate-selector-ds-to-k-k-pi: <<: *selector_3prong - tables: HFSELDSCAND + tables: HFSELDS - o2-analysis-hf-lc-candidate-selector: - <<: *selector_3prong - tables: HFSELLCCAND + o2-analysis-hf-candidate-selector-lb-to-lc-pi: + dependencies: o2-analysis-hf-candidate-creator-lb + tables: HFSELLB + + o2-analysis-hf-candidate-selector-lc: + dependencies: + - o2-analysis-hf-candidate-creator-3prong_derX + - o2-analysis-pid-tpc_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-bayes + - o2-analysis-hf-pid-creator + tables: HFSELLC - o2-analysis-hf-xic-topkpi-candidate-selector: + o2-analysis-hf-candidate-selector-xic-to-p-k-pi: <<: *selector_3prong - tables: HFSELXICCAND + tables: HFSELXIC - o2-analysis-hf-lc-tok0sp-candidate-selector: + o2-analysis-hf-candidate-selector-dstar-to-d0-pi: dependencies: - - o2-analysis-hf-candidate-creator-cascade - - o2-analysis-pid-tpc-full - - o2-analysis-pid-tof-full - tables: HFSELLCK0SPCAND + - o2-analysis-hf-candidate-creator-dstar_derX + - o2-analysis-pid-tpc_runX + - o2-analysis-pid-tof_runX + - o2-analysis-hf-pid-creator + tables: HFSELDSTAR - o2-analysis-hf-x-tojpsipipi-candidate-selector: - dependencies: o2-analysis-hf-candidate-creator-x - tables: HFSELXCAND - - o2-analysis-hf-xicc-topkpipi-candidate-selector: - dependencies: o2-analysis-hf-candidate-creator-xicc - tables: HFSELXICCCAND + o2-analysis-hf-candidate-selector-lc-to-k0s-p: + dependencies: + - o2-analysis-hf-candidate-creator-cascade_derX + - o2-analysis-pid-tpc_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-bayes + - o2-analysis-hf-pid-creator + tables: HFSELLCK0SP - o2-analysis-hf-chic-tojpsigamma-candidate-selector: - dependencies: o2-analysis-hf-candidate-creator-chic - tables: HFSELCHICCAND + o2-analysis-hf-candidate-selector-b0-to-d-pi: + dependencies: o2-analysis-hf-candidate-creator-b0 + tables: HFSELB0 - o2-analysis-hf-bplus-tod0pi-candidate-selector: + o2-analysis-hf-candidate-selector-bplus-to-d0-pi: dependencies: o2-analysis-hf-candidate-creator-bplus - tables: HFSELBPLUSCAND + tables: HFSELBPLUS + + o2-analysis-hf-candidate-selector-to-xi-pi: + dependencies: + - o2-analysis-hf-candidate-creator-xic0-omegac0_derX + - o2-analysis-pid-tof_runX + - o2-analysis-multiplicity-table_runX + tables: HFSELTOXIPI + + o2-analysis-hf-candidate-selector-xic-to-xi-pi-pi: + dependencies: + - o2-analysis-hf-candidate-creator-xic-to-xi-pi-pi_derX + - o2-analysis-pid-tof_runX + - o2-analysis-multiplicity-table_runX + - o2-analysis-pid-tpc_runX # Analysis tasks o2-analysis-hf-task-d0: - dependencies: o2-analysis-hf-d0-candidate-selector - - o2-analysis-hf-task-jpsi: - options: - mc: "--doMC" - dependencies: - - o2-analysis-hf-jpsi-candidate-selector + dependencies: o2-analysis-hf-candidate-selector-d0 o2-analysis-hf-task-dplus: - dependencies: o2-analysis-hf-dplus-topikpi-candidate-selector + dependencies: + - o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi + - o2-analysis-centrality_runX o2-analysis-hf-task-ds: - dependencies: o2-analysis-hf-ds-tokkpi-candidate-selector + dependencies: o2-analysis-hf-candidate-selector-ds-to-k-k-pi + + o2-analysis-hf-task-dstar-to-d0-pi: + dependencies: + - o2-analysis-hf-candidate-selector-dstar-to-d0-pi + - o2-analysis-centrality_runX o2-analysis-hf-task-lc: - dependencies: o2-analysis-hf-lc-candidate-selector + dependencies: o2-analysis-hf-candidate-selector-lc + + o2-analysis-hf-task-lb: + dependencies: o2-analysis-hf-candidate-selector-lb-to-lc-pi o2-analysis-hf-task-xic: - dependencies: o2-analysis-hf-xic-topkpi-candidate-selector + dependencies: o2-analysis-hf-candidate-selector-xic-to-p-k-pi - o2-analysis-hf-task-bplus: - dependencies: o2-analysis-hf-bplus-tod0pi-candidate-selector + o2-analysis-hf-task-xic-to-xi-pi-pi: + dependencies: o2-analysis-hf-candidate-selector-xic-to-xi-pi-pi - o2-analysis-hf-task-x: - options: - mc: "--doMC" - dependencies: o2-analysis-hf-x-tojpsipipi-candidate-selector + o2-analysis-hf-task-b0: + dependencies: o2-analysis-hf-candidate-selector-b0-to-d-pi - o2-analysis-hf-task-lc-tok0sp: - dependencies: o2-analysis-hf-lc-tok0sp-candidate-selector + o2-analysis-hf-task-bplus: + dependencies: o2-analysis-hf-candidate-selector-bplus-to-d0-pi - o2-analysis-hf-task-xicc: - options: - mc: "--doMC" - dependencies: o2-analysis-hf-xicc-topkpipi-candidate-selector + o2-analysis-hf-task-lc-to-k0s-p: + dependencies: o2-analysis-hf-candidate-selector-lc-to-k0s-p - o2-analysis-hf-task-chic: - options: - mc: "--doMC" - dependencies: o2-analysis-hf-chic-tojpsigamma-candidate-selector + # Tree creators - o2-analysis-hf-task-correlation-ddbar: &taskddbar - executable: o2-analysis-hf-task-correlation-ddbar + o2-analysis-hf-tree-creator-d0-to-k-pi: + dependencies: o2-analysis-hf-candidate-selector-d0 + tables: [HFCANDD0LITE, HFCANDD0FULL, HFCANDD0FULLEV, HFCANDD0FULLP] - o2-analysis-hf-task-correlation-ddbar-mc-rec: - <<: *taskddbar - requires_mc: yes - options: "--doMCRec" + o2-analysis-hf-tree-creator-lc-to-p-k-pi: + dependencies: [o2-analysis-hf-candidate-selector-lc, o2-analysis-centrality_runX] + tables: [HFCANDLCLITE, HFCOLLIDLCLITE, HFCANDLCFULL, HFCANDLCFULLEV, HFCANDLCFULLP] - o2-analysis-hf-task-correlation-ddbar-mc-gen: - <<: *taskddbar - requires_mc: yes - options: "--doMCGen" + o2-analysis-hf-tree-creator-lc-to-k0s-p: + dependencies: o2-analysis-hf-candidate-selector-lc-to-k0s-p + tables: [HFCANDCASCLITE, HFCANDCASCFULL, HFCANDCASCFULLE, HFCANDCASCFULLP] - o2-analysis-hf-task-flow: - dependencies: - - o2-analysis-hf-d0-candidate-selector - - # Tree creators - - o2-analysis-hf-tree-creator-d0-tokpi: + o2-analysis-hf-tree-creator-bplus-to-d0-pi: requires_mc: yes - dependencies: o2-analysis-hf-d0-candidate-selector - tables: [HFCANDP2Full, HFCANDP2FullE, HFCANDP2FullP] + dependencies: o2-analysis-hf-candidate-selector-bplus-to-d0-pi + tables: [HFCANDBPFULL, HFCANDBPFULLEV, HFCANDBPFULLP, HFCANDBPLITE] - o2-analysis-hf-tree-creator-lc-topkpi: + o2-analysis-hf-tree-creator-lb-to-lc-pi: requires_mc: yes - dependencies: o2-analysis-hf-lc-candidate-selector - tables: [HFCANDP3Full, HFCANDP3FullE, HFCANDP3FullP] + dependencies: o2-analysis-hf-candidate-selector-lb-to-lc-pi + tables: [HFCANDLBFULL] - o2-analysis-hf-tree-creator-bplus-tod0pi: - requires_mc: yes - dependencies: o2-analysis-hf-bplus-candidate-selector - tables: [HFCANDBPFull, HFCANDBPFullE, HFCANDBPFullP] + o2-analysis-hf-tree-creator-to-xi-pi: + dependencies: o2-analysis-hf-candidate-selector-to-xi-pi + tables: [HFTOXIPIEV, HFTOXIPIFULL, HFTOXIPILITE] - o2-analysis-hf-tree-creator-x-tojpsipipi: - requires_mc: yes - dependencies: o2-analysis-hf-x-tojpsipipi-candidate-selector - tables: [HFCANDXFull, HFCANDXFullE, HFCANDXFullP] + o2-analysis-hf-tree-creator-xic-to-xi-pi-pi: + dependencies: o2-analysis-hf-candidate-selector-xic-to-xi-pi-pi - o2-analysis-hf-tree-creator-xicc-topkpipi: - requires_mc: yes - dependencies: o2-analysis-hf-xicc-topkpipi-candidate-selector - tables: [HFCANDXiccFull, HFCANDXiccFullE, HFCANDXiccFullP] + # Derived-data creators - o2-analysis-hf-tree-creator-chic-tojpsigamma: - requires_mc: yes - dependencies: o2-analysis-hf-chic-tojpsigamma-candidate-selector - tables: [HFCANDChicFull, HFCANDChicFullE, HFCANDChicFullP] + o2-analysis-hf-derived-data-creator-d0-to-k-pi: + dependencies: + - o2-analysis-hf-candidate-selector-d0 + - o2-analysis-hf-candidate-creator-2prong_derX + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + # - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFD0COLLBASE, HFD0COLLID, HFD0MCCOLLBASE, HFD0MCCOLLID, HFD0MCRCOLLID, HFD0BASE, HFD0PAR, HFD0PARE, HFD0SEL, HFD0ML, HFD0ID, HFD0MC, HFD0PBASE, HFD0PID] + + o2-analysis-hf-derived-data-creator-lc-to-p-k-pi: + dependencies: + - o2-analysis-hf-candidate-selector-lc + - o2-analysis-hf-candidate-creator-3prong_derX + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFLCCOLLBASE, HFLCCOLLID, HFLCMCCOLLBASE, HFLCMCCOLLID, HFLCMCRCOLLID, HFLCBASE, HFLCPAR, HFLCPARE, HFLCSEL, HFLCML, HFLCID, HFLCMC, HFLCPBASE, HFLCPID] + + o2-analysis-hf-derived-data-creator-lc-to-k0s-p: + dependencies: + - o2-analysis-hf-candidate-selector-lc-to-k0s-p + - o2-analysis-hf-candidate-creator-cascade + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFLCCCOLLBASE, HFLCCCOLLID, HFLCCMCCOLLBASE, HFLCCMCCOLLID, HFLCCMCRCOLLID, HFLCCBASE, HFLCTOK0SPPAR, HFLCTOK0SPPARE, HFLCCSEL, HFLCTOK0SPML, HFLCCID, HFLCTOK0SPMC, HFLCCPBASE, HFLCCPID] + + o2-analysis-hf-derived-data-creator-dplus-to-pi-k-pi: + dependencies: + - o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi + - o2-analysis-hf-candidate-creator-3prong_derX + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFDPCOLLBASE, HFDPCOLLID, HFDPMCCOLLBASE, HFDPMCCOLLID, HFDPMCRCOLLID, HFDPBASE, HFDPPAR, HFDPPARE, HFDPSEL, HFDPML, HFDPID, HFDPMC, HFDPPBASE, HFDPPID] + + o2-analysis-hf-derived-data-creator-ds-to-k-k-pi: + dependencies: + - o2-analysis-hf-candidate-selector-ds-to-k-k-pi + - o2-analysis-hf-candidate-creator-3prong_derX + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFDSCOLLBASE, HFDSCOLLID, HFDSMCCOLLBASE, HFDSMCCOLLID, HFDSMCRCOLLID, HFDSBASE, HFDSPAR, HFDSPARE, HFDSSEL, HFDSML, HFDSID, HFDSMC, HFDSPBASE, HFDSPID] + + o2-analysis-hf-derived-data-creator-b0-to-d-pi: + dependencies: + - o2-analysis-hf-candidate-selector-b0-to-d-pi + - o2-analysis-hf-candidate-creator-b0 + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFB0COLLBASE, HFB0COLLID, HFB0MCCOLLBASE, HFB0MCCOLLID, HFB0MCRCOLLID, HFB0BASE, HFB0PAR, HFB0PARD0, HFB0PARE, HFB0ML, HFB0MLD0, HFB0ID, HFB0MC, HFB0PBASE, HFB0PID] + + o2-analysis-hf-derived-data-creator-bplus-to-d0-pi: + dependencies: + - o2-analysis-hf-candidate-selector-bplus-to-d0-pi + - o2-analysis-hf-candidate-creator-bplus + - o2-analysis-hf-pid-creator + - o2-analysis-centrality_runX + - o2-analysis-lf-mc-centrality + - o2-analysis-multiplicity-table_runX + - o2-analysis-track-dca_runX + - o2-analysis-pid-tof_runX + - o2-analysis-pid-tpc_runX + tables: [HFBPCOLLBASE, HFBPCOLLID, HFBPMCCOLLBASE, HFBPMCCOLLID, HFBPMCRCOLLID, HFBPBASE, HFBPPAR, HFBPPARD0, HFBPPARE, HFBPML, HFBPMLD0, HFBPID, HFBPMC, HFBPPBASE, HFBPPID] # D meson correlations - o2-analysis-hf-correlator-d0d0bar: &d0d0barcorr - executable: o2-analysis-hf-correlator-d0d0bar - dependencies: [o2-analysis-hf-d0-candidate-selector, o2-analysis-alice3-centrality] + o2-analysis-hf-correlator-d0-d0bar: &d0d0barcorr + executable: o2-analysis-hf-correlator-d0-d0bar + dependencies: o2-analysis-hf-candidate-selector-d0 tables: [DDBARPAIR, DDBARRECOINFO] - o2-analysis-hf-correlator-d0d0bar-mc-rec: + o2-analysis-hf-correlator-d0-d0bar_mc-rec: <<: *d0d0barcorr options: "--doMCRec" - o2-analysis-hf-correlator-d0d0bar-mc-gen: + o2-analysis-hf-correlator-d0-d0bar_mc-gen: <<: *d0d0barcorr options: "--doMCGen" tables: DDBARPAIR - o2-analysis-hf-correlator-dplusdminus: &dplusdminus - executable: o2-analysis-hf-correlator-dplusdminus - dependencies: [o2-analysis-hf-dplus-topikpi-candidate-selector, o2-analysis-alice3-centrality] + o2-analysis-hf-correlator-dplus-dminus: &dplusdminus + executable: o2-analysis-hf-correlator-dplus-dminus + dependencies: o2-analysis-hf-candidate-selector-dplus-to-pi-k-pi tables: [DDBARPAIR, DDBARRECOINFO] - o2-analysis-hf-correlator-dplusdminus-mc-rec: + o2-analysis-hf-correlator-dplus-dminus_mc-rec: <<: *dplusdminus requires_mc: yes - options: "--doMCRec" - o2-analysis-hf-correlator-dplusdminus-mc-gen: + o2-analysis-hf-correlator-dplus-dminus_mc-gen: <<: *dplusdminus requires_mc: yes - options: "--doMCGen" tables: DDBARPAIR + o2-analysis-hf-correlator-d0-hadrons: + 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 + + # HF helpers + + o2-analysis-hf-pid-creator: + dependencies: [o2-analysis-pid-tpc_runX, o2-analysis-pid-tof_runX] + + # Jets + + o2-analysis-je-jet-deriveddata-producer: {} + + o2-analysis-je-estimator-rho: {} + + o2-analysis-je-jet-finder-d0-data-charged: &jethf + dependencies: + - o2-analysis-hf-derived-data-creator-d0-to-k-pi + - o2-analysis-je-jet-deriveddata-producer + 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-d0-qa_data: + executable: o2-analysis-je-jet-finder-d0-qa + dependencies: o2-analysis-je-jet-finder-d0-data-charged + + o2-analysis-je-jet-finder-d0-qa_mc: + executable: o2-analysis-je-jet-finder-d0-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-mc-d0-ch: + 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-d0_data: + executable: o2-analysis-je-jet-substructure-d0 + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-data-charged] + tables: D0SS + + o2-analysis-je-jet-substructure-d0_mc: + executable: o2-analysis-je-jet-substructure-d0 + dependencies: [o2-analysis-hf-candidate-selector-d0, o2-analysis-je-jet-finder-d0-mcd-charged, o2-analysis-je-jet-finder-d0-mcp-charged] + requires_mc: yes + tables: [D0MCDSS, D0MCPSS] + + o2-analysis-je-jet-substructure-d0-output_data: + executable: o2-analysis-je-jet-substructure-d0-output + dependencies: [o2-analysis-je-jet-substructure-d0_data, o2-analysis-je-estimator-rho] + tables: [D0O, D0SSO] + + o2-analysis-je-jet-substructure-d0-output_mc: + executable: o2-analysis-je-jet-substructure-d0-output + dependencies: o2-analysis-je-jet-substructure-d0_mc + requires_mc: yes + tables: [D0MCDO, D0MCDSSO, D0MCPO, D0MCPSSO] + # QA o2-analysis-qa-efficiency: requires_mc: yes - dependencies: [o2-analysis-event-selection, o2-analysis-trackselection] + dependencies: [o2-analysis-event-selection-service_runX, o2-analysis-trackselection_runX] o2-analysis-qa-event-track: requires_mc: yes - dependencies: [o2-analysis-event-selection, o2-analysis-trackselection, o2-analysis-pid-tof-base] - - o2-analysis-hf-qa-rejection: - requires_mc: yes - dependencies: - - o2-analysis-hf-track-index-skims-creator - - o2-analysis-pid-tpc-full - - o2-analysis-pid-tof-full + dependencies: [o2-analysis-event-selection-service_runX, o2-analysis-trackselection_runX, o2-analysis-pid-tof-base] o2-analysis-pid-tof-qa-mc: requires_mc: yes - dependencies: - - o2-analysis-pid-tof-full - - o2-analysis-pid-tof-beta + dependencies: [o2-analysis-pid-tof_runX, o2-analysis-pid-tof-beta] - o2-analysis-hf-mc-validation: + o2-analysis-hf-task-mc-validation: requires_mc: yes - dependencies: [o2-analysis-hf-candidate-creator-2prong, o2-analysis-hf-candidate-creator-3prong] + dependencies: [o2-analysis-hf-candidate-creator-2prong_derX, o2-analysis-hf-candidate-creator-3prong_derX] # Helper tasks + o2-analysis-track-to-collision-associator: + dependencies: [o2-analysis-track-dca_runX, o2-analysis-trackselection_runX] + tables: HFTRACKASSOC + o2-analysis-timestamp: {} - o2-analysis-trackselection: - dependencies: - - o2-analysis-trackextension + o2-analysis-trackselection_run2: + executable: o2-analysis-trackselection + dependencies: o2-analysis-track-dca_run2 - o2-analysis-trackselection-alice3: - executable: o2-analysis-alice3-trackselection + o2-analysis-trackselection_run3: + executable: o2-analysis-trackselection + dependencies: o2-analysis-track-dca_run3 - o2-analysis-trackextension: - dependencies: o2-analysis-timestamp + o2-analysis-track-dca_run2: + executable: o2-analysis-trackextension + dependencies: o2-analysis-event-selection-service_run2 - o2-analysis-trackextension-alice3: - executable: o2-analysis-alice3-trackextension + o2-analysis-track-dca_run3: + executable: o2-analysis-propagationservice + dependencies: o2-analysis-event-selection-service_run3 - o2-analysis-alice3-centrality: - dependencies: o2-analysis-trackextension-alice3 + o2-analysis-centrality_run2: + executable: o2-analysis-centrality-table + dependencies: [o2-analysis-event-selection-service_run2, o2-analysis-multiplicity-table_run2] - o2-analysis-event-selection: - dependencies: - - o2-analysis-timestamp + o2-analysis-centrality_run3: + executable: o2-analysis-centrality-table - o2-analysis-multiplicity-table: - dependencies: - - o2-analysis-event-selection # only Run3 + o2-analysis-lf-mc-centrality: {} - o2-analysis-centrality-table: {} + o2-analysis-event-selection-service_run2: + executable: o2-analysis-event-selection-service-run2 - o2-analysis-pid-tpc-full: - dependencies: - - o2-analysis-multiplicity-table - - o2-analysis-timestamp + o2-analysis-event-selection-service_run3: + executable: o2-analysis-event-selection-service + + o2-analysis-multiplicity-table_run2: + executable: o2-analysis-multiplicity-table + + o2-analysis-multiplicity-table_run3: + executable: o2-analysis-multiplicity-table + dependencies: o2-analysis-event-selection-service_run3 + + o2-analysis-ft0-corrected-table: {} - o2-analysis-pid-tof-base: {} + # PID - o2-analysis-pid-tof-full: - dependencies: o2-analysis-pid-tof-base + o2-analysis-pid-tpc_run2: + executable: o2-analysis-pid-tpc-service-run2 + dependencies: [o2-analysis-event-selection-service_run2] - o2-analysis-pid-tof-full-alice3: - executable: o2-analysis-alice3-pid-tof + o2-analysis-pid-tpc_run3: + executable: o2-analysis-pid-tpc-service + dependencies: [o2-analysis-event-selection-service_run3] + + o2-analysis-pid-tof_run2: + executable: o2-analysis-pid-tof-merge + dependencies: [o2-analysis-event-selection-service_run2] + + o2-analysis-pid-tof_run3: + executable: o2-analysis-pid-tof-merge + dependencies: [o2-analysis-event-selection-service_run3, o2-analysis-ft0-corrected-table] o2-analysis-pid-bayes: - dependencies: - - o2-analysis-pid-tof-full - - o2-analysis-pid-tpc-full + dependencies: [o2-analysis-pid-tof_runX, o2-analysis-pid-tpc_runX, o2-analysis-multiplicity-table_runX, o2-analysis-track-dca_runX] o2-analysis-pid-tof-beta: {} + # Converters + o2-analysis-mc-converter: {} o2-analysis-fdd-converter: {} - o2-analysis-track-propagation: {} + o2-analysis-collision-converter: {} - # LF + o2-analysis-mccollision-converter: {} - o2-analysis-lf-lambdakzerobuilder: - dependencies: - - o2-analysis-timestamp - - o2-analysis-trackextension + o2-analysis-zdc-converter: {} + + o2-analysis-bc-converter: {} + + o2-analysis-run2bcinfos-converter: {} + + o2-analysis-tracks-extra-converter: {} + + o2-analysis-tracks-extra-v002-converter: {} + + o2-analysis-v0converter: {} + + o2-analysis-mft-tracks-converter: {} diff --git a/codeHF/workflows_run5.yml b/codeHF/workflows_run5.yml new file mode 100644 index 00000000..3c501c7a --- /dev/null +++ b/codeHF/workflows_run5.yml @@ -0,0 +1,114 @@ +--- +workflows: + # Candidate creators + + o2-analysis-hf-candidate-creator-x: + dependencies: o2-analysis-hf-candidate-selector-jpsi_runX + tables: + default: [HFCANDXBASE, DYN/HFCANDXEXT] + mc: [HFCANDXMCREC, HFCANDXMCGEN] + + o2-analysis-hf-candidate-creator-chic: + dependencies: o2-analysis-hf-candidate-selector-jpsi_runX + tables: + default: [HFCANDCHICBASE, DYN/HFCANDCHICEXT] + mc: [HFCANDCHICMCREC, HFCANDCHICMCGEN] + + o2-analysis-hf-candidate-creator-xicc: + dependencies: o2-analysis-hf-candidate-selector-xic-to-p-k-pi + requires_mc: yes + options: + mc: "--doMC" + tables: + default: [HFCANDXICCBASE, DYN/HFCANDXICCEXT] + mc: [HFCANDXICCMCREC, HFCANDXICCMCGEN] + + # Selectors + + o2-analysis-hf-candidate-selector-jpsi_run3: &selector_jpsi + # <<: *selector_2prong + executable: o2-analysis-hf-candidate-selector-jpsi + tables: HFSELJPSI + + o2-analysis-hf-candidate-selector-jpsi_run2: + <<: *selector_jpsi + + o2-analysis-hf-candidate-selector-jpsi_run5: + <<: *selector_jpsi + options: --isAlice3 + + o2-analysis-hf-candidate-selector-x-to-jpsi-pi-pi: + dependencies: o2-analysis-hf-candidate-creator-x + tables: HFSELX + + o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma: + dependencies: o2-analysis-hf-candidate-creator-chic + tables: HFSELCHIC + + o2-analysis-hf-candidate-selector-xicc-to-p-k-pi-pi: + dependencies: o2-analysis-hf-candidate-creator-xicc + requires_mc: yes + tables: HFSELXICC + + # Analysis tasks + + o2-analysis-hf-task-jpsi: + options: + mc: "--doMC" + dependencies: o2-analysis-hf-candidate-selector-jpsi_runX + + o2-analysis-hf-task-x: + options: + mc: "--doMC" + dependencies: o2-analysis-hf-candidate-selector-x-to-jpsi-pi-pi + + o2-analysis-hf-task-chic: + options: + mc: "--doMC" + dependencies: o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma + + o2-analysis-hf-task-xicc: + requires_mc: yes + options: + mc: "--doMC" + dependencies: o2-analysis-hf-candidate-selector-xicc-to-p-k-pi-pi + + # Tree creators + + o2-analysis-hf-tree-creator-x-to-jpsi-pi-pi: + requires_mc: yes + dependencies: o2-analysis-hf-candidate-selector-x-to-jpsi-pi-pi + tables: [HFCANDXFULL, HFCANDXFULLEV, HFCANDXFULLP] + + o2-analysis-hf-tree-creator-chic-to-jpsi-gamma: + requires_mc: yes + dependencies: o2-analysis-hf-candidate-selector-chic-to-jpsi-gamma + tables: [HFCANDCHICFULL, HFCANDCHICFULLE, HFCANDCHICFULLP] + + o2-analysis-hf-tree-creator-xicc-to-p-k-pi-pi: + requires_mc: yes + dependencies: o2-analysis-hf-candidate-selector-xicc-to-p-k-pi-pi + tables: [HFCANDXICCFULL, HFCANDXICCFULLE, HFCANDXICCFULLP] + + # QA + + o2-analysis-hf-task-qa-pid-rejection: + requires_mc: yes + dependencies: [o2-analysis-hf-track-index-skim-creator_skimX, o2-analysis-pid-tpc_runX, o2-analysis-pid-tof_runX] + + # Helper tasks + + o2-analysis-trackselection_run5: + executable: o2-analysis-alice3-trackselection + + o2-analysis-track-dca_run5: + executable: o2-analysis-alice3-trackextension + + o2-analysis-centrality_run5: + executable: o2-analysis-alice3-centrality + dependencies: o2-analysis-track-dca_run5 + + # PID + + o2-analysis-pid-tof_run5: + executable: o2-analysis-alice3-pid-tof diff --git a/codeJE/Compare.C b/codeJE/Compare.C new file mode 100644 index 00000000..6084c7c1 --- /dev/null +++ b/codeJE/Compare.C @@ -0,0 +1,43 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// Comparison of AliPhysics and O2 histograms + +#include "../exec/utilitiesValidation.h" + +Int_t Compare(TString pathFileO2 = "AnalysisResults_O2.root", TString pathFileAli = "AnalysisResults_ALI.root", TString options = "", bool doRatio = false) +{ + TString pathListAli = "ChJetSpectraAliAnalysisTaskEmcalJetValidation/AliAnalysisTaskEmcalJetValidation"; + + // Histogram specification: axis label, AliPhysics name, O2Physics path/name, rebin, log scale histogram, log scale ratio, projection axis + + VecSpecHis vecHisEvents; + AddHistogram(vecHisEvents, "#it{z}_{prim. vtx.} (cm)", "collisionVtxZ", "jet-validation-track-collision-qa/controlCollisionVtxZ", 1, 0, 0); + + VecSpecHis vecHisJets; + AddHistogram(vecHisJets, "#it{p}_{T, ch jet} (GeV/#it{c})", "jetPt", "jet-validation-track-collision-qa/jetPt", 1, 1, 0); + AddHistogram(vecHisJets, "#it{#varphi}_{jet}", "jetPhi", "jet-validation-track-collision-qa/jetPhi", 1, 0, 0); + AddHistogram(vecHisJets, "#it{#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, "#it{#varphi}_{track}", "jetTrackPhi", "jet-validation-track-collision-qa/selectedTrackPhi", 1, 0, 0); + AddHistogram(vecHisJets, "#it{#eta}_{track}", "jetTrackEta", "jet-validation-track-collision-qa/selectedTrackEta", 1, 0, 0); + + // vector of specifications of vectors: name, VecSpecHis, pads X, pads Y + VecSpecVecSpec vecSpecVecSpec; + + // Add vector specifications in the vector. + if (options.Contains(" events ")) + vecSpecVecSpec.push_back(std::make_tuple("events", vecHisEvents, 1, 1)); + if (options.Contains(" jets ")) + vecSpecVecSpec.push_back(std::make_tuple("jets", vecHisJets, 3, 2)); + + return MakePlots(vecSpecVecSpec, pathFileO2, pathFileAli, pathListAli, doRatio); +} diff --git a/codeJE/RunJetTaskLocal.C b/codeJE/RunJetTaskLocal.C new file mode 100644 index 00000000..fe1e5588 --- /dev/null +++ b/codeJE/RunJetTaskLocal.C @@ -0,0 +1,82 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// Macro to run the JE AliPhysics task that produces validation histograms + +#include "../exec/utilitiesAli.h" + +#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 + +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) { + Fatal("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); + + if (isMC) { + AliMCEventHandler* 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); +}; diff --git a/codeJE/clean.sh b/codeJE/clean.sh new file mode 100755 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..4796dd34 --- /dev/null +++ b/codeJE/config_input.sh @@ -0,0 +1,150 @@ +#!/bin/bash +# shellcheck disable=SC2034 # Ignore unused parameters. + +# Input specification for run_analysis.sh +# (Modifies input parameters.) + +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.) + +# Number of input files per job. (Will be automatically optimised if set to 0.) +NFILESPERJOB_CONVERT=0 # Conversion +NFILESPERJOB_ALI=0 # AliPhysics +NFILESPERJOB_O2=1 # O2 + +# Maximum number of simultaneously running O2 jobs. (Adjust it based on available memory.) +NJOBSPARALLEL_O2=$(python3 -c "print(min(10, round($(nproc) / 2)))") + +# Default settings: +# INPUT_LABEL="nothing" # Input description +# INPUT_DIR="$PWD" # Input directory +# INPUT_FILES="AO2D.root" # Input file pattern +# INPUT_SYS="pp" # Collision system ("pp", "PbPb") +# INPUT_RUN=3 # LHC Run (2, 3, 5) +# INPUT_IS_O2=1 # Input files are in O2 format. +# INPUT_IS_MC=0 # Input files are MC data. +# INPUT_PARENT_MASK="" # Path replacement mask for the input directory of parent files in case of linked derived O2 input. Set to ";" if no replacement needed. Syntax: "alien:///path/in/alien;/local/path" +# INPUT_TASK_CONFIG="" # Input-specific task configuration (e.g. enabling converters), overriding the task configuration in CONFIG_TASKS. String of space-separated commands. +# JSON="dpl-config.json" # O2 device configuration + +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" + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + ;; + 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_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + 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_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + 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_FILES="AliESDs.root" + INPUT_SYS="PbPb" + INPUT_RUN=2 + INPUT_IS_O2=0 + INPUT_TASK_CONFIG="DOO2_CONV_BC=1" + ;; + 5) + INPUT_LABEL="Run 2, Pb-Pb 5.02 TeV LHC15o, MC LHC15k1a3" + INPUT_DIR="$INPUT_BASE/Run2/PbPb_5.02TeV/sim/LHC15k1a3" + INPUT_FILES="AliESDs.root" + INPUT_SYS="PbPb" + INPUT_RUN=2 + INPUT_IS_O2=0 + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_BC=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_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + INPUT_IS_MC=1 + ;; + 7) + INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass4, real" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass4_minBias_small" + INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1 DOO2_CONV_MFT=1" + ;; + 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_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1" + ;; + 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_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1" + ;; + 10) + INPUT_LABEL="Run 2, p-p 13 TeV LHC18f, MC LHC20f4a (ESD)" + INPUT_DIR="$INPUT_BASE/Run2/pp_13TeV/sim/LHC20f4a" + INPUT_FILES="AliESDs.root" + INPUT_RUN=2 + INPUT_IS_O2=0 + 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_RUN=2 + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_BCINFO=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=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_RUN=2 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_BCINFO=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_COLL=1 DOO2_CONV_V0=1" + ;; + 13) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC22b1b, D2H enriched" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC22b1b" + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_ZDC=1 DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1" + ;; + 14) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC23f4b2, general purpose" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC23f4b2" + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_BC=1 DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1" + ;; + 15) + INPUT_LABEL="Run 3, Pb-Pb 5.36 TeV LHC23zzi_pass2" + INPUT_DIR="$INPUT_BASE/Run3/PbPb_5.36TeV/real/LHC23zzi" + INPUT_SYS="PbPb" + INPUT_TASK_CONFIG="DOO2_CONV_TRKEX_1_2=1" + ;; + 16) + INPUT_LABEL="Run 3, p-p 13.6 TeV, MC LHC24d3, anchored" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/sim/LHC24d3" + INPUT_IS_MC=1 + INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_TRKEX_1_2=1" + ;; + 17) + INPUT_LABEL="Run 3, p-p 13.6 TeV, LHC22o_pass4_minBias_small" + INPUT_DIR="$INPUT_BASE/Run3/pp_13.6TeV/real/LHC22o_pass4_minBias_small" + INPUT_TASK_CONFIG="DOO2_CONV_MCCOLL=1 DOO2_CONV_BC=1 DOO2_CONV_TRKEX_0_2=1 DOO2_CONV_V0=1" + ;; + esac diff --git a/codeJE/config_tasks.sh b/codeJE/config_tasks.sh new file mode 100644 index 00000000..d0464660 --- /dev/null +++ b/codeJE/config_tasks.sh @@ -0,0 +1,219 @@ +#!/bin/bash +# shellcheck disable=SC2034 # Ignore unused parameters. + +# Configuration of tasks for run_analysis.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. + +#################################################################################################### + +# Here you can select the AliPhysics and O2Physics Git branches to load. (You need to have them built with aliBuild.) +# BRANCH_ALI="master" +# ENV_ALI="alienv setenv AliPhysics/latest-${BRANCH_ALI}-o2 -c" +# BRANCH_O2="master" +# ENV_O2="alienv setenv O2Physics/latest-${BRANCH_O2}-o2 -c" + +# 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; } + +DATABASE_O2="workflows.yml" # Workflow specification database +MAKE_GRAPH=0 # Make topology graph. +MAKE_PERF_STATS=0 # Produce performance profiling stats. + +# Activation of O2 workflows +# Table producers +DOO2_JET_DERIVED=0 # je-jet-deriveddata-producer +DOO2_JET_FINDER=0 # je-jet-finder-data-charged +# Analysis tasks +# TODO: Add analysis tasks +# QA +DOO2_QA_EVTRK=0 # qa-event-track +DOO2_JET_VALID=1 # je-jet-validation-qa +# Converters (Consider setting these per input case via INPUT_TASK_CONFIG.) +DOO2_CONV_MC=0 # mc-converter +DOO2_CONV_FDD=0 # fdd-converter +DOO2_CONV_COLL=0 # collision-converter +DOO2_CONV_ZDC=0 # zdc-converter +DOO2_CONV_BC=0 # bc-converter +DOO2_CONV_TRKEX=0 # tracks-extra-converter +DOO2_CONV_V0=0 # v0converter + +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. + +#################################################################################################### + +# 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" + + # Derived AO2D input + if [ "$INPUT_PARENT_MASK" ]; then + ReplaceString "PARENT_PATH_MASK" "$INPUT_PARENT_MASK" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # 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." + + # 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 + + # Suffix to distinguish the workflows that run on derived data with parent access + SUFFIX_DER_MASK="_derX" # suffix mask to be replaced in the workflow names + [ "$INPUT_PARENT_MASK" ] && SUFFIX_DER="_derived" || SUFFIX_DER="" # the actual suffix to be used instead of the mask + + WORKFLOWS="" + # 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-data-charged" + # Analysis tasks + # TODO: Add analysis tasks + # QA + [ $DOO2_QA_EVTRK -eq 1 ] && WORKFLOWS+=" o2-analysis-qa-event-track" + [ $DOO2_JET_VALID -eq 1 ] && WORKFLOWS+=" o2-analysis-je-jet-validation-qa" + # 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" + [ $DOO2_CONV_V0 -eq 1 ] && WORKFLOWS+=" o2-analysis-v0converter" + + # 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_PERF_STATS -eq 1 ] && OPT_MAKECMD+=" -p" + + # 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." + ReplaceString "$SUFFIX_DER_MASK" "$SUFFIX_DER" "$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_JET_VALID -eq 1 ] && OPT_COMPARE+=" jets " + [ $DOO2_JET_VALID -eq 1 ] && OPT_COMPARE+=" events " + [ "$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..ef43a1d3 --- /dev/null +++ b/codeJE/dpl-config.json @@ -0,0 +1,228 @@ +{ + "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-private": "@list_o2.txt", + "aod-file": "@list_o2.txt", + "aod-parent-base-path-replacement": "PARENT_PATH_MASK", + "aod-parent-access-level": 1 + }, + "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.15", + "ptMax": "1e+10", + "etaMin": "-0.8", + "etaMax": "0.8" + }, + "jet-deriveddata-producer": { + "processBunchCrossings": "false", + "processCollisions": "false", + "processCollisionsWithoutCentralityAndMultiplicity": "true", + "processMcCollisionLabels": "false", + "processMcCollisions": "false", + "processTracks": "true", + "processMcTrackLabels": "false", + "processParticles": "false", + "processClusters": "false", + "processD0": "false", + "processD0MC": "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": "none", + "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-validation-track-collision-qa": { + "ptLow": "0.15", + "ptUp": "1e15", + "etaLow": "-0.9", + "etaUp": "0.9", + "evSel": "false", + "nBins": "200", + "BinsPhi": { + "values": [ + "180", + "0", + "6.4" + ] + }, + "BinsEta": { + "values": [ + "200", + "-0.9", + "0.9" + ] + }, + "BinsPt": { + "values": [ + "200", + "0", + "100" + ] + }, + "trackSelections": "hybridTracks", + "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": "" +} \ No newline at end of file diff --git a/codeJE/run_analysis.sh b/codeJE/run_analysis.sh new file mode 120000 index 00000000..dcb9d813 --- /dev/null +++ b/codeJE/run_analysis.sh @@ -0,0 +1 @@ +../exec/run_analysis.sh \ No newline at end of file diff --git a/codeJE/workflows.yml b/codeJE/workflows.yml new file mode 100644 index 00000000..00d20f6b --- /dev/null +++ b/codeJE/workflows.yml @@ -0,0 +1,99 @@ +--- +options: + global: "" # used once at the end of the command + local: # used for every workflow + - "-b" + - "--configuration json://$JSON" + - "--aod-memory-rate-limit 2000000000" + - "--shm-segment-size 16000000000" + - "--resources-monitoring 2" + - "--min-failure-level error" + +workflows: + # dummy workflow with the full list of options + o2-analysis-workflow: + executable: o2-analysis-workflow # workflow command, if different from the dictionary node name above + dependencies: [] # dictionary nodes that this workflow needs as direct dependencies (format: str, list) + requires_mc: no # yes/no whether the workflow can only run on MC or not + options: "--option" # command line options (format: str, list), see more detailed format below + # options: + # default: "" + # real: "" + # mc: "--doMC" + tables: [] # descriptions of output tables to be saved as trees (format: str, list), see more detailed format below + # tables: + # default: [] + # real: [] + # mc: [] + + # 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-data-charged: + dependencies: [o2-analysis-je-jet-deriveddata-producer] + + # Analysis tasks + + # TODO: Add analysis tasks + + # QA + + o2-analysis-je-jet-validation-qa: + dependencies: [o2-analysis-je-jet-finder-data-charged, 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-track-to-collision-associator: + tables: HFTRACKASSOC + + 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-v0converter: {} + + o2-analysis-calo-label-converter: {} diff --git a/codeQA/o2qaplots/.gitignore b/codeQA/o2qaplots/.gitignore deleted file mode 100644 index 409424f8..00000000 --- a/codeQA/o2qaplots/.gitignore +++ /dev/null @@ -1,198 +0,0 @@ -.local -.idea -.ipython -.vscode - -# PYTHON gitignore from github - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints -.jupyter - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# MAC OS gitignore -.DS_Store - - -# C++ gitignore from github -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app - - -# CMake gitignore from github -CMakeLists.txt.user -CMakeCache.txt -CMakeFiles -CMakeScripts -Testing -Makefile -cmake_install.cmake -install_manifest.txt -compile_commands.json -CTestTestfile.cmake -_deps \ No newline at end of file diff --git a/codeQA/o2qaplots/Dockerfile b/codeQA/o2qaplots/Dockerfile deleted file mode 100644 index a7034afd..00000000 --- a/codeQA/o2qaplots/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -FROM centos:7 - -SHELL ["/bin/bash", "-c"] - -# Install ROOT -RUN yum install -y epel-release \ - && yum install -y \ - python3-3.6.8-18.el7.x86_64 \ - python36-root-6.22.06-1.el7.x86_64 \ - root-6.22.06-1.el7.x86_64 \ - && yum clean all \ - && rm -rf /var/cache/yum - -COPY requirements.txt /requirements/requirements.txt - -RUN pip3 install -r /requirements/requirements.txt --no-cache-dir - -COPY . /o2qaplots -RUN pip3 install -e /o2qaplots/. --no-cache-dir diff --git a/codeQA/o2qaplots/README.md b/codeQA/o2qaplots/README.md deleted file mode 100644 index c6d1b15e..00000000 --- a/codeQA/o2qaplots/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Plots for the O2QA - -## Install the package in your system - -One of the easiest way to work with qa plotting macros is to install them as a package. -You can install it by navigating into this folder installing it using pip (or pip3 depending on your system): - - pip install -e . - -In order to run the QA plotting, you can check the available commands by running - - o2qa --help - -You can also get more information for each option, such as - - o2qa plot --help - -## Run the scripts without installing - -You can run the script directly. This will require you to run python in the correct directory -(the same one that has the setup.py and this README file). Go to the folder containing this file -and run: - - python o2qaplots/cli.py --help. - -The same instructions as for `Install the package in your system` apply here to check the available commands. - -## Run in a (docker) container - -Having problems with python versions? Something just does not work? Addicted to docker? -Or does it sparks joy on you to see your analysis running in an isolated and reproducible setup? -You can use the `Dockerfiles` and `docker-compose` configuration to help you run the analysis. diff --git a/codeQA/o2qaplots/docker-compose.yml b/codeQA/o2qaplots/docker-compose.yml deleted file mode 100644 index fc962d7b..00000000 --- a/codeQA/o2qaplots/docker-compose.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: "3.7" - -services: - plotting: - build: - context: . - volumes: - - .:/o2qaplots/ - tty: true diff --git a/codeQA/o2qaplots/o2qaplots/__init__.py b/codeQA/o2qaplots/o2qaplots/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/codeQA/o2qaplots/o2qaplots/cli.py b/codeQA/o2qaplots/o2qaplots/cli.py deleted file mode 100644 index 82aed4f4..00000000 --- a/codeQA/o2qaplots/o2qaplots/cli.py +++ /dev/null @@ -1,46 +0,0 @@ -import argparse - -import ROOT -from o2qaplots.efficiency.efficiency import Efficiency -from o2qaplots.plot1d import Plot1D, Plot2D -from o2qaplots.tracking_resolution.ip.ip import ImpactParameter - -ROOT.PyConfig.IgnoreCommandLineOptions = True - - -def cli(): - """Main entrypoint of the program. - It redirects the input to the correct task.""" - - help_general = "Action to be performed." - - parser = argparse.ArgumentParser() - subparsers = parser.add_subparsers(dest="command", help=help_general) - - tasks = [Efficiency, ImpactParameter, Plot1D, Plot2D] - - for t in tasks: - t.add_to_subparsers(subparsers) - - args = parser.parse_args() - args_to_pop = ["command"] - - task_arguments = vars(args).copy() - - for arg in args_to_pop: - task_arguments.pop(arg) - - task_to_run = None - - for task in tasks: - if args.command == task.parser_command: - task_to_run = task - - if task is None: - raise ValueError("Task not defined.") - - task_to_run(**task_arguments).run() - - -if __name__ == "__main__": - cli() diff --git a/codeQA/o2qaplots/o2qaplots/config.py b/codeQA/o2qaplots/o2qaplots/config.py deleted file mode 100644 index 481124a1..00000000 --- a/codeQA/o2qaplots/o2qaplots/config.py +++ /dev/null @@ -1,78 +0,0 @@ -import json -import typing -from collections import defaultdict - - -class AxisConfig: - """Configures an histogram axis representation. - - Attributes: - view_range: the axes range that will be visible in the plot - log: whether the axis should be shown in a log scale. - - Args: - view_range: the axes range that will be visible in the plot - log: whether the axis should be shown in a log scale. - """ - - def __init__(self, view_range: typing.List[float] = None, log: bool = False): - self.view_range = view_range - self.log = log - - def __repr__(self): - return ( - f"<{self.__class__.__name__} view_range={self.view_range} log={self.log}>" - ) - - -class PlotConfig: - """Configures an individual plot. - - Attributes: - x_axis: AxisConfig with the configuration for the x axis - y_axis: AxisConfig with the configuration for the y axis - - Args: - x_axis: an AxisConfig with for the axis, or a dict to be passed to the - constructor of AxisConfig - y_axis: an AxisConfig with for the axis, or a dict to be passed to the - constructor of AxisConfig - - """ - - def __init__(self, x_axis=AxisConfig(), y_axis=AxisConfig()): - if not isinstance(x_axis, AxisConfig): - x_axis = AxisConfig(**x_axis) - - if not isinstance(y_axis, AxisConfig): - y_axis = AxisConfig(**y_axis) - - self.x_axis = x_axis - self.y_axis = y_axis - - def __repr__(self): - return ( - f"<{self.__class__.__name__} " - f"x_axis={repr(self.x_axis)} y_axis={repr(self.y_axis)}>" - ) - - -class JsonConfig(defaultdict): - """ "Class used to read and store the JSON configuration files. - It reads the configuration from the JSON file and it stores it in as a dictionary. - The values of the dictionaryare automatically converted into an PlotConfig. - - In case the configuration is not set for a particular object, - this configuration will return a PlotConfig with its default value. - """ - - def __init__(self, json_file_name=None): - if json_file_name is not None: - with open(json_file_name) as json_file: - values = json.load(json_file) - super().__init__( - lambda: PlotConfig(), - {k: PlotConfig(**v) for k, v in values.items()}, - ) - else: - super(JsonConfig, self).__init__() diff --git a/codeQA/o2qaplots/o2qaplots/config/qa_plot_default.json b/codeQA/o2qaplots/o2qaplots/config/qa_plot_default.json deleted file mode 100644 index 7318c48a..00000000 --- a/codeQA/o2qaplots/o2qaplots/config/qa_plot_default.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "numberOfTracks": { - "x_axis": { - "view_range": [ - 0, - 200 - ] - } - }, - "numberOfContributors": { - "x_axis": { - "view_range": [ - 0, - 200 - ] - } - }, - "pt": { - "x_axis": { - "view_range": [ - 0.1, - 10 - ], - "log": true - }, - "y_axis": { - } - }, - "ptResolution": { - "x_axis": { - "view_range": [ - -0.2, - 0.2 - ] - } - }, - "ptResolutionVsPt": { - "x_axis": { - } - }, - "ptDiffMCRec": { - "x_axis": { - "view_range": [ - -0.1, - 0.1 - ] - } - }, - "impactParameterRPhiVsPt": { - "x_axis": { - } - }, - "impactParameterErrorRPhiVsPt": { - "x_axis": { - "view_range": [0.001, 10] - }, - "y_axis": { - "view_range": [ - 80, - 110 - ] - } - }, - "impactParameterZVsPt": { - "x_axis": { - } - }, - "impactParameterErrorZVsPt": { - "x_axis": { - } - }, - "primaryTrackEfficiency": { - "x_axis": { - "log": true, - "view_range": [ - 0.01, - 1 - ] - }, - "y_axis": { - "log": false, - "view_range": [ - 0, - 1.5 - ] - } - } -} \ No newline at end of file diff --git a/codeQA/o2qaplots/o2qaplots/efficiency/__init__.py b/codeQA/o2qaplots/o2qaplots/efficiency/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/codeQA/o2qaplots/o2qaplots/efficiency/efficiency.py b/codeQA/o2qaplots/o2qaplots/efficiency/efficiency.py deleted file mode 100644 index 90c715c3..00000000 --- a/codeQA/o2qaplots/o2qaplots/efficiency/efficiency.py +++ /dev/null @@ -1,101 +0,0 @@ -import typing - -import ROOT -from o2qaplots.plot_base import ( - Configurable, - InputConfigurable, - PlottingTask, - ROOTObj, - TaskInput, - macro, -) - - -def calculate_efficiency( - reconstructed: ROOT.TH3D, - generated: ROOT.TH3D, - eta_cut: float = None, - pt_range: typing.List[float] = None, -): - """Calculated the efficiency as function of the feature in axis. - - Args: - reconstructed: histogram with the reconstructed information. - generated: histogram with the generated information. - eta_cut: applies the selection |n| < eta_cut to the efficiency - pt_range: selects only particles with pt_range[0] < pt < pt_range[1] - - Returns: - efficiency: a TGraph with the efficiencies - """ - - epsilon = 0.0001 - - if eta_cut is not None: - generated.GetYaxis().SetRangeUser(-1.0 * eta_cut + epsilon, eta_cut - epsilon) - reconstructed.GetYaxis().SetRangeUser( - -1.0 * eta_cut + epsilon, eta_cut - epsilon - ) - - if pt_range is not None: - if len(pt_range) != 2: - raise ValueError( - "You should pass exactly two values to the transverse momentum" - "range (pt_range)." - ) - - generated.GetXaxis().SetRangeUser(pt_range[0] + epsilon, pt_range[1] - epsilon) - reconstructed.GetXaxis().SetRangeUser( - pt_range[0] + epsilon, pt_range[1] - epsilon - ) - - generated_1d = generated.Project3D("x") - reconstructed_1d = reconstructed.Project3D("x") - - # efficiency = ROOT.TEfficiency(reconstructed_1d, generated_1d) - efficiency = reconstructed_1d.Clone("Efficiency") - efficiency.Divide(generated_1d) - - return efficiency - - -class Efficiency(PlottingTask): - parser_description = "Calculates the efficiency for the physical primary particles." - parser_command = "eff" - - eta = Configurable("--eta", "-e", default=1.4, type=float, help="Selection in eta.") - - pt_range = Configurable( - "--pt_range", - "-pt", - default=(0.0, 10.0), - nargs=2, - action="append", - type=float, - help="Cut in pt_range[0] < pt <= pt_range[1].", - ) - - particle = InputConfigurable( - "-p", - "--particle", - help="particle to be processed", - type=str, - choices=["electron", "pion", "kaon", "muon", "proton"], - default="pion", - ) - - generated = TaskInput("qa-tracking-efficiency/generatedKinematics") - reconstructed = TaskInput("qa-tracking-efficiency/reconstructedKinematics") - - efficiency = ROOTObj("qa-tracking-efficiency/primaryTrackEfficiency") - - def process(self): - efficiency = calculate_efficiency( - self.reconstructed, self.generated, self.eta, self.pt_range - ) - - return {self.efficiency: efficiency} - - -if __name__ == "__main__": - macro(Efficiency) diff --git a/codeQA/o2qaplots/o2qaplots/file_utils.py b/codeQA/o2qaplots/o2qaplots/file_utils.py deleted file mode 100644 index ddd216f3..00000000 --- a/codeQA/o2qaplots/o2qaplots/file_utils.py +++ /dev/null @@ -1,52 +0,0 @@ -import pathlib - - -def check_file_exists(file): - """Checks if file exists. - - Raises: - FileNotFoundError is file does not exist. - """ - file_path = pathlib.Path(file) - if not file_path.is_file(): - raise FileNotFoundError("It was not possible find the file: " + file) - - -def discover_root_objects(file, type_check): - """Discovers the histograms saved in a file with multiple TDirectories. - - Args: - file: the file to be inspected. - type_check: a function to be called in the object to determine if they should - be selected. - - Returns - histograms: a list with HistogramInfo for each histogram. - """ - histograms = list() - - _find_objects_in_path(None, histograms, file, type_check) - - return histograms - - -def _find_objects_in_path(path, results, file, type_check): - - if path is None: - key_list = file.GetListOfKeys() - else: - try: - key_list = file.Get(path).GetListOfKeys() - except AttributeError: - return - - for key in key_list: - key_path = f"{path}/{key.GetName()}" - - if path is None: - key_path = key.GetName() - - if type_check(key.GetClassName()): - results.append(key_path) - else: - _find_objects_in_path(key_path, results, file, type_check) diff --git a/codeQA/o2qaplots/o2qaplots/plot.py b/codeQA/o2qaplots/o2qaplots/plot.py deleted file mode 100644 index 6853bb84..00000000 --- a/codeQA/o2qaplots/o2qaplots/plot.py +++ /dev/null @@ -1,226 +0,0 @@ -import os -import os.path -import pathlib - -import ROOT -from o2qaplots.config import PlotConfig - -ROOT.TH1.AddDirectory(False) - - -def _validate_size(histograms, attribute): - """Checks if histograms and attributes have the same size.""" - if attribute is not None: - if len(histograms) != len(attribute): - raise ValueError( - "The size of the lists do not match the number of histograms." - ) - - -def plot_1d( - histograms_to_plot, - normalize=False, - plot_errors=True, - labels=None, - colors=None, - draw_option="", - plot_ratio=False, - plot_config=None, - legend=None, -): - """Plot a list of histograms to a ROOT.Canvas. - - Args: - histograms_to_plot: the histograms to be plotted. - draw_option: this will be passed to the Draw method of the histogram. - normalize: whether the histograms should be normalized or not. - labels: The labels to be used in the legend. - colors: The colors for each histogram. - plot_errors: if true, the uncertainties in x and y will be plotted. - Otherwise the plot will use a only a line. - plot_ratio: is True and len(histograms_to_plot) is 2, it will plot the ratio - between the two histograms. - plot_config: PlotConfig object with the plot configuration - - Returns: - A list with ROOT.Canvas or matplotlib.Axes with the histograms drawn. - """ - - if len(histograms_to_plot) == 0: - return [] - - if plot_config is None: - plot_config = PlotConfig() - - _validate_size(histograms_to_plot, labels) - _validate_size(histograms_to_plot, colors) - - if plot_ratio and len(histograms_to_plot) != 2: - raise ValueError("Ratio plots can only be used if two histograms are passed.") - - _set_root_global_style() - _normalize(histograms_to_plot, normalize) - _set_labels(histograms_to_plot, labels) - _set_colors(histograms_to_plot, colors) - - common_draw_opt = _get_draw_option( - histograms_to_plot, draw_option, colors, plot_errors - ) - canvas = ROOT.TCanvas() - _set_log(canvas, plot_config) - _set_axis_range(histograms_to_plot, plot_config) - _plot_graph(histograms_to_plot, common_draw_opt, draw_option, canvas, plot_ratio) - - if legend is None: - _build_legend(canvas, labels) - else: - legend.Draw() - - canvas.Update() - - return canvas - - -def _normalize(histograms_to_plot, normalize): - if normalize: - for h in histograms_to_plot: - if h.Integral() > 0: - h.GetYaxis().SetTitle("Relative Frequency") - h.Scale(1.0 / h.Integral()) - - -def _set_axis_range(histograms_to_plot, plot_config): - if plot_config.y_axis.view_range is not None: - for h1 in histograms_to_plot: - h1.GetYaxis().SetRangeUser(*plot_config.y_axis.view_range) - else: - if len(histograms_to_plot) > 1: - max_value, min_value = _get_histogram_ranges(histograms_to_plot) - for h1 in histograms_to_plot: - h1.GetYaxis().SetRangeUser(min_value, 1.1 * max_value) - if plot_config.x_axis.view_range is not None: - for h1 in histograms_to_plot: - h1.GetXaxis().SetRangeUser(*plot_config.x_axis.view_range) - - -def _set_labels(histograms_to_plot, labels): - if labels is not None: - for h1, label in zip(histograms_to_plot, labels): - h1.SetTitle(label) - - -def _set_colors(histograms_to_plot, colors): - if colors is not None: - for h1, color in zip(histograms_to_plot, colors): - h1.SetLineColor(color) - h1.SetMarkerColor(color) - - -def _get_draw_option(histograms_to_plot, draw_option, colors, plot_errors): - common_draw_opt = "" - if "TH1" not in str(type(histograms_to_plot[0])): - common_draw_opt += "PE " - if colors is None: - common_draw_opt += "PLC PMC" - if not plot_errors and "TH1" in str(type(histograms_to_plot[0])): - common_draw_opt += "HIST" - return common_draw_opt - - -def _plot_graph(histograms_to_plot, common_draw_opt, draw_option, canvas, plot_ratio): - canvas.cd() - - histograms_to_plot[0].Draw(draw_option + common_draw_opt) - - for h in histograms_to_plot[1:]: - h.Draw(draw_option + " SAME " + common_draw_opt) - - -def _set_log(canvas, plot_config): - if plot_config.x_axis.log: - canvas.SetLogx() - if plot_config.y_axis.log: - canvas.SetLogy() - - -def _build_legend(canvas, labels): - if labels is not None: - legend = canvas.BuildLegend() - legend.SetLineWidth(0) - legend.SetBorderSize(0) - legend.SetFillStyle(0) - - -def plot_2d(histogram, draw_option="colz1", labels=None, plot_config=None): - """Plot a list of histograms to a canvas.""" - canvas = ROOT.TCanvas() - canvas.cd() - histogram.Draw(draw_option) - - return canvas - - -def profile_histogram(histogram, axis, option="", update_title=True): - """Make a profile (taking mean of each bin) of histogram in de designated axis.""" - _set_root_global_style() - - if axis.lower() == "x": - profile1 = histogram.ProfileX("_pfx", 1, -1, option) - if update_title: - profile1.GetYaxis().SetTitle("< " + histogram.GetYaxis().GetTitle() + " >") - else: - profile1 = histogram.ProfileY("_pfy", 1, -1, option) - if update_title: - profile1.GetXaxis().SetTitle("< " + histogram.GetXaxis().GetTitle() + " >") - profile = profile1 - - return profile - - -def plot_profile(histograms, draw_option="", axis="x", option="", **kwargs): - """Plot a profile histogram, taking the average of each bin""" - profiles = [profile_histogram(h, axis, option) for h in histograms] - - return plot_1d(profiles, draw_option=draw_option, **kwargs) - - -def save_canvas(info, canvas_or_ax, base_output_dir, suffix=""): - """Save a ROOT.TCanvas or a matplotplib Axes into an base_histogram file.""" - - output_file = f"{base_output_dir}/{info.full_path}{suffix}.pdf" - - output_dir = os.path.dirname(output_file) - os.makedirs(output_dir, exist_ok=True) - - try: - canvas_or_ax.SaveAs(output_file) - except AttributeError: - canvas_or_ax.get_figure().savefig(output_file, bbox_inches="tight") - - _check_file_exists(output_file) - - -def _check_file_exists(file): - """Checks if file exists. - - Raises: - FileNotFoundError is file does not exist. - """ - file_path = pathlib.Path(file) - if not file_path.is_file(): - raise FileNotFoundError("It was not possible to save_canvas the file: " + file) - - -def _set_root_global_style(): - """Set the global style for the plots""" - - ROOT.gStyle.SetOptStat(0) - ROOT.gROOT.SetStyle("ATLAS") - ROOT.gStyle.SetMarkerStyle(ROOT.kFullSquare) - ROOT.gROOT.ForceStyle() - - -def _get_histogram_ranges(histograms_to_plot): - max_value = max([h.GetMaximum() for h in histograms_to_plot]) - min_value = min([h.GetMinimum() for h in histograms_to_plot] + [0]) - return max_value, min_value diff --git a/codeQA/o2qaplots/o2qaplots/plot1d.py b/codeQA/o2qaplots/o2qaplots/plot1d.py deleted file mode 100644 index 0ac6ae89..00000000 --- a/codeQA/o2qaplots/o2qaplots/plot1d.py +++ /dev/null @@ -1,34 +0,0 @@ -import o2qaplots.plot as plot -import ROOT -from o2qaplots.file_utils import discover_root_objects -from o2qaplots.plot_base import PlottingTask, ROOTObj, macro - - -class Plot(PlottingTask): - plot_type = "define_your_type" - save_output = False - - def process(self): - histograms = discover_root_objects( - ROOT.TFile(self.file), lambda x: self.plot_type in x - ) - print(histograms) - - return {ROOTObj(x): ROOTObj(x).get(self.file) for x in histograms} - - -class Plot1D(Plot): - parser_description = "Plots all the 1d histograms." - parser_command = "plot1d" - plot_type = "TH1" - - -class Plot2D(Plot): - parser_description = "Plots all the 2d histograms." - parser_command = "plot2d" - plotting_function = plot.plot_2d - plot_type = "TH2" - - -if __name__ == "__main__": - macro(Plot) diff --git a/codeQA/o2qaplots/o2qaplots/plot_base.py b/codeQA/o2qaplots/o2qaplots/plot_base.py deleted file mode 100644 index d28eb935..00000000 --- a/codeQA/o2qaplots/o2qaplots/plot_base.py +++ /dev/null @@ -1,385 +0,0 @@ -""" -To create your own plotting macro, do the following: - -- Derive your plotting class from PlottingTask. - -- Define configurables that this task will depend upon in the - PlottingTask.configurables class attribute. - They should be declared using the type Configurable. The task configurables - will follow the same logic of the argparse.ArgumentParser.add_argument method, - except that they require an additional "name" parameter at the start. - - When creating an instance of the class, the value read from the command line - argument will be available for this parameter at self.. - -- Define your input files that will be read from each ROOT file. Add a class - attribute with type TaskInputObj and it will automatically read it for each - file. So at run time, this will always point to the declared ROOT object - for the current file. - -- Create your own PlottingTask.process function. This will be applied to each - file and should return a dict with the output that to be saved/plotted. - -""" -import argparse -import inspect -import os -import typing - -import o2qaplots.config as cfg -import o2qaplots.plot as plot -import ROOT -from o2qaplots.file_utils import check_file_exists - -default_json = ( - f"{os.path.dirname(os.path.abspath(__file__))}/config/qa_plot_default.json" -) - - -class Configurable: - """An argument to be added to a parser from argparse. - This argument will become a data member of your plotting task and you will - be able to access it.""" - - def __init__(self, *args, **kwargs): - """Constructor that mimics argparse.ArgumentParser.add_argument. - Args: - *args: configurables to be passed to - argparse.ArgumentParser.add_argument - **kwargs: kwargs to be passed to - argparse.ArgumentParser.add_argument - """ - self.args = args - self.kwargs = kwargs - - def add_argument(self, parser): - """Adds the content of this argument to a argparse.ArgumentParser""" - parser.add_argument(*self.args, **self.kwargs) - - def __repr__(self): - return f"<{self.__class__.__name__}(args={self.args}, kwargs={self.kwargs})>" - - -class InputConfigurable(Configurable): - """Special case of configurable that can modify the path of the input - objects.""" - - pass - - -class ROOTObj: - """Stores the representation of a input ROOT object that can be read - from a file. - - Attributes: - path: a list with the path in the ROOT file. This is NOT the path to - the file, but rather the TDirectories. - name: the name of the object to be read from the file. - """ - - def __init__(self, path: str): - obj_path = path.split("/") - self.path = obj_path[:-1] - self.name = obj_path[-1] - - @property - def full_path(self): - return "/".join(self.path) + "/" + self.name - - def get(self, input_file): - file = ROOT.TFile(input_file) - return file.Get(self.full_path) - - def with_input(self, input_argument=None): - """In case your task has input configurables that can change the name of - your structure of the ROOT folders, this function will generate a new - object taking into account the input argument. The values will be - passed to the first directory of the object. - - Args: - input_argument: a string or list with the input configurables. - - Returns: - an instance of this class taking into account the input_arguments. - """ - if input_argument is None: - return self - - if not isinstance(input_argument, str): - input_argument = "-".join(input_argument) - - path = self.path[:] - - if path: - path[0] += "-" + input_argument - else: - path.append(input_argument) - - return self.__class__("/".join(path + [self.name])) - - def add_to_path(self, additional_path): - """Retuns a new object with the addition of additional_path at the - beggining of the path""" - - return self.__class__(f"{additional_path}/{self.full_path}") - - def __hash__(self): - return hash(self.full_path) - - def __eq__(self, other): - return self.full_path == other.full_path - - def __repr__(self): - return f"<{self.__class__.__name__}({self.full_path})>" - - -class TaskInput(ROOTObj): - """Stores the representation of an input object. - You should define your inputs using this class.""" - - pass - - -def find_class_instances(class_, class_to_find) -> typing.List[str]: - """Finds all the data members of class_ that are from class_to_find. - - Args: - class_: the class which will be inspected. - class_to_find: the class that the data members should match. - - Returns: - A list with the data members with type class_to_find. - """ - return [ - name - for name, _ in inspect.getmembers( - class_, lambda x: isinstance(x, class_to_find) - ) - ] - - -class PlottingTask: - """Base class to perform the plotting. It does contains basic functions to - read the files and utilities. - You should derive your class from it and override the methods. - - Attributes: - parser_description: string with the description which will be - shown when this plotting macro is run from the command line. - arguments: list with the configurables for the process. - """ - - parser_description: str = "Put here the parser description" - parser_command = "here_goes_the_parser_command" - - files = Configurable("files", type=str, nargs="+", help="Analysis files.") - - labels = Configurable("--labels", "-l", type=str, nargs="+", help="Legend labels") - - output = Configurable("--output", "-o", help="Output folder", default="qa_output") - - config = Configurable( - "--config", "-c", help="JSON configuration", default=default_json - ) - - suffix = Configurable( - "--suffix", "-s", type=str, help="Suffix to the output", default="" - ) - - save_output = True - - plotting_function = plot.plot_1d - plotting_kwargs = dict() - - output_file = "LocalTaskResults.root" - - def __init__(self, **kwargs): - """Constructor for the process. Do not modify it when inheriting, - it will be automatically generated based on the configurables specified - in the class definition.""" - cls = self.__class__ - - # Initialize all configurables and input arguments - for arg in cls.configurables(): - try: # Read from class constructor - setattr(self, arg, kwargs[arg]) - except KeyError: - try: # Set from default value defined in class - default_value = getattr(self, arg).kwargs["default"] - setattr(self, arg, default_value) - except KeyError: # if nothing is provided, fallbakcs to None - setattr(self, arg, None) - - self.input_arguments = None - if cls.input_configurables(): - self.input_arguments = [ - getattr(self, arg) for arg in cls.input_configurables() - ] - - self.json_config = cfg.JsonConfig(self.config) - self.output_objects = [] - self.file = None - - @classmethod - def input(cls): - """Returns a list with the name of the inputs.""" - return find_class_instances(cls, TaskInput) - - @classmethod - def input_configurables(cls): - """Returns a list of the class members that are input arguments.""" - return find_class_instances(cls, InputConfigurable) - - @classmethod - def configurables(cls): - """Returns a list of the class members that are configurables.""" - return find_class_instances(cls, Configurable) - - def get_input_from_file(self, file): - """Gets the input from a file. - - Args: - file: the file that will be used to read the input objects. - - Returns: - input_objs: dictionary with ROOTObj: for the inputs of this task. - - """ - cls = self.__class__ - - input_objs = { - attr: getattr(cls, attr).with_input(self.input_arguments).get(file) - for attr in cls.input() - } - - return input_objs - - def _check_consistency(self): - """Check if the input of the user is valid. The following checks are performed: - - - Files declared exists. - - If labels were passed, if they have the same length as the number of files. - - Raises: - ValueError: if the number of labels is different from the number of files. - FileNotFoundError: if any of the files in self.files do not exist. - - """ - for f in self.files: # pylint: disable=not-an-iterable - check_file_exists(f) - - if self.labels is not None: - if len(self.labels) != len(self.files): - raise ValueError( - f"The length of labels ({len(self.labels)}) is " - f"different from the length of files ({len(self.files)}" - ) - - def _set_input_for_current_file(self): - """Reads the input objects from file and returns them.""" - for attr, obj in self.get_input_from_file(self.file).items(): - setattr(self, attr, obj) - - def _get_output_objects_info(self): - """Return a list-like with the histograms that have to be saved.""" - if len(self.output_objects) == 0: - return [] - - return self.output_objects[0].keys() - - def _get_results_from_all_files(self, output_ojt): - """Returns a list will a particular output object""" - return [output[output_ojt] for output in self.output_objects] - - def process(self): - """Process the objects of input_objects. This should be the input for a - single file. - It should return the output as a dict in the form {HistogramInfo: histogram}. - """ - pass - - def run(self): - """Process the task.""" - self._check_consistency() - - self.process_files() - - self.save_figures() - - if self.save_output: - self.save_root_output() - - def process_files(self): - for f in self.files: # pylint: disable=not-an-iterable - self.file = f - self._set_input_for_current_file() - self.output_objects.append(self.process()) - - def save_figures(self): - """Save the output figures to PDF files.""" - cls = self.__class__ - plotted_canvas = [] - - for result in self._get_output_objects_info(): - result_objects_list = self._get_results_from_all_files(result) - - canvas = cls.plotting_function( - result_objects_list, - labels=self.labels, - plot_config=self.json_config.get(result.name), - **self.plotting_kwargs, - ) - - plotted_canvas.append(canvas) - - plot.save_canvas( - result.with_input(self.input_arguments), - canvas, - self.output, - self.suffix, - ) - return plotted_canvas - - def save_root_output(self): - root_output_file = ROOT.TFile(f"{self.output}/{self.output_file}", "RECREATE") - root_output_file.cd() - - labels = self.labels - - if labels is None: - if len(set(self.files)) == len(self.files): - labels = self.files - else: - labels = [str(i) for i in range(len(self.files))] - - for output, label in zip(self.output_objects, labels): - for root_info, opt_obj in output.items(): - opt_obj.Write(root_info.add_to_path(label).full_path) - - root_output_file.Close() - - @classmethod - def add_parser_options(cls, parser): - """Add the configurables from this task to parser.""" - for arg in cls.configurables(): - getattr(cls, arg).add_argument(parser) - - @classmethod - def add_to_subparsers(cls, subparsers): - sub = subparsers.add_parser( - cls.parser_command, description=cls.parser_description - ) - cls.add_parser_options(sub) - - -def macro(task_class): - """Instance to run as the main entrypoint of a program or/and scripting. - Call this function with to make a script macro. - - Args: - task_class: the class, derived from PlottingTask, which will be used to - run this script. - """ - parser_main = argparse.ArgumentParser(description=task_class.parser_description) - task_class.add_parser_options(parser_main) - task_class(**vars(parser_main.parse_args())).run() diff --git a/codeQA/o2qaplots/o2qaplots/tracking_resolution/__init__.py b/codeQA/o2qaplots/o2qaplots/tracking_resolution/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/codeQA/o2qaplots/o2qaplots/tracking_resolution/ip/__init__.py b/codeQA/o2qaplots/o2qaplots/tracking_resolution/ip/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/codeQA/o2qaplots/o2qaplots/tracking_resolution/ip/ip.py b/codeQA/o2qaplots/o2qaplots/tracking_resolution/ip/ip.py deleted file mode 100644 index c0294972..00000000 --- a/codeQA/o2qaplots/o2qaplots/tracking_resolution/ip/ip.py +++ /dev/null @@ -1,104 +0,0 @@ -import o2qaplots.plot as pl -import ROOT -from o2qaplots.plot_base import Configurable, PlottingTask, ROOTObj, TaskInput, macro - - -def plot_1d_legend(x, *args, **kwargs): - return pl.plot_1d([x[0][0]], *args, legend=x[0][1], **kwargs) - - -class ImpactParameter(PlottingTask): - parser_description = ( - "Plots the Impact Parameter resolution in the rphi and z direction. " - "Currently it can only handle ONE file at at time. This will change soon." - ) - parser_command = "ip" - - ip_rphi_pt = TaskInput( - "qa-tracking-resolution/impactParameter/impactParameterRPhiVsPt" - ) - ip_rphi_eta = TaskInput( - "qa-tracking-resolution/impactParameter/impactParameterRPhiVsEta" - ) - ip_rphi_phi = TaskInput( - "qa-tracking-resolution/impactParameter/impactParameterRPhiVsPhi" - ) - ip_z_pt = TaskInput("qa-tracking-resolution/impactParameter/impactParameterZVsPt") - ip_z_eta = TaskInput("qa-tracking-resolution/impactParameter/impactParameterZVsEta") - ip_z_phi = TaskInput("qa-tracking-resolution/impactParameter/impactParameterZVsPhi") - - ip_histograms = [ - ip_rphi_pt, - ip_rphi_eta, - ip_rphi_phi, - ip_rphi_eta, - ip_z_eta, - ip_z_phi, - ] - - show_fits = Configurable( - "--show-fits", "-sf", action="store_true", default=False, help="" - ) - - plotting_function = plot_1d_legend - - def process(self): - fit_slices, legends = calculate_ip_resolution(self.ip_rphi_pt) - return { - ROOTObj(f"qa-tracking-resolution/fit_slice_{i}"): (fit_slice, legend) - for fit_slice, legend, i in zip(fit_slices, legends, range(len(fit_slices))) - } - - -def calculate_ip_resolution(ip_vs_var): - """Calculates the impact parameter (ip) resolution vs a particular variable. - - Args: - ip_vs_var: a ROOT TH2 histogram with the ip in the y axis and the - dependent variable in the x axis. - """ - - ROOT.TH1.AddDirectory(False) - projections = [ - ip_vs_var.ProjectionY(ip_vs_var.GetName() + f"_{i}", i, i) - for i in range(1, ip_vs_var.GetNbinsX() + 1) - ] - - function = ROOT.TF1("gaus", "gaus", -1000, 1000) - legends = [] - - for hist_slice, i in zip(projections, range(1, len(projections) + 1)): - hist_slice.GetYaxis().SetTitle( - f"Counts ({ip_vs_var.GetXaxis().GetBinLowEdge(i)}, " - f"{ip_vs_var.GetXaxis().GetBinUpEdge(i)})" - ) - - hist_slice.GetXaxis().SetRangeUser(-400, 400) - fit_results = hist_slice.Fit(function, "QRS") - - chi2 = 0 - - if int(fit_results) == 0: - - if fit_results.Ndf() > 0: - chi2 = fit_results.Chi2() / fit_results.Ndf() - - mean, mean_error = fit_results.Parameter(1), fit_results.ParError(1) - sigma, sigma_error = fit_results.Parameter(2), fit_results.ParError(2) - else: - chi2 = -999 - sigma, sigma_error = hist_slice.GetStdDev(), hist_slice.GetStdDevError() - mean, mean_error = hist_slice.GetMean(), hist_slice.GetMeanError() - - legend = ROOT.TLegend() - legend.SetHeader(f"Gaussian fit results (#chi^{{2}}/NDF = {chi2:.2f})") - legend.AddEntry(ROOT.nullptr, f"Mean = {mean:.2f} #pm {mean_error:.2f}") - legend.AddEntry(ROOT.nullptr, f"Sigma = {sigma:.2f} #pm {sigma_error:.2f}") - - legends.append(legend) - - return projections, legends - - -if __name__ == "__main__": - macro(ImpactParameter) diff --git a/codeQA/o2qaplots/requirements.txt b/codeQA/o2qaplots/requirements.txt deleted file mode 100644 index d31ca6b6..00000000 --- a/codeQA/o2qaplots/requirements.txt +++ /dev/null @@ -1,13 +0,0 @@ -matplotlib==3.3.2 -pandas==1.1.4 -pytest==6.1.2 -seaborn==0.11.0 -setuptools>=50.3.2 -uproot==3.13.0 -tqdm==4.54.0 -autopep8==1.5.4 -black==19.10b0 -flake8==3.8.4 -isort==5.7.0 -pylint==2.6.0 -rope==0.18.0 \ No newline at end of file diff --git a/codeQA/o2qaplots/setup.py b/codeQA/o2qaplots/setup.py deleted file mode 100644 index 8c699c06..00000000 --- a/codeQA/o2qaplots/setup.py +++ /dev/null @@ -1,14 +0,0 @@ -from setuptools import find_packages, setup - -setup( - name="o2qaplots", - version="1.0.0", - packages=find_packages(), - url="https://github.com/hzanoli/O2QA", - license="MIT License", - author="Henrique J. C. Zanoli", - author_email="hzanoli@gmail.com", - description="Plotting tools for the ALICE O2 quality assurance", - entry_points={"console_scripts": ["o2qa=o2qaplots.cli:cli"]}, - install_requirepes=["tqdm"], -) diff --git a/codeQA/o2qaplots/tests/__init__.py b/codeQA/o2qaplots/tests/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/codeQA/o2qaplots/tests/test_efficiency.py b/codeQA/o2qaplots/tests/test_efficiency.py deleted file mode 100644 index e45ef3c7..00000000 --- a/codeQA/o2qaplots/tests/test_efficiency.py +++ /dev/null @@ -1,42 +0,0 @@ -import o2qaplots.efficiency.efficiency as eff -import ROOT - -ROOT.TH1.AddDirectory(False) - - -def set_all_bin_contents(hist: ROOT.TH3D, value: float): - for x in range(0, hist.GetNbinsX() + 2): - for y in range(0, hist.GetNbinsY() + 2): - for z in range(0, hist.GetNbinsZ() + 2): - hist.SetBinContent(x, y, z, value) - - -def print_all_bin_content(hist): - for x in range(1, hist.GetNbinsX()): - for y in range(1, hist.GetNbinsY()): - for z in range(1, hist.GetNbinsZ()): - print(hist.GetBinContent(x, y, z)) - - -def make_3d_with_fixed_value(hist=None, n_fill=1.0): - if hist is None: - hist = ROOT.TH3D( - "base_hist", "", 10, 0, 10, 6, -3, 3, 10, 0, 2 * ROOT.TMath.Pi() - ) - - set_all_bin_contents(hist, n_fill) - - return hist - - -def test_calculate_efficiency( - generated=make_3d_with_fixed_value(n_fill=600 * 1000.0), - reconstructed=make_3d_with_fixed_value(n_fill=0.7 * 600 * 1000.0), -): - """Creates a generated and reconstructed histogram with 0.7 efficiency - and calculates it.""" - - efficiency = eff.calculate_efficiency(reconstructed, generated) - - for i in range(1, efficiency.GetXaxis().GetNbins() + 1): - assert efficiency.GetBinContent(i) == 0.7 diff --git a/codeQA/o2qaplots/tests/test_plot1d.py b/codeQA/o2qaplots/tests/test_plot1d.py deleted file mode 100644 index 75e8be2e..00000000 --- a/codeQA/o2qaplots/tests/test_plot1d.py +++ /dev/null @@ -1,28 +0,0 @@ -import os - -import o2qaplots.plot1d as plot1d -import ROOT - - -def test_discover_root_objects(): - file_test = ROOT.TFile("test_file.root", "RECREATE") - - ROOT.TH1D().Write("um") - ROOT.TH1D().Write("dois/tres") - ROOT.TH1D().Write("quatro/cinco/seis") - ROOT.TH1D().Write("quatro/cinco/sete/oito") - - file_test.Close() - - plots = plot1d.discover_root_objects( - ROOT.TFile("test_file.root"), lambda x: "TH1D" in x - ) - - assert set(plots) == { - "um", - "dois/tres", - "quatro/cinco/seis", - "quatro/cinco/sete/oito", - } - - os.remove("test_file.root") diff --git a/codeQA/o2qaplots/tests/test_plot_base.py b/codeQA/o2qaplots/tests/test_plot_base.py deleted file mode 100644 index e9f96036..00000000 --- a/codeQA/o2qaplots/tests/test_plot_base.py +++ /dev/null @@ -1,78 +0,0 @@ -import o2qaplots.plot_base as plot_base - - -def test_argument_reading(): - class PtSpectra(plot_base.PlottingTask): - pt_range = plot_base.Configurable( - "--pt_range", - "-pt", - default=[0.0, 10.0], - nargs=2, - action="append", - type=float, - help="Cut in pt_range[0] < pt <= pt_range[1].", - ) - - particle = plot_base.InputConfigurable( - "-p", - "--particle", - help="particle to be processed", - type=str, - choices=["electron", "pion", "kaon", "muon", "proton"], - default="pion", - ) - - pt_task_defaults = PtSpectra(files=["pt.root"]) - print(pt_task_defaults.pt_range) - assert pt_task_defaults.pt_range == [0.0, 10.0] - assert pt_task_defaults.particle == "pion" - - pt_task_arguments = PtSpectra(files=["pt.root"], pt_range=[5, 20], particle="d0") - - assert pt_task_arguments.pt_range == [5.0, 20.0] - assert pt_task_arguments.particle == "d0" - - -def test_root_obj_include_task_argument(): - """Tests if plot_base.ROOTObj.with_input does the correct routing when - including the input arguments.""" - - no_folder = plot_base.ROOTObj("some-object") - assert no_folder.with_input() is no_folder - - no_folder_str_arg = no_folder.with_input("pions") - assert no_folder_str_arg == plot_base.ROOTObj("pions/some-object") - - no_folder_list_arg = no_folder.with_input(["pions", "low_pt"]) - assert no_folder_list_arg == plot_base.ROOTObj("pions-low_pt/some-object") - - one_folder = plot_base.ROOTObj("folder/object") - - one_folder_str_arg = one_folder.with_input("pions") - assert one_folder_str_arg == plot_base.ROOTObj("folder-pions/object") - - one_folder_list_arg = one_folder.with_input(["pions", "low_pt"]) - assert one_folder_list_arg == plot_base.ROOTObj("folder-pions-low_pt/object") - - -def test_find_class_instances(): - """Construct simple cases to test find_class_instances.""" - - class Input: - pass - - class Output: - pass - - class Task: - pt = Input() - eta = Input() - - pt_histogram = Output() - eta_histogram = Output() - - assert set(plot_base.find_class_instances(Task, Input)) == set(["pt", "eta"]) - assert set(plot_base.find_class_instances(Task, Output)) == set( - ["pt_histogram", "eta_histogram"] - ) - # Add more tests? diff --git a/codeQA/o2qaplots/tests/test_plot_config.py b/codeQA/o2qaplots/tests/test_plot_config.py deleted file mode 100644 index 8aba05b2..00000000 --- a/codeQA/o2qaplots/tests/test_plot_config.py +++ /dev/null @@ -1,53 +0,0 @@ -import json - -import pytest -from o2qaplots.config import AxisConfig, PlotConfig - - -@pytest.fixture -def json_file(): - return """{ - "numberOfTracks": { - "x_axis": { - "view_range": [0, 200], - "log": false - }, - "y_axis": { - "view_range": [0.0, 1.0], - "log": true - } - }, - "pt": { - "y_axis": { - "log": true - } - }, - "ptResolutionVsPt": { - "x_axis": { - "log": true - } - } - } - """ - - -@pytest.fixture -def dict_example(json_file): - return json.loads(json_file) - - -def test_axis_config(dict_example): - x_axis = AxisConfig(**dict_example["numberOfTracks"]["x_axis"]) - - assert x_axis.log is False - assert x_axis.view_range == [0, 200] - - -def test_plot_config(dict_example): - n_tracks = PlotConfig(**dict_example["numberOfTracks"]) - - assert n_tracks.x_axis.log is False - assert n_tracks.x_axis.view_range == [0, 200] - - assert n_tracks.y_axis.log is True - assert n_tracks.y_axis.view_range == [0.0, 1.0] diff --git a/codeQA/plot_rphi_reso.py b/codeQA/plot_rphi_reso.py deleted file mode 100755 index e5190199..00000000 --- a/codeQA/plot_rphi_reso.py +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env python3 - -import argparse - -from ROOT import TH1, TCanvas, TColor, TFile, TGraph, TLegend, TObjArray - -canvases = [] - - -def make_reso(file_name, out_tag, show, thr=0.08): - f = TFile(file_name, "READ") - h = f.Get("qa-tracking-resolution/impactParameter/impactParameterRPhiVsPt") - h.SetDirectory(0) - f.Close() - h.SetBit(TH1.kNoStats) - if show: - c = "2d" + out_tag - c = TCanvas(c, c) - canvases.append(c) - c.SetLogz() - h.Draw("COLZ") - o = TObjArray() - h.GetYaxis().SetRangeUser(-200, 200) - h.FitSlicesY(0, 0, -1, 0, "QNR", o) - h.GetYaxis().SetRange() - hmean = o.At(1) - hsigma = o.At(2) - if show: - hmean = hmean.DrawCopy("SAME") - hsigma = hsigma.DrawCopy("SAME") - hsigma.SetLineColor(2) - c.Update() - g = TGraph() - g.SetName(out_tag) - g.SetTitle(out_tag) - g.GetXaxis().SetTitle(h.GetXaxis().GetTitle()) - g.GetYaxis().SetTitle(h.GetYaxis().GetTitle()) - - for i in range(1, h.GetNbinsX() + 1): - x = h.GetXaxis().GetBinCenter(i) - if x < thr: - continue - hh = h.ProjectionY(f"{h.GetName()}_{i}", i, i) - y = hh.GetRMS() - y = hsigma.GetBinContent(hsigma.GetXaxis().FindBin(x)) - g.SetPoint(g.GetN(), x, y) - if show: - can2 = "1d" + out_tag - can2 = TCanvas(can2, can2) - canvases.append(can2) - can2.SetLogy() - can2.SetLogx() - g.SetMarkerStyle(8) - g.Draw() - can2.Update() - print(g.Eval(0.1)) - # input("press enter to continue") - g.SaveAs(f"{out_tag}.root") - return g - - -def main(input_files, tags, show=True): - g = [] - for i, j in enumerate(input_files): - t = tags[i] - # print(i, j, t) - g.append(make_reso(j, t, show)) - can = TCanvas("all", "all") - can.DrawFrame( - 0, - 0, - 1, - 200, - f";{g[0].GetXaxis().GetTitle()};Resolution {g[0].GetYaxis().GetTitle()};", - ) - cols = ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"] - leg = TLegend(0.9, 0.1, 1, 0.9) - for j, i in enumerate(g): - print("Drawing", i) - c = TColor.GetColor(cols[j]) - i.SetLineColor(c) - i.SetLineWidth(2) - leg.AddEntry(i, "", "l") - i.Draw("sameL") - leg.Draw() - can.Update() - input("press enter to continue") - - -if __name__ == "__main__": - parser = argparse.ArgumentParser(description="Runner for O2 analyses") - parser.add_argument("files", type=str, nargs="+", help="Running files") - parser.add_argument( - "--tags", "-t", type=str, default=[], nargs="+", help="Tag for output files" - ) - parser.add_argument("-s", action="store_true", help="Verbose mode") - args = parser.parse_args() - main(args.files, args.tags, args.s) diff --git a/config/clean_dummy.sh b/config/clean_dummy.sh new file mode 100644 index 00000000..755f8585 --- /dev/null +++ b/config/clean_dummy.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Script to delete created files + +rm -rf \ +AnalysisResults_ALI.root AnalysisResults_O2.root AnalysisResults_trees_O2.root \ +./*.log \ +output_* \ +|| { echo "Error: Failed to delete files."; exit 1; } + +exit 0 diff --git a/config/config_input_dummy.sh b/config/config_input_dummy.sh index b1bdfae3..be5072b4 100644 --- a/config/config_input_dummy.sh +++ b/config/config_input_dummy.sh @@ -1,14 +1,41 @@ #!/bin/bash # shellcheck disable=SC2034 # Ignore unused parameters. -# Input specification for runtest.sh +# Input specification for run_analysis.sh # (Modifies input parameters.) -INPUT_CASE=1 -INPUT_LABEL="my data" -INPUT_DIR="./data" -INPUT_FILES="*/AliESDs.root" -JSON="dpl-config.json" -ISINPUTO2=0 -ISMC=0 -NFILESMAX=1 +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.) + +# Number of input files per job. (Will be automatically optimised if set to 0.) +NFILESPERJOB_CONVERT=0 # Conversion +NFILESPERJOB_ALI=0 # AliPhysics +NFILESPERJOB_O2=1 # O2 + +# Maximum number of simultaneously running O2 jobs. (Adjust it based on available memory.) +NJOBSPARALLEL_O2=$(python3 -c "print(min(10, round($(nproc) / 2)))") + +# Default settings: +# INPUT_LABEL="nothing" # Input description +# INPUT_DIR="$PWD" # Input directory +# INPUT_FILES="AliESDs.root" # Input file pattern +# INPUT_SYS="pp" # Collision system ("pp", "PbPb") +# INPUT_RUN=2 # LHC Run (2, 3, 5) +# INPUT_IS_O2=0 # Input files are in O2 format. +# INPUT_IS_MC=0 # Input files are MC data. +# INPUT_PARENT_MASK="" # Path replacement mask for the input directory of parent files in case of linked derived O2 input. Set to ";" if no replacement needed. +# INPUT_TASK_CONFIG="" # Input-specific task configuration (e.g. enabling converters), overriding the task configuration in CONFIG_TASKS. String of space-separated commands. +# JSON="dpl-config.json" # O2 device configuration + +# O2 device configuration +JSON="dpl-config_dummy.json" + +INPUT_BASE="/data" + +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" + ;; + esac diff --git a/config/config_tasks_dummy.sh b/config/config_tasks_dummy.sh index cceee52b..1710ef2a 100644 --- a/config/config_tasks_dummy.sh +++ b/config/config_tasks_dummy.sh @@ -1,7 +1,7 @@ #!/bin/bash # shellcheck disable=SC2034 # Ignore unused parameters. -# Configuration of tasks for runtest.sh +# Configuration of tasks for run_analysis.sh # (Cleans directory, modifies step activation, modifies JSON, generates step scripts.) # Mandatory functions: @@ -13,24 +13,54 @@ #################################################################################################### +# Here you can select the AliPhysics and O2Physics Git branches to load. (You need to have them built with aliBuild.) +# BRANCH_ALI="master" +# ENV_ALI="alienv setenv AliPhysics/latest-${BRANCH_ALI}-o2 -c" +# BRANCH_O2="master" +# ENV_O2="alienv setenv O2Physics/latest-${BRANCH_O2}-o2 -c" + # 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. (Compare AliPhysics and O2 output.) +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; } + +DATABASE_O2="workflows_dummy.yml" # Workflow specification database +MAKE_GRAPH=0 # Make topology graph. +MAKE_PERF_STATS=0 # Produce performance profiling stats. + +# Activation of O2 workflows +# Trigger selection +DOO2_EVTSEL=1 # event-selection +DOO2_TRACKSEL=1 # trackselection +# Converters (Consider setting these per input case via INPUT_TASK_CONFIG.) +DOO2_CONV_MC=0 # mc-converter +DOO2_CONV_FDD=0 # fdd-converter +DOO2_CONV_COLL=0 # collision-converter +DOO2_CONV_ZDC=0 # zdc-converter +DOO2_CONV_BC=0 # bc-converter +DOO2_CONV_TRKEX=0 # tracks-extra-converter +DOO2_CONV_V0=0 # v0converter -DEBUG=1 # Print out more information. +SAVETREES=0 # Save O2 tables to trees. #################################################################################################### # Clean before (argument=1) and after (argument=2) running. function Clean { # Cleanup before running - [ "$1" -eq 1 ] && MsgWarn "Before" + [ "$1" -eq 1 ] && { bash "$DIR_TASKS/clean_dummy.sh" || ErrExit; } # Cleanup after running - [ "$1" -eq 2 ] && MsgWarn "After" + [ "$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 } @@ -38,13 +68,89 @@ function Clean { # Modify the JSON file. function AdjustJson { MsgWarn "Running 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" + + # Derived AO2D input + if [ "$INPUT_PARENT_MASK" ]; then + ReplaceString "PARENT_PATH_MASK" "$INPUT_PARENT_MASK" "$JSON" || ErrExit "Failed to edit $JSON." + fi + + # 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." + fi } # Generate the O2 script containing the full workflow specification. function MakeScriptO2 { MsgWarn "Running MakeScriptO2" - O2EXEC="echo \"O2\"" - O2EXEC+=" && cp \"\$FileIn\" $FILEOUT" + # 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 + + # Suffix to distinguish the workflows that run on derived data with parent access (skims) + SUFFIX_DER_MASK="_derX" # suffix mask to be replaced in the workflow names + [ "$INPUT_PARENT_MASK" ] && SUFFIX_DER="_derived" || SUFFIX_DER="" # the actual suffix to be used instead of the mask + + WORKFLOWS="" + [ $DOO2_EVTSEL -eq 1 ] && WORKFLOWS+=" o2-analysis-event-selection" + [ $DOO2_TRACKSEL -eq 1 ] && WORKFLOWS+=" o2-analysis-trackselection${SUFFIX_RUN}" + # 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" + [ $DOO2_CONV_V0 -eq 1 ] && WORKFLOWS+=" o2-analysis-v0converter" + + # 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_PERF_STATS -eq 1 ] && OPT_MAKECMD+=" -p" + + # 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." + ReplaceString "$SUFFIX_DER_MASK" "$SUFFIX_DER" "$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 @@ -57,7 +163,7 @@ EOF function MakeScriptAli { MsgWarn "Running MakeScriptAli" ALIEXEC="echo \"Ali\"" - ALIEXEC+=" && cp \"\$FileIn\" $FILEOUT" + ALIEXEC+=" && cp \$(head -n 1 \"\$FileIn\") $FILEOUT" cat << EOF > "$SCRIPT_ALI" #!/bin/bash FileIn="\$1" diff --git a/config/config_update.sh b/config/config_update.sh deleted file mode 100644 index d9f040d3..00000000 --- a/config/config_update.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2034 # Ignore unused parameters. - -# Configuration of update_packages.sh - -#################################################################################################### - -# Settings - -# Delete unnecessary files. -CLEAN=1 -CLEAN_AGGRESSIVE=0 - -# Delete all builds that are not needed to run the latest builds of specified development packages. -# WARNING: This feature requires all development packages to be specified and added in the list LIST_PKG_DEV_SPECS! Builds of missing packages will be deleted! -# WARNING: This feature executes "aliBuild build" for all development packages. If a package needs to be rebuilt, it will be rebuilt! -# WARNING: Do not enable this if you need to keep several builds per development package (e.g. for different branches or commits)! -PURGE_BUILDS=0 - -# Print out an overview of the latest commits of repositories. -PRINT_COMMITS=1 - -# Main ALICE software directory -ALICE_DIR="$HOME/alice" - -# aliBuild -#ALIBUILD_ARCH=$(aliBuild architecture) # system architecture -#ALIBUILD_OPT="-a $ALIBUILD_ARCH" - -#################################################################################################### - -# Package specification: -# paths, names of remotes (check git remote -v), build options. - -# alidist -ALIDIST_NAME="alidist" -ALIDIST_UPDATE=0 -ALIDIST_DIR="$ALICE_DIR/alidist" -ALIDIST_REMOTE_MAIN="upstream" -ALIDIST_REMOTE_FORK="" -ALIDIST_BRANCH_MAIN="master" -ALIDIST_SPECS=("$ALIDIST_NAME" "$ALIDIST_UPDATE" "$ALIDIST_DIR" "$ALIDIST_REMOTE_MAIN" "$ALIDIST_REMOTE_FORK" "$ALIDIST_BRANCH_MAIN") - -# AliPhysics -ALIPHYSICS_NAME="AliPhysics" -ALIPHYSICS_UPDATE=0 -ALIPHYSICS_DIR="$ALICE_DIR/AliPhysics" -ALIPHYSICS_REMOTE_MAIN="upstream" -ALIPHYSICS_REMOTE_FORK="origin" -ALIPHYSICS_BRANCH_MAIN="master" -ALIPHYSICS_BUILD_OPT="--defaults o2" -ALIPHYSICS_BUILD=0 -ALIPHYSICS_SPECS=("$ALIPHYSICS_NAME" "$ALIPHYSICS_UPDATE" "$ALIPHYSICS_DIR" "$ALIPHYSICS_REMOTE_MAIN" "$ALIPHYSICS_REMOTE_FORK" "$ALIPHYSICS_BRANCH_MAIN" "$ALIPHYSICS_BUILD_OPT" "$ALIPHYSICS_BUILD") - -# O2 -O2_NAME="O2" -O2_UPDATE=1 -O2_DIR="$ALICE_DIR/O2" -O2_REMOTE_MAIN="upstream" -O2_REMOTE_FORK="origin" -O2_BRANCH_MAIN="dev" -O2_BUILD_OPT="--defaults o2" -O2_BUILD=1 -O2_SPECS=("$O2_NAME" "$O2_UPDATE" "$O2_DIR" "$O2_REMOTE_MAIN" "$O2_REMOTE_FORK" "$O2_BRANCH_MAIN" "$O2_BUILD_OPT" "$O2_BUILD") - -# O2Physics -O2PHYSICS_NAME="O2Physics" -O2PHYSICS_UPDATE=1 -O2PHYSICS_DIR="$ALICE_DIR/O2Physics" -O2PHYSICS_REMOTE_MAIN="upstream" -O2PHYSICS_REMOTE_FORK="origin" -O2PHYSICS_BRANCH_MAIN="master" -O2PHYSICS_BUILD_OPT="--defaults o2" -O2PHYSICS_BUILD=1 -O2PHYSICS_SPECS=("$O2PHYSICS_NAME" "$O2PHYSICS_UPDATE" "$O2PHYSICS_DIR" "$O2PHYSICS_REMOTE_MAIN" "$O2PHYSICS_REMOTE_FORK" "$O2PHYSICS_BRANCH_MAIN" "$O2PHYSICS_BUILD_OPT" "$O2PHYSICS_BUILD") - -# DelphesO2 -DELPHESO2_NAME="DelphesO2" -DELPHESO2_UPDATE=0 -DELPHESO2_DIR="$ALICE_DIR/DelphesO2" -DELPHESO2_REMOTE_MAIN="upstream" -DELPHESO2_REMOTE_FORK="" -DELPHESO2_BRANCH_MAIN="master" -DELPHESO2_BUILD_OPT="--defaults o2" -DELPHESO2_BUILD=0 -DELPHESO2_SPECS=("$DELPHESO2_NAME" "$DELPHESO2_UPDATE" "$DELPHESO2_DIR" "$DELPHESO2_REMOTE_MAIN" "$DELPHESO2_REMOTE_FORK" "$DELPHESO2_BRANCH_MAIN" "$DELPHESO2_BUILD_OPT" "$DELPHESO2_BUILD") - -# O2DPG -O2DPG_NAME="O2DPG" -O2DPG_UPDATE=0 -O2DPG_DIR="$ALICE_DIR/O2DPG" -O2DPG_REMOTE_MAIN="upstream" -O2DPG_REMOTE_FORK="" -O2DPG_BRANCH_MAIN="master" -O2DPG_BUILD_OPT="--defaults o2" -O2DPG_BUILD=0 -O2DPG_SPECS=("$O2DPG_NAME" "$O2DPG_UPDATE" "$O2DPG_DIR" "$O2DPG_REMOTE_MAIN" "$O2DPG_REMOTE_FORK" "$O2DPG_BRANCH_MAIN" "$O2DPG_BUILD_OPT" "$O2DPG_BUILD") - -# Run 3 validation -RUN3VALIDATE_NAME="Run 3 validation" -RUN3VALIDATE_UPDATE=1 -RUN3VALIDATE_DIR="$DIR_REPO" -RUN3VALIDATE_REMOTE_MAIN="upstream" -RUN3VALIDATE_REMOTE_FORK="origin" -RUN3VALIDATE_BRANCH_MAIN="master" -RUN3VALIDATE_SPECS=("$RUN3VALIDATE_NAME" "$RUN3VALIDATE_UPDATE" "$RUN3VALIDATE_DIR" "$RUN3VALIDATE_REMOTE_MAIN" "$RUN3VALIDATE_REMOTE_FORK" "$RUN3VALIDATE_BRANCH_MAIN") - -#################################################################################################### - -# List of packages to update/build (Put alidist first!) -LIST_PKG_SPECS=( -"ALIDIST_SPECS" -"ALIPHYSICS_SPECS" -"O2_SPECS" -"O2PHYSICS_SPECS" -#"DELPHESO2_SPECS" -#"O2DPG_SPECS" -"RUN3VALIDATE_SPECS" -) - -# List of development aliBuild packages -LIST_PKG_DEV_SPECS=( -"ALIPHYSICS_SPECS" -"O2_SPECS" -"O2PHYSICS_SPECS" -#"DELPHESO2_SPECS" -#"O2DPG_SPECS" -) - -#################################################################################################### diff --git a/config/dpl-config_dummy.json b/config/dpl-config_dummy.json new file mode 100644 index 00000000..43d97550 --- /dev/null +++ b/config/dpl-config_dummy.json @@ -0,0 +1,14 @@ +{ + "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", + "aod-file-private": "@list_o2.txt", + "aod-parent-base-path-replacement": "PARENT_PATH_MASK", + "aod-parent-access-level": 1 + } +} diff --git a/config/workflows_dummy.yml b/config/workflows_dummy.yml new file mode 100644 index 00000000..a6a4b39a --- /dev/null +++ b/config/workflows_dummy.yml @@ -0,0 +1,130 @@ +--- +options: + global: "" # used once at the end of the command + local: # used for every workflow + - "-b" + - "--configuration json://$JSON" + - "--aod-memory-rate-limit 2000000000" + - "--shm-segment-size 16000000000" + - "--resources-monitoring 2" + - "--min-failure-level error" + +workflows: + # dummy workflow with the full list of options + o2-analysis-workflow: + executable: o2-analysis-workflow # workflow command, if different from the dictionary node name above + dependencies: [] # dictionary nodes that this workflow needs as direct dependencies (format: str, list) + requires_mc: no # yes/no whether the workflow can only run on MC or not + options: "--option" # command line options (format: str, list), see more detailed format below + # options: + # default: "" + # real: "" + # mc: "--doMC" + tables: [] # descriptions of output tables to be saved as trees (format: str, list), see more detailed format below + # tables: + # default: [] + # real: [] + # mc: [] + + # Helper tasks + + o2-analysis-track-to-collision-associator: + tables: HFTRACKASSOC + + 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-trackselection_run5: + executable: o2-analysis-alice3-trackselection + + 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-track-dca_run5: + executable: o2-analysis-alice3-trackextension + + o2-analysis-centrality_run2: + executable: o2-analysis-centrality-table + + o2-analysis-centrality_run3: + executable: o2-analysis-centrality-table + + o2-analysis-centrality_run5: + executable: o2-analysis-alice3-centrality + dependencies: o2-analysis-track-dca_run5 + + o2-analysis-event-selection: + dependencies: o2-analysis-timestamp + + o2-analysis-multiplicity-table_run2: + executable: o2-analysis-multiplicity-table + + o2-analysis-multiplicity-table_run3: + executable: o2-analysis-multiplicity-table + dependencies: o2-analysis-event-selection + + o2-analysis-ft0-corrected-table: {} + + # PID + + o2-analysis-pid-tpc-base: {} + + o2-analysis-pid-tpc: + dependencies: [o2-analysis-pid-tpc-base, o2-analysis-timestamp] + + o2-analysis-pid-tof-base_run2: + executable: o2-analysis-pid-tof-base + dependencies: o2-analysis-event-selection + + o2-analysis-pid-tof-base_run3: + executable: o2-analysis-pid-tof-base + dependencies: [o2-analysis-event-selection, o2-analysis-ft0-corrected-table] + + o2-analysis-pid-tof-full_run2: + executable: o2-analysis-pid-tof-full + dependencies: [o2-analysis-pid-tof-base_run2, o2-analysis-timestamp] + + o2-analysis-pid-tof-full_run3: + executable: o2-analysis-pid-tof-full + dependencies: [o2-analysis-pid-tof-base_run3, o2-analysis-timestamp] + + o2-analysis-pid-tof-full_run5: + executable: o2-analysis-alice3-pid-tof + + o2-analysis-pid-bayes: + dependencies: [o2-analysis-pid-tof-full_runX, o2-analysis-pid-tpc, o2-analysis-multiplicity-table_runX] + + o2-analysis-pid-tof-beta: {} + + # 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-v0converter: {} + + # LF + + o2-analysis-lf-lambdakzerobuilder: + dependencies: [o2-analysis-timestamp, o2-analysis-track-dca_runX, o2-analysis-pid-tpc] diff --git a/exec/batch_ali.sh b/exec/batch_ali.sh index 9bcbb4d6..aa871593 100644 --- a/exec/batch_ali.sh +++ b/exec/batch_ali.sh @@ -18,7 +18,6 @@ DIR_THIS="$(dirname "$(realpath "$0")")" # shellcheck disable=SC1091 # Ignore not following. source "$DIR_THIS/utilities.sh" || { echo "Error: Failed to load utilities."; exit 1; } - CheckFile "$SCRIPT" CheckFile "$JSON" SCRIPT="$(realpath "$SCRIPT")" @@ -65,7 +64,7 @@ else fi || ErrExit "\nCheck $(realpath $LogFile)" grep -q -e '^'"W-" -e '^'"Warning" "$LogFile" && MsgWarn "There were warnings!\nCheck $(realpath $LogFile)" grep -q -e '^'"E-" -e '^'"Error" "$LogFile" && MsgErr "There were errors!\nCheck $(realpath $LogFile)" -grep -q -e '^'"F-" -e '^'"Fatal" -e "segmentation" "$LogFile" && ErrExit "There were fatal errors!\nCheck $(realpath $LogFile)" +grep -q -e '^'"F-" -e '^'"Fatal" -e "segmentation" -e "Segmentation" "$LogFile" && ErrExit "There were fatal errors!\nCheck $(realpath $LogFile)" echo "Merging output files... (output file: $FILEOUT, logfile: $LogFile)" hadd "$FILEOUT" @"$FilesToMerge" >> $LogFile 2>&1 || \ diff --git a/exec/batch_convert.sh b/exec/batch_convert.sh index f3ccbe97..843daa80 100644 --- a/exec/batch_convert.sh +++ b/exec/batch_convert.sh @@ -4,7 +4,7 @@ LISTINPUT="$1" LISTOUTPUT="$2" -ISMC=$3 +INPUT_IS_MC=$3 USEALIEVCUTS=$4 DEBUG=$5 NFILESPERJOB=$6 @@ -19,14 +19,13 @@ DIR_THIS="$(dirname "$(realpath "$0")")" # shellcheck disable=SC1091 # Ignore not following. source "$DIR_THIS/utilities.sh" || { echo "Error: Failed to load utilities."; exit 1; } - LogFile="log_convert.log" ListIn="list_convert.txt" IndexFile=0 IndexJob=0 DirOutMain="output_conversion" -CMDPARALLEL="cd \"$DirOutMain/{}\" && bash \"$DIR_THIS/run_convert.sh\" \"$ListIn\" $ISMC $USEALIEVCUTS \"$LogFile\"" +CMDPARALLEL="cd \"$DirOutMain/{}\" && bash \"$DIR_THIS/run_convert.sh\" \"$ListIn\" $INPUT_IS_MC $USEALIEVCUTS \"$LogFile\"" # Clean before running. rm -rf "$LISTOUTPUT" "$DirOutMain" || ErrExit "Failed to delete output files." @@ -60,6 +59,6 @@ else fi || ErrExit "\nCheck $(realpath $LogFile)" grep -q -e '^'"W-" -e '^'"Warning" "$LogFile" && MsgWarn "There were warnings!\nCheck $(realpath $LogFile)" grep -q -e '^'"E-" -e '^'"Error" "$LogFile" && MsgErr "There were errors!\nCheck $(realpath $LogFile)" -grep -q -e '^'"F-" -e '^'"Fatal" -e "segmentation" "$LogFile" && ErrExit "There were fatal errors!\nCheck $(realpath $LogFile)" +grep -q -e '^'"F-" -e '^'"Fatal" -e "segmentation" -e "Segmentation" "$LogFile" && ErrExit "There were fatal errors!\nCheck $(realpath $LogFile)" exit 0 diff --git a/exec/batch_o2.sh b/exec/batch_o2.sh index b253a298..7db7ed96 100644 --- a/exec/batch_o2.sh +++ b/exec/batch_o2.sh @@ -67,8 +67,8 @@ else # shellcheck disable=SC2086 # Ignore unquoted options. parallel $OPT_PARALLEL --will-cite --progress "$CMDPARALLEL" ::: $(seq 0 $IndexJob) > $LogFile fi || ErrExit "\nCheck $(realpath $LogFile)" -grep -q "\\[WARN\\]" "$LogFile" && MsgWarn "There were warnings!\nCheck $(realpath $LogFile)" -grep -q -e "\\[ERROR\\]" -e "segmentation" "$LogFile" && MsgErr "There were errors!\nCheck $(realpath $LogFile)" +grep -q -e "\\[WARN\\]" -e "Warning in " "$LogFile" && MsgWarn "There were warnings!\nCheck $(realpath $LogFile)" +grep -q -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " "$LogFile" && MsgErr "There were errors!\nCheck $(realpath $LogFile)" echo "Merging output files... (output file: $FILEOUT, logfile: $LogFile)" hadd $FILEOUT @"$FilesToMerge" >> $LogFile 2>&1 || \ diff --git a/exec/check_spaces.sh b/exec/check_spaces.sh old mode 100644 new mode 100755 diff --git a/exec/compare.py b/exec/compare.py new file mode 100755 index 00000000..ff96b58d --- /dev/null +++ b/exec/compare.py @@ -0,0 +1,347 @@ +#!/usr/bin/env python3 + +""" +Comparison script. +Comparing different files with same structure and same histogram names. +To run your comparison between AnalysisResults1.root AnalysisResults2.root you can use: +./compare.py AnalysisResults1.root AnalysisResults2.root -b +""" + +import argparse +from sys import exit + +from ROOT import ( # pylint: disable=import-error; RooUnfoldResponse, + TH1, + TH2, + TH3, + TAxis, + TCanvas, + TColor, + TFile, + THnSparse, + TLegend, + gROOT, +) + +# import itertools + + +def msg_err(message: str): + """Print error message""" + print(f"Error: {message}") + + +def msg_fatal(message: str): + """Print error message and exit""" + print(f"Fatal: {message}") + exit(1) + + +def are_valid(*objects) -> bool: + """Check whether objects exist""" + result = True + for i, o in enumerate(objects): + if not o: + msg_err(f"Bad object {i}") + result = False + return result + + +def are_same_axes(axis1, axis2) -> bool: + """Tell whether two axes are same.""" + if not are_valid(axis1, axis2): + msg_fatal("Bad input objects") + return False + # Check classes + for i, o in enumerate((axis1, axis2)): + if not isinstance(o, TAxis): + msg_fatal(f"Object {i} is not an axis") + return False + # Check number of bins + n_bins1, n_bins2 = axis1.GetNbins(), axis2.GetNbins() + if n_bins1 != n_bins2: + return False + # Check bin arrays + array1 = [axis1.GetBinLowEdge(i + 1) for i in range(n_bins1 + 1)] + array2 = [axis2.GetBinLowEdge(i + 1) for i in range(n_bins2 + 1)] + if array1 != array2: + return False + return True + + +def get_object_type(obj) -> int: + """Return histogram degree""" + # for num, tp in zip((5, 4, 3, 2, 1), (RooUnfoldResponse, THnSparse, TH3, TH2, TH1)): + for num, tp in zip((4, 3, 2, 1), (THnSparse, TH3, TH2, TH1)): + if isinstance(obj, tp): + return num + return 0 + + +def are_same_histograms(his1: TH1, his2: TH1) -> bool: + """Tell whether two histograms are same.""" + if not are_valid(his1, his2): + msg_fatal("Bad input objects") + return False + # Compare number of entries + if his1.GetEntries() != his2.GetEntries(): + print(f"Different number of entries {his1.GetEntries()} vs {his2.GetEntries()}") + return False + # Compare axes + for ax1, ax2 in zip( + (his1.GetXaxis(), his1.GetYaxis(), his1.GetZaxis()), (his2.GetXaxis(), his2.GetYaxis(), his2.GetZaxis()) + ): + if not are_same_axes(ax1, ax2): + print("Different axes") + return False + # Compare bin counts and errors (include under/overflow bins) + for bin_z in range(his1.GetNbinsZ() + 2): + for bin_y in range(his1.GetNbinsY() + 2): + for bin_x in range(his1.GetNbinsX() + 2): + bin = his1.GetBin(bin_x, bin_y, bin_z) + if his1.GetBinContent(bin) != his2.GetBinContent(bin) or his1.GetBinError(bin) != his2.GetBinError(bin): + print( + f"Different bin {bin} content: {his1.GetBinContent(bin)} ± {his1.GetBinError(bin)} vs " + "{his2.GetBinContent(bin)} ± {his2.GetBinError(bin)}" + ) + return False + return True + + +def are_same_thnspare(his1: THnSparse, his2: THnSparse) -> bool: + """Tell whether two THnSparse objects are same.""" + if not are_valid(his1, his2): + msg_fatal("Bad input objects") + return False + # Compare number of dimensions + if his1.GetNdimensions() != his2.GetNdimensions(): + return False + # Compare number of entries + if his1.GetEntries() != his2.GetEntries(): + return False + # Compare number of filled bins + if his1.GetNbins() != his2.GetNbins(): + return False + # Compare axes + for iAx in range(his1.GetNdimensions()): + if not are_same_axes(his1.GetAxis(iAx), his2.GetAxis(iAx)): + return False + # Compare bin content + for iBin in range(his1.GetNbins()): + if his1.GetBinContent(iBin) != his2.GetBinContent(iBin) or his1.GetBinError(iBin) != his2.GetBinError(iBin): + return False + return True + + +# def are_same_response(his1 : RooUnfoldResponse, his2 : RooUnfoldResponse) -> bool: +# """ Tell whether two RooUnfoldResponse objects are same. """ +# if not are_valid(his1, his2): +# msg_fatal("Bad input objects") +# return False +# # Compare number of dimensions +# if his1.GetDimensionMeasured() != his2.GetDimensionMeasured() or \ +# his1.GetDimensionTruth() != his2.GetDimensionTruth(): +# return False +# # Compare number of bins +# if his1.GetNbinsMeasured() != his2.GetNbinsMeasured() or his1.GetNbinsTruth() != his2.GetNbinsTruth(): +# return False +# # Compare axes and bin content +# if not are_same_histograms(his1.Hfakes(), his2.Hfakes()): +# return False +# if not are_same_histograms(his1.Hmeasured(), his2.Hmeasured()): +# return False +# if not are_same_histograms(his1.Htruth(), his2.Htruth()): +# return False +# if not are_same_histograms(his1.Hresponse(), his2.Hresponse()): +# return False +# return True + + +def are_same_objects(obj1, obj2) -> bool: + """Tell whether two histogram-like objects are same.""" + if not are_valid(obj1, obj2): + msg_fatal("Bad input objects") + return False + # Compare types + if type(obj1) is not type(obj2): + print(f"Different types {type(obj1)} {type(obj2)}") + return False + # Get ROOT types + list_type = [-1, -2] + for i, o in enumerate((obj1, obj2)): + list_type[i] = get_object_type(o) + # Compare ROOT types (is it not covered by type(obj)?) + if list_type[0] != list_type[1]: + print(f"Different types {list_type[0]} {list_type[1]}") + return False + type_obj = list_type[0] + # Compare supported ROOT objects + if type_obj == 0: + msg_fatal(f"Objects have an unsupported type {type(obj1)}.") + return False + # elif type_obj == 5: + # return are_same_response(obj1, obj2) + elif type_obj == 4: + return are_same_thnspare(obj1, obj2) + return are_same_histograms(obj1, obj2) + + +def compare(dict_obj, add_leg_title=True, normalize=True): + print("Comparing") + list_colors = ["#e41a1c", "#377eb8", "#4daf4a"] + list_markers = [21, 20, 34] + dict_colors = {} + dict_markers = {} + dict_list_canvas = {} + + # Explicit comparison + list_files = list(dict_obj.keys()) + name_file_0 = list_files[0] + name_file_1 = list_files[1] + for key_obj in dict_obj[name_file_0]: + obj_0 = dict_obj[name_file_0][key_obj] + obj_1 = dict_obj[name_file_1][key_obj] + name_his = obj_0.GetName() + if are_same_objects(obj_0, obj_1): + print(f"Objects {name_his} are same {obj_0.GetEntries()}") + else: + print(f"Objects {name_his} are different") + + for key_file in dict_obj: + print("Entry", len(dict_colors), key_file) + dict_colors[key_file] = TColor.GetColor(list_colors[len(dict_colors)]) + dict_markers[key_file] = list_markers[len(dict_markers)] + # Drawing objects + is_first_file = True + key_file_first = "" + for key_file in dict_obj: + if is_first_file: + key_file_first = key_file + for key_obj in dict_obj[key_file]: + obj = dict_obj[key_file][key_obj] + # FIXME + if "TDirectory" in obj.ClassName(): + continue + opt = "LP" + if dict_list_canvas.setdefault(key_obj, None) is None: + dict_list_canvas[key_obj] = [TCanvas(key_obj, key_obj), TCanvas(f"{key_obj}_ratio", f"{key_obj}_ratio")] + else: + opt += "same" + dict_list_canvas[key_obj][0].cd() + # print(f'Drawing {obj.GetName()} with opt "{opt}" on canvas {gPad.GetName()}') + obj.SetLineColor(dict_colors[key_file]) + obj.SetMarkerStyle(dict_markers[key_file]) + obj.SetMarkerColor(dict_colors[key_file]) + obj.SetBit(TH1.kNoTitle) + obj.SetBit(TH1.kNoStats) + obj.SetTitle(key_file) + if normalize: + dict_list_canvas[key_obj].append(obj.DrawNormalized(opt)) + else: + dict_list_canvas[key_obj].append(obj.DrawClone(opt)) + # Ratio + if not is_first_file: + dict_list_canvas[key_obj][1].cd() + # print(f'Drawing {obj.GetName()} with opt "{opt}" on canvas {gPad.GetName()}') + # line_1 = TLine(obj.GetXaxis().GetXmin(), 1, obj.GetXaxis().GetXmax(), 1) + obj_ratio = obj.Clone(f"{obj.GetName()}_ratio") + obj_ratio.Divide(dict_obj[key_file_first][key_obj]) + dict_list_canvas[key_obj].append(obj_ratio.DrawClone(opt)) + # dict_list_canvas[key_obj].append(line_1.Draw()) + is_first_file = False + for key_obj in dict_list_canvas: + list_canvas = dict_list_canvas[key_obj] + can = list_canvas[0] + can.cd() + # gPad.SetLogy() + leg = TLegend(0.1, 0.9, 0.9, 0.99, can.GetName()) + leg.SetNColumns(2) + list_canvas.append(leg) + for prim in can.GetListOfPrimitives(): + leg.AddEntry(prim) + leg.Draw() + # Ratio + can_ratio = list_canvas[1] + can_ratio.cd() + # gPad.SetLogy() + leg_ratio = TLegend(0.1, 0.9, 0.9, 0.99, can_ratio.GetName()) + leg_ratio.SetNColumns(2) + list_canvas.append(leg_ratio) + for prim in can_ratio.GetListOfPrimitives(): + leg_ratio.AddEntry(prim) + leg_ratio.Draw() + return dict_list_canvas + + +def main(files, th1=True, th2=False, th3=False): + gROOT.SetBatch(True) + list_files = [TFile(i) for i in files] + dict_obj = {} + + def extract(directory): + def accept_obj(entry): + if not th1 and "TH1" in entry.ClassName(): + return False + if not th2 and "TH2" in entry.ClassName(): + return False + if not th3 and "TH3" in entry.ClassName(): + return False + return True + + list_names = [] + print(f"Directory {directory.GetName()}") + for key in directory.GetListOfKeys(): + obj = directory.Get(key.GetName()) + if not accept_obj(obj): + continue + if "TDirectory" in obj.ClassName(): + for key_sub in obj.GetListOfKeys(): + if not accept_obj(obj.Get(key_sub.GetName())): + continue + list_names.append(f"{directory.GetName()}/{key.GetName()}/{key_sub.GetName()}") + continue + list_names.append(f"{directory.GetName()}/{key.GetName()}") + return list_names + + for file in list_files: + name_file = file.GetName() + name_file = name_file.replace(".root", "") + name_file = name_file.replace("AnalysisResults_O2_Run5_", "") + name_file = name_file.split("/")[-1] + dict_obj[name_file] = {} + list_keys = file.GetListOfKeys() + for key in list_keys: + # h[fn] = list(itertools.chain(*extract(i.Get(j.GetName())))) + list_obj_names = extract(file.Get(key.GetName())) + for name_obj in list_obj_names: + dict_obj[name_file][name_obj] = file.Get(name_obj) + dict_list_canvas = compare(dict_obj, normalize=False) + first = True + for key_obj in dict_list_canvas: + can = dict_list_canvas[key_obj][0] + can_rat = dict_list_canvas[key_obj][1] + print(key_obj) + if first: + can_first = can + can_first.SaveAs("Comparison.pdf[") + first = False + can.SaveAs("Comparison.pdf") + can_rat.SaveAs("Comparison.pdf") + can_first.SaveAs("Comparison.pdf]") + # file_out = TFile("Comparison.root", "RECREATE") + # for key_obj in dict_list_canvas: + # can = dict_list_canvas[key_obj][0] + # print("Writing", can.GetName()) + # can.Write(can.GetName().replace("/", "_folder_")) + # file_out.Close() + + +if __name__ == "__main__": + pass + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("files", type=str, nargs="+", help="Input files") + parser.add_argument("-v", action="store_true", help="Verbose mode") + parser.add_argument("-b", action="store_true", help="Background mode") + args = parser.parse_args() + + main(files=args.files) diff --git a/exec/convertAO2D.C b/exec/convertAO2D.C index 7a031316..44dae0af 100644 --- a/exec/convertAO2D.C +++ b/exec/convertAO2D.C @@ -1,14 +1,29 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + R__ADD_INCLUDE_PATH($ALICE_ROOT) R__ADD_INCLUDE_PATH($ALICE_PHYSICS) -#include -#include -#include -#include -#include -#include -#include -TChain* CreateLocalChain(const char* txtfile, const char* type, int nfiles); +#include + +#include "ANALYSIS/macros/train/AddESDHandler.C" // NOLINT +#include "ANALYSIS/macros/train/AddAODHandler.C" // NOLINT +#include "ANALYSIS/macros/train/AddMCHandler.C" // NOLINT +#include "OADB/COMMON/MULTIPLICITY/macros/AddTaskMultSelection.C" // NOLINT +#include "OADB/macros/AddTaskPhysicsSelection.C" // NOLINT +#include "ANALYSIS/macros/AddTaskPIDResponse.C" // NOLINT +#include "RUN3/AddTaskAO2Dconverter.C" // NOLINT +#include "PWGGA/GammaConv/macros/AddTask_V0Reader.C" // NOLINT + +#include "utilitiesAli.h" Long64_t convertAO2D(TString listoffiles, bool isMC = 1, bool useAliEvCuts = false, bool isESD = 1, int nmaxevents = -1) { @@ -28,8 +43,8 @@ Long64_t convertAO2D(TString listoffiles, bool isMC = 1, bool useAliEvCuts = fal ULong64_t nentries = chain->GetEntries(); if (nmaxevents != -1) nentries = nmaxevents; - cout << nentries << " entries in the chain." << endl; - cout << nentries << " converted" << endl; + std::cout << nentries << " entries in the chain." << endl; + std::cout << nentries << " converted" << endl; AliAnalysisManager* mgr = new AliAnalysisManager("AOD converter"); if (isESD) { AddESDHandler(); @@ -40,59 +55,40 @@ Long64_t convertAO2D(TString listoffiles, bool isMC = 1, bool useAliEvCuts = fal AddTaskMultSelection(); AddTaskPhysicsSelection(isMC); AddTaskPIDResponse(); + + // V0Reader related stuff + Int_t isHeavyIon = 0; + TString periodNameV0Reader = "LHC17p"; + TString cutnumberEvent = "00000003"; + if (isHeavyIon == 1) + cutnumberEvent = "10000003"; + else if (isHeavyIon == 2) + cutnumberEvent = "80000003"; + else if (isHeavyIon == 29) // UPC + cutnumberEvent = "100c0003"; + TString conversionPhotonCutnumber = "00000008400000001100000000"; + AddTask_V0Reader(periodNameV0Reader, kFALSE, 0, kTRUE, isHeavyIon, cutnumberEvent + "_" + conversionPhotonCutnumber, conversionPhotonCutnumber); + if (isMC && isESD) AliMCEventHandler* handlerMC = AddMCHandler(); AliAnalysisTaskAO2Dconverter* converter = AddTaskAO2Dconverter(""); - //converter->SelectCollisionCandidates(AliVEvent::kAny); + converter->SetTruncation(true); + converter->SetCompression(501); + converter->SetMaxBytes(250000000); + converter->SetEMCALAmplitudeThreshold(0.075); + converter->SetConversionCut(conversionPhotonCutnumber); + converter->SetDeltaAODBranchName(Form("GammaConv_%s_%s_gamma", cutnumberEvent.Data(), conversionPhotonCutnumber.Data())); + // converter->SelectCollisionCandidates(AliVEvent::kAny); if (useAliEvCuts) converter->SetUseEventCuts(kTRUE); if (isMC) converter->SetMCMode(); if (!mgr->InitAnalysis()) return -1; - //PH mgr->SetBit(AliAnalysisManager::kTrueNotify); - //mgr->SetRunFromPath(244918); + // PH mgr->SetBit(AliAnalysisManager::kTrueNotify); + // mgr->SetRunFromPath(244918); mgr->PrintStatus(); mgr->SetDebugLevel(1); return mgr->StartAnalysis("localfile", chain, nentries, 0); } - -TChain* CreateLocalChain(const char* txtfile, const char* type, int nfiles) -{ - TString treename = type; - treename.ToLower(); - treename += "Tree"; - printf("***************************************\n"); - printf(" Getting chain of trees %s\n", treename.Data()); - printf("***************************************\n"); - // 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(treename); - while (in.good()) { - in >> line; - if (line.IsNull() || line.BeginsWith("#")) - continue; - if (count++ == nfiles) - break; - TString esdFile(line); - TFile* file = TFile::Open(esdFile); - if (file && !file->IsZombie()) { - chain->Add(esdFile); - file->Close(); - } else { - Error("GetChainforTestMode", "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/exec/debug.sh b/exec/debug.sh old mode 100644 new mode 100755 index 59673328..09dc494e --- a/exec/debug.sh +++ b/exec/debug.sh @@ -30,9 +30,9 @@ IsUnfinishedJob() { # Print warnings in the log. PrintWarnings() { if [ "$TYPE" == "o2" ]; then - grep -q "\\[WARN\\]" "$LOG" && { + grep -q -e "\\[WARN\\]" -e "Warning in " "$LOG" && { [ "$PRINTDIR" -eq 1 ] || { echo -e "\n$DIRJOB"; PRINTDIR=1; } - grep "\\[WARN\\]" "$LOG" | sort -u + grep -e "\\[WARN\\]" -e "Warning in " "$LOG" | sort -u } elif [ "$TYPE" == "ali" ]; then grep -q -e '^'"W-" -e '^'"Warning" "$LOG" && { @@ -45,9 +45,9 @@ PrintWarnings() { # Print errors in the log. PrintErrors() { if [ "$TYPE" == "o2" ]; then - grep -q -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "command not found" -e "Error:" "$LOG" && { + grep -q -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " "$LOG" && { [ "$PRINTDIR" -eq 1 ] || { echo -e "\n$DIRJOB"; PRINTDIR=1; } - grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "command not found" -e "Error:" "$LOG" | sort -u + grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " "$LOG" | sort -u } elif [ "$TYPE" == "ali" ]; then grep -q -e '^'"E-" -e '^'"Error" -e '^'"F-" -e '^'"Fatal" -e "segmentation" -e "Segmentation" "$LOG" && { diff --git a/exec/download_from_grid.sh b/exec/download_from_grid.sh index 41b13fa7..457e4936 100755 --- a/exec/download_from_grid.sh +++ b/exec/download_from_grid.sh @@ -75,7 +75,7 @@ while true; do read -r -p "Answer: " yn case $yn in [y] ) echo "Proceeding"; break;; - [n] ) echo "Aborting"; [ "$LISTEXT" -eq 0 ] && rm -f "$inputlist"; exit 0; break;; + [n] ) echo "Aborting"; [ "$LISTEXT" -eq 0 ] && rm -f "$inputlist"; exit 0;; * ) echo "Please answer y or n.";; esac done @@ -99,7 +99,7 @@ done < "$inputlist" if [ "$PARALLEL" -eq 1 ]; then # Download with GNU Parallel. - parallel --halt soon,fail=100% --will-cite --progress < "$scriptfile" > "$logfile" + parallel --halt soon,fail=100% --jobs 10 --will-cite --progress < "$scriptfile" > "$logfile" # Report result. nsuccess=$(grep -c "STATUS OK" "$logfile") nvalid=$(grep -c "TARGET VALID" "$logfile") @@ -111,7 +111,7 @@ else pause=2 # [s] status update interval CMDNRUN="top -u $USER -n 1 -b -c | grep python3 | grep jalien | wc -l" # Wait for the start. - while [ $nrunning -eq 0 ]; do nrunning=$(eval "$CMDNRUN"); done + while [ "$nrunning" -eq 0 ]; do nrunning=$(eval "$CMDNRUN"); done # Report status while [ "$nrunning" -gt 0 ]; do nstarted=$(grep -c "Start" "$logfile") diff --git a/exec/extract_df.py b/exec/extract_df.py new file mode 100755 index 00000000..5b16b4d0 --- /dev/null +++ b/exec/extract_df.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python3 + +""" +Extract data frames from AO2D.root files with information about parent files. +""" + +import sys + +from ROOT import TFile, TObject # pylint: disable=import-error + +# DF range +df_first = 0 +df_last = 0 + +for f in sys.argv[1:]: + df_i = 0 # DF counter + file_in = TFile.Open(f) + file_out = TFile.Open(f.replace(".root", "_edit.root"), "recreate") + for key in file_in.GetListOfKeys(): + key_name = key.GetName() + obj = file_in.Get(key_name) + if not obj: + continue + if key_name == "parentFiles": + print(f"Writing object {key_name}") + file_out.cd() + res = obj.Write(key_name, TObject.kSingleKey) + if not res: + print(f"Failed to write {key_name}") + # DF directory + elif obj.ClassName() == "TDirectoryFile": + if df_first <= df_i <= df_last: + print(f"Writing object {key_name}") + # Create the DF directory + dir_obj = file_out.mkdir(key_name) + if not dir_obj: + print(f"Failed to create dir {key_name}") + dir_obj.cd() + # Write trees in the DF directory + for key_sub in obj.GetListOfKeys(): + key_sub_name = key_sub.GetName() + obj_sub = obj.Get(key_sub_name) + if not obj_sub: + continue + print(f"Writing object {key_name}/{key_sub_name}") + res = obj_sub.CloneTree().Write() if obj_sub.ClassName() == "TTree" else obj_sub.Write() + if not res: + print(f"Failed to write {key_name}/{key_sub_name}") + df_i += 1 diff --git a/exec/get_parents.py b/exec/get_parents.py new file mode 100755 index 00000000..043194b6 --- /dev/null +++ b/exec/get_parents.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python3 + +""" +Get paths to parent files from derived AO2D.root files. +""" + +import sys + +from ROOT import TFile # pylint: disable=import-error + +for f in sys.argv[1:]: + file = TFile.Open(f) + print(f) + list_parents = [] + obj_map = file.Get("parentFiles") + # map.Print() + # Loop over data frames + for key in obj_map: + # Get the parent file path + # print(map.GetValue(key)) + list_parents.append(str(obj_map.GetValue(key))) + # Remove duplicities and sort + print(len(list_parents)) + list_parents = list(dict.fromkeys(list_parents)) + list_parents.sort() + # Print out list of parents + for p in list_parents: + print(p) diff --git a/exec/make_command_o2.py b/exec/make_command_o2.py old mode 100644 new mode 100755 index dc9d2928..9ead8ab0 --- a/exec/make_command_o2.py +++ b/exec/make_command_o2.py @@ -10,7 +10,7 @@ import sys from typing import List -import yaml +import yaml # pylint: disable=import-error def eprint(*args, **kwargs): @@ -39,7 +39,7 @@ def msg_bold(message: str): eprint("\x1b[1m%s\x1b[0m" % message) -def join_strings(obj): +def join_strings(obj) -> str: """Return strings concatenated into one.""" if isinstance(obj, str): return obj @@ -47,6 +47,7 @@ def join_strings(obj): return " ".join(obj) else: msg_fatal("Cannot convert %s into a string" % type(obj)) + return "" def join_to_list(obj, list_out: list): @@ -59,6 +60,21 @@ def join_to_list(obj, list_out: list): msg_fatal("Cannot convert %s into a string" % type(obj)) +def make_table_output(spec: str) -> str: + """Format the output table descriptor.""" + words = spec.split("/") + if len(words) > 2: + return spec + if len(words) == 1: + return f"AOD/{spec}/0" + if len(words) == 2: + if words[0] in ("AOD", "AOD1", "DYN"): + return f"{spec}/0" + if words[1].isdigit(): + return f"AOD/{spec}" + return spec + + def healthy_structure(dic_full: dict): """Check correct structure of the database.""" if not isinstance(dic_full, dict): @@ -99,9 +115,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 @@ -139,23 +153,15 @@ 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") + parser.add_argument("-p", "--perf", action="store_true", help="produce performance profiling stats") args = parser.parse_args() path_file_database = args.database debug = args.debug @@ -163,6 +169,7 @@ def main(): mc_mode = args.mc save_tables = args.tables make_graph = args.graph + perf = args.perf # Open database input file. if debug: @@ -181,6 +188,13 @@ def main(): msg_warn("MC mode is on.") if save_tables: msg_warn("Tables will be saved in trees.") + if perf: + msg_warn( + "Performance profiling stats will be saved in perf.data files.\n" + " Convert them with: perf script --demangle -i perf.data --no-inline |" + " c++filt -r -t > profile.linux-perf.txt\n" + " and upload the output to https://www.speedscope.app/." + ) # Get workflow-independent options. dic_opt = dic_in["options"] @@ -194,9 +208,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)) @@ -237,13 +249,8 @@ 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)) - ) - str_before = "AOD/" - str_after = "/0" - string_tables = ",".join(str_before + t + str_after for t in tables) + msg_fatal('"tables" in %s must be str, list or dict, is %s' % (wf, type(tab_wf))) + string_tables = ",".join(make_table_output(t) for t in tables) if string_tables: opt_local += " --aod-writer-keep " + string_tables @@ -264,7 +271,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"] @@ -278,17 +285,18 @@ 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 + " " if not command: msg_fatal("Nothing to do!") - # Remove the leading "| \\\n". - command = command[4:] + # Remove the leading "| \\\n" and the trailing " ". + command = command[4:-1] + # Append performance profiling options. + if perf: + opt_perf = "perf record -F 99 -g --call-graph dwarf --user-callchains" + command = command.replace(string_wf, f"{opt_perf} {string_wf}") # Append global options. if opt_global: command += " " + opt_global @@ -318,9 +326,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: @@ -328,10 +334,8 @@ 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() +if __name__ == "__main__": + main() diff --git a/exec/runtest.sh b/exec/run_analysis.sh old mode 100644 new mode 100755 similarity index 74% rename from exec/runtest.sh rename to exec/run_analysis.sh index 557df5f2..bff069bb --- a/exec/runtest.sh +++ b/exec/run_analysis.sh @@ -4,7 +4,15 @@ # Steering script to run Run 2 to Run 3 conversion, AliPhysics tasks, O2 tasks, and postprocessing #################################################################################################### -# Default settings +# Declarations of global parameters and their default values + +# Main directories +DIR_EXEC="$(dirname "$(realpath "$0")")" # Directory of this script (and other execution code) +DIR_TASKS="$PWD" # Directory with task configuration + +# Configuration scripts +CONFIG_INPUT="config_input.sh" # Input specification (Modifies input parameters.) +CONFIG_TASKS="config_tasks.sh" # Task configuration (Cleans directory, modifies step activation, modifies JSON and generates step scripts via functions Clean, AdjustJson, MakeScriptAli, MakeScriptO2, MakeScriptPostprocess.) # Steps DOCLEAN=1 # Delete created files (before and after running tasks). @@ -13,61 +21,60 @@ DOALI=1 # Run AliPhysics tasks. DOO2=1 # Run O2 tasks. DOPOSTPROCESS=1 # Run output postprocessing. (Compare AliPhysics and O2 output.) -# Configuration scripts -CONFIG_INPUT="config_input.sh" # Input specification (Modifies input parameters.) -CONFIG_TASKS="config_tasks.sh" # Tasks configuration (Cleans directory, modifies step activation, modifies JSON and generates step scripts via functions Clean, AdjustJson, MakeScriptAli, MakeScriptO2, MakeScriptPostprocess.) - # Input parameters INPUT_CASE=-1 # Input case INPUT_LABEL="nothing" # Input description -INPUT_DIR="$PWD" # Input directory -INPUT_FILES="AliESDs.root" # Input file pattern -INPUT_SYS="pp" # Collision system -INPUT_RUN=2 # LHC Run (2, 3, 5) -JSON="dpl-config.json" # Tasks parameters -ISINPUTO2=0 # Input files are in O2 format. -ISMC=0 # Input files are MC data. -ISALICE3=0 # Input data from the ALICE 3 detectors. +INPUT_DIR="-" # Input directory +INPUT_FILES="AO2D.root" # Input file pattern +INPUT_SYS="pp" # Collision system ("pp", "PbPb") +INPUT_RUN=3 # LHC Run (2, 3, 5) +INPUT_IS_O2=1 # Input files are in O2 format. +INPUT_IS_MC=0 # Input files are MC data. +INPUT_PARENT_MASK="" # Path replacement mask for the input directory of parent files in case of linked derived O2 input. Set to ";" if no replacement needed. Syntax: "alien:///path/in/alien;/local/path" +INPUT_TASK_CONFIG="" # Input-specific task configuration (e.g. enabling converters), overriding the task configuration in CONFIG_TASKS. String of space-separated commands. +JSON="dpl-config.json" # O2 device configuration + +# Processing NFILESMAX=1 # Maximum number of processed input files. (Set to -0 to process all; to -N to process all but the last N files.) NFILESPERJOB_CONVERT=1 # Number of input files per conversion job NFILESPERJOB_ALI=1 # Number of input files per AliPhysics job NFILESPERJOB_O2=1 # Number of input files per O2 job -# Other options -SAVETREES=0 # Save O2 tables to trees. -DEBUG=0 # Print out more information. -USEALIEVCUTS=0 # Use AliEventCuts in AliPhysics (as used by conversion task) - # Performance NCORES=$(nproc) # Ideal number of used cores NCORESPERJOB_ALI=1 # Average number of cores used by one AliPhysics job NCORESPERJOB_O2=1.6 # Average number of cores used by one O2 job NJOBSPARALLEL_O2=$(nproc) # Maximum number of simultaneously running O2 jobs -# This directory -DIR_EXEC="$(dirname "$(realpath "$0")")" +# Other options +SAVETREES=0 # Save O2 tables to trees. +DEBUG=0 # Print out more information. +USEALIEVCUTS=0 # Use AliEventCuts in AliPhysics (as used by conversion task) # Lists of input files LISTFILES_ALI="list_ali.txt" # conversion and AliPhysics input LISTFILES_O2="list_o2.txt" # O2 input -# Output files names +# Output files FILEOUT="AnalysisResults.root" FILEOUT_ALI="AnalysisResults_ALI.root" FILEOUT_O2="AnalysisResults_O2.root" FILEOUT_TREES="AnalysisResults_trees.root" FILEOUT_TREES_O2="AnalysisResults_trees_O2.root" -# Steering commands -ENVALI="alienv setenv AliPhysics/latest -c" -ENVO2="alienv setenv O2Physics/latest -c" -ENVPOST="alienv setenv ROOT/latest -c" +# Steering commands (loading aliBuild environments) +ENV_ALI="alienv setenv AliPhysics/latest -c" +ENV_O2="alienv setenv O2Physics/latest -c" +ENV_POST="alienv setenv ROOT/latest -c" # Step scripts SCRIPT_O2="script_o2.sh" SCRIPT_ALI="script_ali.sh" SCRIPT_POSTPROCESS="script_postprocess.sh" +# End of declarations of global parameters and their default values +#################################################################################################### + # Load utilities. source "$DIR_EXEC/utilities.sh" || { echo "Error: Failed to load utilities."; exit 1; } @@ -93,7 +100,7 @@ done # Load input specification. source "$CONFIG_INPUT" || ErrExit "Failed to load input specification." -# Load tasks configuration. +# Load task configuration. source "$CONFIG_TASKS" || ErrExit "Failed to load tasks configuration." DIR_TASKS="$(dirname "$(realpath "$CONFIG_TASKS")")" @@ -108,6 +115,14 @@ DIR_TASKS="$(dirname "$(realpath "$CONFIG_TASKS")")" # Print out input description. MsgStep "Processing case $INPUT_CASE: $INPUT_LABEL" +# Adjust task configuration with input-specific configuration. +if [ "$INPUT_TASK_CONFIG" ]; then + for cmd in $INPUT_TASK_CONFIG; do + MsgWarn "Evaluating $cmd" + eval "$cmd" + done +fi + # Clean before running. if [ $DOCLEAN -eq 1 ]; then MsgStep "Cleaning..." @@ -116,7 +131,7 @@ fi # Generate list of input files. MsgStep "Generating list of input files..." -[ $ISINPUTO2 -eq 1 ] && LISTFILES="$LISTFILES_O2" || LISTFILES="$LISTFILES_ALI" +[ $INPUT_IS_O2 -eq 1 ] && LISTFILES="$LISTFILES_O2" || LISTFILES="$LISTFILES_ALI" INPUT_DIR="$(realpath "$INPUT_DIR")" [ $DEBUG -eq 1 ] && { echo "Searching for $INPUT_FILES in $INPUT_DIR"; } find "$INPUT_DIR" -name "$INPUT_FILES" | sort | head -n $NFILESMAX > "$LISTFILES" @@ -136,12 +151,12 @@ if [ $DOCONVERT -eq 1 ]; then [ "$NFILES" -eq 0 ] && { ErrExit "No input conversion files!"; } NFILESPERJOB_CONVERT=$(python3 -c "n = $NFILESPERJOB_CONVERT; print(n if n > 0 else max(1, round($NFILES * $NCORESPERJOB_ALI / $NCORES)))") MsgStep "Converting... ($NFILES files)" - [ $ISMC -eq 1 ] && MsgWarn "Using MC mode" + [ $INPUT_IS_MC -eq 1 ] && MsgWarn "Using MC mode" [ $DEBUG -eq 1 ] && echo "Loading AliPhysics..." # Run the batch script in the ALI environment. [ "$O2_ROOT" ] && { MsgWarn "O2 environment is loaded - expect errors!"; } - [ "$ALICE_PHYSICS" ] && { MsgWarn "AliPhysics environment is already loaded."; ENVALI=""; } - $ENVALI bash "$DIR_EXEC/batch_convert.sh" "$LISTFILES_ALI" "$LISTFILES_O2" $ISMC $USEALIEVCUTS $DEBUG "$NFILESPERJOB_CONVERT" || exit 1 + [ "$ALICE_PHYSICS" ] && { MsgWarn "AliPhysics environment is already loaded."; ENV_ALI=""; } + $ENV_ALI bash "$DIR_EXEC/batch_convert.sh" "$LISTFILES_ALI" "$LISTFILES_O2" $INPUT_IS_MC $USEALIEVCUTS $DEBUG "$NFILESPERJOB_CONVERT" || exit 1 fi # Run AliPhysics tasks. @@ -157,8 +172,8 @@ if [ $DOALI -eq 1 ]; then [ $DEBUG -eq 1 ] && echo "Loading AliPhysics..." # Run the batch script in the ALI environment. [ "$O2_ROOT" ] && { MsgWarn "O2 environment is loaded - expect errors!"; } - [ "$ALICE_PHYSICS" ] && { MsgWarn "AliPhysics environment is already loaded."; ENVALI=""; } - $ENVALI bash "$DIR_EXEC/batch_ali.sh" "$LISTFILES_ALI" "$JSON" "$SCRIPT_ALI" $DEBUG "$NFILESPERJOB_ALI" || exit 1 + [ "$ALICE_PHYSICS" ] && { MsgWarn "AliPhysics environment is already loaded."; ENV_ALI=""; } + $ENV_ALI bash "$DIR_EXEC/batch_ali.sh" "$LISTFILES_ALI" "$JSON" "$SCRIPT_ALI" $DEBUG "$NFILESPERJOB_ALI" || exit 1 mv "$FILEOUT" "$FILEOUT_ALI" || ErrExit "Failed to mv $FILEOUT $FILEOUT_ALI." fi @@ -176,8 +191,8 @@ if [ $DOO2 -eq 1 ]; then [ $DEBUG -eq 1 ] && echo "Loading O2Physics..." # Run the batch script in the O2 environment. [ "$ALICE_PHYSICS" ] && { MsgWarn "AliPhysics environment is loaded - expect errors!"; } - [ "$O2_ROOT" ] && { MsgWarn "O2 environment is already loaded."; ENVO2=""; } - $ENVO2 bash "$DIR_EXEC/batch_o2.sh" "$LISTFILES_O2" "$JSON" "$SCRIPT_O2" $DEBUG "$NFILESPERJOB_O2" "$FILEOUT_TREES" "$NJOBSPARALLEL_O2" || exit 1 + [ "$O2_ROOT" ] && { MsgWarn "O2 environment is already loaded."; ENV_O2=""; } + $ENV_O2 bash "$DIR_EXEC/batch_o2.sh" "$LISTFILES_O2" "$JSON" "$SCRIPT_O2" $DEBUG "$NFILESPERJOB_O2" "$FILEOUT_TREES" "$NJOBSPARALLEL_O2" || exit 1 mv "$FILEOUT" "$FILEOUT_O2" || ErrExit "Failed to mv $FILEOUT $FILEOUT_O2." [[ $SAVETREES -eq 1 && "$FILEOUT_TREES" ]] && { mv "$FILEOUT_TREES" "$FILEOUT_TREES_O2" || ErrExit "Failed to mv $FILEOUT_TREES $FILEOUT_TREES_O2."; } fi @@ -190,8 +205,8 @@ if [ $DOPOSTPROCESS -eq 1 ]; then CheckFile "$SCRIPT_POSTPROCESS" [ $DEBUG -eq 1 ] && echo "Loading ROOT..." # Run the batch script in the postprocessing environment. - [ "$ROOTSYS" ] && { MsgWarn "ROOT environment is already loaded."; ENVPOST=""; } - $ENVPOST bash "$SCRIPT_POSTPROCESS" "$FILEOUT_O2" "$FILEOUT_ALI" > $LogFile 2>&1 || ErrExit "\nCheck $(realpath $LogFile)" + [ "$ROOTSYS" ] && { MsgWarn "ROOT environment is already loaded."; ENV_POST=""; } + $ENV_POST bash "$SCRIPT_POSTPROCESS" "$FILEOUT_O2" "$FILEOUT_ALI" > $LogFile 2>&1 || ErrExit "\nCheck $(realpath $LogFile)" grep -q -e '^'"W-" -e '^'"Warning" -e "warning" "$LogFile" && MsgWarn "There were warnings!\nCheck $(realpath $LogFile)" grep -q -e '^'"E-" -e '^'"Error" "$LogFile" && MsgErr "There were errors!\nCheck $(realpath $LogFile)" grep -q -e '^'"F-" -e '^'"Fatal" -e "segmentation" -e "Segmentation" "$LogFile" && ErrExit "There were fatal errors!\nCheck $(realpath $LogFile)" diff --git a/exec/run_convert.sh b/exec/run_convert.sh index 515ed6da..ee0b650a 100644 --- a/exec/run_convert.sh +++ b/exec/run_convert.sh @@ -1,7 +1,7 @@ #!/bin/bash FILEIN="$1" -ISMC=$2 +INPUT_IS_MC=$2 USEALIEVCUTS=$3 LOGFILE="$4" @@ -9,7 +9,7 @@ LOGFILE="$4" DIR_THIS="$(dirname "$(realpath "$0")")" # Run the macro. -root -b -q -l "$DIR_THIS/convertAO2D.C(\"$FILEIN\", $ISMC, $USEALIEVCUTS)" > "$LOGFILE" 2>&1 +root -b -q -l "$DIR_THIS/convertAO2D.C(\"$FILEIN\", $INPUT_IS_MC, $USEALIEVCUTS)" > "$LOGFILE" 2>&1 ExitCode=$? # Show warnings, errors and fatals in the log file. diff --git a/exec/run_o2.sh b/exec/run_o2.sh index 43ee16a8..2b2b8d6c 100644 --- a/exec/run_o2.sh +++ b/exec/run_o2.sh @@ -10,6 +10,6 @@ bash "$SCRIPT" "$FILEIN" "$JSON" > "$LOGFILE" 2>&1 ExitCode=$? # Show warnings and errors in the log file. -grep -e "\\[WARN\\]" -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "command not found" -e "Error:" "$LOGFILE" | sort -u +grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" -e "Warning in " "$LOGFILE" | sort -u exit $ExitCode diff --git a/exec/update_packages.py b/exec/update_packages.py old mode 100644 new mode 100755 index 123b8c9f..16320d15 --- a/exec/update_packages.py +++ b/exec/update_packages.py @@ -16,10 +16,11 @@ import subprocess as sp # nosec B404 import sys -import yaml +import yaml # pylint: disable=import-error # global variables debug = False +alibuild_exists = False alibuild_arch, alibuild_opt, alibuild_dir_alice, alibuild_dir_sw = "", "", "", "" clean_do, clean_aggressive, clean_purge = 0, 0, 0 @@ -83,16 +84,14 @@ def exec_cmd(cmd: str, msg=None, silent=False, safe=False): msg_fatal("Command contains forbidden characters!") try: if silent: - sp.run( # nosec B602 - cmd, shell=True, check=True, stdout=sp.DEVNULL, stderr=sp.DEVNULL - ) + sp.run(cmd, shell=True, check=True, stdout=sp.DEVNULL, stderr=sp.DEVNULL) # nosec B602 else: sp.run(cmd, shell=True, check=True) # nosec B602 except sp.CalledProcessError: msg_fatal(msg if msg else f"executing: {cmd}") -def get_cmd(cmd: str, msg=None, safe=False): +def get_cmd(cmd: str, msg=None, safe=False) -> str: """Get output of a shell command.""" if debug: eprint(cmd) @@ -104,6 +103,7 @@ def get_cmd(cmd: str, msg=None, safe=False): return out.strip() except sp.CalledProcessError: msg_fatal(msg if msg else f"executing: {cmd}") + return "" def chdir(path: str): @@ -148,22 +148,20 @@ def healthy_structure(dic_full: dict): msg_err('"aliBuild" is not a dictionary.') return False for key, val in template_alibuild.items(): - dic_alibuild[key] = dic_alibuild.get( - key, val - ) # Create a default value if not set. + dic_alibuild[key] = dic_alibuild.get(key, val) # Create a default value if not set. global alibuild_arch, alibuild_dir_alice, alibuild_opt, alibuild_dir_sw, clean_do, clean_aggressive, clean_purge alibuild_arch = dic_alibuild["architecture"] alibuild_dir_alice = dic_alibuild["dir_alice"] if not alibuild_dir_alice: msg_fatal(f"Invalid path: {alibuild_dir_alice}.") alibuild_dir_alice_real = get_cmd(f"realpath {alibuild_dir_alice}") - if not os.path.isdir(alibuild_dir_alice_real): + if alibuild_exists and not os.path.isdir(alibuild_dir_alice_real): msg_fatal(f"{alibuild_dir_alice} does not exist.") alibuild_opt = dic_alibuild["options"] alibuild_dir_sw = os.environ["ALIBUILD_WORK_DIR"] if not alibuild_dir_sw: msg_fatal("ALIBUILD_WORK_DIR is not defined.") - if not os.path.isdir(alibuild_dir_sw): + if alibuild_exists and not os.path.isdir(alibuild_dir_sw): msg_fatal(f"{alibuild_dir_sw} does not exist.") clean_do = dic_alibuild["clean"] clean_aggressive = dic_alibuild["clean_aggressive"] @@ -230,15 +228,11 @@ def update_branch(remote_upstream, remote_origin, branch_main, branch_current): # Synchronise with the origin first, just in case there are some commits pushed from another local repository. if remote_origin: - msg_subsubstep( - f"-- Updating branch {branch_current} from {remote_origin}/{branch_current}" - ) + msg_subsubstep(f"-- Updating branch {branch_current} from {remote_origin}/{branch_current}") exec_cmd(f"git pull --rebase {remote_origin} {branch_current}") # Synchronise with upstream/main. - msg_subsubstep( - f"-- Updating branch {branch_current} from {remote_upstream}/{branch_main}" - ) + msg_subsubstep(f"-- Updating branch {branch_current} from {remote_upstream}/{branch_main}") exec_cmd(f"git pull --rebase {remote_upstream} {branch_main}") # Push to the origin. @@ -304,7 +298,10 @@ def update_package(repo: str, dic_repo: dict): print("Update deactivated. Skipping") # Build package. if dic_repo.get("build", False): - build_package(repo, dic_repo) + if alibuild_exists: + build_package(repo, dic_repo) + else: + msg_warn("Skipping build because of absent aliBuild.") def main(): @@ -312,12 +309,8 @@ def main(): parser = argparse.ArgumentParser( description="This script updates local and remote Git repositories, builds aliBuild packages and does cleanup." ) - parser.add_argument( - "database", help="database with package configuration and options" - ) - parser.add_argument( - "-d", "--debug", action="store_true", help="print debugging info" - ) + parser.add_argument("database", help="database with package configuration and options") + parser.add_argument("-d", "--debug", action="store_true", help="print debugging info") parser.add_argument("-l", action="store_true", help="print latest commits and exit") parser.add_argument("-c", action="store_true", help="print configuration and exit") args = parser.parse_args() @@ -343,16 +336,22 @@ def main(): dic_repos = dic_in["repositories"] # Check aliBuild - get_cmd("which aliBuild", "aliBuild not found") + global alibuild_exists + try: + get_cmd("which aliBuild", "aliBuild not found") + alibuild_exists = True + except SystemExit: + msg_warn("aliBuild commands will be skipped.") global alibuild_arch - if not alibuild_arch: + if not alibuild_arch and alibuild_exists: alibuild_arch = get_cmd("aliBuild architecture", "Failed to get architecture") # Dry run: Print out configuration and exit. if show_config: msg_step("Configuration") - print(get_cmd("aliBuild version", "Failed to get aliBuild version")) + if alibuild_exists: + print(get_cmd("aliBuild version", "Failed to get aliBuild version")) print(f"Architecture: {alibuild_arch}") print(f"aliBuild work dir: {alibuild_dir_sw}") print(f"aliBuild build dir: {alibuild_dir_alice}") @@ -376,7 +375,7 @@ def main(): update_package(repo, dic_repo) # Cleanup - if clean_do: + if clean_do and alibuild_exists: msg_step("Cleaning aliBuild files") alibuild_dir_arch = f"{alibuild_dir_sw}/{alibuild_arch}" alibuild_dir_build = f"{alibuild_dir_sw}/BUILD" @@ -388,9 +387,7 @@ def main(): # Delete all symlinks to builds and recreate the latest ones to allow deleting of all other builds. if clean_purge: msg_substep("- Purging builds") - msg_warn( - "This action will run 'aliBuild build' for each development package." - ) + msg_warn("This action will run 'aliBuild build' for each development package.") # Check existence of the build directories. msg_subsubstep("-- Checking existence of the build directories") for dir in (alibuild_dir_arch, alibuild_dir_build): @@ -429,9 +426,7 @@ def main(): msg_subsubstep(f"-- Recreating symlinks in SOURCES to {repo}") path_link = f"{alibuild_dir_sw}/SOURCES/{repo}/{dic_repo['branch']}" os.makedirs(path_link) - os.symlink( - get_cmd(f"realpath {dic_repo['path']}"), f"{path_link}/0" - ) + os.symlink(get_cmd(f"realpath {dic_repo['path']}"), f"{path_link}/0") # Get the directory size after cleaning. msg_substep(f"- Estimating size of {alibuild_dir_sw}") diff --git a/exec/update_packages.sh b/exec/update_packages.sh deleted file mode 100644 index aa9af9ac..00000000 --- a/exec/update_packages.sh +++ /dev/null @@ -1,327 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2015 # Ignore A && B || C. - -# This script updates local and remote Git repositories, builds aliBuild packages and does cleanup. - -# The main Git branch (and the current one if different from the main one) is updated in the following way: -# - Pull & rebase the branch from the same branch in the remote fork repository if specified. -# - Pull & rebase the branch from the main branch in the main remote repository. -# - Force-push the branch into the remote fork repository if specified. -# aliBuild packages are built using the respective current branches and the specified build options. - -#################################################################################################### - -# Settings - -# This repository directory -DIR_REPO="$(realpath "$(dirname "$0")"/..)" - -# Configuration file -FILE_CONFIG="$DIR_REPO/config/config_update.sh" - -# Main ALICE software directory -ALICE_DIR="$HOME/alice" - -# aliBuild -[ "$(which aliBuild)" ] || ErrExit "aliBuild not found" -ALIBUILD_ARCH=$(aliBuild architecture) # system architecture (as detected by aliBuild) -ALIBUILD_OPT="-a $ALIBUILD_ARCH" - -# List of packages to update/build -LIST_PKG_SPECS=() - -# List of development aliBuild packages -LIST_PKG_DEV_SPECS=() - -# Delete unnecessary files. -CLEAN=1 -CLEAN_AGGRESSIVE=0 -CLEAN_OPT="" - -# Delete all builds that are not needed to run the latest builds of specified development packages. -# WARNING: This feature requires all development packages to be specified and added in the list LIST_PKG_DEV_SPECS! Builds of missing packages will be deleted! -# WARNING: This feature executes "aliBuild build" for all development packages. If a package needs to be rebuilt, it will be rebuilt! -# WARNING: Do not enable this if you need to keep several builds per development package (e.g. for different branches or commits)! -PURGE_BUILDS=0 - -# Print out an overview of the latest commits of repositories. -PRINT_COMMITS=1 - -# Display configuration without doing anything. -DRYRUN=0 - -#################################################################################################### - -# Message formatting -function MsgStep { echo -e "\n\e[1;32m$*\e[0m"; } -function MsgSubStep { echo -e "\n\e[1m$*\e[0m"; } -function MsgSubSubStep { echo -e "\e[4m$*\e[0m"; } -function MsgWarn { echo -e "\e[1;36m$*\e[0m"; } -function MsgErr { echo -e "\e[1;31m$*\e[0m"; } - -# Throw error and exit. -function ErrExit { - MsgErr "Error: $*"; exit 1; -} - -# Print out package summary. -function PackageSummary { - local -n Specs=$1 - NArgs=${#Specs[@]} - [ "$NArgs" -lt 1 ] && ErrExit "Bad array." - [ "$NArgs" -lt 6 ] && ErrExit "Package: ${Specs[0]}: Incomplete list of parameters." - echo "Package: ${Specs[0]}" - echo "Update: ${Specs[1]}" - echo "Repository: ${Specs[2]}" - echo "Upstream remote: ${Specs[3]}" - echo "Fork remote: ${Specs[4]}" - echo "Main branch: ${Specs[5]}" - [ "$NArgs" -ge 8 ] && { - echo "Build: ${Specs[7]}" - echo "Build options: ${Specs[6]}" - } - return 0 -} - -# Print out name of the current branch and the hash of the last commit. -function PrintLastCommit { - BRANCH=$(git rev-parse --abbrev-ref HEAD) - COMMIT=$(git log -n 1 --pretty='format:%ci %h %s') - echo "$BRANCH $COMMIT" - return 0 -} - -# Update a given branch and push to the fork repository (if specified). -function UpdateBranch { - REMOTE_MAIN_="$1" # Main remote (upstream) - BRANCH_MAIN_="$2" # Main branch - BRANCH_="$3" # Current branch to be updated - REMOTE_FORK_="" # Fork remote - [ "$4" ] && REMOTE_FORK_="$4" - - MsgSubStep "- Updating branch $BRANCH_" - git checkout "$BRANCH_" || ErrExit "git checkout $BRANCH_ failed." - - # Synchronise with the fork first, just in case there are some commits pushed from another local repository. - if [ "$REMOTE_FORK_" ]; then - MsgSubSubStep "-- Updating branch $BRANCH_ from $REMOTE_FORK_/$BRANCH_" - git pull --rebase "$REMOTE_FORK_" "$BRANCH_" || ErrExit "git pull --rebase $REMOTE_FORK_ $BRANCH_ failed." - fi - - # Synchronise with upstream/main. - MsgSubSubStep "-- Updating branch $BRANCH_ from $REMOTE_MAIN_/$BRANCH_MAIN_" - git pull --rebase "$REMOTE_MAIN_" "$BRANCH_MAIN_" || ErrExit "git pull --rebase $REMOTE_MAIN_ $BRANCH_MAIN_ failed." - - # Push to the fork. - if [ "$REMOTE_FORK_" ]; then - MsgSubSubStep "-- Pushing branch $BRANCH_ to $REMOTE_FORK_" - git push -f "$REMOTE_FORK_" "$BRANCH_" || ErrExit "git push -f $REMOTE_FORK_ $BRANCH_ failed" - fi - return 0 -} - -# Update the main and the current branch and push to the fork repository (if specified). -function UpdateGit { - DIR="$1" # Git repository directory - REMOTE_MAIN="$2" # Main remote (upstream) - BRANCH_MAIN="$3" # Main branch - REMOTE_FORK="" # Fork remote - [ "$4" ] && REMOTE_FORK="$4" - - # Move to the Git repository and get the name of the current branch. - cd "$DIR" && BRANCH=$(git rev-parse --abbrev-ref HEAD) || ErrExit "Failed to get the name of the current branch." - #echo "Directory: $DIR" - echo "Current branch: $BRANCH" - - # Skip update when on detached HEAD. - [ "$BRANCH" == "HEAD" ] && { MsgSubStep "- Skipping update because of detached HEAD"; return 0; } - - # Stash uncommitted local changes. - MsgSubStep "- Stashing potential uncommitted local changes" - NSTASH_OLD=$(git stash list | wc -l) && \ - git stash && \ - NSTASH_NEW=$(git stash list | wc -l) || ErrExit "git stash failed." - - # Update the main branch. - UpdateBranch "$REMOTE_MAIN" "$BRANCH_MAIN" "$BRANCH_MAIN" "$REMOTE_FORK" || ErrExit "Failed to update branch $BRANCH_MAIN." - - # Update the current branch. - [ "$BRANCH" != "$BRANCH_MAIN" ] && { UpdateBranch "$REMOTE_MAIN" "$BRANCH_MAIN" "$BRANCH" "$REMOTE_FORK" || ErrExit "Failed to update branch $BRANCH."; } - - # Unstash stashed changes if any. - [ "$NSTASH_NEW" -ne "$NSTASH_OLD" ] && { MsgSubStep "- Unstashing uncommitted local changes"; git stash pop || ErrExit "git stash pop failed."; } - return 0 -} - -function BuildPackage { - PkgName="$1" - PkgBuildOpt="$2" - [ "$PkgName" ] || ErrExit "Empty package name" - # shellcheck disable=SC2086 # Ignore unquoted options. - cd "$ALICE_DIR" && aliBuild build "$PkgName" $PkgBuildOpt $ALIBUILD_OPT || ErrExit "aliBuild build $PkgName $PkgBuildOpt $ALIBUILD_OPT failed." -} - -# Do the full update of a package. -function UpdatePackage { - # Get package specification parameters. - local -n Specs=$1 - NArgs=${#Specs[@]} - [ "$NArgs" -lt 1 ] && ErrExit "Bad array. $Specs" - Name="${Specs[0]}" - MsgStep "Updating $Name" - [ "$NArgs" -lt 6 ] && ErrExit "Incomplete list of parameters." - DoUpdate=${Specs[1]} - PathRepo="${Specs[2]}" - RemoteMain="${Specs[3]}" - RemoteFork="${Specs[4]}" - BranchMain="${Specs[5]}" - DoBuild=0 - BuildOpt="" - [ "$NArgs" -ge 8 ] && { - BuildOpt="${Specs[6]}" - DoBuild=${Specs[7]} - } - # Update repository. - [ "$DoUpdate" -eq 1 ] && { UpdateGit "$PathRepo" "$RemoteMain" "$BranchMain" "$RemoteFork" || ErrExit "Failed to update $Name repository."; } || { echo "Update deactivated. Skipping"; } - # Build package. - [ "$DoBuild" -eq 1 ] && { MsgSubStep "- Building $Name"; BuildPackage "$Name" "$BuildOpt" || ErrExit "Failed to build $Name."; } - return 0 -} - -function Help { echo "Usage: bash [/]$(basename "$0") [-h] [-c ] [-d]"; } - -#################################################################################################### - -########## EXECUTION ########## - -# Parse command line options. -while getopts ":hc:d" opt; do - case ${opt} in - h) - Help; exit 0;; - c) - FILE_CONFIG="$OPTARG";; - d) - DRYRUN=1;; - \?) - MsgErr "Invalid option: $OPTARG" 1>&2; Help; exit 1;; - :) - MsgErr "Invalid option: $OPTARG requires an argument." 1>&2; Help; exit 1;; - esac -done - -# Load configuration. -# shellcheck disable=SC1090 # Ignore non-constant source. -source "$FILE_CONFIG" || ErrExit "Failed to load configuration from $FILE_CONFIG." -[ "$ALIBUILD_WORK_DIR" ] || ErrExit "ALIBUILD_WORK_DIR is not defined." -[ -d "$ALIBUILD_WORK_DIR" ] || ErrExit "$ALIBUILD_WORK_DIR does not exist." -ALIBUILD_DIR_ARCH="$ALIBUILD_WORK_DIR/$ALIBUILD_ARCH" # directory with builds of all packages -ALIBUILD_DIR_BUILD="$ALIBUILD_WORK_DIR/BUILD" # directory with builds of development packages - -# Dry run: Print out configuration and exit. -if [ $DRYRUN -eq 1 ]; then - MsgStep "Configuration:" - echo "Configuration file: $FILE_CONFIG" - echo "Main ALICE software directory: $ALICE_DIR" - echo "aliBuild working directory: $ALIBUILD_WORK_DIR" - echo "System architecture: $ALIBUILD_ARCH" - echo "Cleanup: $CLEAN" - echo "Purging: $PURGE_BUILDS" - echo "Print commits: $PRINT_COMMITS" - MsgSubStep "Package settings:" - for pkg in "${LIST_PKG_SPECS[@]}"; do - arr="${pkg}[@]" - spec=("${!arr}") - echo "" - PackageSummary spec - done - MsgSubStep "Development packages:" - for pkg in "${LIST_PKG_DEV_SPECS[@]}"; do - arr="${pkg}[@]" - spec=("${!arr}") - echo "${spec[0]}" - done - exit 0 -fi - -# Update all packages in the list. -for pkg in "${LIST_PKG_SPECS[@]}"; do - arr="${pkg}[@]" - spec=("${!arr}") - UpdatePackage spec || ErrExit "Failed to update packages." -done - -# Cleanup -if [ $CLEAN -eq 1 ]; then - MsgStep "Cleaning aliBuild files" - - # Get the directory size before cleaning. - SIZE_BEFORE=$(du -sb "$ALIBUILD_WORK_DIR" | cut -f1) - - # Delete all symlinks to builds and recreate the latest ones to allow deleting of all other builds. - if [ $PURGE_BUILDS -eq 1 ]; then - MsgSubStep "- Purging builds" - # Check existence of the build directories. - MsgSubSubStep "-- Checking existence of the build directories" - [[ -d "$ALIBUILD_DIR_ARCH" && -d "$ALIBUILD_DIR_BUILD" ]] || ErrExit "Build directories do not exist." - # Delete symlinks to all builds. - MsgSubSubStep "-- Deleting symlinks to all builds" - find "$ALIBUILD_DIR_ARCH" -mindepth 2 -maxdepth 2 -type l -delete || ErrExit "Failed to delete symlinks in $ALIBUILD_DIR_ARCH." - find "$ALIBUILD_DIR_BUILD" -mindepth 1 -maxdepth 1 -type l -delete || ErrExit "Failed to delete symlinks in $ALIBUILD_DIR_BUILD." - # Recreate symlinks to the latest builds of development packages and their dependencies. - for ((i = 0; i < ${#LIST_PKG_DEV_SPECS[@]}; ++i)); do - pkg="${LIST_PKG_DEV_SPECS[i]}" - arr="${pkg}[@]" - spec=("${!arr}") - Name="${spec[0]}" - BuildOpt="${spec[6]}" - MsgSubSubStep "-- Re-building $Name to recreate symlinks"; cd "$ALICE_DIR" && BuildPackage "$Name" "$BuildOpt" > /dev/null 2>&1 || ErrExit "Failed to rebuild $Name." - done - fi - - # Delete obsolete builds. - MsgSubStep "- Deleting obsolete builds" - [ $CLEAN_AGGRESSIVE -eq 1 ] && { MsgWarn "Using aggressive cleanup"; CLEAN_OPT="--aggressive-cleanup"; } - # shellcheck disable=SC2086 # Ignore unquoted options. - cd "$ALICE_DIR" && aliBuild clean $ALIBUILD_OPT $CLEAN_OPT || ErrExit "aliBuild clean $ALIBUILD_OPT $CLEAN_OPT failed." - - # Recreate symlinks to the source of development packages in sw/SOURCES. - if [ $CLEAN_AGGRESSIVE -eq 1 ]; then - mkdir "$ALIBUILD_WORK_DIR/SOURCES" - for ((i = 0; i < ${#LIST_PKG_DEV_SPECS[@]}; ++i)); do - pkg="${LIST_PKG_DEV_SPECS[i]}" - arr="${pkg}[@]" - spec=("${!arr}") - Name="${spec[0]}" - PathRepo="${spec[2]}" - BranchMain="${spec[5]}" - PathLink="$ALIBUILD_WORK_DIR/SOURCES/$Name/$BranchMain" - mkdir -p "$PathLink" - ln -s "$PathRepo" "$PathLink/0" - MsgSubSubStep "-- Recreating symlinks in SOURCES to $Name" - done - fi - - # Get the directory size after cleaning. - SIZE_AFTER=$(du -sb "$ALIBUILD_WORK_DIR" | cut -f1) - # Report size difference. - SIZE_DIFF=$(( SIZE_BEFORE - SIZE_AFTER )) - # Convert the number of bytes to a human-readable format. - [ "$(which numfmt)" ] && { SIZE_DIFF=$(numfmt --to=si --round=nearest -- $SIZE_DIFF); SIZE_AFTER=$(numfmt --to=si --round=nearest -- "$SIZE_AFTER"); } - echo -e "\nFreed up ${SIZE_DIFF}B of disk space." - echo "Directory $ALIBUILD_WORK_DIR takes ${SIZE_AFTER}B." -fi - -# Print out latest commits. -if [ $PRINT_COMMITS -eq 1 ]; then - MsgStep "Latest commits" - for pkg in "${LIST_PKG_SPECS[@]}"; do - arr="${pkg}[@]" - spec=("${!arr}") - echo "${spec[0]}: $( cd "${spec[2]}" && PrintLastCommit || ErrExit )" - done -fi - -MsgStep "Done" - -exit 0 diff --git a/exec/utilitiesAli.h b/exec/utilitiesAli.h new file mode 100644 index 00000000..c2e4e81f --- /dev/null +++ b/exec/utilitiesAli.h @@ -0,0 +1,53 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// AliPhysics utilities + +#ifndef EXEC_UTILITIESALI_H_ +#define EXEC_UTILITIESALI_H_ + +TChain* CreateLocalChain(const char* txtfile, const char* type = "esd", int nfiles = -1) +{ + TString treename = type; + treename.ToLower(); + treename += "Tree"; + // 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(treename); + while (in.good()) { + in >> line; + if (line.IsNull() || line.BeginsWith("#")) + continue; + if (count++ == nfiles) + break; + 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; +} + +#endif // EXEC_UTILITIESALI_H_ diff --git a/exec/utilitiesPlot.h b/exec/utilitiesPlot.h new file mode 100644 index 00000000..250362ed --- /dev/null +++ b/exec/utilitiesPlot.h @@ -0,0 +1,126 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// Plotting utilities + +#ifndef EXEC_UTILITIESPLOT_H_ +#define EXEC_UTILITIESPLOT_H_ + +#include // std::min, std::max + +void SetCanvas(TCanvas* can, int nPadsX, int nPadsY) +{ + if (!can) { + Fatal("SetCanvas", "Invalid canvas"); + return; + } + can->Divide(nPadsX, nPadsY, 0.005, 0.005); +} + +void SetPad(TVirtualPad* pad, bool logScale) +{ + if (!pad) { + Fatal("SetPad", "Invalid pad"); + return; + } + pad->SetBottomMargin(0.11); + pad->SetLeftMargin(0.1); + pad->SetTopMargin(0.08); + pad->SetRightMargin(0.08); + if (logScale) { + pad->SetLogy(); + } +} + +/// @brief Get maximum and minimum of a histograms with non-negative bin contents and errors +/// @param his histogram +/// @param yMin variable to set minimum +/// @param yMax variable to set maximum +/// @param onlyPositive make sure that yMin, yMax are positive +/// @param includeErrors consider heights of error bars +void GetYRange(TH1* his, Float_t& yMin, Float_t& yMax, bool onlyPositive = true, bool includeErrors = true) +{ + if (!his) { + Fatal("GetYRange", "Invalid histogram"); + return; + } + yMin = his->GetMinimum(0); + yMax = his->GetMaximum(); + if (onlyPositive) { + if (yMin <= 0.) { + yMin = 1.; + } + if (yMax <= 0.) { + yMax = 1.; + } + } + if (includeErrors) { + Float_t cont, err, yLow; + for (Int_t i = 0; i < his->GetNbinsX(); i++) { + cont = his->GetBinContent(i + 1); + if (cont <= 0.) { + continue; + } + err = his->GetBinError(i + 1); + yLow = cont - err; + if (onlyPositive && yLow <= 0.) { + yLow = cont; + } + yMin = std::min(yMin, yLow); + yMax = std::max(yMax, cont + err); + } + } +} + +/// @brief Set plotting properties of a histogram +/// @param his histogram +/// @param yMin minimum y value to display +/// @param yMax maximum y value to display +/// @param marginLow margin to keep below yMin (expressed as a fraction of the full y-axis plotting range) +/// @param marginHigh margin to keep above yMax (expressed as a fraction of the full y-axis plotting range) +/// @note The full y-axis plotting range is calculated from yMin, yMax, marginLow, marginHigh, logScale. +void SetHistogram(TH1* his, Float_t yMin, Float_t yMax, Float_t marginLow, Float_t marginHigh, bool& logScale) +{ + if (!his) { + Fatal("SetHistogram", "Invalid histogram"); + return; + } + Float_t textsize = 0.05; + his->GetYaxis()->SetTitleSize(textsize); + his->GetXaxis()->SetTitleSize(textsize); + his->GetYaxis()->SetTitleOffset(1.0); + his->GetXaxis()->SetTitleOffset(1.0); + Float_t k = 1. - marginHigh - marginLow; + Float_t yRange; + if (logScale && yMin > 0 && yMax > 0) { + yRange = yMax / yMin; + his->GetYaxis()->SetRangeUser(yMin / std::pow(yRange, marginLow / k), yMax * std::pow(yRange, marginHigh / k)); + } else { + logScale = false; + yRange = yMax - yMin; + his->GetYaxis()->SetRangeUser(yMin - marginLow / k * yRange, yMax + marginHigh / k * yRange); + } +} + +void SetHistogramStyle(TH1* his, Int_t colour = 1, Int_t markerStyle = 1, Float_t markerSize = 1, Float_t lineWidth = 1) +{ + if (!his) { + Fatal("SetHistogramStyle", "Invalid histogram"); + return; + } + his->SetLineColor(colour); + his->SetLineWidth(lineWidth); + his->SetMarkerColor(colour); + his->SetMarkerStyle(markerStyle); + his->SetMarkerSize(markerSize); +} + +#endif // EXEC_UTILITIESPLOT_H_ diff --git a/exec/utilitiesValidation.h b/exec/utilitiesValidation.h new file mode 100644 index 00000000..1c682ad9 --- /dev/null +++ b/exec/utilitiesValidation.h @@ -0,0 +1,205 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +// Validation utilities + +#ifndef EXEC_UTILITIESVALIDATION_H_ +#define EXEC_UTILITIESVALIDATION_H_ + +#include // std::min, std::max +#include // std::tuple, std::make_tuple +#include // std::vector + +#include "utilitiesPlot.h" + +// vectors of histogram specifications: axis label, AliPhysics name, O2Physics path/name, rebin, log scale histogram, log scale ratio, projection axis +using VecSpecHis = std::vector>; + +// vector of specifications of vectors: name, VecSpecHis, pads X, pads Y +using VecSpecVecSpec = std::vector>; + +// Add histogram specification in the vector. +void AddHistogram(VecSpecHis& vec, TString label, TString nameAli, TString nameO2, int rebin, bool logH, bool logR, TString proj = "x") +{ + vec.push_back(std::make_tuple(label, nameAli, nameO2, rebin, logH, logR, proj)); +} + +// Make validation plots. +Int_t MakePlots(const VecSpecVecSpec& vecSpecVecSpec, + TString pathFileO2 = "AnalysisResults_O2.root", + TString pathFileAli = "AnalysisResults_ALI.root", + TString pathListAli = "list", + bool doRatio = false) +{ + gStyle->SetOptStat(0); + gStyle->SetPalette(0); + gStyle->SetCanvasColor(0); + gStyle->SetFrameFillColor(0); + + TFile* fO2 = new TFile(pathFileO2.Data()); + if (fO2->IsZombie()) { + Fatal("MakePlots", "Failed to open file %s\n", pathFileO2.Data()); + return 1; + } + TFile* fAli = new TFile(pathFileAli.Data()); + if (fAli->IsZombie()) { + Fatal("MakePlots", "Failed to open file %s\n", pathFileAli.Data()); + return 1; + } + + TList* lAli = nullptr; + fAli->GetObject(pathListAli.Data(), lAli); + if (!lAli) { + Fatal("MakePlots", "Failed to load list %s from %s\n", pathListAli.Data(), pathFileAli.Data()); + return 1; + } + + // 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 nAli, nO2, rebin; + + TH1F* hAli = nullptr; + TH1D* hO2 = nullptr; + TH1F* hRatio = nullptr; + TString labelAxis = ""; + TString nameHisAli = ""; + TString nameHisO2 = ""; + 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 (%lu)", nameSpec.Data(), 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); + nameHisAli = std::get<1>(spec); + nameHisO2 = 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. + hAli = reinterpret_cast(lAli->FindObject(nameHisAli.Data())); + if (!hAli) { + Fatal("MakePlots", "Failed to load %s from %s\n", nameHisAli.Data(), pathFileAli.Data()); + return 1; + } + + // Get O2 histogram. + auto oO2 = fO2->Get(nameHisO2.Data()); + if (!oO2) { + Fatal("MakePlots", "Failed to load %s from %s\n", nameHisO2.Data(), pathFileO2.Data()); + return 1; + } + + if (oO2->InheritsFrom("TH3")) { + if (projAx == "x") { + hO2 = (reinterpret_cast(oO2))->ProjectionX(); + } else if (projAx == "y") { + hO2 = (reinterpret_cast(oO2))->ProjectionY(); + } + } else if (oO2->InheritsFrom("TH2")) { + if (projAx == "x") { + hO2 = (reinterpret_cast(oO2))->ProjectionX(); + } else if (projAx == "y") { + hO2 = (reinterpret_cast(oO2))->ProjectionY(); + } + } else { + hO2 = reinterpret_cast(oO2); + } + + Printf("%d (%s, %s): bins: %d, %d, ranges: %g-%g, %g-%g", + index, nameHisAli.Data(), nameHisO2.Data(), + hAli->GetNbinsX(), hO2->GetNbinsX(), + hAli->GetXaxis()->GetBinLowEdge(1), hAli->GetXaxis()->GetBinUpEdge(hAli->GetNbinsX()), + hO2->GetXaxis()->GetBinLowEdge(1), hO2->GetXaxis()->GetBinUpEdge(hO2->GetNbinsX())); + + nAli = hAli->GetEntries(); + nO2 = hO2->GetEntries(); + + // Histograms + auto padH = canHis->cd(index + 1); + hAli->Rebin(rebin); + hO2->Rebin(rebin); + hAli->SetLineColor(1); + hAli->SetLineWidth(2); + hO2->SetLineColor(2); + hO2->SetLineWidth(1); + hAli->SetTitle(Form(";%s;Entries", labelAxis.Data())); + hAli->GetYaxis()->SetMaxDigits(3); + Float_t yMinO2, yMaxO2; + GetYRange(hO2, yMinO2, yMaxO2, logScaleH, false); + GetYRange(hAli, yMin, yMax, logScaleH, false); + yMin = std::min(yMinO2, yMin); + yMax = std::max(yMaxO2, yMax); + SetHistogram(hAli, yMin, yMax, marginLow, marginHigh, logScaleH); + SetPad(padH, logScaleH); + hAli->Draw("hist"); + hO2->Draw("hist same"); + TLegend* legend = new TLegend(0.1, 0.93, 0.9, 1.0); + legend->SetNColumns(2); + legend->SetBorderSize(0); + legend->AddEntry(hAli, Form("Ali: %d", nAli), "L"); + legend->AddEntry(hO2, Form("O^{2}: %d", nO2), "L"); + legend->Draw(); + + // Ratio + if (doRatio) { + auto padR = canRat->cd(index + 1); + hRatio = reinterpret_cast(hO2->Clone(Form("hRatio%d", index))); + hRatio->Divide(hAli); + hRatio->SetTitle(Form("Entries ratio: %g;%s;O^{2}/Ali", static_cast(nO2) / static_cast(nAli), labelAxis.Data())); + GetYRange(hRatio, yMin, yMax, logScaleR, false); + SetHistogram(hRatio, yMin, yMax, marginRLow, marginRHigh, logScaleR); + SetPad(padR, logScaleR); + hRatio->Draw("hist"); + } + } + canHis->SaveAs(Form("comparison_histos_%s.pdf", nameSpec.Data())); + canHis->SaveAs(Form("comparison_histos_%s.png", nameSpec.Data())); + if (doRatio) { + canRat->SaveAs(Form("comparison_ratios_%s.pdf", nameSpec.Data())); + canRat->SaveAs(Form("comparison_ratios_%s.png", nameSpec.Data())); + } + delete canHis; + delete canRat; + } + return 0; +} + +#endif // EXEC_UTILITIESVALIDATION_H_ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..1f5b7f63 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[tool.pyright] +reportMissingImports = false +reportUnboundVariable = false + +[tool.ruff] +line-length = 120 + +[tool.ruff.lint] +select = [ # defaults: ["E4", "E7", "E9", "F"], see https://docs.astral.sh/ruff/rules/ + "A", # flake8-builtins + "ARG", # flake8-unused-arguments + "B", # flake8-bugbear + "C4", # flake8-comprehensions + "E", # pycodestyle Error + "F", # Pyflakes + "FLY", # flynt + "FURB", # refurb + "I", # isort + "NPY", # NumPy-specific rules + "PD", # pandas-vet + "PL", # Pylint + "RUF", # Ruff-specific rules + "SIM", # flake8-simplify + "UP", # pyupgrade + "W", # pycodestyle Warning +] +ignore = [ + "PD901", # pandas-df-variable-name + "PLR09", # too-many-... +] diff --git a/simulations/README.md b/simulations/README.md deleted file mode 100644 index 1181bfee..00000000 --- a/simulations/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Example of Run3 simulation workflow + HF O2 (WIP) -(thanks to Nazar Burmasov ) - -## Example -1) Load the O2 environment as usual -2) bash sim_challenge.sh -3) bash testAOD.sh - diff --git a/simulations/clean.sh b/simulations/clean.sh deleted file mode 100644 index edca04b9..00000000 --- a/simulations/clean.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -rm ./*.root ./*.log ./*.ini ./*log* ./*.dat ./*done ./*time ./*json ./*list diff --git a/simulations/sim_challenge.sh b/simulations/sim_challenge.sh deleted file mode 100644 index 74890cfe..00000000 --- a/simulations/sim_challenge.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC1091 # Ignore not following. - -. "${O2_ROOT}"/share/scripts/jobutils.sh - -# chain of algorithms from MC and reco - -# options to pass to every workflow -gloOpt=" -b --run --shm-segment-size 10000000000" - -taskwrapper sim.log o2-sim -n 10 --configKeyValue "Diamond.width[2]=6." -g pythia8 -e TGeant3 -j 6 -m PIPE ITS FT0 TPC TOF MFT - -taskwrapper digi.log o2-sim-digitizer-workflow "$gloOpt" --interactionRate 400000 --tpc-lanes 1 - -taskwrapper tpcreco.log o2-tpc-reco-workflow "$gloOpt" --tpc-digit-reader \"--infile tpcdigits.root\" --input-type digits --output-type clusters,tracks --tpc-track-writer \"--treename events --track-branch-name Tracks --trackmc-branch-name TracksMCTruth\" - -taskwrapper itsreco.log o2-its-reco-workflow --trackerCA --async-phase "$gloOpt" - -taskwrapper mftreco.log o2-mft-reco-workflow "$gloOpt" -echo "Return status of mftreco: $?" - -echo "Running FT0 reco flow" -#needs FT0 digitized data -taskwrapper ft0reco.log o2-ft0-reco-workflow "$gloOpt" -echo "Return status of ft0reco: $?" - -echo "Running ITS-TPC macthing flow" -#needs results of o2-tpc-reco-workflow, o2-its-reco-workflow and o2-fit-reco-workflow -taskwrapper itstpcMatch.log o2-tpcits-match-workflow "$gloOpt" --tpc-track-reader \"tpctracks.root\" --tpc-native-cluster-reader \"--infile tpc-native-clusters.root\" -echo "Return status of itstpcMatch: $?" - -echo "Running ITSTPC-TOF macthing flow" -#needs results of TOF digitized data and results of o2-tpcits-match-workflow -taskwrapper tofMatch.log o2-tof-reco-workflow "$gloOpt" -echo "Return status of its-tpc-tof match: $?" - -echo "Running primary vertex finding flow" -#needs results of TPC-ITS matching and FIT workflows -taskwrapper pvfinder.log o2-primary-vertexing-workflow "$gloOpt" -echo "Return status of primary vertexing: $?" - -echo "Producing AOD" -taskwrapper aod.log o2-aod-producer-workflow --aod-writer-keep dangling -echo "Return status of AOD production: $?" diff --git a/simulations/testAOD.sh b/simulations/testAOD.sh deleted file mode 100644 index 7ec5ef34..00000000 --- a/simulations/testAOD.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -o2-analysis-hf-track-index-skims-creator --aod-file ../simulations/AnalysisResults_trees.root -b -