/* University College London Dept of Physics Course in C++ 3C59 | all rights reserved 2000 | | Utility: The Photomultiplier class | | This class represents a photomultiplier used in the compton scattering | experiment. | It contains the concept of a finite front window and detectes | whether Particles thrown at it would enter and be detected. | | For such detected particles it simulates the PMT energy resolution of | 80 kev and adds the detected energy to a running average fo all particles which | have entered it so far. | | Author: P.Clarke */ #ifndef _photomultiplier_h #define _photomultiplier_h 1 #include "Photon.h" #include "../util/RanGen.h" // Define the class class PhotoMultiplier { private: // Attributes fo detector float m_centralAngle ; // Position of centre in degrees float m_lolim ; // lower angular acceptance float m_hilim ; // higher angular acceptance float m_resolution ; // Energy resolution of this detector in keV // Needed to accumulate average energy. int m_numberDetectedParticles ; float m_totalEnergy ; // Needed to generate gaussian random numbers RanGen m_generator ; //To assimilate Photon attributes in the case of a detected particle void assimilate( Photon& ); public: //Constructor taking: // center = angle setting of centre of detector // dist = distance of entrance window of PMT from centre of experiment // window = widthe of entrance window // res = energy resolution of detector PhotoMultiplier( float center, float dist, float window, float res ) ; // Method to fire a Photon into the detector void tryit( Photon& ) ; // Method to return number of particles detected so far int numberAccepted( ) ; // Method to return average energy of detected particles float averageEnergy( ) ; // Method to return central angle float angle( ) ; }; #endif