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

None 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)
Re: More Re: Insert a local electric field inside GEANT4 (Gumplinger Peter)
Date: 07 Jun, 2005
From: luhao <luhao>

User Peter Gumplinger wrote:
>> 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);
Does that really work? Because G4ClassicalRK4 is inherit from class G4MagErrorStepper;
and according to the comment of the source file in G4MagErrorStepper.hh:
//--------------------------------------------------------------------
// class G4MagErrorStepper
//
// Class description:
//
// Abstract base class for integrator of particle's equation of motion,
// used in tracking in space dependent magnetic field.
                                      ^^^^^^^^^^^^^^^^
// History:
// 09.12.97  W.Wander <wwc@mit.edu>  Created G4MagErrorStepper
// --------------------------------------------------------------------

This class is used to calculate MAGNETIC field!! I search the source file
and found the relation of different steppers:
---------------------------------
 G4MagIntegratorStepper
      G4CashKarpRKF45
      G4MagErrorStepper
 	  G4ClassicalRK4
 	  G4ExplicitEuler
 	  G4ImplicitEuler
 	  G4SimpleHeum
 	  G4SimpleRunge
      G4MagHelicalStepper
 	  G4HelixExplicitEuler
 	  G4HelixHeum
 	  G4HelixImplicitEuler
 	  G4HelixSimpleRunge
      G4RKG3_Stepper
--------------------------------
which one is used to calculate the electric field?

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