/** University College London Dept of Physics Course in OO 3C59 | all rights reserved 2000 | | Utility: The Photon class | | This is an unbelieveably trival class used to represent a photon in | the Compton experiment monte-carlo programme used as a consolidation | excercise | | It is so trivial I havnt even written a .cpp file and ive also | putmin some of the const qualifiers. | | Author: P.Clarke */ //package uk.ac.ucl.hep.ComptonMC ; import java.lang.Math ; public class Photon { private double m_energy ; // Photon energy private double m_angle ; // Photon angle in degrees // Constructor: takes angle in degrees public Photon( double energy, double angle ) { m_energy = energy; m_angle = angle; } // Default constructor public Photon( ) { m_energy = 0.; m_angle = 0.; } // Query properties public double angle( ) { return m_angle ;} public double angleRadians( ) { return (m_angle * Math.PI / 180.0) ; } public double energy() { return m_energy ;} }