57 : theA(0), theZ(0), theL(0), aEff(0.0), zEff(0)
59 pnBlackTrackEnergy = 0.0;
60 dtaBlackTrackEnergy = 0.0;
61 pnBlackTrackEnergyfromAnnihilation = 0.0;
62 dtaBlackTrackEnergyfromAnnihilation = 0.0;
63 excitationEnergy = 0.0;
65 fermiMomentum = 1.52*hbarc/fermi;
66 theTemp = 293.16*kelvin;
73 pnBlackTrackEnergy = 0.0;
74 dtaBlackTrackEnergy = 0.0;
75 pnBlackTrackEnergyfromAnnihilation = 0.0;
76 dtaBlackTrackEnergyfromAnnihilation = 0.0;
77 excitationEnergy = 0.0;
79 fermiMomentum = 1.52*hbarc/fermi;
80 theTemp = 293.16*kelvin;
87 pnBlackTrackEnergy = 0.0;
88 dtaBlackTrackEnergy = 0.0;
89 pnBlackTrackEnergyfromAnnihilation = 0.0;
90 dtaBlackTrackEnergyfromAnnihilation = 0.0;
91 excitationEnergy = 0.0;
93 fermiMomentum = 1.52*hbarc/fermi;
94 theTemp = 293.16*kelvin;
101 pnBlackTrackEnergy = 0.0;
102 dtaBlackTrackEnergy = 0.0;
103 pnBlackTrackEnergyfromAnnihilation = 0.0;
104 dtaBlackTrackEnergyfromAnnihilation = 0.0;
105 excitationEnergy = 0.0;
107 fermiMomentum = 1.52*hbarc/fermi;
124 if ( E_threshold == -1. ) {
125 E_threshold = 400.0*8.617333262E-11*temp;
132 if ( E_neutron <= E_threshold ) {
139 G4double vN_norm2 = vN_norm*vN_norm;
143 aVelocity = (1./vN_norm)*aVelocity;
151 G4double cdf0 = 2./(2.+std::sqrt(CLHEP::pi)*y);
164 vT_norm = std::sqrt(x2)/beta;
165 vT_norm2 = vT_norm*vT_norm;
171 vRelativeSpeed = std::sqrt(vN_norm2 + vT_norm2 - 2*vN_norm*vT_norm*mu);
172 acceptThreshold = vRelativeSpeed/(vN_norm + vT_norm);
174 }
while ( randThreshold >= acceptThreshold );
197 G4double sinTh = std::sqrt(1. - cosTh*cosTh);
206 if ( uNorm[0] ) ortho[0] = -(uNorm[1]+uNorm[2])/uNorm[0];
207 else if ( uNorm[1] ) ortho[1] = -(uNorm[0]+uNorm[2])/uNorm[1];
208 else if ( uNorm[2] ) ortho[2] = -(uNorm[0]+uNorm[1])/uNorm[2];
211 ortho = (1/ortho.
mag())*ortho;
214 G4ThreeVector orthoComp( uNorm[1]*ortho[2] - ortho[1]*uNorm[2],
215 uNorm[2]*ortho[0] - ortho[2]*uNorm[0],
216 uNorm[0]*ortho[1] - ortho[0]*uNorm[1] );
219 G4ThreeVector directionTarget( cosTh*uNorm[0] + sinTh*(cosPhi*orthoComp[0] + sinPhi*ortho[0]),
220 cosTh*uNorm[1] + sinTh*(cosPhi*orthoComp[1] + sinPhi*ortho[1]),
221 cosTh*uNorm[2] + sinTh*(cosPhi*orthoComp[2] + sinPhi*ortho[2]) );
224 directionTarget = ( 1./directionTarget.
mag() )*directionTarget;
232 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
236 if ( tEtot/result.
GetMass() - 1. > 0.001 ) {
251 if (currentTemp < 0) currentTemp = theTemp;
259 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
264 if (tEtot/theTarget.
GetMass() - 1. > 0.001) {
288 if (running > random*sum) {
289 element = (*theElementVector)[i];
298 while (iso < element->GetNumberOfIsotopes() &&
299 sumAbundance < randomAbundance) {
309 aEff = element->
GetN();
310 zEff = element->
GetZ();
311 theZ =
G4int(zEff + 0.5);
312 theA =
G4int(aEff + 0.5);
323 theL = std::max(numberOfLambdas, 0);
324 if (theA<1 || theZ<0 || theZ>theA) {
326 "G4Nucleus::SetParameters called with non-physical parameters");
339 theL = std::max(numberOfLambdas, 0);
340 if( theA<1 || theZ<0 || theZ>theA )
343 "G4Nucleus::SetParameters called with non-physical parameters");
357 if ( rnd < zEff/aEff ) {
359 }
else if ( rnd < (zEff + theL*1.0)/aEff ) {
364 return targetParticle;
372 if ( numberOfLambdas > 0 ) {
384 if ( numberOfLambdas > 0 ) {
395 G4double result = G4RandGauss::shoot();
396 result *= std::sqrt(k_Boltzmann*temp*mass);
415 pnBlackTrackEnergy = dtaBlackTrackEnergy = 0.0;
419 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
420 const G4float atno = std::min( 120., aEff );
421 const G4float gfa = 2.0*((aEff-1.0)/70.)*
G4Exp(-(aEff-1.0)/70.);
426 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*
G4Log(ekin) );
428 * ((atno-1.0)/120.)*
G4Exp(-(atno-1.0)/120.);
429 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
436 pnBlackTrackEnergy = exnu*fpdiv;
437 dtaBlackTrackEnergy = exnu*(1.0-fpdiv);
439 if(
G4int(zEff+0.1) != 82 )
443 for(
G4int i=0; i<12; ++i )
448 pnBlackTrackEnergy *= 1.0 + ran1*gfa;
449 dtaBlackTrackEnergy *= 1.0 + ran2*gfa;
451 pnBlackTrackEnergy = std::max( 0.0, pnBlackTrackEnergy );
452 dtaBlackTrackEnergy = std::max( 0.0, dtaBlackTrackEnergy );
453 while( pnBlackTrackEnergy+dtaBlackTrackEnergy >= ek )
460 return (pnBlackTrackEnergy+dtaBlackTrackEnergy)*GeV;
470 if( aEff < 1.5 || ekOrg < 0.)
472 pnBlackTrackEnergyfromAnnihilation = 0.0;
473 dtaBlackTrackEnergyfromAnnihilation = 0.0;
477 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
478 const G4float atno = std::min( 120., aEff );
479 const G4float gfa = 2.0*((aEff-1.0)/70.)*
G4Exp(-(aEff-1.0)/70.);
481 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*
G4Log(ekin) );
483 * ((atno-1.0)/120.)*
G4Exp(-(atno-1.0)/120.);
484 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
486 pnBlackTrackEnergyfromAnnihilation = exnu*fpdiv;
487 dtaBlackTrackEnergyfromAnnihilation = exnu*(1.0-fpdiv);
491 for(
G4int i=0; i<12; ++i ) {
495 pnBlackTrackEnergyfromAnnihilation *= 1.0 + ran1*gfa;
496 dtaBlackTrackEnergyfromAnnihilation *= 1.0 + ran2*gfa;
498 pnBlackTrackEnergyfromAnnihilation = std::max( 0.0, pnBlackTrackEnergyfromAnnihilation);
499 dtaBlackTrackEnergyfromAnnihilation = std::max( 0.0, dtaBlackTrackEnergyfromAnnihilation);
500 G4double blackSum = pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation;
501 if (blackSum >= ekOrg/GeV) {
502 pnBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
503 dtaBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
506 return (pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation)*GeV;
519 static const G4double expxl = -expxu;
524 G4double em = std::min( 1.0, 0.2390 + 0.0408*aLog*aLog );
525 G4double temp1 = -ek * std::min( 0.15, 0.0019*aLog*aLog*aLog );
526 G4double temp2 =
G4Exp( std::max( expxl, std::min( expxu, -(ekLog-em)*(ekLog-em)*2.0 ) ) );
528 if( std::abs( temp1 ) < 1.0 )
530 if( temp2 > 1.0e-10 )result = temp1*temp2;
532 else result = temp1*temp2;
533 if( result < -ek )result = -ek;
549 G4double ranmax = (ranflat1>ranflat2? ranflat1: ranflat2);
550 ranmax = (ranmax>ranflat3? ranmax : ranflat3);
554 G4double sintheta = std::sqrt(1.0 - costheta*costheta);
558 G4double px=sintheta*std::cos(phi)*ranmax;
559 G4double py=sintheta*std::sin(phi)*ranmax;
574 momentum+=(aMomentum);
580 excitationEnergy+=anEnergy;
std::vector< const G4Element * > G4ElementVector
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
G4double G4Log(G4double x)
std::vector< G4ReactionProduct * > G4ReactionProductVector
CLHEP::Hep3Vector G4ThreeVector
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
G4double * GetRelativeAbundanceVector() const
const G4Isotope * GetIsotope(G4int iso) const
size_t GetNumberOfIsotopes() const
static G4HadronicParameters * Instance()
G4double GetNeutronKineticEnergyThresholdForSVT() const
static G4double GetNuclearMass(G4int A, G4int Z, G4int L)
static G4Lambda * Lambda()
const G4ElementVector * GetElementVector() const
G4double GetTotNbOfAtomsPerVolume() const
G4double GetTemperature() const
const G4double * GetVecNbOfAtomsPerVolume() const
std::size_t GetNumberOfElements() const
static G4Neutron * Neutron()
static G4double GetNuclearMass(const G4double A, const G4double Z)
void AddExcitationEnergy(G4double anEnergy)
G4double GetThermalPz(const G4double mass, const G4double temp) const
G4double EvaporationEffects(G4double kineticEnergy)
void ChooseParameters(const G4Material *aMaterial)
G4double AtomicMass(const G4double A, const G4double Z, const G4int numberOfLambdas=0) const
G4double AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg)
void SetParameters(const G4double A, const G4double Z, const G4int numberOfLambdas=0)
G4double Cinema(G4double kineticEnergy)
G4DynamicParticle * ReturnTargetParticle() const
G4ReactionProductVector * Fragmentate()
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
void AddMomentum(const G4ThreeVector aMomentum)
void DoKinematicsOfThermalNucleus(const G4double mu, const G4double vT_norm, const G4ThreeVector &aVelocity, G4ReactionProduct &result) const
G4ReactionProduct GetThermalNucleus(G4double aMass, G4double temp=-1) const
G4ThreeVector GetFermiMomentum()
G4double GetPDGMass() const
static G4Proton * Proton()
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetKineticEnergy(const G4double en)
void SetMass(const G4double mas)