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

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

I'll try to summarize:

For the moment until the signature of the G4ChordFinder constructor is changed (which I'd hope will be the case in the 7.0 release), or you do the trick of your electric field inherit from G4MagneticField as was also suggested under this thread, the way to define a local electric field is:

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

      G4EqMagElectricField *myEquation =
                  new G4EqMagElectricField(myElectricField);

      G4int nvar = 8; // Need to integrate 8 variables: x,y,z,p[xyz],E,t 

      G4MagIntegratorStepper* myStepper = new G4ClassicalRK4(myEquation,nvar);

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

      G4ChordFinder* myChordFinder =
                  new G4ChordFinder(myIntgrDriver);

      G4bool fieldChangesEnergy = true;

      G4FieldManager* pFieldMgr =
                  new G4FieldManager(myField,pChordFinder,FieldChangeEnergy);

      LocalLogicalVolume = new G4LogicalVolume(shape, material,"name",pFieldMgr,0,0);

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

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