You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
while (mcPart.has_mothers()) { // the first hadron after hadronization
357
363
auto mother = mcPart.mothers_first_as<aod::McParticles>();
358
-
if (std::abs(mother.getGenStatusCode()) < 80) {
364
+
if (std::abs(mother.getGenStatusCode()) < hadronStatus) {
359
365
break;
360
366
}
361
367
mcPart = mother;
362
368
}
363
369
int flv = mcPart.pdgCode() / std::pow(10, static_cast<int>(std::log10(std::abs(mcPart.pdgCode()))));
364
-
if (abs(flv) == 5 && mcPart.pdgCode() < 1000)
370
+
if (std::abs(flv) == kBottom && mcPart.pdgCode() < pdgMid) {
365
371
flv = -flv;
372
+
}
366
373
for (int i = (mcPart.mothers_first_as<aod::McParticles>()).globalIndex(); i <= (mcPart.mothers_last_as<aod::McParticles>()).globalIndex(); i++) { // loop over the lund string
int motherflv = (mctrack.mothers_first_as<aod::McParticles>()).pdgCode() / std::pow(10, static_cast<int>(std::log10(abs((mctrack.mothers_first_as<aod::McParticles>()).pdgCode())))); // find the mother with same flavor
376
-
auto mother = (abs(motherflv) == abs(flv)) ? (mctrack.mothers_first_as<aod::McParticles>()) : (mctrack.mothers_last_as<aod::McParticles>());
377
-
if ((mother.pdgCode() != mctrack.pdgCode()) && (abs(mctrack.pdgCode()) < 10)) { // both mother is not the the quark with same flavor
378
-
mcNum = mctrack.globalIndex();
381
+
auto currentTrk = mctrack;
382
+
while (currentTrk.has_mothers()) {
383
+
int motherflv = (currentTrk.mothers_first_as<aod::McParticles>()).pdgCode() / std::pow(10, static_cast<int>(std::log10(std::abs((currentTrk.mothers_first_as<aod::McParticles>()).pdgCode())))); // find the mother with same flavor
384
+
auto mother = (std::abs(motherflv) == std::abs(flv)) ? (currentTrk.mothers_first_as<aod::McParticles>()) : (currentTrk.mothers_last_as<aod::McParticles>());
385
+
if ((mother.pdgCode() != currentTrk.pdgCode()) && (std::abs(currentTrk.pdgCode()) < kElectron)) { // both mother is not the the quark with same flavor
0 commit comments