Skip to content

Commit b050f2d

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents f8f87ce + a3400a6 commit b050f2d

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/o2-linter.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
# "on": [pull_request_target, push]
5+
#"on": [pull_request_target, push]
66
permissions: {}
77
env:
88
BRANCH_MAIN: master
@@ -47,6 +47,8 @@ jobs:
4747
fi
4848
echo "linter_ran=1" >> "$GITHUB_OUTPUT"
4949
[[ "${{ github.event_name }}" == "pull_request_target" ]] && options="-g"
50+
# Checkout the script from the base branch to prevent execution of arbitrary code in the head branch.
51+
git checkout ${{ env.BRANCH_BASE }} -- Scripts/o2_linter.py
5052
# shellcheck disable=SC2086 # Ignore unquoted options.
5153
python3 Scripts/o2_linter.py $options "${files[@]}"
5254
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."

PWGEM/Dilepton/Tasks/checkMCTemplate.cxx

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ using namespace o2::aod;
5959
using namespace o2::soa;
6060
using namespace o2::aod::pwgem::dilepton::utils::mcutil;
6161
using namespace o2::aod::fwdtrackutils;
62+
using namespace o2::constants::physics;
6263

6364
struct checkMCTemplate {
6465
Configurable<std::string> ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -219,6 +220,12 @@ struct checkMCTemplate {
219220
registry.add("Electron/c2l/hs", "hs", kTHnSparseF, {axis_pt, axis_eta_cb, axis_phi, axis_dca_cb, axis_charge}, false);
220221
registry.addClone("Electron/c2l/", "Electron/b2l/");
221222
registry.addClone("Electron/c2l/", "Electron/b2c2l/");
223+
registry.addClone("Electron/c2l/", "Electron/b2Dch2l/");
224+
registry.addClone("Electron/c2l/", "Electron/b2D02l/");
225+
registry.addClone("Electron/c2l/", "Electron/b2Ds2l/");
226+
registry.addClone("Electron/c2l/", "Electron/b2LambdaC2l/");
227+
registry.addClone("Electron/c2l/", "Electron/b2LXic02l/");
228+
registry.addClone("Electron/c2l/", "Electron/b2LXicch2l/");
222229

223230
registry.add("Muon/c2l/hs", "hs", kTHnSparseF, {axis_pt, axis_eta_fwd, axis_phi, axis_dca_fwd, axis_charge}, false);
224231
registry.addClone("Muon/c2l/", "Muon/b2l/");
@@ -660,9 +667,22 @@ struct checkMCTemplate {
660667
if (isWeakDecayFromBeautyHadron(mcparticle, mcParticles)) { // hb->l is found in full decay chain.
661668
registry.fill(HIST("Electron/b2l/hs"), pt, eta, phi, dca_sigma, track.sign());
662669
} else if (isWeakDecayFromCharmHadron(mcparticle, mcParticles)) { // hc->l is found in full decay chain.
663-
if (IsFromBeauty(mcmother, mcParticles) > 0) { // hb->hc->l is fond.
670+
if (IsFromBeauty(mcmother, mcParticles) > 0) { // hb->hc->l is found.
664671
registry.fill(HIST("Electron/b2c2l/hs"), pt, eta, phi, dca_sigma, track.sign());
665-
} else { // prompt hc->l is found.
672+
if (abs(mcparticle.pdgCode()) == kDPlus)
673+
registry.fill(HIST("Electron/b2Dch2l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->D+->l
674+
// if(abs(mcparticle.pdgCode()) == 413); registry.fill(HIST("Electron/b2DchStar2l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->D*+->l
675+
if (abs(mcparticle.pdgCode()) == kD0)
676+
registry.fill(HIST("Electron/b2D02l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->D0->l
677+
if (abs(mcparticle.pdgCode()) == kDS)
678+
registry.fill(HIST("Electron/b2Ds2l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->Ds->l
679+
if (abs(mcparticle.pdgCode()) == kLambdaCPlus)
680+
registry.fill(HIST("Electron/b2LambdaC2l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->LambdaC->l
681+
if (abs(mcparticle.pdgCode()) == kXiC0)
682+
registry.fill(HIST("Electron/b2Xic02l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->Xic0->l
683+
if (abs(mcparticle.pdgCode()) == kXiCPlus)
684+
registry.fill(HIST("Electron/b2Xicch2l/hs"), pt, eta, phi, dca_sigma, track.sign()); // hb->Xicch->l
685+
} else { // prompt hc->l is found.
666686
registry.fill(HIST("Electron/c2l/hs"), pt, eta, phi, dca_sigma, track.sign());
667687
}
668688
}

0 commit comments

Comments
 (0)