| Summary: | wrong excitation for recoil nucleus in G4ParticleHPInelasticCompFS | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Artem Zontikov <zontikov.a> |
| Component: | processes/hadronic/models/neutron_hp | Assignee: | dennis.herbert.wright |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | CC: | dennis.herbert.wright |
| Priority: | P4 | ||
| Version: | 10.5 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Artem Zontikov
2019-06-08 20:19:25 CEST
Hi Artem, Most of this seems OK, except for the case when theFinalStatePhotons[it] = 0. Then you assign zero excitation energy. In that case it would seem better to use totalPhotonEnergy, would it not? Dennis I guess that theFinalStatePhotons[it] == 0 results in thePhotons == 0 which leaves no other option but to have a zero totalPhotonEnergy.
Also, proposed fix makes these lines redundant:
587 G4double totalPhotonEnergy = 0.0;
588 if ( thePhotons != 0 )
589 {
590 unsigned int nPhotons = thePhotons->size();
591 unsigned int ii0;
592 for ( ii0=0; ii0<nPhotons; ii0++)
593 {
594 //thePhotons has energies at LAB system
595 totalPhotonEnergy += thePhotons->operator[](ii0)->GetTotalEnergy();
596 }
597 }
Your fix has been implemented as proposed. |