G4ChordFinder has only two signatures: G4ChordFinder::G4ChordFinder(G4MagInt_Driver* pIntegrationDriver) and G4ChordFinder::G4ChordFinder( G4MagneticField* theMagField, G4double stepMinimum, G4MagIntegratorStepper* pItsStepper ) There is no: G4ChordFinder::G4ChordFinder( G4Field* theField, G4ChordFinder::G4ChordFinder( G4ElectroMagneticField* theEleMagField, G4ChordFinder::G4ChordFinder( G4ElectricField* theEleField, This was not a problem before 2003/11/05 when G4ElectroMagneticField::G4ElectroMagneticField(const G4ElectroMagneticField &r) : G4MagneticField(r) but now: G4ElectroMagneticField::G4ElectroMagneticField(const G4ElectroMagneticField &r) : G4Field(r) Thus, the code snippet in the documentation - User's Guide: For Application Developers: Source listing 4.3.1 must also not compile, nor should: /examples/advanced/underground_physics/src/DMXDetectorField.icc, line 40 /source/geometry/magneticfield/test/field02/src/F02ElectroMagneticField.cc /source/geometry/magneticfield/test/testProElectroMagField.cc and possibly others too!
Dear Peter, Thank you for notifying this change and the resulting gap between the code and the documentation. The design change in the field classes and the ommission of more constuctors for G4ChordFinder were intended, as for electric fields more care should be taken to provide good parameters to the field module. Also the design change enabled us to more clearly separate electric and magnetic fields so that the system could recognise magnetic fields in order to conserve energy exactly for these, while checking the numerical accuracy of its energy and momentum integration. However the functionality provided by these simple constructors is still provided, although for currently it located in the extended examples. In the example examples/extended/field/field02 the class F02ElectricFieldSetup demonstrates how to create a Chord Finder, a Integrator Driver and other necessary classes for an electric field. I agree that the documentation required updating, and with release 7.1 the relevant part titled "Creating an Electric or Electromagnetic Field" of section 4.3.2 of the "User's Guide For Application Developers" was also updated with this fix. I note that the new recommended procedure and code are required for release 6.0 and later -- but are expected also to be valid for previous releases of Geant4 (e.g. 5.2 ). In future we could foresee refining the field setup classes in the extended examples (such as F02ElectricFieldSetup ) and creating one or a few factory classes in the kernel that create the chord finder and integration driver and stepper.