Geant4 Cross Reference |
1 // Copyright (C) 2010, Guy Barrand. All rights 1 // Copyright (C) 2010, Guy Barrand. All rights reserved. 2 // See the file tools.license for terms. 2 // See the file tools.license for terms. 3 3 4 #ifndef tools_rtausmef 4 #ifndef tools_rtausmef 5 #define tools_rtausmef 5 #define tools_rtausmef 6 6 7 #include "rtausmeui" 7 #include "rtausmeui" 8 #include "S_STRING" 8 #include "S_STRING" 9 9 10 #include <cmath> 10 #include <cmath> 11 11 12 namespace tools { 12 namespace tools { 13 13 14 class rtausmef : public rtausmeui { 14 class rtausmef : public rtausmeui { 15 typedef rtausmeui parent; 15 typedef rtausmeui parent; 16 public: 16 public: 17 TOOLS_SCLASS(tools::rtausmef) 17 TOOLS_SCLASS(tools::rtausmef) 18 public: 18 public: 19 rtausmef(unsigned int a_seed = 4357):parent( 19 rtausmef(unsigned int a_seed = 4357):parent(a_seed){} 20 virtual ~rtausmef(){} 20 virtual ~rtausmef(){} 21 public: 21 public: 22 rtausmef(const rtausmef& a_from):parent(a_fr 22 rtausmef(const rtausmef& a_from):parent(a_from){} 23 rtausmef& operator=(const rtausmef& a_from) 23 rtausmef& operator=(const rtausmef& a_from) {parent::operator=(a_from);return *this;} 24 protected: 24 protected: 25 static float two_to_minus_32() { 25 static float two_to_minus_32() { 26 static const float s_v = ::ldexpf(1,-32); 26 static const float s_v = ::ldexpf(1,-32); 27 return s_v; 27 return s_v; 28 } 28 } 29 public: 29 public: 30 float shoot() {return float(parent::shoot()) 30 float shoot() {return float(parent::shoot()) * two_to_minus_32();} 31 }; 31 }; 32 32 33 } 33 } 34 34 35 #endif 35 #endif