Creating a uniform Electromagnetic Field inside a detector

Hey, I am relatively new to Geant4, and I’m sure this is a pretty basic task but I had a few questions about it anyway. So as far as I know, a uniform magnetic field can be created by using the G4UniformMagneticField class with a G4ThreeVector that contains the uniform 3D values of the field. One can then create a field manager, assign a chord finder to it, and then put the manager inside any logical volume in a setup.

I have a simple geometric setup with a rectangular world filled with air, and a cylindrical detector filled with LaBr3. I am trying to add both uniform electric and magnetic fields to it, but I only know how to use the G4UniformElectricField and the G4UniformMagneticField classes independently - by which I mean that I can create these fields and put them in a field manager and put the field manager in a logical volume, but I do not know how to put both fields inside the same manager/volume.

I am aware that there is a class called G4ElectromagneticField but as far as I understand, this class needs some sort of 3-D point wise data for it? As in, it is meant for non uniform fields? How does one use this for my task?

And lastly, do I need to do anything other than what I have mentioned so far for creating and assigning a field to a logical volume? I am not working with sensitive detectors - I am using the concept of scoring volumes instead. I am creating and assigning fields inside the usual DetectorConstruction class.

Please let me know if I need to provide more details for my inquiries.

Thanks in advance!

Hello, ssundarr!
Don’t know, if it is still useful, but i found answer for this question by looking at example microbeam from advanced dir. There is example of uniform electromagnetic field, wich could be applied to the whole world, or to the certain logical voluve. I worked with examples “microbeam”, “field02”, “field03”, “field04” and “B5”.