54 return theIsotopeWiseData[isoNumber].
GetXsec(energy);
59 return theFinalStates[isoNumber]->
GetXsec(energy);
66 Init(anElement, dirName);
72 theElement = anElement;
81 if ( registerCount > 5 )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this material");
82 if ( Z < 1 )
return false;
91 if ( Z <=theElement->
GetZ()-5 )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this material");
94 if(count == 0||registerCount!=0) count +=
97 delete [] theIsotopeWiseData;
100 active =
new G4bool[niso];
102 delete [] theFinalStates;
104 delete theChannelData;
106 for(
G4int i=0; i<niso; i++)
108 theFinalStates[i] = theFS->
New();
115 for (
G4int i1=0; i1<nIsos; i1++)
123 theFinalStates[i1]->
SetA_Z(A, Z, M);
124 UpdateData(A, Z, M, count++, frac, theProjectile);
138 theFinalStates[i1]->
SetA_Z(A, Z);
139 UpdateData(A, Z, count++, frac, theProjectile);
145 if ( result ) theChannelData->
Hash();
154 if(wendtFissionGenerator)
159 theFinalStates[index]->
Init(A, Z, M, theDir, theFSType, projectile);
160 if(!theFinalStates[index]->
HasAnyData())
return;
164 if(theFinalStates[index]->HasXsec())
166 theBuffer = theFinalStates[index]->
GetXsec();
167 theBuffer->
Times(abundance/100.);
174 active[index] = theIsotopeWiseData[index].
Init(A, Z, M, abundance, theDir, tString);
175 if(active[index]) theBuffer = theIsotopeWiseData[index].
MakeChannelData();
177 if(theBuffer != 0)
Harmonise(theChannelData, theBuffer);
182 G4int s_tmp = 0,
n=0, m_tmp=0;
188 while (a<anActive->GetVectorLength()&&
p<aPassive->GetVectorLength())
197 if( std::abs(std::abs(xp-xa)/xa)<0.001 )
203 anActive = aPassive; a=
p;
228 if ( anIsotope != -1 && anIsotope != -2 )
241 for (
G4int i=0; i<niso; i++)
246 theFinalStates[i]->
GetN(),
247 theFinalStates[i]->
GetZ(),
270 for (
G4int ix=0; ix<niso; ix++)
274 if( sum == 0 || random <= running/sum )
289 if(wendtFissionGenerator&&anIsotope==-2)
291 theFinalState = wendtFissionGenerator->
ApplyYourself(theTrack, Z, A);
299 G4int icounter_max=1024;
300 while(theFinalState==0)
303 if ( icounter > icounter_max ) {
304 G4cout <<
"Loop-counter exceeded the threshold value at " << __LINE__ <<
"th line of " << __FILE__ <<
"." <<
G4endl;
319 return theFinalState;
330 for(
int i=0;i<niso;i++){
335 G4cout<<
" Cross Section (total for this channel):"<<
G4endl;
338 for(
int i=0;i<np;i++){
G4double G4ParticleHPJENDLHEData::G4double result
static G4ParticleHPManager * GetInstance()
size_t GetNumberOfIsotopes() const
G4double GetEnergy(G4int i) const
G4HadFinalState * ApplyYourself(const G4HadProjectile &projectile, G4int Z, G4int A)
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &)
G4int GetVectorLength() const
void Init(G4double A, G4double Z, G4String &dirName, G4String &aFSType, G4ParticleDefinition *projectile)
void UpdateData(G4int A, G4int Z, G4int index, G4double abundance, G4ParticleDefinition *projectile)
std::vector< ExP01TrackerHit * > a
G4int GetFirstIsotope(G4int Z)
static constexpr double perCent
void SetData(G4int i, G4double x, G4double y)
G4double GetXsec(G4double energy)
virtual G4ParticleHPFinalState * New()=0
G4double GetXsec(G4int i)
G4bool Register(G4ParticleHPFinalState *theFS)
void Harmonise(G4ParticleHPVector *&theStore, G4ParticleHPVector *theNew)
void InitializeANucleus(const G4int A, const G4int Z, const G4int M, const G4String &dataDirectory)
G4GLOB_DLL std::ostream G4cout
double A(double temperature)
void Times(G4double factor)
G4double * GetRelativeAbundanceVector() const
G4ParticleHPVector * MakeChannelData()
static constexpr double eV
void Init(G4Element *theElement, const G4String dirName)
void SetProjectile(G4ParticleDefinition *projectile)
G4int GetNumberOfIsotopes(G4int Z)
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
G4bool HasAnyData(G4int isoNumber)
G4int GetIsotopeNucleonCount(G4int number)
G4double GetFSCrossSection(G4double energy, G4int isoNumber)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double energy(const ThreeVector &p, const G4double m)
virtual G4double GetXsec(G4double)
const G4Isotope * GetIsotope(G4int iso) const
G4double GetWeightedXsec(G4double energy, G4int isoNumber)
G4double GetTemperature() const
const G4Material * GetMaterial() const
void SetA_Z(G4double anA, G4double aZ, G4int aM=0)
G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType)
G4double GetAbundance(G4int number)
G4bool HasDataInAnyFinalState()
void FillChannelData(G4ParticleHPVector *aBuffer)
const G4String & GetName() const
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
G4double GetXsec(G4double energy)
G4HadFinalState * ApplyYourself(const G4HadProjectile &theTrack, G4int isoNumber=-1)