38{
39
41
42
43
44
45 G4int iZ = aTarg.GetZ_asInt();
46 G4int iA = aTarg.GetA_asInt();
48 if ( aTarg.GetIsotope() != NULL ) {
49 iM = aTarg.GetIsotope()->Getm();
50 }
51
53
56
59
61
64
65
68 theNeutron.SetKineticEnergy( ke );
69
70
71
73 if ( iM != 0 ) {
75 }
78
80
81
84 , G4RandGauss::shoot() * std::sqrt( kT*mass )
85 , G4RandGauss::shoot() * std::sqrt( kT*mass ) );
86 theTarget.SetMomentum( v );
87
89 G4double nEnergy = theNeutron.GetTotalEnergy();
91 G4double tEnergy = theTarget.GetTotalEnergy();
96 G4double cmsMom = std::sqrt(the3CMS*the3CMS);
97 G4double sqrts = std::sqrt((totE-cmsMom)*(totE+cmsMom));
100
101 theNeutron.Lorentz(theNeutron, theCMS);
102 theTarget.Lorentz(theTarget, theCMS);
103 G4double en = theNeutron.GetTotalMomentum();
108 tempVector.
setX( std::cos(theta)*std::sin(cms_theta)*std::cos(cms_phi)
109 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::cos(cms_phi)
110 -std::sin(theta)*std::sin(phi)*std::sin(cms_phi) );
111 tempVector.
setY( std::cos(theta)*std::sin(cms_theta)*std::sin(cms_phi)
112 +std::sin(theta)*std::cos(phi)*std::cos(cms_theta)*std::sin(cms_phi)
113 +std::sin(theta)*std::sin(phi)*std::cos(cms_phi) );
114 tempVector.
setZ( std::cos(theta)*std::cos(cms_theta)
115 -std::sin(theta)*std::cos(phi)*std::sin(cms_theta) );
116 tempVector *= en;
117 theNeutron.SetMomentum(tempVector);
118 theTarget.SetMomentum(-tempVector);
119 G4double tP = theTarget.GetTotalMomentum();
121 theTarget.SetTotalEnergy(std::sqrt((tP+tM)*(tP+tM)-2.*tP*tM));
122
123
124 theNeutron.Lorentz(theNeutron, -1.*theCMS);
125 theTarget.Lorentz(theTarget, -1.*theCMS);
126
127
128 if ( theNeutron.GetKineticEnergy() <= 0 )
129 {
131 }
132
133 if ( theTarget.GetKineticEnergy() < 0 )
134 {
136 }
137
138
142
146
147 return theResult;
148
149}
void SetDefinition(const G4ParticleDefinition *aParticleDefinition)
void SetMomentum(const G4ThreeVector &momentum)
double getElasticFinalState(double e_in, double temperature, double(*rng)(void *), void *rngState)
void AddSecondary(G4DynamicParticle *aP, G4int mod=-1)
void SetEnergyChange(G4double anEnergy)
void SetMomentumChange(const G4ThreeVector &aV)
const G4Material * GetMaterial() const
const G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4LorentzVector & Get4Momentum() const
G4HadFinalState theParticleChange
G4ParticleDefinition * GetIon(G4int Z, G4int A, G4int lvl=0)
static G4IonTable * GetIonTable()
G4double GetExcitationEnergyOfExcitedIsomer(G4int, G4int, G4int)
G4int GetNucleusEncoding(G4int iZ, G4int iA, G4int iM)
static G4LENDManager * GetInstance()
G4LENDManager * lend_manager
G4HadFinalState * returnUnchanged(const G4HadProjectile &aTrack, G4HadFinalState *theResult)
G4GIDI_target * get_target_from_map(G4int nuclear_code)
G4double GetTemperature() const
G4double GetPDGMass() const
static G4Pow * GetInstance()
G4double powA(G4double A, G4double y) const
void SetMomentum(const G4double x, const G4double y, const G4double z)
void SetTotalEnergy(const G4double en)
void SetMass(const G4double mas)