53 return std::max(0., theChannelData->
GetXsec(energy));
58 return theIsotopeWiseData[isoNumber].
GetXsec(energy);
63 return theFinalStates[isoNumber]->
GetXsec(energy);
70 Init(anElement, dirName);
76 theElement = anElement;
85 if ( registerCount > 5 )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this material");
86 if (
Z < 1 )
return false;
98 if(count == 0||registerCount!=0) count +=
101 delete [] theIsotopeWiseData;
104 active =
new G4bool[niso];
106 delete [] theFinalStates;
108 delete theChannelData;
110 for(
G4int i=0; i<niso; ++i)
112 theFinalStates[i] = theFS->
New();
119 for (
G4int i1=0; i1<nIsos; ++i1)
147 if ( result ) theChannelData->
Hash();
155 if(wendtFissionGenerator)
160 theFinalStates[index]->
Init(
A,
Z,
M, theDir, theFSType, projectile);
161 if(!theFinalStates[index]->
HasAnyData())
return;
165 if(theFinalStates[index]->HasXsec())
167 theBuffer = theFinalStates[index]->
GetXsec();
168 theBuffer->
Times(abundance/100.);
175 active[index] = theIsotopeWiseData[index].
Init(
A,
Z,
M, abundance, theDir, tString);
176 if(active[index]) theBuffer = theIsotopeWiseData[index].
MakeChannelData();
178 if(theBuffer != 0)
Harmonise(theChannelData, theBuffer);
183 G4int s_tmp = 0, n=0, m_tmp=0;
188 G4int a = s_tmp, p = n, t;
189 while (a<anActive->GetVectorLength()&&p<aPassive->GetVectorLength())
198 if( std::abs(std::abs(xp-xa)/xa)<0.001 )
204 anActive = aPassive; a=p;
227 if ( anIsotope != -1 && anIsotope != -2 )
240 for (
G4int i=0; i<niso; i++)
245 theFinalStates[i]->
GetN(),
246 theFinalStates[i]->
GetZ(),
269 for (
G4int ix=0; ix<niso; ix++)
273 if( sum == 0 || random <= running/sum )
288 if(wendtFissionGenerator&&anIsotope==-2)
298 G4int icounter_max=1024;
299 while(theFinalState==0)
302 if ( icounter > icounter_max ) {
303 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
318 return theFinalState;
329 for(
int i=0;i<niso;i++){
334 G4cout<<
" Cross Section (total for this channel):"<<
G4endl;
337 for(
int i=0;i<np;i++){
G4GLOB_DLL std::ostream G4cout
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
const G4String & GetName() const
const G4Material * GetMaterial() const
G4double GetTemperature() const
G4bool HasAnyData(G4int isoNumber)
void UpdateData(G4int A, G4int Z, G4int index, G4double abundance, G4ParticleDefinition *projectile)
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack, G4int isoNumber=-1)
void Init(G4Element *theElement, const G4String dirName)
void Harmonise(G4ParticleHPVector *&theStore, G4ParticleHPVector *theNew)
G4bool HasDataInAnyFinalState()
G4double GetWeightedXsec(G4double energy, G4int isoNumber)
G4bool Register(G4ParticleHPFinalState *theFS)
G4double GetXsec(G4double energy)
G4double GetFSCrossSection(G4double energy, G4int isoNumber)
virtual G4double GetXsec(G4double)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &)
void Init(G4double A, G4double Z, G4String &dirName, G4String &aFSType, G4ParticleDefinition *projectile)
void SetA_Z(G4double anA, G4double aZ, G4int aM=0)
virtual G4ParticleHPFinalState * New()=0
void SetProjectile(G4ParticleDefinition *projectile)
G4ParticleHPVector * MakeChannelData()
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
void FillChannelData(G4ParticleHPVector *aBuffer)
G4double GetXsec(G4double energy)
static G4ParticleHPManager * GetInstance()
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
void SetData(G4int i, G4double x, G4double y)
void Times(G4double factor)
G4double GetXsec(G4int i)
G4double GetEnergy(G4int i) const
G4int GetVectorLength() const
G4double GetAbundance(G4int number)
G4int GetFirstIsotope(G4int Z)
G4int GetNumberOfIsotopes(G4int Z)
G4int GetIsotopeNucleonCount(G4int number)
void InitializeANucleus(const G4int A, const G4int Z, const G4int M, const G4String &dataDirectory)
G4HadFinalState * ApplyYourself(const G4HadProjectile &projectile, G4int Z, G4int A)