-
Notifications
You must be signed in to change notification settings - Fork 7
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
G4StepLimiterPhysics #13
Comments
Hi. I didn't know that we need to set the User Limits and in addition to Register and instance of |
Thanks for the fast answer a fast Implantation would bei great :). At least nothing i noticed ist Missing at the Moment but i will contact you again If i find Something. |
I have made a new version (Geant4 v0.1.16) and is now registered in Julia. To use the new class
The example B2a in https://github.com/JuliaHEP/G4Examples.jl/blob/main/basic/B2/B2a.jl has it now. I would be interested if you could share your progress in your work since I have to prepare a contribution for JuliaCon and I could use it as example of use. BTW, I did produce a set of tutorials notebooks here: https://github.com/peremato/Geant4.jl-tutorial |
Thanks for the quick response and implementation. I have tried using the maximum step size now for my code but it still doesn't work so I tried the B2a example with some modifications to look at the influence of the maximum step size. I added the following code after the inclusion of
I also added the following few lines into the
(See fully modified code below)
So in the 3rd column i would expect the difference between two lines to be less than 2mm but it shows that there are differences which are around 11mm instead. Did I just misunderstood the maximum step size or is still something not working for me? And if I misunderstood the step size how would I achieve the effect of limiting the distance traveled by a particle between each step? Btw, i will ask my supervisors if I can provide some examples. Full code of B2a.jl:
|
I did not check carefully the actual step length, but I noticed that by adding these lines in the script I saw that new steps are created because of the limits.
Can you try with |
Ok so I did some testing with different particles and different step size for one particle shot for each test.
What I noticed from the testing is that the computation time goes up for smaller step sizes which makes sense but the number of entries generated seems totally random to me. I did wonder if my scorer doesn't score what I think it does, but when i checked the logic it should score every step with the according position and energy deposition. So technically i should see more entries for a smaller maximum step size. |
Did you try with?
It could be a discrepancy between the number of steps and the number of hits. In the processHit function there is
Perhaps is worth to put the question to the Geant4 Forum |
Oh my bad no i didn't. But with that I atleast found out my stupid mistake while using the example. I had my step size limit applied to the tracker logical volume while my sensitive detector was applied to the chamber logical volumes. Thats why I couldn't see the additional steps caused by the |
Welcome! |
Hey it's me again. I'm still working with Geant4 in Julia and i have to say it's well done and very comfortable to work with.
I tried to implement a maximum stepsize into my simulation and noticed that it doesn't work although you use it in one of
your examples. Did i just oversee something or is the problem that the G4StepLimiterPhysics list isn't implemented yet?
Or could it be that the maximum stepsize just doesn't work for geantinos?
The text was updated successfully, but these errors were encountered: