File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -269,6 +269,13 @@ namespace ParticleZoo {
269269 * @return ParticleType The type of particle (electron, photon, proton, etc.)
270270 */
271271 ParticleType getType () const ;
272+
273+ /* *
274+ * @brief Get the PDG identification code of the particle.
275+ *
276+ * @return std::int32_t The PDG code corresponding to the particle type
277+ */
278+ std::int32_t getPDGCode () const ;
272279
273280 /* *
274281 * @brief Get the kinetic energy of the particle.
@@ -612,6 +619,7 @@ namespace ParticleZoo {
612619 }
613620
614621 inline ParticleType Particle::getType () const { return type_; }
622+ inline std::int32_t Particle::getPDGCode () const { return getPDGIDFromParticleType (type_); }
615623 inline float Particle::getKineticEnergy () const { return kineticEnergy_; }
616624 inline float Particle::getX () const { return x_; }
617625 inline float Particle::getY () const { return y_; }
You can’t perform that action at this time.
0 commit comments