Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
I started to play with constant magnetic field in a dipole to simulate transport of beam.
However when i started to play around the charge state of my beam i notice that the angle did not change for heavy ion.
I did some test with lighter beam (alpha, C, Ca) and they work as expected but for heavier beam i started to get the same angle regardless of the charge. I even have deflection when i set my ion charge to 0 …
Is there a limit on mass you can transport ? why does it seems that for heavier beam we have a fix charge.
All transport are done in G4_galactic.
If someone as an insight it would be helpful i am stuck
How are you setting the charge? Are you varying the kinetic energy with heavier ions and how? The rigidity is inversely proportional to momentum and this decreases with a fixed E total for example.
/gps/particle ion
/gps/ion 95 243 0 0
/gps/pos/type Beam
/gps/pos/centre 0 5. -685.5 mm
/gps/pos/sigma_x 2.0 mm
/gps/pos/sigma_y 2.0 mm
/gps/direction 0 0 1
/gps/ene/type Gauss
/gps/ene/mono 104 MeV
/gps/ene/sigma 3.9 MeV
And even with a charge of 0 i get deviation by the magnetic field.
I try with different ion and up to Ca i get expected behavior, but for heavier ion i first get 2 path: one straight and one at an angle … and then at higher mass i only get the deviated one
Without this it draws only the beginning and end points of a step. In between, the track might have lots of curvature. With the above, intermediate points are drawn too, and you get a nice trajectory.
I have smooth trajectory already
my main issue is that i get bending in magnetic field even when i put my beam with a neutral charge
I check the charge in vaccum in my stepping action and it even when i put it a 0 in my gps i get non zero charge using G4DynamicParticle::GetCharge()
After deeper analysis the real problem comes from the fact that the charge is being change affecting the transport. Without ionization process i get the correct transport, but now need to understand why G4Galactic is changing the charge..