File tree Expand file tree Collapse file tree
MC/config/PWGDQ/external/generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,15 +33,16 @@ class GeneratorCocktail_class : public Generator
3333 int nPart = mParticles .size ();
3434 g -> importParticles ();
3535 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 );
4436 mParticles .push_back (p );
37+ auto& pEdit = mParticles .back ();
38+ if (pEdit .GetFirstMother () > -1 )
39+ pEdit .SetFirstMother (pEdit .GetFirstMother () + nPart );
40+ if (pEdit .GetSecondMother () > -1 )
41+ pEdit .SetLastMother (pEdit .GetSecondMother () + nPart );
42+ if (pEdit .GetFirstDaughter () > -1 )
43+ pEdit .SetFirstDaughter (pEdit .GetFirstDaughter () + nPart );
44+ if (pEdit .GetLastDaughter () > -1 )
45+ pEdit .SetLastDaughter (pEdit .GetLastDaughter () + nPart );
4546 }
4647 g -> clearParticles ();
4748 }
@@ -55,6 +56,11 @@ class GeneratorCocktail_class : public Generator
5556 return ;
5657 };
5758
59+ std ::vector < Generator * > * getGenerators ()
60+ {
61+ return mEntries ;
62+ };
63+
5864 private :
5965 ///
6066 std ::vector < Generator * > * mEntries = new std ::vector < Generator * > (); // vector of Generator
You can’t perform that action at this time.
0 commit comments