<< particle->Px() << " , "
<< particle->Py() << " , "
<< particle->Pz() << " ) --> "
- << particle->P() << " GeV" << endl;
+ << particle->P() << " GeV "
+ << particle->Energy() << " GeV "
+ << particle->GetMass() << " GeV " << endl;
}
/* Lstack is the stack counter: of course any time source is called it
* must be =0
//STACK.ilo[STACK.lstack] = BEAM.ijbeam;
if (pdg != 50000050 && pdg != 50000051) {
STACK.lstack++;
- STACK.ilo[STACK.lstack] = fluka-> IdFromPDG(pdg);
-
+ Int_t ifl = fluka-> IdFromPDG(pdg);
+ STACK.ilo[STACK.lstack] = ifl;
/* Wt is the weight of the particle*/
STACK.wt[STACK.lstack] = oneone;
STARS.weipri += STACK.wt[STACK.lstack];
STACK.igroup[STACK.lstack] = 0;
/* Kinetic energy */
- STACK.tke[STACK.lstack] = particle->Energy() - particle->GetMass();
+ Double_t p = particle->P();
+ Double_t mass = PAPROP.am[ifl + 6];
+ STACK.tke[STACK.lstack] = TMath::Sqrt( p * p + mass * mass) - mass;
/* Particle momentum*/
- STACK.pmom [STACK.lstack] = particle->P();
-
+ STACK.pmom [STACK.lstack] = p;
STACK.tx [STACK.lstack] = cosx;
STACK.ty [STACK.lstack] = cosy;