42#define MAX_SECONDARIES 100
46G4NeutronCaptureAtRest::G4NeutronCaptureAtRest(
const G4String& processName,
49 massProton(
G4Proton::Proton()->GetPDGMass()/GeV),
50 massNeutron(
G4Neutron::Neutron()->GetPDGMass()/GeV),
51 massElectron(
G4Electron::Electron()->GetPDGMass()/GeV),
52 massDeuteron(
G4Deuteron::Deuteron()->GetPDGMass()/GeV),
95 return ( &particle == pdefNeutron );
128 G4cout <<
"G4NeutronCaptureAtRestProcess::AtRestGetPhysicalInteractionLength ";
165 for (
G4int i1=0; i1 < numberOfElements; i1++ )
167 normalization += theAtomicNumberDensity[i1] ;
172 for (
G4int i2=0; i2 < numberOfElements; i2++ )
174 runningSum += theAtomicNumberDensity[i2];
176 if (random<=runningSum)
178 targetCharge =
G4double((*theElementVector)[i2]->GetZ());
179 targetAtomicMass = (*theElementVector)[i2]->GetN();
182 if (random>runningSum)
184 targetCharge =
G4double((*theElementVector)[numberOfElements-1]->GetZ());
185 targetAtomicMass = (*theElementVector)[numberOfElements-1]->GetN();
190 G4cout <<
"G4NeutronCaptureAtRest::AtRestDoIt is invoked " <<
G4endl;
198 GenerateSecondaries();
202 for (
G4int isec = 0; isec < ngkine; isec++ ) {
205 aNewParticle->
SetMomentum( gkin[isec].GetMomentum() * GeV );
207 localtime = globalTime + gkin[isec].
GetTOF();
228void G4NeutronCaptureAtRest::GenerateSecondaries()
248 NeutronCapture(&nopt);
267 for (l = 1; l <= ntot; ++l) {
273 gkin[ngkine] = eve[index];
274 gkin[ngkine].
SetTOF( eve[index].GetTOF() * 5e-11 );
293void G4NeutronCaptureAtRest::Normal(
G4float *ran)
301 for (i = 1; i <= 12; ++i) {
308void G4NeutronCaptureAtRest::NeutronCapture(
G4int *nopt)
321 pv[2].
SetMass( AtomAs(targetAtomicMass, targetCharge) );
380 rmel = massElectron *
G4float(1e3);
382 rmp = massProton *
G4float(1e3);
384 rmn = massNeutron *
G4float(1e3);
386 rmd = massDeuteron *
G4float(1e3) + rmel;
398 if (iz < 0 || iz > ia) {
410 else if (ia == 2 && iz == 1) {
413 else if (ia == 4 && iz == 2) {
416 else if ( (ia == 2 && iz != 1) || ia == 3 || (ia == 4 && iz != 2) || ia > 4) {
419 mass = (aa - zz) * rmn + zz * rmp + zz * rmel - aa *
G4float(15.67) +
420 std::pow(aa, .6666667) *
G4float(17.23) + d__1 * d__1 *
G4float(93.15) / aa +
421 d__2 * d__2 *
G4float(.6984523) / std::pow(aa, .3333333);
425 mass += (ipp + izz - 1) *
G4float(12.) * std::pow(aa, -.5);
428 ret_val = mass *
G4float(.001);
std::vector< G4Element * > G4ElementVector
G4double condition(const G4ErrorSymMatrix &m)
#define G4HadronicDeprecate(name)
G4DLLIMPORT std::ostream G4cout
void DumpInfo(G4int mode=0) const
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
G4ParticleDefinition * GetParticleDef()
void SetParticleDef(G4ParticleDefinition *c)
void SetMomentum(G4ParticleMomentum mom)
void SetMomentumAndUpdate(G4ParticleMomentum mom)
void SetMass(G4double mas)
void Lor(const G4GHEKinematicsVector &p1, const G4GHEKinematicsVector &p2)
void SetKineticEnergyAndUpdate(G4double ekin)
void Add(const G4GHEKinematicsVector &p1, const G4GHEKinematicsVector &p2)
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
~G4NeutronCaptureAtRest()
void PreparePhysicsTable(const G4ParticleDefinition &)
G4VParticleChange * AtRestDoIt(const G4Track &, const G4Step &)
void BuildPhysicsTable(const G4ParticleDefinition &)
G4bool IsApplicable(const G4ParticleDefinition &)
G4int GetNumberOfSecondaries()
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *)
G4double GetMeanLifeTime(const G4Track &, G4ForceCondition *)
G4GHEKinematicsVector * GetSecondaryKinematics()
void AddSecondary(G4Track *aSecondary)
virtual void Initialize(const G4Track &)
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