Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ALICE3/TableProducer/alice3-multicharmTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
Configurable<float> xiccMaxEta{"xiccMaxEta", 1.5, "Max eta"};
Configurable<float> massWindowXi{"massWindowXi", 0.015, "Mass window around Xi peak (GeV/c)"};
Configurable<float> massWindowXiC{"massWindowXiC", 0.015, "Mass window around XiC peak (GeV/c)"};
Configurable<float> massWindowXiCC{"massWindowXiCC", 0.4, "Mass window around XiCC peak (GeV/c). Make sure that bkg region is included in this window"};

ConfigurableAxis axisEta{"axisEta", {80, -4.0f, +4.0f}, "#eta"};
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 0.0f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2.0f, 2.2f, 2.4f, 2.6f, 2.8f, 3.0f, 3.2f, 3.4f, 3.6f, 3.8f, 4.0f, 4.4f, 4.8f, 5.2f, 5.6f, 6.0f, 6.5f, 7.0f, 7.5f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f, 17.0f, 19.0f, 21.0f, 23.0f, 25.0f, 30.0f, 35.0f, 40.0f, 50.0f}, "pt axis for QA histograms"};
Expand All @@ -149,9 +150,9 @@

HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};

Partition<aod::McParticles> trueXi = aod::mcparticle::pdgCode == 3312;

Check failure on line 153 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
Partition<aod::McParticles> trueXiC = aod::mcparticle::pdgCode == 4232;

Check failure on line 154 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
Partition<aod::McParticles> trueXiCC = aod::mcparticle::pdgCode == 4422;

Check failure on line 155 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.

// filter expressions for D mesons
static constexpr uint32_t trackSelectionPiFromXiC = 1 << kInnerTOFPion | 1 << kOuterTOFPion | 1 << kRICHPion | 1 << kTruePiFromXiC;
Expand Down Expand Up @@ -245,14 +246,19 @@
thisXiCCcandidate.parentTrackCovMatrix[5] = covVtx(2, 2);

// set relevant values
thisXiCCcandidate.dca = TMath::Sqrt(fitter.getChi2AtPCACandidate());

Check failure on line 249 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (thisXiCCcandidate.dca > dcaXiCCDaughtersSelection) {
return false;
}

thisXiCCcandidate.mass = RecoDecay::m(array{array{thisXiCCcandidate.prong0mom[0], thisXiCCcandidate.prong0mom[1], thisXiCCcandidate.prong0mom[2]}, array{thisXiCCcandidate.prong1mom[0], thisXiCCcandidate.prong1mom[1], thisXiCCcandidate.prong1mom[2]}}, array{mass0, mass1});

Check failure on line 254 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

if (std::fabs(thisXiCCcandidate.mass - o2::constants::physics::MassXiCCPlusPlus) > massWindowXiCC) {
return false;
}

thisXiCCcandidate.pt = std::hypot(thisXiCCcandidate.prong0mom[0] + thisXiCCcandidate.prong1mom[0], thisXiCCcandidate.prong0mom[1] + thisXiCCcandidate.prong1mom[1]);
thisXiCCcandidate.eta = RecoDecay::eta(array{thisXiCCcandidate.prong0mom[0] + thisXiCCcandidate.prong1mom[0], thisXiCCcandidate.prong0mom[1] + thisXiCCcandidate.prong1mom[1], thisXiCCcandidate.prong0mom[2] + thisXiCCcandidate.prong1mom[2]});

Check failure on line 261 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return true;
}

Expand Down Expand Up @@ -315,13 +321,13 @@
thisXiCcandidate.parentTrackCovMatrix[5] = covVtx(2, 2);

// set relevant values
thisXiCcandidate.dca = TMath::Sqrt(fitter3.getChi2AtPCACandidate());

