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
21 changes: 14 additions & 7 deletions PWGLF/Tasks/Strangeness/phik0shortanalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@
// Efficiecy maps
TH3F* effMapPhi;
TH3F* effMapK0S;
TH3F* effMapPion;
TH3F* effMapPionTPC;
TH3F* effMapPionTPCTOF;

void init(InitContext&)
{
Expand Down Expand Up @@ -616,7 +617,8 @@
else {
effMapPhi = nullptr;
effMapK0S = nullptr;
effMapPion = nullptr;
effMapPionTPC = nullptr;
effMapPionTPCTOF = nullptr;
}
}
}
Expand Down Expand Up @@ -965,9 +967,14 @@
LOG(error) << "Problem getting efficiency map for K0S!";
return;
}
effMapPion = static_cast<TH3F*>(listEfficiencyMaps->FindObject("h3EfficiencyPion"));
if (!effMapPion) {
LOG(error) << "Problem getting efficiency map for Pion!";
effMapPionTPC = static_cast<TH3F*>(listEfficiencyMaps->FindObject("h3EfficiencyPionTPC"));
if (!effMapPionTPC) {
LOG(error) << "Problem getting efficiency map for Pion with TPC!";
return;
}
effMapPionTPCTOF = static_cast<TH3F*>(listEfficiencyMaps->FindObject("h3EfficiencyPionTPCTOF"));
if (!effMapPionTPCTOF) {
LOG(error) << "Problem getting efficiency map for Pion with TPC and TOF!";
return;
}
}
Expand Down Expand Up @@ -1626,7 +1633,7 @@
if (mcTrack.isPhysicalPrimary()) {
mcPionHist.fill(HIST("h3RecMCDCAxyPrimPi"), track.pt(), track.dcaXY());
} else {
if (mcTrack.getProcess() == 4) { // Selection of secondary pions from weak decay

Check failure on line 1636 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
mcPionHist.fill(HIST("h3RecMCDCAxySecWeakDecayPi"), track.pt(), track.dcaXY());
} else { // Selection of secondary pions from material interactions
mcPionHist.fill(HIST("h3RecMCDCAxySecMaterialPi"), track.pt(), track.dcaXY());
Expand Down Expand Up @@ -2099,7 +2106,7 @@
if (mcParticle1.pdgCode() != o2::constants::physics::Pdg::kPhi)
continue;
auto kDaughters = mcParticle1.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)

Check failure on line 2109 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
Expand Down Expand Up @@ -2236,7 +2243,7 @@
continue;
if (cfgisGenMCForClosure) {
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)

Check failure on line 2246 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
Expand Down Expand Up @@ -2313,7 +2320,7 @@
continue;
if (cfgisGenMCForClosure) {
auto kDaughters = mcParticle2.daughters_as<aod::McParticles>();
if (kDaughters.size() != 2)

Check failure on line 2323 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
continue;
bool isPosKaon = false, isNegKaon = false;
for (const auto& kDaughter : kDaughters) {
Expand Down Expand Up @@ -2578,7 +2585,7 @@

float efficiencyPhiPion = 1.0f;
if (applyEfficiency) {
efficiencyPhiPion = effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPion->Interpolate(multiplicity, track.pt(), track.rapidity(massPi));
efficiencyPhiPion = track.pt() < trackConfigs.pTToUseTOF ? effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPC->Interpolate(multiplicity, track.pt(), track.rapidity(massPi)) : effMapPhi->Interpolate(multiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPCTOF->Interpolate(multiplicity, track.pt(), track.rapidity(massPi));
if (efficiencyPhiPion == 0)
efficiencyPhiPion = 1.0f;
}
Expand Down Expand Up @@ -2698,7 +2705,7 @@

float efficiencyPhiPion = 1.0f;
if (applyEfficiency) {
efficiencyPhiPion = effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPion->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi));
efficiencyPhiPion = track.pt() < trackConfigs.pTToUseTOF ? effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPC->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi)) : effMapPhi->Interpolate(genmultiplicity, recPhi.Pt(), recPhi.Rapidity()) * effMapPionTPCTOF->Interpolate(genmultiplicity, track.pt(), track.rapidity(massPi));
if (efficiencyPhiPion == 0)
efficiencyPhiPion = 1.0f;
}
Expand Down Expand Up @@ -2819,7 +2826,7 @@
if (mcTrack.isPhysicalPrimary()) {
mcPionHist.fill(HIST("h3RecMCDCAxyPrimPi"), track.pt(), track.dcaXY());
} else {
if (mcTrack.getProcess() == 4) { // Selection of secondary pions from weak decay

Check failure on line 2829 in PWGLF/Tasks/Strangeness/phik0shortanalysis.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.
mcPionHist.fill(HIST("h3RecMCDCAxySecWeakDecayPi"), track.pt(), track.dcaXY());
} else { // Selection of secondary pions from material interactions
mcPionHist.fill(HIST("h3RecMCDCAxySecMaterialPi"), track.pt(), track.dcaXY());
Expand Down
Loading