Unfortunately, I have forgotten to add the statement "return true" at the end of the G4bool ProcessHits() method. Before you run and test the code you have to add it there, otherwise, it might produce an error message.
You can visit the full playlist for watching all videos of this tutorial series:
https://www.youtube.com/playlist?list=PLLybgCU6QCGWgzNYOV0SKen9vqg4KXeVL
The code of the tutorials is now available on GitHub:
https://github.com/MustafaSchmidt/geant4-tutorial
0:00 Intro
0:37 Modifying Detector Construction
1:20 Adding Solid Volume
2:37 Creating Logical Volume
4:07 Defining Physical Volumes
9:10 Visualizing Geometry
10:30 Create Sensitive Detectors
14:58 Implementing Sensitive Detector
17:58 Photon Tracks Output
22:08 Kill Tracks
23:09 Output Digitized Hits
Twitter: https://twitter.com/MattersPhysics Discord: https://discord.gg/YYBzEuYeFe If you are interested in fundamental physics, you can visit my new website project: https://physicus.net/