View | Details | Raw Unified | Return to problem 2290
Collapse All | Expand All

(-)a/source/processes/hadronic/processes/src/G4HadronElasticProcess.cc (+3 lines)
Lines 188-193 G4HadronElasticProcess::PostStepDoIt(const G4Track& track, Link Here
188
188
189
  // directions
189
  // directions
190
  G4ThreeVector indir = track.GetMomentumDirection();
190
  G4ThreeVector indir = track.GetMomentumDirection();
191
  G4double phi = CLHEP::twopi*G4UniformRand();
192
  G4ThreeVector it(0., 0., 1.);
191
  G4ThreeVector outdir = result->GetMomentumChange();
193
  G4ThreeVector outdir = result->GetMomentumChange();
192
194
193
  if(verboseLevel>1) {
195
  if(verboseLevel>1) {
Lines 206-211 G4HadronElasticProcess::PostStepDoIt(const G4Track& track, Link Here
206
  theTotalResult->ProposeEnergy(efinal);
208
  theTotalResult->ProposeEnergy(efinal);
207
209
208
  if(efinal > 0.0) {
210
  if(efinal > 0.0) {
211
    outdir.rotate(phi, it);
209
    outdir.rotateUz(indir);
212
    outdir.rotateUz(indir);
210
    theTotalResult->ProposeMomentumDirection(outdir);
213
    theTotalResult->ProposeMomentumDirection(outdir);
211
  } else {
214
  } else {

Return to problem 2290