00001
00014 #ifndef DECAYRATES_H
00015 #define DECAYRATES_H
00016
00017 #include "GenDecay/NucVisitor.h"
00018
00019 #include "GaudiKernel/RndmGenerators.h"
00020
00021 #include <more/phys/ens.h>
00022 #include <map>
00023 #include <vector>
00024
00025 class IRndmGenSvc;
00026
00027 namespace GenDecay {
00028
00031 class DecayRates : public GenDecay::NucVisitor
00032 {
00033 public:
00034 typedef std::map<more::phys::nucleus,double> AbundanceMap_t;
00035 typedef std::pair<NucDecay*,double> DecayValuePair_t;
00036 typedef std::vector<DecayValuePair_t> DecayValues_t;
00037 typedef std::map<NucState*,double> StateValueMap_t;
00038
00044 DecayRates(const AbundanceMap_t& abundance,
00045 bool secularEquilibrium, double corrTime, double epsTime,
00046 IRndmGenSvc *rgs);
00047 virtual ~DecayRates();
00048
00049
00050 NucDecay* decay();
00051
00052
00053 NucDecay* decay_state(NucState* nuc);
00054
00055
00056 bool visit(NucState* mother, NucState* , NucDecay* decay);
00057
00058
00059 const std::vector<NucState*>& mothers() const { return m_mothers; }
00060 double totalRate() const { return m_totalDecayRate; }
00061
00063 DecayValues_t decayTimes(NucDecay* decay);
00064
00065 double uni() { return m_uni(); }
00066
00067 private:
00068 void get_decay_times(NucDecay* decay, DecayValues_t& decayTime, double now);
00069
00070 AbundanceMap_t m_abundance;
00071 bool m_secEq;
00072 double m_correlationTime;
00073 double m_epsilonTime;
00074
00075
00076 double m_secEqRate;
00077
00078
00079 StateValueMap_t m_meanDecayTimes;
00080
00081
00082 std::vector<NucState*> m_mothers;
00083 std::vector<double> m_motherBranching;
00084 double m_totalDecayRate;
00085
00086 Rndm::Numbers m_uni;
00087
00088 };
00089
00090 }
00091 #endif // DECAYRATES_H