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