42 #define MAX_SECONDARIES 100
46 G4AntiNeutronAnnihilationAtRest::G4AntiNeutronAnnihilationAtRest(
const G4String& processName,
76 globalTime = targetAtomicMass = targetCharge = evapEnergy1
107 return ( &particle == pdefAntiNeutron );
140 G4cout <<
"G4AntiNeutronAnnihilationAtRestProcess::AtRestGetPhysicalInteractionLength ";
177 for (
G4int i1=0; i1 < numberOfElements; i1++ )
179 normalization += theAtomicNumberDensity[i1] ;
184 for (
G4int i2=0; i2 < numberOfElements; i2++ )
186 runningSum += theAtomicNumberDensity[i2];
188 if (random<=runningSum)
190 targetCharge =
G4double( ((*theElementVector)[i2])->GetZ());
191 targetAtomicMass = (*theElementVector)[i2]->GetN();
194 if (random>runningSum)
196 targetCharge =
G4double( ((*theElementVector)[numberOfElements-1])->GetZ());
197 targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
201 G4cout <<
"G4AntiNeutronAnnihilationAtRest::AtRestDoIt is invoked " <<
G4endl;
209 GenerateSecondaries();
213 for (
G4int isec = 0; isec < ngkine; isec++ ) {
218 localtime = globalTime + gkin[isec].
GetTOF();
220 G4Track* aNewTrack =
new G4Track( aNewParticle, localtime*
s, position );
239 void G4AntiNeutronAnnihilationAtRest::GenerateSecondaries()
255 result.
SetMass( massAntiNeutron );
262 AntiNeutronAnnihilation(&nopt);
281 for (l = 1; l <= ntot; ++l) {
287 gkin[ngkine] = eve[index];
288 gkin[ngkine].
SetTOF( eve[index].GetTOF() * 5e-11 );
307 void G4AntiNeutronAnnihilationAtRest::Poisso(
G4float xav,
G4int *iran)
322 ran1 = xav + ran1 * std::sqrt(xav);
336 for (i = 1; i <= fivex; ++i) {
382 G4int G4AntiNeutronAnnihilationAtRest::NFac(
G4int n)
397 for (i = 2; i <= j; ++i) {
406 void G4AntiNeutronAnnihilationAtRest::Normal(
G4float *ran)
415 void G4AntiNeutronAnnihilationAtRest::AntiNeutronAnnihilation(
G4int *nopt)
429 G4float ran1, ran2, ekin, tkin;
447 pv[1].
SetMass( massAntiNeutron );
466 rmnve1 = massPionPlus;
467 rmnve2 = massPionMinus;
469 rmnve1 = massPionZero;
470 rmnve2 = massPionZero;
473 rmnve2 = massPionZero;
479 ek = massNeutron + massAntiNeutron - rmnve1 - rmnve2;
486 en = ek + (rmnve1 + rmnve2) /
G4float(2.);
487 r__1 = en * en - rmnve1 * rmnve2;
488 pcm = r__1 > 0 ? std::sqrt(r__1) : 0;
499 pv[3].
SetEnergy( std::sqrt(pv[3].GetMass()*pv[3].GetMass()+pcm*pcm) );
500 pv[3].
SetMomentumAndUpdate( -pv[2].GetMomentum().
x(), -pv[2].GetMomentum().y(), -pv[2].GetMomentum().
z() );
521 if (targetAtomicMass >=
G4float(1.5)) {
528 black = (targ *
G4float(1.25) +
529 G4float(1.5)) * evapEnergy1 / (evapEnergy1 + evapEnergy3);
532 nbl =
G4int(targetAtomicMass - targ);
540 for (i = 1; i <= nbl; ++i) {
557 ekin1 = tex - (ekin2 - ekin1);
563 pnrat =
G4float(1.) - targetCharge / targetAtomicMass;
585 for (i = 1; i <= nt; ++i) {
587 if (pv[ii].GetParticleDef() != pdefProton) {
607 (evapEnergy1 + evapEnergy3);
615 for (i = 1; i <= nbl; ++i) {
632 ekin1 = tex - (ekin2 - ekin1);
659 for (i = 3; i <= nt; ++i) {
673 G4float cfa, gfa, ran1, ran2, ekin1, atno3;
683 if (targetAtomicMass >=
G4float(1.5)) {
685 if (
G4int(targetCharge + 0.1f) == 82) {
697 cfa =
G4float(.13043478260869565);
703 atno3 = targetAtomicMass;
715 gfa = (targetAtomicMass -
G4float(1.)) /
718 evapEnergy1 = ret_val * fpdiv;
719 evapEnergy3 = ret_val - evapEnergy1;
726 evapEnergy1 *= ran1 * gfa +
G4float(1.);
727 if (evapEnergy1 < 0.0f) {
730 evapEnergy3 *= ran2 * gfa +
G4float(1.);
731 if (evapEnergy3 < 0.0f) {
736 while ((ret_val = evapEnergy1 + evapEnergy3) >= ek1) {
G4double condition(const G4ErrorSymMatrix &m)
static G4Pow * GetInstance()
void DeRegisterExtraProcess(G4VProcess *)
G4double GetMeanLifeTime(const G4Track &, G4ForceCondition *)
void SetParticleDef(G4ParticleDefinition *c)
void SetMomentum(const G4ThreeVector &momentum)
G4double powN(G4double x, G4int n) const
std::vector< G4Element * > G4ElementVector
static G4HadronicProcessStore * Instance()
const G4DynamicParticle * GetDynamicParticle() const
~G4AntiNeutronAnnihilationAtRest()
G4ParticleDefinition * GetParticleDef()
const G4String & GetName() const
const G4ThreeVector & GetPosition() const
void DumpInfo(G4int mode=0) const
G4GHEKinematicsVector * GetSecondaryKinematics()
G4double theNumberOfInteractionLengthLeft
void SetTouchableHandle(const G4TouchableHandle &apValue)
void BuildPhysicsTable(const G4ParticleDefinition &)
virtual void ResetNumberOfInteractionLengthLeft()
#define G4HadronicDeprecate(name)
const G4ElementVector * GetElementVector() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetKineticEnergyAndUpdate(G4double ekin)
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfSecondaries()
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4double currentInteractionLength
void SetProcessSubType(G4int)
G4double GetGlobalTime() const
const G4String & GetProcessName() const
const G4double * GetAtomicNumDensityVector() const
const G4TouchableHandle & GetTouchableHandle() const
G4Material * GetMaterial() const
void SetEnergyAndUpdate(G4double e)
void RegisterExtraProcess(G4VProcess *)
G4bool IsApplicable(const G4ParticleDefinition &)
G4double G4Log(G4double x)
void PreparePhysicsTable(const G4ParticleDefinition &)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
virtual void Initialize(const G4Track &)
void SetEnergy(G4double e)
G4double GetPDGMass() const
void SetMomentumAndUpdate(G4ParticleMomentum mom)
void SetNumberOfSecondaries(G4int totSecondaries)
G4ParticleChange aParticleChange
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
static constexpr double GeV
void SetMass(G4double mas)
void AddSecondary(G4Track *aSecondary)
size_t GetNumberOfElements() const
void ProposeTrackStatus(G4TrackStatus status)
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void PrintInfo(const G4ParticleDefinition *)