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
2 changes: 1 addition & 1 deletion PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@

#include "Math/Vector4D.h"
#include "TMath.h"
#include "TDatabasePDG.h"

Check failure on line 33 in PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.

using namespace o2::framework;

Check failure on line 35 in PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis::femto_universe
{
Expand Down Expand Up @@ -141,8 +141,8 @@
/// \param pdg2 PDG code of particle two
void setPDGCodes(const int pdg1, const int pdg2)
{
mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass();

Check failure on line 144 in PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass();

Check failure on line 145 in PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
mPDGOne = pdg1;
mPDGTwo = pdg2;
}
Expand All @@ -161,10 +161,10 @@
deltaPhi = part1.phi() - part2.phi();

while (deltaPhi < mPhiLow) {
deltaPhi += o2::constants::math::TwoPI;

Check failure on line 164 in PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
while (deltaPhi > mPhiHigh) {
deltaPhi -= o2::constants::math::TwoPI;

Check failure on line 167 in PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}

mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtouniverse_mc_particle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), deltaPhi, deltaEta, weight);
Expand Down Expand Up @@ -206,7 +206,7 @@
const float mT = FemtoUniverseMath::getmT(part1, mMassOne, part2, mMassTwo);

if (mHistogramRegistry) {
setPairBase<o2::aod::femtouniverse_mc_particle::MCType::kRecon>(femtoObs, mT, part1, part2, mult, use3dplots);
setPairBase<o2::aod::femtouniverse_mc_particle::MCType::kRecon>(femtoObs, mT, part1, part2, mult, use3dplots, weight);

if constexpr (isMC) {
if (part1.has_fdMCParticle() && part2.has_fdMCParticle()) {
Expand Down
12 changes: 3 additions & 9 deletions PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,7 @@
Configurable<uint8_t> confChooseD0trackCorr{"confChooseD0trackCorr", 0, "If 0 correlations with D0s, if 1 with D0bars"};

// Efficiency
struct : o2::framework::ConfigurableGroup {
Configurable<std::string> confEfficiencyTrackPath{"confEfficiencyTrackPath", "", "Local path to hadron efficiency TH2F file"};
Configurable<std::string> confEfficiencyD0Path{"confEfficiencyD0Path", "", "Local path to D0 efficiency TH2F file"};
Configurable<int64_t> confEfficiencyTrackTimestamp{"confEfficiencyTrackTimestamp", 0, "(int64_t) Timestamp for hadron"};
Configurable<int64_t> confEfficiencyD0Timestamp{"confEfficiencyD0Timestamp", 0, "(int64_t) Timestamp for D0"};
Configurable<bool> doEfficiencyCorr{"doEfficiencyCorr", false, "Apply efficiency corrections"};
} ConfEff;
Configurable<bool> doEfficiencyCorr{"doEfficiencyCorr", false, "Apply efficiency corrections"};

/// Partitions for particle 1
Partition<FemtoFullParticles> partsTrack = (aod::femtouniverseparticle::partType == uint8_t(aod::femtouniverseparticle::ParticleType::kTrack)) && (aod::femtouniverseparticle::sign == int8_t(ConfTrack.confTrackSign)) && (aod::femtouniverseparticle::pt > ConfTrack.confTrackLowPtCut) && (aod::femtouniverseparticle::pt < ConfTrack.confTrackHighPtCut);
Expand Down Expand Up @@ -850,7 +844,7 @@
}
// Efficiency
weight = 1.0f;
if (ConfEff.doEfficiencyCorr) {
if (doEfficiencyCorr) {
weight = efficiencyCalculator.getWeight(ParticleNo::ONE, track.pt()) * efficiencyCalculator.getWeight(ParticleNo::TWO, d0candidate.pt());
}
sameEventAngularCont.setPair<isMC>(track, d0candidate, multCol, ConfBothTracks.confUse3D, weight);
Expand Down Expand Up @@ -979,7 +973,7 @@
}
// Efficiency
weight = 1.0f;
if (ConfEff.doEfficiencyCorr) {
if (doEfficiencyCorr) {
weight = efficiencyCalculator.getWeight(ParticleNo::ONE, track.pt()) * efficiencyCalculator.getWeight(ParticleNo::TWO, d0candidate.pt());
}

Expand Down Expand Up @@ -1145,18 +1139,18 @@
if (pdgParticle->Charge() > 0.0) {
mcTruthRegistry.fill(HIST("MCTruthAllPositivePt"), part.pt());
}
if (pdgCode == 211) {

Check failure on line 1142 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.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.
mcTruthRegistry.fill(HIST("MCTruthPipPtVsEta"), part.pt(), part.eta());
mcTruthRegistry.fill(HIST("MCTruthPipPt"), part.pt());
}
if (pdgCode == 321) {

Check failure on line 1146 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.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.
mcTruthRegistry.fill(HIST("MCTruthKpPtVsEta"), part.pt(), part.eta());
mcTruthRegistry.fill(HIST("MCTruthKpPt"), part.pt());
}
if (pdgCode == 421) {

Check failure on line 1150 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.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.
mcTruthRegistry.fill(HIST("MCTruthD0D0bar"), part.pt(), part.eta());
}
if (pdgCode == 2212) {

Check failure on line 1153 in PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackD0.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.
mcTruthRegistry.fill(HIST("MCTruthProtonPtVsEta"), part.pt(), part.eta());
mcTruthRegistry.fill(HIST("MCTruthProtonPt"), part.pt());
}
Expand Down
Loading