Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of the electric field in Geant4 #397

Open
hervasa2 opened this issue Aug 8, 2024 · 8 comments
Open

Integration of the electric field in Geant4 #397

hervasa2 opened this issue Aug 8, 2024 · 8 comments
Assignees
Labels
enhancement Improvement of existing features geant4 Anything related to the Geant4 support

Comments

@hervasa2
Copy link
Collaborator

hervasa2 commented Aug 8, 2024

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

RegisterPhysics(pl, move!(G4EmStandardPhysics(verbose))) # EM physics

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 hervasa2 added enhancement Improvement of existing features geant4 Anything related to the Geant4 support labels Aug 8, 2024
@hervasa2 hervasa2 changed the title G4EmStandardPhysics_option3/4 and Integration of the electric field in Geant4 G4EmStandardPhysics_option4 and Integration of the electric field in Geant4 Aug 8, 2024
@hervasa2
Copy link
Collaborator Author

hervasa2 commented Aug 8, 2024

Looks like G4EmStandardPhysics_option4 works well and only causes a modest slowdown ~ 1.5-2 times slower

window = 0.002
bw = 0.00025
plot(stephist(sum.(events.edep), bins = 1593.002-window:bw:1593.002+window),
    stephist(sum.(events.edep), bins = 2104.001-window:bw:2104.001+window),
    size = (1500,500)
    )

Double and single escape peaks with with G4EmStandardPhysics_option4
Screenshot 2024-08-08 at 14 54 12

Double and single escape peaks with with G4EmStandardPhysics
Screenshot 2024-08-08 at 14 58 33

@oschulz
Copy link
Member

oschulz commented Aug 9, 2024

Having doppler broadening in would be very useful when simulating calibration spectra, for example.

@oschulz
Copy link
Member

oschulz commented Aug 9, 2024

As for the electrical field effects on particle propagation, can you estimate if this will result in non-negligible corrections?

@oschulz
Copy link
Member

oschulz commented Aug 9, 2024

We should also be able it easy for the user to select the physics model with an option, right?

@hervasa2
Copy link
Collaborator Author

hervasa2 commented Aug 9, 2024

As for the electrical field effects on particle propagation, can you estimate if this will result in non-negligible corrections?

Yes I was wondering about this. We know that the shift of the single escape peak is about 0.1keV (source) which is definitely observable. However I think we can ignore it for practical purposes. As for any other effects (i.e. shift of positron annihilation position due to drift, charged particle tracks...) its hard to say a priori.

@oschulz
Copy link
Member

oschulz commented Aug 9, 2024

Let's split this - user selectable physics lists should be easy to do, while incorporating the electrical field will be more involved (are you interested in pursuing this @hervasa2 ?).

@hervasa2
Copy link
Collaborator Author

hervasa2 commented Aug 9, 2024

Yes, I will work on selectable physics lists next week! See you at volleyball!

@oschulz
Copy link
Member

oschulz commented Aug 9, 2024

@hervasa2 don't worry about the physics lists, @fhagemann will do this over the weekend or so, it's quick thing.

Incorporating the electrical field seems like a different best though, someone will need to contribute this.

@fhagemann fhagemann changed the title G4EmStandardPhysics_option4 and Integration of the electric field in Geant4 Integration of the electric field in Geant4 Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features geant4 Anything related to the Geant4 support
Projects
None yet
Development

No branches or pull requests

3 participants