| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DecayRates.h

Go to the documentation of this file.
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     // Return a randomly chosen decay from the chain
00050     NucDecay* decay();
00051 
00052     // Return a randomly chosen decay from a particular mother
00053     NucDecay* decay_state(NucState* nuc);
00054 
00055     // Build up map from decay to mean rate
00056     bool visit(NucState* mother, NucState* /*daughter*/, NucDecay* decay);
00057 
00058     // Access the collection of uncorrelated mothers from this chain
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;   // seconds
00073     double m_epsilonTime;        // seconds
00074 
00075     // secular equilibrium rate, take from chain's mother
00076     double m_secEqRate;
00077 
00078     // Cache mean decay rate of each mother
00079     StateValueMap_t m_meanDecayTimes;
00080 
00081     // uncorrelated mothers
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
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 21:01:08 2011 for GenDecay by doxygen 1.4.7