| Summary: | Particles are not accelerated in the electric field | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Mikhail.Kirsanov |
| Component: | processes/transportation | Assignee: | John Apostolakis <John.Apostolakis> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | ||
| Priority: | P2 | ||
| Version: | 5.2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Mikhail.Kirsanov
2003-09-19 04:54:32 CEST
This can be seen from the example outputs in the Geant4 distributive itself:
geant4.5.2/examples/extended/field/field02/field02.out
geant4.5.2.p01/examples/extended/field/field02/field02.out
*** Bug 535 has been marked as a duplicate of this bug. *** *** 'John.Apostolakis@cern.ch' will be responsible for bug 535. *** Dear Mikhail, We have discovered the root cause of this problem. A modification included in patch01 'renormalises' the energy, for the cases in which the field preserves the energy. When utilising an electric field, it is neccessary to call fFieldManager->SetFieldChangesEnergy(true); for the field manager corresponding to the Electric Field in order to notify the system that the current field is not energy conserving. In our example field02, we forgot the code this code, that protects the tracking in an electric field from being affected by this. This also ensures that the time is integrated, in order to attempt to take into account velocity changes. The new code is best placed in the DetectorConstruction or a helper class such as F02ElectricField in which the Field Manager is created: fFieldManager = GetGlobalFieldManager(); fFieldManager->SetFieldChangesEnergy(true); I have now corrected the example by adding the above lines in the constructor to ensure that this variable is set. With these changes example field02 also gives the previous (correct) answer. Thank you once again for your report. Best regards, John Apostolakis |