32 #ifndef G4FermiChannels_h
33 #define G4FermiChannels_h 1
45 : nch(0), excitation(ex), ground_mass(gmass)
46 { fvect.reserve(nmax); cum_prob.reserve(nmax); };
49 inline const std::vector<const G4FermiPair*>&
GetChannels()
const;
69 std::vector<const G4FermiPair*> fvect;
70 std::vector<G4double> cum_prob;
86 return (idx < nch) ? fvect[idx] :
nullptr;
92 for(
size_t i=0; i<nch; ++i) {
93 if(rand <= cum_prob[i]) { ptr = fvect[i];
break; }
100 fvect.push_back(ptr);
101 cum_prob.push_back(1.0);
117 return excitation + ground_mass;
void AddChannel(const G4FermiPair *)
G4double GetExcitation() const
const G4FermiPair * GetPair(size_t idx) const
G4FermiChannels(size_t nmax, G4double ex, G4double gmass)
const std::vector< const G4FermiPair * > & GetChannels() const
const G4FermiPair * SamplePair(G4double rand) const
size_t GetNumberOfChannels() const
std::vector< G4double > & GetProbabilities()