Skip to content

Commit

Permalink
PushTrack(..., Float* pmom ...): calculate energy in double precision (
Browse files Browse the repository at this point in the history
…#1154)

Co-authored-by: Andreas Morsch <[email protected]>
  • Loading branch information
gconesab and amorsch authored May 6, 2020
1 parent 5077cd3 commit f3199b1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions STEER/STEERBase/AliStack.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,11 @@ void AliStack::PushTrack(Int_t done, Int_t parent, Int_t pdg, const Float_t *pmo
//
TParticlePDG* pmc = TDatabasePDG::Instance()->GetParticle(pdg);
if (pmc) {
Float_t mass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
Float_t e=TMath::Sqrt(mass*mass+pmom[0]*pmom[0]+
pmom[1]*pmom[1]+pmom[2]*pmom[2]);
Double_t mass = TDatabasePDG::Instance()->GetParticle(pdg)->Mass();
Double_t px = pmom[0];
Double_t py = pmom[1];
Double_t pz = pmom[2];
Double_t e = TMath::Sqrt(mass * mass + px * px + py * py + pz * pz);

// printf("Loading mass %f ene %f No %d ip %d parent %d done %d pos %f %f %f mom %f %f %f kS %d m \n",
// mass,e,fNtrack,pdg,parent,done,vpos[0],vpos[1],vpos[2],pmom[0],pmom[1],pmom[2],kS);
Expand Down

0 comments on commit f3199b1

Please sign in to comment.