45 return std::max(0., theChannelData->
GetXsec(energy));
50 return theIsotopeWiseData[isoNumber].
GetXsec(energy);
55 return theFinalStates[isoNumber]->
GetXsec(energy);
62 Init(anElement, dirName);
68 theElement = anElement;
77 if ( registerCount > 5 )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this material");
78 if ( Z < 1 )
return false;
87 if ( Z <=theElement->
GetZ()-5 )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this material");
90 if(count == 0||registerCount!=0) count +=
93 delete [] theIsotopeWiseData;
98 delete [] theFinalStates;
100 delete theChannelData;
102 for(
G4int i=0; i<niso; i++)
104 theFinalStates[i] = theFS->
New();
110 for (
G4int i1=0; i1<nIsos; i1++)
118 theFinalStates[i1]->
SetA_Z(A, Z, M);
133 theFinalStates[i1]->
SetA_Z(A, Z);
145 theFinalStates[index]->
Init(A, Z, M, theDir, theFSType);
146 if(!theFinalStates[index]->
HasAnyData())
return;
150 if(theFinalStates[index]->HasXsec())
152 theBuffer = theFinalStates[index]->
GetXsec();
153 theBuffer->
Times(abundance/100.);
160 active[index] = theIsotopeWiseData[index].
Init(A, Z, M, abundance, theDir, tString);
161 if(active[index]) theBuffer = theIsotopeWiseData[index].
MakeChannelData();
163 if(theBuffer != 0)
Harmonise(theChannelData, theBuffer);
168 G4int s_tmp = 0, n=0, m_tmp=0;
173 G4int a = s_tmp, p = n, t;
174 while (a<anActive->GetVectorLength()&&p<aPassive->GetVectorLength())
183 if( std::abs(std::abs(xp-xa)/xa)<0.001 )
189 anActive = aPassive; a=p;
214 if ( anIsotope != -1 )
227 for (
G4int i=0; i<niso; i++)
232 theFinalStates[i]->
GetN(),
233 theFinalStates[i]->
GetZ(),
256 for (
G4int ix=0; ix<niso; ix++)
260 if( sum == 0 || random <= running/sum )
270 while(theFinalState==0)
280 return theFinalState;
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
const G4Material * GetMaterial() const
G4double GetTemperature() const
G4bool HasDataInAnyFinalState()
G4bool Register(G4NeutronHPFinalState *theFS)
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack, G4int isoNumber=-1)
void Harmonise(G4NeutronHPVector *&theStore, G4NeutronHPVector *theNew)
G4bool HasAnyData(G4int isoNumber)
G4double GetFSCrossSection(G4double energy, G4int isoNumber)
void UpdateData(G4int A, G4int Z, G4int index, G4double abundance)
G4double GetXsec(G4double energy)
void Init(G4Element *theElement, const G4String dirName)
G4double GetWeightedXsec(G4double energy, G4int isoNumber)
virtual G4double GetXsec(G4double)
virtual G4NeutronHPFinalState * New()=0
void Init(G4double A, G4double Z, G4String &dirName, G4String &aFSType)
void SetA_Z(G4double anA, G4double aZ, G4int aM=0)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &)
G4NeutronHPVector * MakeChannelData()
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
void FillChannelData(G4NeutronHPVector *aBuffer)
G4double GetXsec(G4double energy)
static G4NeutronHPManager * GetInstance()
G4NeutronHPReactionWhiteBoard * GetReactionWhiteBoard()
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
G4int GetVectorLength() const
G4double GetEnergy(G4int i) const
G4double GetXsec(G4int i)
void SetData(G4int i, G4double x, G4double y)
void Times(G4double factor)
G4double GetAbundance(G4int number)
G4int GetFirstIsotope(G4int Z)
G4int GetNumberOfIsotopes(G4int Z)
G4int GetIsotopeNucleonCount(G4int number)