Problem 533 - Particles are not accelerated in the electric field
Summary: Particles are not accelerated in the electric field
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: processes/transportation (show other problems)
Version: 5.2
Hardware: PC Linux
: P2 critical
Assignee: John Apostolakis
URL:
: 535 (view as problem list)
Depends on:
Blocks:
 
Reported: 2003-09-19 04:54 CEST by Mikhail.Kirsanov
Modified: 2003-10-15 11:36 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Mikhail.Kirsanov 2003-09-19 04:54:32 CEST
After the installation of patch p01 on geant4.5.2 particles are not accelerated
in the longitudinal electric field, though there is still a drift in the
transverse electric field (crossed with magnetic field). The particles are 3 -
300 eV positrions.
Comment 1 Mikhail.Kirsanov 2003-09-21 14:26:59 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
Comment 2 Gabriele Cosmo 2003-10-01 13:35:59 CEST
*** Bug 535 has been marked as a duplicate of this bug. ***
*** 'John.Apostolakis@cern.ch' will be responsible for bug 535. ***
Comment 3 John Apostolakis 2003-10-15 11:36:59 CEST
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