50 : theA(0), theZ(0), aEff(0.0), zEff(0)
52 pnBlackTrackEnergy = 0.0;
53 dtaBlackTrackEnergy = 0.0;
54 pnBlackTrackEnergyfromAnnihilation = 0.0;
55 dtaBlackTrackEnergyfromAnnihilation = 0.0;
56 excitationEnergy = 0.0;
66 pnBlackTrackEnergy = 0.0;
67 dtaBlackTrackEnergy = 0.0;
68 pnBlackTrackEnergyfromAnnihilation = 0.0;
69 dtaBlackTrackEnergyfromAnnihilation = 0.0;
70 excitationEnergy = 0.0;
80 pnBlackTrackEnergy = 0.0;
81 dtaBlackTrackEnergy = 0.0;
82 pnBlackTrackEnergyfromAnnihilation = 0.0;
83 dtaBlackTrackEnergyfromAnnihilation = 0.0;
84 excitationEnergy = 0.0;
94 pnBlackTrackEnergy = 0.0;
95 dtaBlackTrackEnergy = 0.0;
96 pnBlackTrackEnergyfromAnnihilation = 0.0;
97 dtaBlackTrackEnergyfromAnnihilation = 0.0;
98 excitationEnergy = 0.0;
119 while(value/norm<random)
123 value = (targetVelocity+aVelocity).mag()/velMag;
133 if(currentTemp < 0) currentTemp = theTemp;
141 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
145 if(1-tEtot/theTarget.
GetMass()>0.001)
169 if (running > random*sum) {
170 element = (*theElementVector)[i];
179 while (iso < element->GetNumberOfIsotopes() &&
180 sumAbundance < randomAbundance) {
189 aEff = element->
GetN();
190 zEff = element->
GetZ();
191 theZ =
G4int(zEff + 0.5);
192 theA =
G4int(aEff + 0.5);
202 if (theA<1 || theZ<0 || theZ>theA) {
204 "G4Nucleus::SetParameters called with non-physical parameters");
216 if( theA<1 || theZ<0 || theZ>theA )
219 "G4Nucleus::SetParameters called with non-physical parameters");
236 return targetParticle;
275 pnBlackTrackEnergy = dtaBlackTrackEnergy = 0.0;
281 const G4float gfa = 2.0*((aEff-1.0)/70.)*std::exp(-(aEff-1.0)/70.);
286 G4float cfa =
std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*std::log(ekin) );
287 G4float exnu = 7.716 * cfa * std::exp(-cfa)
288 * ((atno-1.0)/120.)*std::exp(-(atno-1.0)/120.);
296 pnBlackTrackEnergy = exnu*fpdiv;
297 dtaBlackTrackEnergy = exnu*(1.0-fpdiv);
299 if(
G4int(zEff+0.1) != 82 )
303 for(
G4int i=0; i<12; ++i )
308 pnBlackTrackEnergy *= 1.0 + ran1*gfa;
309 dtaBlackTrackEnergy *= 1.0 + ran2*gfa;
311 pnBlackTrackEnergy =
std::max( 0.0, pnBlackTrackEnergy );
312 dtaBlackTrackEnergy =
std::max( 0.0, dtaBlackTrackEnergy );
313 while( pnBlackTrackEnergy+dtaBlackTrackEnergy >= ek )
320 return (pnBlackTrackEnergy+dtaBlackTrackEnergy)*
GeV;
328 if( aEff < 1.5 || ekOrg < 0.)
330 pnBlackTrackEnergyfromAnnihilation = 0.0;
331 dtaBlackTrackEnergyfromAnnihilation = 0.0;
337 const G4float gfa = 2.0*((aEff-1.0)/70.)*std::exp(-(aEff-1.0)/70.);
339 G4float cfa =
std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*std::log(ekin) );
340 G4float exnu = 7.716 * cfa * std::exp(-cfa)
341 * ((atno-1.0)/120.)*std::exp(-(atno-1.0)/120.);
344 pnBlackTrackEnergyfromAnnihilation = exnu*fpdiv;
345 dtaBlackTrackEnergyfromAnnihilation = exnu*(1.0-fpdiv);
349 for(
G4int i=0; i<12; ++i ) {
353 pnBlackTrackEnergyfromAnnihilation *= 1.0 + ran1*gfa;
354 dtaBlackTrackEnergyfromAnnihilation *= 1.0 + ran2*gfa;
356 pnBlackTrackEnergyfromAnnihilation =
std::max( 0.0, pnBlackTrackEnergyfromAnnihilation);
357 dtaBlackTrackEnergyfromAnnihilation =
std::max( 0.0, dtaBlackTrackEnergyfromAnnihilation);
358 G4double blackSum = pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation;
359 if (blackSum >= ekOrg/
GeV) {
360 pnBlackTrackEnergyfromAnnihilation *= ekOrg/
GeV/blackSum;
361 dtaBlackTrackEnergyfromAnnihilation *= ekOrg/
GeV/blackSum;
364 return (pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation)*
GeV;
376 static const G4double expxl = -expxu;
383 G4double temp2 = std::exp(
std::max( expxl, std::min( expxu, -(ekLog-em)*(ekLog-em)*2.0 ) ) );
385 if( std::abs( temp1 ) < 1.0 )
387 if( temp2 > 1.0e-10 )result = temp1*temp2;
389 else result = temp1*temp2;
390 if( result < -ek )result = -
ek;
409 G4double ranmax = (ranflat1>ranflat2? ranflat1: ranflat2);
410 ranmax = (ranmax>ranflat3? ranmax : ranflat3);
414 G4double sintheta = std::sqrt(1.0 - costheta*costheta);
418 G4double px=sintheta*std::cos(phi)*ranmax;
419 G4double py=sintheta*std::sin(phi)*ranmax;
432 momentum+=(aMomentum);
437 excitationEnergy+=anEnergy;
size_t GetNumberOfIsotopes() const
ThreeVector shoot(const G4int Ap, const G4int Af)
G4double AtomicMass(const G4double A, const G4double Z) const
G4double EvaporationEffects(G4double kineticEnergy)
static G4double GetNuclearMass(const G4double A, const G4double Z)
G4double GetThermalPz(const G4double mass, const G4double temp) const
std::vector< G4Element * > G4ElementVector
CLHEP::Hep3Vector G4ThreeVector
void SetKineticEnergy(const G4double en)
void SetMomentum(const G4double x, const G4double y, const G4double z)
G4double G4NeutronHPJENDLHEData::G4double result
void ChooseParameters(const G4Material *aMaterial)
G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const
const G4ElementVector * GetElementVector() const
G4DynamicParticle * ReturnTargetParticle() const
G4ReactionProductVector * Fragmentate()
std::vector< G4ReactionProduct * > G4ReactionProductVector
const G4double * GetVecNbOfAtomsPerVolume() const
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
void SetMass(const G4double mas)
void SetTotalEnergy(const G4double en)
G4ErrorTarget * theTarget
void AddMomentum(const G4ThreeVector aMomentum)
G4double * GetRelativeAbundanceVector() const
static G4Proton * Proton()
static G4Neutron * Neutron()
G4double GetTotNbOfAtomsPerVolume() const
G4ThreeVector GetFermiMomentum()
G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg)
G4double GetPDGMass() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
G4double Cinema(G4double kineticEnergy)
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
G4ThreeVector GetMomentum() const
const G4Isotope * GetIsotope(G4int iso) const
G4double GetTemperature() const
const XML_Char int const XML_Char * value
void AddExcitationEnergy(G4double anEnergy)
size_t GetNumberOfElements() const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetParameters(const G4double A, const G4double Z)