-
Notifications
You must be signed in to change notification settings - Fork 40
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
Set SetMeanEnergyPerIonPair for acollinearity - continuation #485
base: master
Are you sure you want to change the base?
Set SetMeanEnergyPerIonPair for acollinearity - continuation #485
Conversation
…t working; Adapted actor utilisation to current flavor of oGate; added Rayleigh fit for more accurate test; cuter figure
Currently, the test does not pass with materials created on the go. For example, if we use the following material for the test:
I get an This seems to be caused by However, if the material is also added in the So, it seems that |
@MaxTousss strange, the test "test022_half_life_ion.py" also check add_material_nb_atoms and seems to run without error. Can you check again or send me an example (by email) please ? |
@dsarrut Yes, that test also use the method As requested, the example was sent by email. I also added the .log for good measure. |
ok, I see the problem. Give me few days to find how to deal with it ... Here is two workarounds:
I think the first is simpler, but the second may be useful for you to debug/tests. @MaxTousss : acolinearity works with ion source, does it work with beta+ source ? |
…est; Keeping different materials in the test for future test
Add a method to set ionization options in the simulation engine.
Are As for solution 3, I believe that most user would use on For now, I only refactored the tests so I could extract their difference. I still need to understand if your workaround can be simplified when the material is defined in I have no idea if it should work with beta+. I mean, beta+ is a necessary step of Ion to gamma pair in my mind, so it should, but never tested it. I have added it to the list of todos |
Yes I was unclear sorry : please use solution1 for the moment. The solution 2 (indeed ...new_material2.py) is only to show you how to access ionisation object once G4 is init (before the run), for debug purpose. |
…n acolin; correctly set mean_energy as a parameter
…the helper for multi actor cases
I added the remaining tests. In theory, only missing missing how to deal with Gate/Geant4/custom materials in the documentation. Also, could you comment about the following? I think that line is no longer viable, right? |
… G4Cache error obtained with previous version
Previous version of the test with multiple object resulted in ~10 of the checks per OS to fail with the error
In an attempt to remove that error, I merged the two actors into one. Hope it works... |
Finished everything in the TODO. All tests pass locally so I decided to put as ready for review even if github checks are on-going. @dsarrut I do not know how to proceed from here. I guess you know who can sanity check this. |
To get acolin as expected in PET (i.e. ~0.5 deg FWHM) with Ion source, the mean energy per ion pair of the material where the annihilation happens need to be set to 5.0 eV. This PR create the hook from GEANT4, test the feature and document the feature. Note: this is a continuation of #439
Material need to be declared withSeems this was a bug, now it behave correctly.add_material_nb_atoms
for non-basic material, i.e. even when defined in GateMaterials. However, this is not documented currently in the material section.sim.physics_manager = True
(See zxc in files changed)Sanity check if it affect positron rangeI did not found a test already done for positron range. Adding such a test would be outside the scope of this PR. Since the potential "problem" is documented in the user guide of this PR, this should be good enough for now.