Message: Re: Electric Field does not work... Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Electric Field does not work... 

Keywords: Electric Field
Forum: Fields: Magnetic and Otherwise
Re: Question Electric Field does not work... (Dai ho Ko)
Date: 31 Aug, 2004
From: Dai ho Ko <kodainim@hotmail.com>

This is what I got from Tom Roberts Thank you very much. As I'm sure this note will help other users, I'm posting here.

Here's what I do -- you'll see you missed at least one call (SetFieldChangesEnergy). This is in the constructor of my class derived from G4ElectroMagneticField.

        // Construct equation of motion of particles through e.m. fields 
        G4EqMagElectricField *fEquationE = new 
G4EqMagElectricField(this); 

        // Get transportation, field, and propagator  managers 
        G4TransportationManager  *pTransportMgr= 
               G4TransportationManager::GetTransportationManager(); 
        G4FieldManager* fieldMgr = pTransportMgr->GetFieldManager(); 
        G4PropagatorInField *pFieldPropagator = 
pTransportMgr->GetPropagatorInField(); 

        // Need to SetFieldChangesEnergy to account for a time varying 
// electric field (r.f. fields) 
        fieldMgr->SetFieldChangesEnergy(true); 

        // Set the field 
        fieldMgr->SetDetectorField(this); 

Tom Roberts tjrob@fnal.gov

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

1 None: Re: Electric Field does not work...   (Dai ho Ko - 31 Aug, 2004)
 Add Message Add Message
to: "Re: Electric Field does not work..."

 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 ]