Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
using namespace Pythia8;

#include <cmath>

#include <fairlogger/Logger.h>

namespace hf_generators
{
enum GenType : int {
Expand Down Expand Up @@ -285,12 +288,14 @@ Bool_t importParticles() override
if(idFirstMother >=0) {
/// the 1st mother is from charm or beauty, i.e. is not a light-flavoured parton
if(idLastMother != idFirstMotherOrig) {
if(idLastMother != -1) {
/// idLastMother is >= 0
idLastMother = findKey(mapHfParticles, idLastMother);
if(idLastMother < 0) {
// second mother not found, we set it to -1
idLastMother = -1;
}
} else {
/// idLastMother is equal to idFirstMother
idLastMother = idFirstMother;
idLastMother = idFirstMother;
}
isFirstMotherOk = true;
}
Expand All @@ -311,15 +316,17 @@ Bool_t importParticles() override
const int idMother = findKey(mapHfParticles, idMotherOrig);
if(idMother >= 0) {
/// this should mean that the mother is from HF, i.e. that we found the correct one
idFirstMother = idMother;
idLastMother = idFirstMother;
if (idFirstMother < 0) {
idFirstMother = idMother;
}
idLastMother = idMother;
foundAnyMother = true;
break;
}
}
// set last mother to -1 if no mother has been found so far
if (!foundAnyMother) {
idLastMother = -1;
idFirstMother = -1;
}
}

Expand All @@ -330,8 +337,8 @@ Bool_t importParticles() override
/// adjust the particle mother and daughter indices
particle.SetFirstMother((idFirstMother >= 0) ? idFirstMother + offset : idFirstMother);
particle.SetLastMother((idLastMother >= 0) ? idLastMother + offset : idLastMother);
particle.SetFirstDaughter((idFirstDaughter >= 0) ? idFirstDaughter + offset : idFirstDaughter);
particle.SetLastDaughter((idLastDaughter >= 0) ? idLastDaughter + offset : idLastDaughter);
particle.SetFirstDaughter((idFirstDaughter >= 0) ? idFirstDaughter + offset : idFirstDaughter);
particle.SetLastDaughter((idLastDaughter >= 0) ? idLastDaughter + offset : idLastDaughter);

/// copy inside this.mParticles from mGeneratorEvHF.mParticles, i.e. the particles generated in mGeneratorEvHF
mParticles.push_back(particle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,25 @@ BeamRemnants:saturation =5

### only semileptonic decays
### D+
411:oneChannel = 1 0.087 0 -311 -11 12
411:addChannel = 1 0.040 0 -321 211 -11 12
411:addChannel = 1 0.037 0 -313 -11 12
411:oneChannel = 1 0.087 22 -11 12 -311
411:addChannel = 1 0.040 22 -11 12 -321 211
411:addChannel = 1 0.037 22 -11 12 -313
### D0
421:oneChannel = 1 0.035 0 -321 -11 12
421:addChannel = 1 0.022 0 -323 -11 12
421:addChannel = 1 0.016 0 -321 111 -11 12
421:oneChannel = 1 0.035 22 -11 12 -321
421:addChannel = 1 0.022 22 -11 12 -323
421:addChannel = 1 0.016 22 -11 12 -321 111
421:addChannel = 1 0.014 22 -11 12 -311 -211
### Ds
431:oneChannel = 1 0.025 0 333 -11 12
431:addChannel = 1 0.027 0 221 -11 12
431:oneChannel = 1 0.025 22 -11 12 333
431:addChannel = 1 0.027 22 -11 12 221
### Lambdac
4122:oneChannel = 1 0.036 0 3122 -11 12
4122:oneChannel = 1 0.036 22 -11 12 3122
### chi_{c}^{+}
4232:oneChannel = 1 0.07 0 3322 -11 12
4232:oneChannel = 1 0.07 22 -11 12 3322
### chi_{c}^{0}
4132:oneChannel = 1 0.014 0 3312 -11 12
4132:oneChannel = 1 0.014 22 -11 12 3312
### Omega_{c}
4332:oneChannel = 1 0.01224 0 3334 -11 12
4332:oneChannel = 1 0.01224 22 -11 12 3334

# Correct OmegaC decay length (wrong in PYTHIA8 decay table) (mm/c)
4332:tau0 = 0.08000000000
Expand Down
Loading