41#define MAX_SECONDARIES 100
45G4AntiNeutronAnnihilationAtRest::G4AntiNeutronAnnihilationAtRest(
const G4String& processName,
48 massPionMinus(
G4PionMinus::PionMinus()->GetPDGMass()/GeV),
49 massPionZero(
G4PionZero::PionZero()->GetPDGMass()/GeV),
50 massPionPlus(
G4PionPlus::PionPlus()->GetPDGMass()/GeV),
51 massGamma(
G4Gamma::Gamma()->GetPDGMass()/GeV),
52 massAntiNeutron(
G4AntiNeutron::AntiNeutron()->GetPDGMass()/GeV),
75 globalTime = targetAtomicMass = targetCharge = evapEnergy1
106 return ( &particle == pdefAntiNeutron );
139 G4cout <<
"G4AntiNeutronAnnihilationAtRestProcess::AtRestGetPhysicalInteractionLength ";
176 for (
G4int i1=0; i1 < numberOfElements; i1++ )
178 normalization += theAtomicNumberDensity[i1] ;
183 for (
G4int i2=0; i2 < numberOfElements; i2++ )
185 runningSum += theAtomicNumberDensity[i2];
187 if (random<=runningSum)
189 targetCharge =
G4double( ((*theElementVector)[i2])->GetZ());
190 targetAtomicMass = (*theElementVector)[i2]->GetN();
193 if (random>runningSum)
195 targetCharge =
G4double( ((*theElementVector)[numberOfElements-1])->GetZ());
196 targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
200 G4cout <<
"G4AntiNeutronAnnihilationAtRest::AtRestDoIt is invoked " <<
G4endl;
208 GenerateSecondaries();
212 for (
G4int isec = 0; isec < ngkine; isec++ ) {
215 aNewParticle->
SetMomentum( gkin[isec].GetMomentum() * GeV );
217 localtime = globalTime + gkin[isec].
GetTOF();
238void G4AntiNeutronAnnihilationAtRest::GenerateSecondaries()
254 result.
SetMass( massAntiNeutron );
261 AntiNeutronAnnihilation(&nopt);
280 for (l = 1; l <= ntot; ++l) {
286 gkin[ngkine] = eve[index];
287 gkin[ngkine].
SetTOF( eve[index].GetTOF() * 5e-11 );
306void G4AntiNeutronAnnihilationAtRest::Poisso(
G4float xav,
G4int *iran)
321 ran1 = xav + ran1 * std::sqrt(xav);
335 for (i = 1; i <= fivex; ++i) {
381G4int G4AntiNeutronAnnihilationAtRest::NFac(
G4int n)
396 for (i = 2; i <= j; ++i) {
405void G4AntiNeutronAnnihilationAtRest::Normal(
G4float *ran)
414void G4AntiNeutronAnnihilationAtRest::AntiNeutronAnnihilation(
G4int *nopt)
428 G4float ran1, ran2, ekin, tkin;
446 pv[1].
SetMass( massAntiNeutron );
465 rmnve1 = massPionPlus;
466 rmnve2 = massPionMinus;
468 rmnve1 = massPionZero;
469 rmnve2 = massPionZero;
472 rmnve2 = massPionZero;
478 ek = massNeutron + massAntiNeutron - rmnve1 - rmnve2;
485 en = ek + (rmnve1 + rmnve2) /
G4float(2.);
486 r__1 = en * en - rmnve1 * rmnve2;
487 pcm = r__1 > 0 ? std::sqrt(r__1) : 0;
498 pv[3].
SetEnergy( std::sqrt(pv[3].GetMass()*pv[3].GetMass()+pcm*pcm) );
499 pv[3].
SetMomentumAndUpdate( -pv[2].GetMomentum().x(), -pv[2].GetMomentum().y(), -pv[2].GetMomentum().z() );
520 if (targetAtomicMass >=
G4float(1.5)) {
527 black = (targ *
G4float(1.25) +
528 G4float(1.5)) * evapEnergy1 / (evapEnergy1 + evapEnergy3);
531 nbl =
G4int(targetAtomicMass - targ);
539 for (i = 1; i <= nbl; ++i) {
556 ekin1 = tex - (ekin2 - ekin1);
562 pnrat =
G4float(1.) - targetCharge / targetAtomicMass;
584 for (i = 1; i <= nt; ++i) {
586 if (pv[ii].GetParticleDef() != pdefProton) {
606 (evapEnergy1 + evapEnergy3);
614 for (i = 1; i <= nbl; ++i) {
631 ekin1 = tex - (ekin2 - ekin1);
658 for (i = 3; i <= nt; ++i) {
672 G4float cfa, gfa, ran1, ran2, ekin1, atno3;
682 if (targetAtomicMass >=
G4float(1.5)) {
684 if (
G4int(targetCharge + 0.1f) == 82) {
696 cfa =
G4float(.13043478260869565);
702 atno3 = targetAtomicMass;
714 gfa = (targetAtomicMass -
G4float(1.)) /
717 evapEnergy1 = ret_val * fpdiv;
718 evapEnergy3 = ret_val - evapEnergy1;
725 evapEnergy1 *= ran1 * gfa +
G4float(1.);
726 if (evapEnergy1 < 0.0f) {
729 evapEnergy3 *= ran2 * gfa +
G4float(1.);
730 if (evapEnergy3 < 0.0f) {
735 while ((ret_val = evapEnergy1 + evapEnergy3) >= ek1) {
std::vector< G4Element * > G4ElementVector
G4double condition(const G4ErrorSymMatrix &m)
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
#define G4HadronicDeprecate(name)
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
void PreparePhysicsTable(const G4ParticleDefinition &)
G4GHEKinematicsVector * GetSecondaryKinematics()
G4double GetMeanLifeTime(const G4Track &, G4ForceCondition *)
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4int GetNumberOfSecondaries()
void BuildPhysicsTable(const G4ParticleDefinition &)
~G4AntiNeutronAnnihilationAtRest()
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
G4bool IsApplicable(const G4ParticleDefinition &)
void DumpInfo(G4int mode=0) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
void SetEnergy(G4double e)
void SetEnergyAndUpdate(G4double e)
G4ParticleDefinition * GetParticleDef()
void SetParticleDef(G4ParticleDefinition *c)
void SetMomentumAndUpdate(G4ParticleMomentum mom)
void SetMass(G4double mas)
void SetKineticEnergyAndUpdate(G4double ekin)
void DeRegisterExtraProcess(G4VProcess *)
void RegisterExtraProcess(G4VProcess *)
void RegisterParticleForExtraProcess(G4VProcess *, const G4ParticleDefinition *)
static G4HadronicProcessStore * Instance()
void PrintInfo(const G4ParticleDefinition *)
const G4ElementVector * GetElementVector() const
size_t GetNumberOfElements() const
const G4double * GetAtomicNumDensityVector() const
const G4String & GetName() const
void AddSecondary(G4Track *aSecondary)
virtual void Initialize(const G4Track &)
G4double GetPDGMass() const
static G4Pow * GetInstance()
G4double powN(G4double x, G4int n) const
const G4ThreeVector & GetPosition() const
void SetTouchableHandle(const G4TouchableHandle &apValue)
G4double GetGlobalTime() const
G4Material * GetMaterial() const
const G4DynamicParticle * GetDynamicParticle() const
const G4TouchableHandle & GetTouchableHandle() const
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
G4double currentInteractionLength
virtual void ResetNumberOfInteractionLengthLeft()
G4ParticleChange aParticleChange
G4double theNumberOfInteractionLengthLeft
void SetProcessSubType(G4int)
const G4String & GetProcessName() const