Skip to content

Commit a1fd0bb

Browse files
calmonbehlingMaria Calmon Behling
andauthored
[PWGLF] Apply kinematic cuts to all particles (#18697)
Co-authored-by: Maria Calmon Behling <mariacalmonbehling@pcikf104.ikf.uni-frankfurt.de>
1 parent d037a9e commit a1fd0bb

1 file changed

Lines changed: 3 additions & 17 deletions

File tree

‎PWGLF/TableProducer/Nuspex/particleCompositionCorrection.cxx‎

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,7 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
149149

150150
static constexpr int kXi0PDG = 3322;
151151

152-
/* if (skipAll || std::abs(particle.eta()) > etaCut || particle.pt() < ptMinCut || particle.pt() > ptMaxCut) {
153-
return noWeights;
154-
} */
155-
156-
if (skipAll) {
152+
if (skipAll || std::abs(particle.eta()) > etaCut || particle.pt() < ptMinCut || particle.pt() > ptMaxCut) {
157153
return noWeights;
158154
}
159155

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

182-
if (!particle.has_daughters()) {
183-
184-
if (particle.eta() > etaCut || particle.pt() > ptMaxCut || particle.pt() < ptMinCut) {
185-
186-
return noWeights;
187-
}
188-
}
189-
190178
// translate abs PDG code to PID variable of neural networks (0: pion, 1: kaon, 2: proton, 3: sigma)
191179

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

214202
// calculate particle fractions and corresponding weight for given reference particle
215203
std::vector<std::vector<float>> input = {{dNdEta}, {particle.pt()}, {iterMapPID->second}};
204+
216205
float fracData = particleFractionsData.evalModel(input)[0];
217206
float fracMC = particleFractionsMC.evalModel(input)[0];
207+
218208
float weight = (fracMC != 0.f) ? fracData / fracMC : 1.f;
219209
std::tuple<float, float, float> weights = {weight, weight, weight};
220210
if (!skipSec && particle.has_daughters()) {
@@ -258,10 +248,6 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
258248
}
259249
}
260250

261-
if (particle.eta() > etaCut || particle.pt() > ptMaxCut || particle.pt() < ptMinCut) {
262-
return noWeights;
263-
}
264-
265251
while (particles.iteratorAt(refParticleID).has_mothers()) {
266252

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

0 commit comments

Comments
 (0)