Message: Re: Insert a local electric field inside GEANT4 Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Warning Re: Insert a local electric field inside GEANT4 

Keywords: Local Electric Field insode a simulation
Forum: Fields: Magnetic and Otherwise
Re: Question Insert a local electric field inside GEANT4 (G.A.P.Cirrone)
Date: 16 Nov, 2004
From: Gumplinger Peter <Gumplinger Peter>

Hi Pablo,

GREAT POINT!

I have the same problem. When you look, G4ChordFinder has only two signatures:

G4ChordFinder::G4ChordFinder(G4MagInt_Driver* pIntegrationDriver)

and

G4ChordFinder::G4ChordFinder( G4MagneticField*        theMagField,
                              G4double                stepMinimum,
                              G4MagIntegratorStepper* pItsStepper )

I have done a little research and believe that the problem exists since 2003/11/05 when:

G4ElectroMagneticField::G4ElectroMagneticField(const G4ElectroMagneticField &r)	 G4ElectroMagneticField::G4ElectroMagneticField(const G4ElectroMagneticField &r)
   : G4MagneticField(r)

changed to:

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!

You can try this instead (it compiles but I don't know whether it works - that's for an expert to tell us):

      G4UniformElectricField* myElectricField =
                  new G4UniformElectricField(G4ThreeVector(0,fieldValue,0));

      G4EqMagElectricField *myEquation =
                  new G4EqMagElectricField(myElectricField);

      G4MagIntegratorStepper* myStepper = new G4ClassicalRK4(myEquation);

      G4MagInt_Driver* myIntgrDriver =
                  new G4MagInt_Driver(1.0e-3*mm, myStepper,
                                      myStepper->GetNumberOfVariables());

      G4ChordFinder* myChordFinder =
                  new G4ChordFinder(myIntgrDriver);

Peter

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Idea: Re: Insert a local electric field inside GEANT4   (Daniel Barna - 17 Nov, 2004)
(_ More: Re: Insert a local electric field inside GEANT4   (Peter Gumplinger - 19 Nov, 2004)
(_ None: Re: Insert a local electric field inside GEANT4   (luhao - 07 Jun, 2005)
(_ Ok: Re: Insert a local electric field inside GEANT4   (John Apostolakis - 07 Jun, 2005)
 Add Message Add Message
to: "Re: Insert a local electric field inside GEANT4"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]