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++)
127 theFinalStates[i1]->
SetA_Z(
A, Z, M);
142 theFinalStates[i1]->
SetA_Z(
A, Z);
149 if ( result ) theChannelData->
Hash();
158 if(wendtFissionGenerator)
163 theFinalStates[index]->
Init(
A, Z, M, theDir, theFSType, projectile);
164 if(!theFinalStates[index]->
HasAnyData())
return;
168 if(theFinalStates[index]->HasXsec())
170 theBuffer = theFinalStates[index]->
GetXsec();
171 theBuffer->
Times(abundance/100.);
178 active[index] = theIsotopeWiseData[index].
Init(
A, Z, M, abundance, theDir, tString);
179 if(active[index]) theBuffer = theIsotopeWiseData[index].
MakeChannelData();
181 if(theBuffer != 0)
Harmonise(theChannelData, theBuffer);
186 G4int s_tmp = 0, n=0, m_tmp=0;
191 G4int a = s_tmp, p = n, t;
192 while (a<anActive->GetVectorLength()&&p<aPassive->GetVectorLength())
201 if( std::abs(std::abs(xp-xa)/xa)<0.001 )
207 anActive = aPassive; a=p;
232 if ( anIsotope != -1 && anIsotope != -2 )
245 for (
G4int i=0; i<niso; i++)
250 theFinalStates[i]->
GetN(),
251 theFinalStates[i]->
GetZ(),
274 for (
G4int ix=0; ix<niso; ix++)
278 if( sum == 0 || random <= running/sum )
293 if(wendtFissionGenerator&&anIsotope==-2)
295 theFinalState = wendtFissionGenerator->
ApplyYourself(theTrack, Z,
A);
303 G4int icounter_max=1024;
304 while(theFinalState==0)
307 if ( icounter > icounter_max ) {
308 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
323 return theFinalState;
334 for(
int i=0;i<niso;i++){
339 G4cout<<
" Cross Section (total for this channel):"<<
G4endl;
342 for(
int i=0;i<np;i++){
double A(double temperature)
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)