Hi. thanks for your reply. I had never heard or read about GEARS before. I think that GEARS is interesting. I’m going to read the 9 page PDF you shared.
I think the paper describes most of the points that for me where problematic with Geant4 at the beginning and allowed me to do some Physics. It doesn’t do everything, well it doesn’t set out to. For instance physics lists are set up with an environment variable, if I remember correctly.
It’s a shame that I can’t find the paper is in a published Journal but in ArXiv. But ArXiv is another area. Sharing that’s what publications are about and what communities are for. So a thanks to Geant4 Forum for being there. For answering some of the queries. And for some posts which I don’t stand a chance of ever fathoming but are interesting from language.
Finally, if anyone is out there, is there an official Geant4 documentation group which deals with this as I believe it needs it- not negative, would be positive. But, sometimes, I can’t get my head around it.
Oh yes software “containers”. This to me is antithesis of an up to date working system. In other words goes in the opposite direction to what is needed. But hey Software travels at the speed of light.
Thanks for your reply. I’m reading the paper about GEARS that you shared and I have read that physics lists can be set up with an environment variable, just like you said; Another thing I have read in the paper (about GEARS) is that the core of GEARS consists of a single C++ source file with 555 lines of C++ code.
Something I find interesting and amazing is that with GEARS one can define the detector, the physics and the primary particle source without C++.
I´m going to continue reading the paper (about GEARS) to see what other new things I learn.
Hi. I have finished to read the paper about GEARS. I learned several things. On the other hand, I think I would wait first the release of a user manual and helpful videos about GEARS before delve deeper into this topic, because that way I think I could make more progress; so, for now, I think I will continue using GEANT4 with the help of the GEANT4 Forum, GEANT4 user manual, PDF’s about GEANT4 and Youtube videos about GEANT4. Finally, I would just add that there is another tool that is considered a general purpose GEANT4 application that does not require programming in C++, that tool is GAMOS. Thanks
Hallo Alfredo thanks for your reply. I did not know about GAMOS (reminded me of a DFT package and therefore unfortunate) and will look further even try it out. Im not plugging GEARS. It helped me out getting me up to speed (well not quite there yet). The “documentation” is mainly on GitHub but the tutorials are quite self explanatory. His videos are on YouTube as physino.xyz (I believe) the other guy who helped is the YouTube “Physics Matters”: I use Root for analysis not HDF5 for somewhat local “political reasons”, also now historical- Its Open which is better than Closed. Installing Geant4 was a daunting complicated task with updates of various packages etc giving problems (some error messages not being helpful, and if given by sentience would be considered lies, albeit unknowingly). It is now better.
Finally back to GEANT5 documentation for me it needs distillation, precised (ahh a precis, missed that). And to GAMOS this is presumably work of a funded? collaboration rather than a gang of one; but a nice one.
p.s. I try and steer clear of medical issues (bad joke)
Hi David. thanks for your reply. GAMOS means Geant4-based Architecture for Medicine-Oriented Simulations. Regarding the installation of Geant4, I was able to install Geant4 on my machine using the Geant4 manual and 2 Youtube videos.
I have learned Geant4 asking questions and reading topics on the Geant4 forum, reading the Geant4 manual, looking at and running some examples of the Geant4 toolkit, reading PDFs and to watch Youtube videos about Geant4. I hope that helps.
On the topic of Geant4-based tools and interfaces, I’ve been working on an application called AIRPET that might be relevant here: AIRPET: Virtual Positron Emission Tomography
Its initial focus is PET imaging, but the goal is to provide a higher-level interface for setting up Geant4 simulations (geometry, sources, etc.) without requiring direct C++ programming. It’s still in development and definitely doesn’t cover the full flexibility of Geant4, but I thought I’d share it here in case it’s useful.
It’s open-source (see GitHub link in paper) and there’s an online demo: https://huggingface.co/spaces/airpet/airpet
Hi. thanks for your reply. I didn´t know about AIRPET; I took a look at the paper about AIRPET. It is interesting. In my opinion, it´s amazing and innovative the use of Artificial Intelligence / large language models (LLMs) and Geant4 to create AIRPET.
I´m going to read the full paper. I watched the online demo, it looks good. So, are you meaning that AIRPET is or will be a general purpose Geant4-based application asisted by Artificial Intelligence / LLMs?.
Hi. I have finished to read the paper about AIRPET. In my opinion, the paper contains interesting information. The paper about AIRPET is the first paper I have read that mentions Artificial Intelligence / LLMs as well as Geant4. Thanks
I would not claim it is “general” purpose. Following the discussion on this thread, it would be difficult to make an interface that covers everything one can do with Geant4. For now AIRPET is mostly for construction/organization of Geant4 geometry, running some basic simulations, and basic PET reconstruction. Geometry is restricted to GDML + attempts to facilitate CAD import, though this already covers quite some possibilities. There are some features like parameter optimization that need more testing. It’s probably most useful for fast prototyping, assisted by AI.
The online demo is a working installation of the program on HuggingFace, so you can actually try it out and ask the AI to make some geometry. Then add a source (“+GPS” button) and run some events (or ask the AI to do that too). Right now what is there works on the Gemini free tier, so there may be issues with availability at times. If so, try again after a few minutes - you can make your own free Gemini API key and add it (File —> Set Gemini API Key) if the AI runs out.
I’d be interested to know if you find it useful and what suggestions you have for improvement.
Hi. Thank you for all the information. I find AIRPET useful. I find AIRPET useful because it would be possible to do Geant4 simulations without programming in C++. I also find AIRPET useful because it would be possible to do Geant4 simulations with the help of Artificial Intelligence. Regarding the suggestions:
1.- I think that create a Geant4 interface that allows set up the geometry, material or materials (any type of material; being able to set up a basic material, a mixture or a composite material), the physics of the simulation and be able to select what type of simulation results we want (with a menu or buttons of the interface; for example: counts versus energy, counts versus time, etc.) would be a good improvement. It would also be useful if the following 2 options are possible: a) that the Geant4 simulation set up could be done through an interface (with a menu and buttons); b) that the Geant4 simulation could be done by asking the Artificial Intelligence to do so. Regarding option b), it would also be useful to ask the Artificial Intelligence to provide the Geant4 simulation code, to verify if it is correct or if some lines of code need to be corrected.
2.- Another improvement would be to take into account the possibility of obtaining Geant4 simulation results at the SteppingAction level, or at the EventAction level or at the RunAction level by selecting one of those options in the Geant4 interface menu, or by asking Artificial Intelligence to do so
3.- Another good improvement would be the following: Test AIRPET for a long time and many times; based on the results of those tests, improve AIRPET and the Artificial Intelligence as much as possible to get a better Geant4 based application and also to get better simulation results.
What is your opinion regarding those suggestions for improvement?.
Hallo, Unfortunately I called up the package on hugging spaces/face but did not get very far. This might be browser settings, but I think not (also I try to be very careful of changing security settings).
I do not see where I can put the AI input input. Perhaps a button might help here. Also a forum might be good. Presumably also you need to train the AI, which buttons work and which might.
This might also be the case of leading a horse to water but you can’t make him drink. Sorry, im not a fan of simply pushing buttons (I have had problems), im more text.
A separate forum I think is definitely a good idea. But this is for G4 to decide.
Hi. I agree with you that create a forum about AIRPET is a good idea. In addition, if more Geant4 experts and Artificial Intelligence experts collaborate, that collaboration could provide more suggestions for improvement, useful for AIRPET.
With a collaboration like the one I mentioned, it would be possible to create, for example, an Artificial Intelligence (like Gemini or Chatgpt), but specialized / trained only in Geant4 simulations (basic or advanced), which, I think, would be something new and possibly useful.
Thanks for the feedback! The AI input box should be at the bottom of the screen once the application is loaded, where it says: “Type a message or geometry instruction…”. Hopefully there are not too many issues with browser settings - I’ve seen it work on recent versions of Chrome, Firefox, and Safari, though I’m not sure if older browsers have problems displaying everything correctly. Perhaps a standalone application is best for something like this, though I had hoped that the web-app approach would avoid dependence on specific operating systems.
The AI is currently just using an already-trained LLM, and there are no functions within AIRPET to further train it. As time goes on, these models are improving, and now some quite powerful models are open-source can be hosted locally. Having an AI specialized to Geant4 would be great, though I haven’t looked into this. It would probably involve building an extensive training set.
Hi. thanks for your reply. Your reply has helped me understand better how AIRPET works. I was using AIRPET; I was able to ask the AI to add a primary particle source and a detector material to the simulation. I was also able to ask the AI to create a spherical detector.
I was also able to see the trajectories of the particles. I was also able to download the HDF5 file on my machine. I’ve never used HDF5 files, I don´t know how to open a HDF5 file, so, Could you tell me what I need to do (the steps) to open a HDF5 file?, please.
Another thing, Could the AIRPET simulation data be saved in a .txt or .root file in the future (so that ROOT can be used to open those files)?.
While I was using AIRPET, I couldn´t zoom in or zoom out the view of the simulation, Is there a way to do that?, or, Will zoom in and zoom out be included in AIRPET in the future?.
You can use tools like Python (h5py and/or pandas) to extract the hits from the HDF5 file: see this example in the GitHub.
To zoom in and out on the view of the simulation, try using the mouse wheel.
Hi. Thanks for your reply. Three things to say; I’m new to Python, therefore, Could you tell me the steps I need to follow in Python to extract the Data/ Hits from the HDF5 file?, please.
On the other hand, I installed HDFView on my machine, and I tried to see the data / Hits from the HDF5 file; After opening the HDF5 file, I noticed that there are “entries“; I also noticed that it’s possible to plot the data, however, I haven´t been able to plot the data, perhaps a tutorial could help me; or, Could you tell me the steps I need to follow to see the data / Hits and plot them using HDFView?, please.
My computer (laptop) doesn´t have a mouse wheel; Is there anything I can do to zoom in and out the simulation view without using the mouse wheel?.