Check failure on line 324 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (thisXiCcandidate.dca > dcaXiCDaughtersSelection) {
return false;
}
thisXiCcandidate.mass = RecoDecay::m(array{array{thisXiCcandidate.prong0mom[0], thisXiCcandidate.prong0mom[1], thisXiCcandidate.prong0mom[2]}, array{thisXiCcandidate.prong1mom[0], thisXiCcandidate.prong1mom[1], thisXiCcandidate.prong1mom[2]}, array{thisXiCcandidate.prong2mom[0], thisXiCcandidate.prong2mom[1], thisXiCcandidate.prong2mom[2]}}, array{p0mass, p1mass, p2mass});

Check failure on line 328 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
thisXiCcandidate.pt = std::hypot(thisXiCcandidate.prong0mom[0] + thisXiCcandidate.prong1mom[0] + thisXiCcandidate.prong2mom[0], thisXiCcandidate.prong0mom[1] + thisXiCcandidate.prong1mom[1] + thisXiCcandidate.prong2mom[1]);
thisXiCcandidate.eta = RecoDecay::eta(array{thisXiCcandidate.prong0mom[0] + thisXiCcandidate.prong1mom[0] + thisXiCcandidate.prong2mom[0], thisXiCcandidate.prong0mom[1] + thisXiCcandidate.prong1mom[1] + thisXiCcandidate.prong2mom[1], thisXiCcandidate.prong0mom[2] + thisXiCcandidate.prong1mom[2] + thisXiCcandidate.prong2mom[2]});

Check failure on line 330 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return true;
}

Expand All @@ -343,7 +349,7 @@
auto mcParticle1 = track1.template mcParticle_as<aod::McParticles>();
auto mcParticle2 = track2.template mcParticle_as<aod::McParticles>();
if (mcParticle1.has_mothers() && mcParticle2.has_mothers()) {
for (auto& mcParticleMother1 : mcParticle1.template mothers_as<aod::McParticles>()) {

Check failure on line 352 in ALICE3/TableProducer/alice3-multicharmTable.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (auto& mcParticleMother2 : mcParticle2.template mothers_as<aod::McParticles>()) {
if (mcParticleMother1.globalIndex() == mcParticleMother2.globalIndex()) {
returnValue = true;
Expand Down
6 changes: 4 additions & 2 deletions ALICE3/Tasks/alice3-multicharm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ struct alice3multicharm {

histos.add("hBDTScore", "hBDTScore", kTH1D, {axisBDTScore});
histos.add("hBDTScoreVsXiccMass", "hBDTScoreVsXiccMass", kTH2D, {axisXiccMass, axisBDTScore});
histos.add("hBDTScoreVsXiccPt", "hBDTScoreVsXiccPt", kTH2D, {axisXiccMass, axisPt});
histos.add("hBDTScoreVsXiccPt", "hBDTScoreVsXiccPt", kTH2D, {axisPt, axisBDTScore});
histos.add("h3dBDTScore", "h3dBDTScore", kTH3D, {axisPt, axisXiccMass, axisBDTScore});
for (const auto& score : bdt.requiredScores.value) {
histPath = std::format("MLQA/RequiredBDTScore_{}/", static_cast<int>(score * 100));
histPointers.insert({histPath + "hDCAXicDaughters", histos.add((histPath + "hDCAXicDaughters").c_str(), "hDCAXicDaughters", {kTH1D, {{axisDcaDaughters}}})});
Expand Down Expand Up @@ -293,7 +294,7 @@ struct alice3multicharm {
}

template <typename TMCharmCands>
void genericProcessXicc(TMCharmCands xiccCands)
void genericProcessXicc(TMCharmCands const& xiccCands)
{
for (const auto& xiccCand : xiccCands) {
if (bdt.enableML) {
Expand Down Expand Up @@ -324,6 +325,7 @@ struct alice3multicharm {
histos.fill(HIST("hBDTScore"), bdtScore);
histos.fill(HIST("hBDTScoreVsXiccMass"), xiccCand.xiccMass(), bdtScore);
histos.fill(HIST("hBDTScoreVsXiccPt"), xiccCand.xiccPt(), bdtScore);
histos.fill(HIST("h3dBDTScore"), xiccCand.xiccPt(), xiccCand.xiccMass(), bdtScore);

for (const auto& requiredScore : bdt.requiredScores.value) {
if (bdtScore > requiredScore) {
Expand Down
Loading