Skip to content

Commit 7151cd4

Browse files
committed
To fix the code check error
1 parent 7e12135 commit 7151cd4

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

PWGLF/Tasks/Resonances/chargedkstaranalysis.cxx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,33 +1445,36 @@ struct Chargedkstaranalysis {
14451445
const int pionWanted = (part.pdgCode() > 0) ? +kPiPlus : -kPiPlus;
14461446
bool hasRightPion = false;
14471447
bool hasK0sToPipi = false;
1448-
bool passDauAcceptance = false;
14491448
for (const auto& d1 : part.template daughters_as<aod::McParticles>()) {
14501449
const int pdg1 = d1.pdgCode();
14511450
if (pdg1 == pionWanted) {
14521451
lDecayDaughter_bach = LorentzVectorSetXYZM(d1.px(), d1.py(), d1.pz(), MassPionCharged);
14531452
if (helicityCfgs.genKinematicsChecks) {
1454-
if (!((lDecayDaughter_bach.pt() > trackCutCfgs.cMinPtcut) && (std::abs(lDecayDaughter_bach.eta()) < trackCutCfgs.cMaxEtacut))) {
1453+
if (lDecayDaughter_bach.pt() <= trackCutCfgs.cMinPtcut || std::abs(lDecayDaughter_bach.eta()) >= trackCutCfgs.cMaxEtacut) {
14551454
continue;
14561455
}
14571456
}
1458-
passDauAcceptance = (lDecayDaughter_bach.pt() > trackCutCfgs.cMinPtcut) && (std::abs(lDecayDaughter_bach.eta()) < trackCutCfgs.cMaxEtacut);
14591457
hasRightPion = true;
14601458
} else if (std::abs(pdg1) == kPDGK0) {
14611459
for (const auto& d2 : d1.template daughters_as<aod::McParticles>()) {
14621460
if (std::abs(d2.pdgCode()) == kPDGK0s) {
1461+
if (helicityCfgs.genKinematicsChecks) {
1462+
if (d2.pt() <= secondaryCutsCfgs.cSecondaryPtMin || std::abs(d2.eta()) >= secondaryCutsCfgs.cSecondaryRapidityMax) {
1463+
continue;
1464+
}
1465+
}
14631466
bool seenPip = false, seenPim = false;
14641467
for (const auto& d3 : d2.template daughters_as<aod::McParticles>()) {
14651468
if (d3.pdgCode() == +kPiPlus) {
14661469
if (helicityCfgs.genKinematicsChecks) {
1467-
if (!((d3.pt() > trackCutCfgs.cMinPtcut) && (std::abs(d3.eta()) < trackCutCfgs.cMaxEtacut))) {
1470+
if (!helicityCfgs.genKinematicsChecks || (d3.pt() > trackCutCfgs.cMinPtcut && std::abs(d3.eta()) < trackCutCfgs.cMaxEtacut)) {
14681471
continue;
14691472
}
14701473
}
14711474
seenPip = true;
14721475
} else if (d3.pdgCode() == -kPiPlus) {
14731476
if (helicityCfgs.genKinematicsChecks) {
1474-
if (!((d3.pt() > trackCutCfgs.cMinPtcut) && (std::abs(d3.eta()) < trackCutCfgs.cMaxEtacut))) {
1477+
if (!helicityCfgs.genKinematicsChecks || (d3.pt() > trackCutCfgs.cMinPtcut && std::abs(d3.eta()) < trackCutCfgs.cMaxEtacut)) {
14751478
continue;
14761479
}
14771480
}
@@ -1480,11 +1483,6 @@ struct Chargedkstaranalysis {
14801483
}
14811484
if (seenPip && seenPim) {
14821485
lResoSecondary = LorentzVectorSetXYZM(d2.px(), d2.py(), d2.pz(), MassK0Short);
1483-
if (helicityCfgs.genKinematicsChecks) {
1484-
if (!((d2.pt() > secondaryCutsCfgs.cSecondaryPtMin) && (std::abs(d2.eta()) < secondaryCutsCfgs.cSecondaryRapidityMax))) {
1485-
continue;
1486-
}
1487-
}
14881486
hasK0sToPipi = true;
14891487
break;
14901488
}

0 commit comments

Comments
 (0)