86{
91
92
94
95 G4double kineticEnergy = track.GetKineticEnergy();
98
99
100
102
105
106
108 try
109 {
111 *targNucleus);
112 }
114 {
117 ed <<
" PostStepDoIt failed on element selection" <<
G4endl;
118 G4Exception(
"G4HadronElasticProcess::PostStepDoIt",
"had003",
120 }
122 try
123 {
125 }
127 {
129 ed <<
"Target element "<< elm->
GetName()<<
" Z= "
132 DumpState(track,
"ChooseHadronicInteraction",ed);
133 ed <<
" No HadronicInteraction found out" <<
G4endl;
134 G4Exception(
"G4HadronElasticProcess::PostStepDoIt",
"had005",
136 }
137
138 size_t idx = track.GetMaterialCutsCouple()->GetIndex();
142
143
144
147 G4cout <<
"G4HadronElasticProcess::PostStepDoIt for "
149 <<
" in " << material->
GetName()
152 }
153
155 try
156 {
158 }
160 {
163 ed <<
"Target element "<< elm->
GetName()<<
" Z= "
167 ed <<
" ApplyYourself failed" <<
G4endl;
168 G4Exception(
"G4HadronElasticProcess::PostStepDoIt",
"had006",
170 }
171
172
173
174
175
176
177
182
187 << " dir= " << outdir
189 }
190
191
194 if(efinal < 0.0) { efinal = 0.0; }
195 if(edep < 0.0) { edep = 0.0; }
196
197
198
199 if(efinal <= lowestEnergy) {
200 edep += efinal;
201 efinal = 0.0;
202 }
203
204
206
208 if(efinal > 0.0) {
212 } else {
217 }
218
219
220
222
223
226
230
231
234
236
237
239 track.GetPosition());
243
244 } else {
246 delete p;
247 }
248 }
252
254}
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