00001 00008 //============================================================== 00009 00010 #ifndef BDSPhotonCounter_h 00011 #define BDSPhotonCounter_h 00012 00013 #include "G4Track.hh" 00014 00015 class BDSPhotonCounter 00016 { 00017 public: 00018 static BDSPhotonCounter* Instance(); 00019 ~BDSPhotonCounter(); 00020 00021 void countPhoton(const G4Track* aTrack); 00022 G4double nPhotons() const; 00023 G4double energy() const; 00024 00025 private: 00026 BDSPhotonCounter(); 00027 G4double _nPhotons; 00028 G4double _energy; 00029 static BDSPhotonCounter* _instance; 00030 00031 }; 00032 00033 inline G4double BDSPhotonCounter::nPhotons() const{ 00034 return _nPhotons; 00035 } 00036 00037 inline G4double BDSPhotonCounter::energy() const{ 00038 return _energy; 00039 } 00040 00041 #endif 00042