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
20 changes: 3 additions & 17 deletions PWGLF/TableProducer/Nuspex/particleCompositionCorrection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M

static constexpr int kXi0PDG = 3322;

/* if (skipAll || std::abs(particle.eta()) > etaCut || particle.pt() < ptMinCut || particle.pt() > ptMaxCut) {
return noWeights;
} */

if (skipAll) {
if (skipAll || std::abs(particle.eta()) > etaCut || particle.pt() < ptMinCut || particle.pt() > ptMaxCut) {
return noWeights;
}

Expand All @@ -179,14 +175,6 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
return noWeights;
}

if (!particle.has_daughters()) {

if (particle.eta() > etaCut || particle.pt() > ptMaxCut || particle.pt() < ptMinCut) {

return noWeights;
}
}

// translate abs PDG code to PID variable of neural networks (0: pion, 1: kaon, 2: proton, 3: sigma)

static const std::map<int, float> mapPID = {
Expand All @@ -213,8 +201,10 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M

// calculate particle fractions and corresponding weight for given reference particle
std::vector<std::vector<float>> input = {{dNdEta}, {particle.pt()}, {iterMapPID->second}};

float fracData = particleFractionsData.evalModel(input)[0];
float fracMC = particleFractionsMC.evalModel(input)[0];

float weight = (fracMC != 0.f) ? fracData / fracMC : 1.f;
std::tuple<float, float, float> weights = {weight, weight, weight};
if (!skipSec && particle.has_daughters()) {
Expand Down Expand Up @@ -258,10 +248,6 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
}
}

if (particle.eta() > etaCut || particle.pt() > ptMaxCut || particle.pt() < ptMinCut) {
return noWeights;
}

while (particles.iteratorAt(refParticleID).has_mothers()) {

auto motherID = particles.iteratorAt(refParticleID).mothersIds()[0] - particles.offset();
Expand Down
Loading