Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit f0a9b64

Browse files
committed
Add a helper method for retriving kinetic energy
1 parent 9051a0c commit f0a9b64

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

include/SimCore/Event/SimParticle.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ class SimParticle {
6363
*/
6464
double getEnergy() const { return energy_; }
6565

66+
/**
67+
* Get the kinetic energy of this particle [MeV].
68+
*
69+
* @return The kinetic energy of this particle.
70+
*/
71+
double getKineticEnergy() const { return energy_ - mass_; }
6672
/**
6773
* Get the PDG ID of this particle.
6874
*

0 commit comments

Comments
 (0)