Skip to content

Commit 13eecea

Browse files
ihrivnacsawenzel
authored andcommitted
A new attempt to fix importing decay products:
- Return isFinal() as the particle status code (instead of statusHepMC()), to be consistent with the decayer implementation in AliRoot. - Revert back the changes in commit b3e825e (not needed anymore). This should fix the problem with the explosion of the log file in Geant4 O2 production tests.
1 parent 7f84ced commit 13eecea

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Generators/src/DecayerPythia8.cxx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,19 @@ void DecayerPythia8::Decay(Int_t pdg, TLorentzVector* lv)
7474

7575
/*****************************************************************/
7676

77+
#include <iostream>
78+
7779
Int_t DecayerPythia8::ImportParticles(TClonesArray* particles)
7880
{
7981
TClonesArray& ca = *particles;
8082
ca.Clear();
8183

8284
auto nParticles = mPythia.event.size();
83-
for (Int_t iparticle = 1; iparticle < nParticles; iparticle++) {
85+
for (Int_t iparticle = 0; iparticle < nParticles; iparticle++) {
8486
// Do not import the decayed particle - start loop from 1
8587
auto particle = mPythia.event[iparticle];
8688
auto pdg = particle.id();
87-
auto st = particle.statusHepMC();
89+
auto st = particle.isFinal();
8890
auto px = particle.px();
8991
auto py = particle.py();
9092
auto pz = particle.pz();
@@ -98,7 +100,7 @@ Int_t DecayerPythia8::ImportParticles(TClonesArray* particles)
98100
auto d1 = particle.daughter1();
99101
auto d2 = particle.daughter2();
100102

101-
new (ca[iparticle - 1]) TParticle(pdg, st, m1, m2, d1, d2, px, py, pz, et, vx, vy, vz, vt);
103+
new (ca[iparticle]) TParticle(pdg, st, m1, m2, d1, d2, px, py, pz, et, vx, vy, vz, vt);
102104
}
103105

104106
return ca.GetEntries();

0 commit comments

Comments
 (0)