Hi. In a Geant4 simulation, Can the energy deposited in an element of a detector be considered as a “Count”?. Once I get these “Counts“, I want to make a histogram of “Counts“ versus energy
Yes, this is very basic functionality in every detector based example. I mean this in the kindest way I can that the best way to learn how to use Geant4 is to just use Geant4. The basic examples and, later on, the extended examples are meant to operate as tools to learning a lot of the tools in the immense Geant4 toolkit. The documentation, especially the installation and application guide, will be very important to read thoroughly and look back to often.
The general pathway for “learning Geant4” is to run a few of the basic examples which have tutorials, youtube videos, or online free courses. Then to find the example that most closely resembles your use case to modify. You won’t hopefully be writing too much C++ from scratch and, if anything, Geant4 can be a great example of learning by doing to C++ code. I understand it seems daunting at first but you just have to start working with it in a way that brings you to your end use case as fast as possible. There is no free lunch.
Also as I have mentioned in your other threads, there are python wrapper libraries if that makes things less daunting so you aren’t learning C++ and Geant4 at the same time. At some point you will likely want to switch to C++ since installation and coordination between codebases in two different languages will get frustrating at some point such as, for example, updating Geant4.
Ok, thank you for your reply. Your answer has helped me. I’m going to take your advices into account. Therefore, I’m going to have to just use Geant4, first a few of the basic examples, then a few of the extended examples, and maybe afterwards take a look at the advanced examples. I agree with you that Geant4 is a great example for learning to code in C++.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.