I tried to simulate ions creation and extraction using an electron beam and dihydrogen gas.
I tried extracting these ions using fields but all I could get is energy deposited from ionization only.
Detector definition:
G4Material* HydrogenGasIonized = new G4Material("HydrogenGasIonized", 0.0899 * g/cm3, ncomponents=1, kStateGas);
HydrogenGasIonized->AddElement(elH, 2);
// Gas source (H2)
G4VSolid* gasSourceSolid = new G4Tubs("GasSourceSolid", 0 * cm, 3 * cm, 9.89 * cm, 0, 360 * deg);
gasSourceLog = new G4LogicalVolume(gasSourceSolid, hydrogenGasIonized, "GasSourceLog");
new G4PVPlacement(nullptr, G4ThreeVector(0, 0, 0 * cm), gasSourceLog, "GasSourcePhys", logicWorld, false, 0);
Fields definition :
G4MagneticField* field = new G4UniformMagField(G4ThreeVector(0.0 * tesla, 0.0 * tesla, 10.0 * tesla));
G4FieldManager* fieldManager = new G4FieldManager( field );
G4ThreeVector electricFieldVector(0.0, 0.0* kilovolt / cm, 100.0 * kilovolt / cm); // Adjust the field strength and direction as needed
electricField = new G4UniformElectricField(electricFieldVector);
//fieldManager->SetDetectorField(field, 1);
//gasSourceLog->SetFieldManager(fieldManager, true);
Primary generator :
G4int n_particles = 1;
// Initialize the particle gun
particleGun = new G4ParticleGun(n_particles);
// Set default particle properties
particleGun->SetParticleDefinition(G4Electron::Definition());
particleGun->SetParticleEnergy(1.0 * MeV);
particleGun->SetParticlePosition(G4ThreeVector(0.0, 0.0, - 9.0 * cm));
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.0));
and used G4EmStandardPhysics in the physics list.
Is it possible to simulate such interaction with the available toolkit ?
Thanks in advance.
_Geant4 Version:11.1.2
_Operating System:WSL2.0 / Ubuntu 22.04.2
Compiler/Version:
CMake Version: