| Summary: | Exit direction of hadronic elastic collisions perpendicular to Z-axis | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Sergio Losilla <sergio.losilla> |
| Component: | processes/hadronic/processes | Assignee: | dennis.herbert.wright |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | liulixing, sergio.losilla |
| Priority: | P4 | ||
| Version: | 10.6 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Histogram containing the exit angle of neutrons in a water phantom for
Patch adding the removed randomization around the Z-axis |
||
|
Description
Sergio Losilla
2021-01-10 15:01:27 CET
Created attachment 657 [details]
Patch adding the removed randomization around the Z-axis
The patch consists of selected lines from Geant4 10.5.1.
This has already been fixed according to bug report 2290. It will be included in the first patch to Geant4 10.7 Good to know. I will add a comment in the discussion. I have updated my geant4 to geant4.10.7.2. But I haven't seen the bug fixed! Is there something wrong? Here is the part of the code in greant4.10.7.2:
// Check the result for catastrophic energy non-conservation
// cannot be applied because is not guranteed that recoil
// nucleus is created
// result = CheckResult(theProj, targNucleus, result);
// directions
G4ThreeVector indir = track.GetMomentumDirection();
G4ThreeVector outdir = result->GetMomentumChange();
if(verboseLevel>1) {
G4cout << "Efin= " << result->GetEnergyChange()
<< " de= " << result->GetLocalEnergyDeposit()
<< " nsec= " << result->GetNumberOfSecondaries()
<< " dir= " << outdir
<< G4endl;
}
// energies
G4double edep = std::max(result->GetLocalEnergyDeposit(), 0.0);
G4double efinal = std::max(result->GetEnergyChange(), 0.0);
// primary change
theTotalResult->ProposeEnergy(efinal);
if(efinal > 0.0) {
outdir.rotateUz(indir);
theTotalResult->ProposeMomentumDirection(outdir);
} else {
if(part->GetProcessManager()->GetAtRestProcessVector()->size() > 0)
{ status = fStopButAlive; }
else { status = fStopAndKill; }
theTotalResult->ProposeTrackStatus(status);
}
|