| Message: Re: Electric potential / non-uniform electric field | Not Logged In (login) |
|
Try this: G4FieldManager* pFieldMgrEF3 = new G4FieldManager(); G4ElectricField* PurgEl3Field= new TabulatedElField2D3D("MMPS_in_edit.txt",0,0,0); G4EqMagElectricField* myEquationEF3 = new G4EqMagElectricField(PurgEl3Field); G4MagIntegratorStepper* myStepperEF3 = new G4ClassicalRK4(myEquationEF3,8)
G4MagInt_Driver* myIntgrDriverEF3 = new G4MagInt_Driver(1.0e-3*mm,
myStepperEF3,
myStepperEF3->GetNumberOfVariables());
G4ChordFinder* myChordFinderEF3 = new G4ChordFinder(myIntgrDriverEF3); pFieldMgrEF3->SetDetectorField(PurgEl3Field); pFieldMgrEF3->SetChordFinder(myChordFinderEF3); pFieldMgrEF3->SetFieldChangesEnergy(true); logicVolume_in_question->SetFieldManager(pFieldMgrEF3,allLocal); see also /examples/extended/field/field02 for how to define electric fields (albeit G4UniformElectricField) and /field03 of how to attach it to a logical volume (instead of using the GlobalFieldManager) |
| Inline Depth: | Outline Depth: | Add message: |
|
to: |