SolidStateDetectors.jl icon indicating copy to clipboard operation
SolidStateDetectors.jl copied to clipboard

Integration of the electric field in Geant4

Open hervasa2 opened this issue 6 months ago • 8 comments

Full integration of SSD and geant4 could include the use of the electric field calculated by SSD. Particle propagation in Geant4 can then occur in the presence of this field. Field dependent spectrum effects (i.e. shift of single escape peak) could thus be simulated. This would also require switching to G4EmStandardPhysics_option4 https://github.com/JuliaPhysics/SolidStateDetectors.jl/blob/30584dc6abab01085e47bcb21ad6672a7fe3896c/ext/Geant4/g4jl_application.jl#L5 which should then also include doppler broadening effects (not captured by StandardPhysics). We would need some speed tests for this change.

I see two possible ways of passing the field to Geant4.

  1. Following the guidance in this thread a non-uniform electric field can be created in Geant4 in the following manner.
fFieldMessenger(nullptr)
{
// fEMfield = new G4UniformElectricField(G4ThreeVector(0.0,-1.0kilovolt/cm,0.0));
G4double zOffset = 0.0 * mm;
fEMfield = new PurgMagTabulatedEField3D(“PurgMag3D.TABLE”, zOffset);
fEquation = new G4EqMagElectricField(fEMfield);

fFieldManager = GetGlobalFieldManager();

UpdateIntegrator();
fFieldMessenger = new F02FieldMessenger(this);
}
  • PurgMag3D.TABLE is just a text file with a field vector in each row: x y z Ex Ey Ez
  • A /field/getField function needs to be defined to interpolate at any point, this can just be ported from the current methods in SSD
  1. Create virtual volumes (given by grid size) of uniform electric field and use
fEMfield = new G4UniformElectricField(G4ThreeVector(0.0,100000.0*kilovolt/cm,0.0));
fEquation = new G4EqMagElectricField(fEMfield)

hervasa2 avatar Aug 08 '24 12:08 hervasa2