101{
104 G4double weight = track.GetWeight();
106
107
109
110 G4double kineticEnergy = track.GetKineticEnergy();
113
114
115
116 if (part == theNeutron) {
119
122
123
125 try
126 {
128 *targNucleus);
129 }
131 {
134 ed <<
" PostStepDoIt failed on element selection" <<
G4endl;
135 G4Exception(
"G4WHadronElasticProcess::PostStepDoIt",
"had003",
137 }
139 try
140 {
142 }
144 {
146 ed <<
"Target element "<< elm->
GetName()<<
" Z= "
149 DumpState(track,
"ChooseHadronicInteraction",ed);
150 ed <<
" No HadronicInteraction found out" <<
G4endl;
151 G4Exception(
"G4WHadronElasticProcess::PostStepDoIt",
"had005",
153 }
154
155 size_t idx = track.GetMaterialCutsCouple()->GetIndex();
159
160
161
164 G4cout <<
"G4WHadronElasticProcess::PostStepDoIt for "
166 <<
" in " << material->
GetName()
169 }
170
172 try
173 {
175 }
177 {
180 ed <<
"Target element "<< elm->
GetName()<<
" Z= "
184 ed <<
" ApplyYourself failed" <<
G4endl;
185 G4Exception(
"G4WHadronElasticProcess::PostStepDoIt",
"had006",
187 }
188
189
190
191
192
193
194
199
204 << " dir= " << outdir
206 }
207
208
211 if(efinal < 0.0) { efinal = 0.0; }
212 if(edep < 0.0) { edep = 0.0; }
213
214
215
216 if((part == theNeutron && efinal <= lowestEnergyNeutron) ||
217 (part != theNeutron && efinal <= lowestEnergy)) {
218 edep += efinal;
219 efinal = 0.0;
220 }
221
222
224
226 if(efinal > 0.0) {
230 } else {
235 }
236
237
238
240
241
244
248
249
252
254
255
257 track.GetPosition());
261
262 } else {
264 delete p;
265 }
266 }
270
272}
G4DLLIMPORT std::ostream G4cout
Hep3Vector & rotateUz(const Hep3Vector &)
Hep3Vector & rotate(double, const Hep3Vector &)
G4Element * SampleZandA(const G4DynamicParticle *, const G4Material *, G4Nucleus &target)
void SetMomentumDirection(const G4ThreeVector &aDirection)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
const G4String & GetName() const
G4double GetEnergyChange() const
G4double GetLocalEnergyDeposit() const
G4int GetNumberOfSecondaries() const
const G4ThreeVector & GetMomentumChange() const
G4HadSecondary * GetSecondary(size_t i)
G4DynamicParticle * GetParticle()
virtual G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &targetNucleus)=0
const G4String & GetModelName() const
void SetRecoilEnergyThreshold(G4double val)
G4Nucleus * GetTargetNucleusPointer()
G4ParticleChange * theTotalResult
G4CrossSectionDataStore * GetCrossSectionDataStore()
G4HadronicInteraction * ChooseHadronicInteraction(G4double kineticEnergy, G4Material *aMaterial, G4Element *anElement)
void DumpState(const G4Track &, const G4String &, G4ExceptionDescription &)
const G4String & GetName() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void AddSecondary(G4Track *aSecondary)
void ProposeEnergy(G4double finalEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
virtual void Initialize(const G4Track &)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4ProcessVector * GetAtRestProcessVector(G4ProcessVectorTypeIndex typ=typeGPIL) const
const std::vector< G4double > * GetEnergyCutsVector(size_t pcIdx) const
static G4ProductionCutsTable * GetProductionCutsTable()
void SetWeight(G4double aValue)
void SetTouchableHandle(const G4TouchableHandle &apValue)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeNonIonizingEnergyDeposit(G4double anEnergyPart)
void ProposeWeight(G4double finalWeight)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
void ClearNumberOfInteractionLengthLeft()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription