/* University College London Dept of Physics Course in C++ 3C59 | all rights reserved 2000 | | Utility: The Rod class | | This class simulates the combination of the radioactive sourse and the | scattering rod. | | Its main function is to provide Photons on demand with an angular | distribution corresponding to that of the real scattered photons | in the experiment | | Author: P.Clarke */ #ifndef __rod_h__ #define __rod_h__ 1 // Random angle generator class sold by Petes Enterprises inc. #include "RanCom.h" #include "Photon.h" class Rod { private: float m_sourceEnergy ; // energy of photons from the radioactive source float m_electronMass ; // Electron mass in kev RanCom angleGenerator; // Object which gives a random angle with correct distribution // Private methods to help out // This one calculates the energy corresponding to the scattering angle float calculateEnergy( float angle ) ; public: // Constructor. Rod( float sourceEnergy, float electronMass ) ; // Main method to return a new photon to the client with an angle and energy // corresponding to the true compton scattering distribution Photon generatePhoton() ; }; #endif