Skip to content

Commit cba1c82

Browse files
preghenellasawenzel
authored andcommitted
Remove Pythia8 system and shift all indices by -1
1 parent d73308a commit cba1c82

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Generators/src/GeneratorPythia8.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ Bool_t
167167
/* loop over particles */
168168
// auto weight = mPythia.info.weight(); // TBD: use weights
169169
auto nParticles = event.size();
170-
for (Int_t iparticle = 0; iparticle < nParticles; iparticle++) { // first particle is system
170+
for (Int_t iparticle = 1; iparticle < nParticles; iparticle++) { // first particle is system
171171
auto particle = event[iparticle];
172172
auto pdg = particle.id();
173173
auto st = particle.statusHepMC();
@@ -179,10 +179,10 @@ Bool_t
179179
auto vy = particle.yProd();
180180
auto vz = particle.zProd();
181181
auto vt = particle.tProd();
182-
auto m1 = particle.mother1();
183-
auto m2 = particle.mother2();
184-
auto d1 = particle.daughter1();
185-
auto d2 = particle.daughter2();
182+
auto m1 = particle.mother1() - 1;
183+
auto m2 = particle.mother2() - 1;
184+
auto d1 = particle.daughter1() - 1;
185+
auto d2 = particle.daughter2() - 1;
186186
mParticles.push_back(TParticle(pdg, st, m1, m2, d1, d2, px, py, pz, et, vx, vy, vz, vt));
187187
}
188188

0 commit comments

Comments
 (0)