56 : theA(0), theZ(0), theL(0), aEff(0.0), zEff(0)
58 pnBlackTrackEnergy = 0.0;
59 dtaBlackTrackEnergy = 0.0;
60 pnBlackTrackEnergyfromAnnihilation = 0.0;
61 dtaBlackTrackEnergyfromAnnihilation = 0.0;
62 excitationEnergy = 0.0;
64 fermiMomentum = 1.52*hbarc/fermi;
65 theTemp = 293.16*kelvin;
72 pnBlackTrackEnergy = 0.0;
73 dtaBlackTrackEnergy = 0.0;
74 pnBlackTrackEnergyfromAnnihilation = 0.0;
75 dtaBlackTrackEnergyfromAnnihilation = 0.0;
76 excitationEnergy = 0.0;
78 fermiMomentum = 1.52*hbarc/fermi;
79 theTemp = 293.16*kelvin;
86 pnBlackTrackEnergy = 0.0;
87 dtaBlackTrackEnergy = 0.0;
88 pnBlackTrackEnergyfromAnnihilation = 0.0;
89 dtaBlackTrackEnergyfromAnnihilation = 0.0;
90 excitationEnergy = 0.0;
92 fermiMomentum = 1.52*hbarc/fermi;
93 theTemp = 293.16*kelvin;
100 pnBlackTrackEnergy = 0.0;
101 dtaBlackTrackEnergy = 0.0;
102 pnBlackTrackEnergyfromAnnihilation = 0.0;
103 dtaBlackTrackEnergyfromAnnihilation = 0.0;
104 excitationEnergy = 0.0;
106 fermiMomentum = 1.52*hbarc/fermi;
123 G4double E_threshold = 400.0*8.617333262E-11*temp;
129 if ( E_neutron <= E_threshold ) {
136 G4double vN_norm2 = vN_norm*vN_norm;
140 aVelocity = (1./vN_norm)*aVelocity;
148 G4double cdf0 = 2./(2.+std::sqrt(CLHEP::pi)*y);
161 vT_norm = std::sqrt(x2)/beta;
162 vT_norm2 = vT_norm*vT_norm;
168 vRelativeSpeed = std::sqrt(vN_norm2 + vT_norm2 - 2*vN_norm*vT_norm*mu);
169 acceptThreshold = vRelativeSpeed/(vN_norm + vT_norm);
171 }
while ( randThreshold >= acceptThreshold );
177 G4double sinTh = std::sqrt(1. - cosTh*cosTh);
186 if ( uNorm[0] ) ortho[0] = -(uNorm[1]+uNorm[2])/uNorm[0];
187 else if ( uNorm[1] ) ortho[1] = -(uNorm[0]+uNorm[2])/uNorm[1];
188 else if ( uNorm[2] ) ortho[2] = -(uNorm[0]+uNorm[1])/uNorm[2];
191 ortho = (1/ortho.
mag())*ortho;
194 G4ThreeVector orthoComp( uNorm[1]*ortho[2] - ortho[1]*uNorm[2],
195 uNorm[2]*ortho[0] - ortho[2]*uNorm[0],
196 uNorm[0]*ortho[1] - ortho[0]*uNorm[1] );
199 G4ThreeVector directionTarget( cosTh*uNorm[0] + sinTh*(cosPhi*orthoComp[0] + sinPhi*ortho[0]),
200 cosTh*uNorm[1] + sinTh*(cosPhi*orthoComp[1] + sinPhi*ortho[1]),
201 cosTh*uNorm[2] + sinTh*(cosPhi*orthoComp[2] + sinPhi*ortho[2]) );
204 directionTarget = (1/directionTarget.
mag())*directionTarget;
212 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
216 if ( tEtot/result.
GetMass() - 1. > 0.001 ) {
239 if (currentTemp < 0) currentTemp = theTemp;
247 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
252 if (tEtot/theTarget.
GetMass() - 1. > 0.001) {
276 if (running > random*sum) {
277 element = (*theElementVector)[i];
286 while (iso < element->GetNumberOfIsotopes() &&
287 sumAbundance < randomAbundance) {
297 aEff = element->
GetN();
298 zEff = element->
GetZ();
299 theZ =
G4int(zEff + 0.5);
300 theA =
G4int(aEff + 0.5);
311 theL = std::max(numberOfLambdas, 0);
312 if (theA<1 || theZ<0 || theZ>theA) {
314 "G4Nucleus::SetParameters called with non-physical parameters");
327 theL = std::max(numberOfLambdas, 0);
328 if( theA<1 || theZ<0 || theZ>theA )
331 "G4Nucleus::SetParameters called with non-physical parameters");
345 if ( rnd < zEff/aEff ) {
347 }
else if ( rnd < (zEff + theL*1.0)/aEff ) {
352 return targetParticle;
360 if ( numberOfLambdas > 0 ) {
372 if ( numberOfLambdas > 0 ) {
383 G4double result = G4RandGauss::shoot();
384 result *= std::sqrt(k_Boltzmann*temp*mass);
403 pnBlackTrackEnergy = dtaBlackTrackEnergy = 0.0;
407 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
408 const G4float atno = std::min( 120., aEff );
409 const G4float gfa = 2.0*((aEff-1.0)/70.)*
G4Exp(-(aEff-1.0)/70.);
414 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*
G4Log(ekin) );
416 * ((atno-1.0)/120.)*
G4Exp(-(atno-1.0)/120.);
417 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
424 pnBlackTrackEnergy = exnu*fpdiv;
425 dtaBlackTrackEnergy = exnu*(1.0-fpdiv);
427 if(
G4int(zEff+0.1) != 82 )
431 for(
G4int i=0; i<12; ++i )
436 pnBlackTrackEnergy *= 1.0 + ran1*gfa;
437 dtaBlackTrackEnergy *= 1.0 + ran2*gfa;
439 pnBlackTrackEnergy = std::max( 0.0, pnBlackTrackEnergy );
440 dtaBlackTrackEnergy = std::max( 0.0, dtaBlackTrackEnergy );
441 while( pnBlackTrackEnergy+dtaBlackTrackEnergy >= ek )
448 return (pnBlackTrackEnergy+dtaBlackTrackEnergy)*GeV;
458 if( aEff < 1.5 || ekOrg < 0.)
460 pnBlackTrackEnergyfromAnnihilation = 0.0;
461 dtaBlackTrackEnergyfromAnnihilation = 0.0;
465 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
466 const G4float atno = std::min( 120., aEff );
467 const G4float gfa = 2.0*((aEff-1.0)/70.)*
G4Exp(-(aEff-1.0)/70.);
469 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*
G4Log(ekin) );
471 * ((atno-1.0)/120.)*
G4Exp(-(atno-1.0)/120.);
472 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
474 pnBlackTrackEnergyfromAnnihilation = exnu*fpdiv;
475 dtaBlackTrackEnergyfromAnnihilation = exnu*(1.0-fpdiv);
479 for(
G4int i=0; i<12; ++i ) {
483 pnBlackTrackEnergyfromAnnihilation *= 1.0 + ran1*gfa;
484 dtaBlackTrackEnergyfromAnnihilation *= 1.0 + ran2*gfa;
486 pnBlackTrackEnergyfromAnnihilation = std::max( 0.0, pnBlackTrackEnergyfromAnnihilation);
487 dtaBlackTrackEnergyfromAnnihilation = std::max( 0.0, dtaBlackTrackEnergyfromAnnihilation);
488 G4double blackSum = pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation;
489 if (blackSum >= ekOrg/GeV) {
490 pnBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
491 dtaBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
494 return (pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation)*GeV;
507 static const G4double expxl = -expxu;
512 G4double em = std::min( 1.0, 0.2390 + 0.0408*aLog*aLog );
513 G4double temp1 = -ek * std::min( 0.15, 0.0019*aLog*aLog*aLog );
514 G4double temp2 =
G4Exp( std::max( expxl, std::min( expxu, -(ekLog-em)*(ekLog-em)*2.0 ) ) );
516 if( std::abs( temp1 ) < 1.0 )
518 if( temp2 > 1.0e-10 )result = temp1*temp2;
520 else result = temp1*temp2;
521 if( result < -ek )result = -ek;
537 G4double ranmax = (ranflat1>ranflat2? ranflat1: ranflat2);
538 ranmax = (ranmax>ranflat3? ranmax : ranflat3);
542 G4double sintheta = std::sqrt(1.0 - costheta*costheta);
546 G4double px=sintheta*std::cos(phi)*ranmax;
547 G4double py=sintheta*std::sin(phi)*ranmax;
562 momentum+=(aMomentum);
568 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 G4double GetNuclearMass(G4int A, G4int Z, G4int L)
static G4Lambda * Lambda()
const G4ElementVector * GetElementVector() const
G4double GetTotNbOfAtomsPerVolume() const
G4double GetTemperature() const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() 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)
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)