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

Idea 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)
Re: Warning Re: Insert a local electric field inside GEANT4 (Gumplinger Peter)
Date: 17 Nov, 2004
From: Daniel Barna <Daniel Barna>

Hi

Clearly, G4ChordFinder should accept an argument of G4ElectroMagneticField* or G4Field* instead. This problem probably stems from the early days, when G4 could only handle magnetic fields (???). Another solution to the problem is to derive your electric field from G4MagneticField. This is quite disturbing, but as far as I can judge, G4ElectricField and G4MagneticField only specify the pure-virtual DoesFieldChangeEnergy function (to return true and false, respectively), so if your overwrite this member function in your derived class to return true, this should work exactly the same way as if y ou would derive your class from G4ElectricField, with the additional benefit that your code also compiles. See #217 in the forum Event and Track Management

Cheers, Daniel

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

1 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 ]