Skip to content
Merged
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
4 changes: 2 additions & 2 deletions DPG/Tasks/AOTTrack/tagAndProbeDmesons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@
using CollisionsWithEvSel = soa::Join<aod::Collisions, aod::EvSels>;

Filter evSelFilter = aod::evsel::sel8 == true; // simple event selection
Filter collisionFilter = nabs(aod::collision::posZ) < 10.f; // simple event selection

Check failure on line 257 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
Filter trackFilter = requireGlobalTrackWoDCAInFilter() && aod::track::pt > trackPtMin && (nabs(aod::track::dcaXY) > trackDcaXyMin || aod::track::pt > 2.f); // for the tag, we only consider global tracks with large dcaXY (low pT only)

Check failure on line 258 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
using TracksWithSelAndDcaFiltered = soa::Filtered<TracksWithSelAndDca>;
using TracksWithSelAndDcaMcFiltered = soa::Filtered<TracksWithSelAndDcaMc>;
using CollisionsFiltered = soa::Filtered<CollisionsWithEvSel>;
Expand Down Expand Up @@ -422,13 +422,13 @@

if (channel == aod::tagandprobe::TagChannels::DplusToKPiPi) {
pdgTagMother = constants::physics::Pdg::kDPlus;
pdgProbeParticle = 321; // Ka

Check failure on line 425 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
} else if (channel == aod::tagandprobe::TagChannels::DsOrDplusToKKPi) {
pdgTagMother = constants::physics::Pdg::kPhi;
pdgProbeParticle = 211; // Pi

Check failure on line 428 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
} else {
pdgTagMother = constants::physics::Pdg::kD0;
pdgProbeParticle = 211; // Pi

Check failure on line 431 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
}

if (!firsTrack.has_mcParticle() || !secondTrack.has_mcParticle()) {
Expand All @@ -451,8 +451,8 @@
auto daughters = particleMother.template daughters_as<PParticles>();

// Check if the probe is within the mother's particle daughters
if (daughters.size() == 3) { // non-resonant decay

Check failure on line 454 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
for (auto& daughter : daughters) {

Check failure on line 455 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
if (std::abs(daughter.pdgCode()) == pdgProbeParticle) {
isTaggedAsSignal = true;
motherIdx = firstTrackMotherId;
Expand All @@ -460,7 +460,7 @@
}
}
} else if (daughters.size() == 2) { // resonant decay
for (auto& daughter : daughters) {

Check failure on line 463 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
auto absPdg = std::abs(daughter.pdgCode());
if (std::find(pdgResonances.begin(), pdgResonances.end(), absPdg) != pdgResonances.end()) {
isTaggedAsSignal = true;
Expand All @@ -473,14 +473,14 @@
} else {
/// K∓K± for φ from Ds± or D± → φπ± decays
/// K∓π± for D0 from D±* → D0π± decays
for (auto pdgGrandMother : pdgDecayMothers) {

Check failure on line 476 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
auto grandMotherId = RecoDecay::getMother(mcParticles, particleMother, pdgGrandMother, true);
if (grandMotherId != -1) {
auto particleGrandMother = mcParticles.rawIteratorAt(grandMotherId);
auto daughters = particleGrandMother.template daughters_as<PParticles>();
// Check if the probe is within the GrandMother's particle daughters
if (daughters.size() == 2) { // exclude undesired decays, such as Ds± → φπ±π±π∓
for (auto& daughter : daughters) {

Check failure on line 483 in DPG/Tasks/AOTTrack/tagAndProbeDmesons.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.
if (std::abs(daughter.pdgCode()) == pdgProbeParticle) {
isTaggedAsSignal = true;
motherIdx = grandMotherId;
Expand Down Expand Up @@ -1291,7 +1291,7 @@
}
}
for (int iChannel{0}; iChannel < aod::tagandprobe::TagChannels::NTagChannels; ++iChannel) {
histosGen[iChannel] = registry.add<THnSparse>(Form("hGen%s", tagChannels[iChannel].data()), ";#it{p}_{T}(D_{parent}) (GeV/#it{c}); #it{y}(D_{parent});#it{p}_{T}(tag) (GeV/#it{c}); #it{y}(tag);#it{p}_{T}(probe) (GeV/#it{c}); #it{#eta}(probe);#it{p}_{T}^{min}(tag daughters);#it{#eta}_{max}(tag daughters); radius(tag) (cm)", HistType::kTHnSparseF, {axisPtD, axisYD, axisPtTag, axisYD, axisPtProbe, axisEtaProbe, axisPtMinTagdaught, axisAbsEtaMaxTagdaught,axisRadiusTag});
histosGen[iChannel] = registry.add<THnSparse>(Form("hGen%s", tagChannels[iChannel].data()), ";#it{p}_{T}(D_{parent}) (GeV/#it{c}); #it{y}(D_{parent});#it{p}_{T}(tag) (GeV/#it{c}); #it{y}(tag);#it{p}_{T}(probe) (GeV/#it{c}); #it{#eta}(probe);#it{p}_{T}^{min}(tag daughters);#it{#eta}_{max}(tag daughters); radius(tag) (cm)", HistType::kTHnSparseF, {axisPtD, axisYD, axisPtTag, axisYD, axisPtProbe, axisEtaProbe, axisPtMinTagdaught, axisAbsEtaMaxTagdaught, axisRadiusTag});
}
applyMl = {mlConfig.applyMlPiPiFromDplus, mlConfig.applyMlKaKaFromDsOrDplus, mlConfig.applyMlDzeroFromDstar};
}
Expand Down Expand Up @@ -1390,7 +1390,7 @@

bool isCollisionSelected(CollisionsWithEvSel::iterator const& collision)
{
switch(requireCollisionsGoodITS.value) {
switch (requireCollisionsGoodITS.value) {
case None:
return true;
break;
Expand Down
Loading