We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2d6447 commit 13767c9Copy full SHA for 13767c9
1 file changed
MC/config/PWGDQ/external/generator/GeneratorCocktail.C
@@ -30,9 +30,19 @@ class GeneratorCocktail_class : public Generator
30
bool importParticles() override
31
{
32
for (auto& g : *mEntries) {
33
+ int nPart = mParticles.size();
34
g->importParticles();
- for (auto& p : g->getParticles())
35
+ for (auto p : g->getParticles()) {
36
+ if (p.GetFirstMother() > -1)
37
+ p.SetFirstMother(p.GetFirstMother() + nPart);
38
+ if (p.GetSecondMother() > -1)
39
+ p.SetLastMother(p.GetSecondMother() + nPart);
40
+ if (p.GetFirstDaughter() > -1)
41
+ p.SetFirstDaughter(p.GetFirstDaughter() + nPart);
42
+ if (p.GetLastDaughter() > -1)
43
+ p.SetLastDaughter(p.GetLastDaughter() + nPart);
44
mParticles.push_back(p);
45
+ }
46
g->clearParticles();
47
}
48
return true;
0 commit comments