55 : theA(0), theZ(0), aEff(0.0), zEff(0)
57 pnBlackTrackEnergy = 0.0;
58 dtaBlackTrackEnergy = 0.0;
59 pnBlackTrackEnergyfromAnnihilation = 0.0;
60 dtaBlackTrackEnergyfromAnnihilation = 0.0;
61 excitationEnergy = 0.0;
63 fermiMomentum = 1.52*hbarc/fermi;
64 theTemp = 293.16*kelvin;
71 pnBlackTrackEnergy = 0.0;
72 dtaBlackTrackEnergy = 0.0;
73 pnBlackTrackEnergyfromAnnihilation = 0.0;
74 dtaBlackTrackEnergyfromAnnihilation = 0.0;
75 excitationEnergy = 0.0;
77 fermiMomentum = 1.52*hbarc/fermi;
78 theTemp = 293.16*kelvin;
85 pnBlackTrackEnergy = 0.0;
86 dtaBlackTrackEnergy = 0.0;
87 pnBlackTrackEnergyfromAnnihilation = 0.0;
88 dtaBlackTrackEnergyfromAnnihilation = 0.0;
89 excitationEnergy = 0.0;
91 fermiMomentum = 1.52*hbarc/fermi;
92 theTemp = 293.16*kelvin;
99 pnBlackTrackEnergy = 0.0;
100 dtaBlackTrackEnergy = 0.0;
101 pnBlackTrackEnergyfromAnnihilation = 0.0;
102 dtaBlackTrackEnergyfromAnnihilation = 0.0;
103 excitationEnergy = 0.0;
105 fermiMomentum = 1.52*hbarc/fermi;
124 const G4int maxNumberOfLoops = 1000000;
125 G4int loopCounter = -1;
126 while ( (value/norm<random) && ++loopCounter < maxNumberOfLoops )
130 value = (targetVelocity+aVelocity).mag()/velMag;
133 if ( loopCounter >= maxNumberOfLoops ) {
135 ed <<
" Failed sampling after maxNumberOfLoops attempts : forced exit! " <<
G4endl;
146 if (currentTemp < 0) currentTemp = theTemp;
154 G4double tMom = std::sqrt(px*px+py*py+pz*pz);
159 if (tEtot/theTarget.
GetMass() - 1. > 0.001) {
183 if (running > random*sum) {
184 element = (*theElementVector)[i];
193 while (iso < element->GetNumberOfIsotopes() &&
194 sumAbundance < randomAbundance) {
203 aEff = element->
GetN();
204 zEff = element->
GetZ();
205 theZ =
G4int(zEff + 0.5);
206 theA =
G4int(aEff + 0.5);
216 if (theA<1 || theZ<0 || theZ>theA) {
218 "G4Nucleus::SetParameters called with non-physical parameters");
230 if( theA<1 || theZ<0 || theZ>theA )
233 "G4Nucleus::SetParameters called with non-physical parameters");
250 return targetParticle;
270 G4double result = G4RandGauss::shoot();
271 result *= std::sqrt(k_Boltzmann*temp*mass);
289 pnBlackTrackEnergy = dtaBlackTrackEnergy = 0.0;
293 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
294 const G4float atno = std::min( 120., aEff );
295 const G4float gfa = 2.0*((aEff-1.0)/70.)*
G4Exp(-(aEff-1.0)/70.);
300 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*
G4Log(ekin) );
302 * ((atno-1.0)/120.)*
G4Exp(-(atno-1.0)/120.);
303 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
310 pnBlackTrackEnergy = exnu*fpdiv;
311 dtaBlackTrackEnergy = exnu*(1.0-fpdiv);
313 if(
G4int(zEff+0.1) != 82 )
317 for(
G4int i=0; i<12; ++i )
322 pnBlackTrackEnergy *= 1.0 + ran1*gfa;
323 dtaBlackTrackEnergy *= 1.0 + ran2*gfa;
325 pnBlackTrackEnergy = std::max( 0.0, pnBlackTrackEnergy );
326 dtaBlackTrackEnergy = std::max( 0.0, dtaBlackTrackEnergy );
327 while( pnBlackTrackEnergy+dtaBlackTrackEnergy >= ek )
334 return (pnBlackTrackEnergy+dtaBlackTrackEnergy)*GeV;
342 if( aEff < 1.5 || ekOrg < 0.)
344 pnBlackTrackEnergyfromAnnihilation = 0.0;
345 dtaBlackTrackEnergyfromAnnihilation = 0.0;
349 G4float ekin = std::min( 4.0, std::max( 0.1, ek ) );
350 const G4float atno = std::min( 120., aEff );
351 const G4float gfa = 2.0*((aEff-1.0)/70.)*
G4Exp(-(aEff-1.0)/70.);
353 G4float cfa = std::max( 0.15, 0.35 + ((0.35-0.05)/2.3)*
G4Log(ekin) );
355 * ((atno-1.0)/120.)*
G4Exp(-(atno-1.0)/120.);
356 G4float fpdiv = std::max( 0.5, 1.0-0.25*ekin*ekin );
358 pnBlackTrackEnergyfromAnnihilation = exnu*fpdiv;
359 dtaBlackTrackEnergyfromAnnihilation = exnu*(1.0-fpdiv);
363 for(
G4int i=0; i<12; ++i ) {
367 pnBlackTrackEnergyfromAnnihilation *= 1.0 + ran1*gfa;
368 dtaBlackTrackEnergyfromAnnihilation *= 1.0 + ran2*gfa;
370 pnBlackTrackEnergyfromAnnihilation = std::max( 0.0, pnBlackTrackEnergyfromAnnihilation);
371 dtaBlackTrackEnergyfromAnnihilation = std::max( 0.0, dtaBlackTrackEnergyfromAnnihilation);
372 G4double blackSum = pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation;
373 if (blackSum >= ekOrg/GeV) {
374 pnBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
375 dtaBlackTrackEnergyfromAnnihilation *= ekOrg/GeV/blackSum;
378 return (pnBlackTrackEnergyfromAnnihilation+dtaBlackTrackEnergyfromAnnihilation)*GeV;
390 static const G4double expxl = -expxu;
395 G4double em = std::min( 1.0, 0.2390 + 0.0408*aLog*aLog );
396 G4double temp1 = -ek * std::min( 0.15, 0.0019*aLog*aLog*aLog );
397 G4double temp2 =
G4Exp( std::max( expxl, std::min( expxu, -(ekLog-em)*(ekLog-em)*2.0 ) ) );
399 if( std::abs( temp1 ) < 1.0 )
401 if( temp2 > 1.0e-10 )result = temp1*temp2;
403 else result = temp1*temp2;
404 if( result < -ek )result = -ek;
423 G4double ranmax = (ranflat1>ranflat2? ranflat1: ranflat2);
424 ranmax = (ranmax>ranflat3? ranmax : ranflat3);
428 G4double sintheta = std::sqrt(1.0 - costheta*costheta);
432 G4double px=sintheta*std::cos(phi)*ranmax;
433 G4double py=sintheta*std::sin(phi)*ranmax;
446 momentum+=(aMomentum);
451 excitationEnergy+=anEnergy;
double A(double temperature)
std::vector< G4Element * > G4ElementVector
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
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
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 AnnihilationEvaporationEffects(G4double kineticEnergy, G4double ekOrg)
G4double Cinema(G4double kineticEnergy)
G4DynamicParticle * ReturnTargetParticle() const
void SetParameters(const G4double A, const G4double Z)
G4ReactionProductVector * Fragmentate()
G4ReactionProduct GetBiasedThermalNucleus(G4double aMass, G4ThreeVector aVelocity, G4double temp=-1) const
G4double AtomicMass(const G4double A, const G4double Z) 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)
G4ThreeVector GetMomentum() const
void SetKineticEnergy(const G4double en)
void SetMass(const G4double mas)