How to record time of arrival?

Hello!
I am relatively new to Geant4. I have simulated a scintillation detector and want to record the arrival times of optical photons arriving at the photocathode of a photomultiplier tube. So I want to end up with a plot of amplitude against time. Can anyone give me some guidance on how I would do this? I have assigned the photodetector as a sensitive detector to record ‘hits’ - Do I use GlobalTime() to get time of arrival? And how can I get a histogram of amplitude against time for this?

Thank you!

A couple of generic comments (I don’t have specific answers):

  • there are various examples that do similar things. Have a look, and if you need help modifying one, let us know.
  • the questions don’t appear specific to optical photons. You are more likely to get an answer by removing reference to optical photons where possible.
1 Like

As far as I know there are two ways to do so:

  • User defined stepping action. In your stepping action you can put a condition (if volume == myvolume & if particle == myparticle) and save the global time
  • Via hits you can define a sensitive detector and save the global time when the desired particle is registered in the hit

Focusing on your problem, with these two methods you are going to get only the time of arrival of each photon on the pmt. To get an amplitude you have to either simulate the signal in Geant or via an external software.

Mind that in some case just knowing the number of photons on the cathode might be enough. You can also consider a certain pde when registering the photons number in the stepping action.

1 Like

Thank you for your reply. My aim is to get the amplitude of the signal so I can look at the pulse shape.

Unfortunatly Geant does not include the signal generation from your detector. That is something that you have to develop by yourself. You can either write a C++ function/library that does it and include it in the stepping action/event action or you can extract and save the arriving time of each photon and simulate the detector response after the geant simulation.

As I said before this is the final step of the simulation. I think that you can do a lot just with the information of the number of photons detected by the pmt (maybe including pde and time). Then if everything is working you can start to implement the signal digitization step but before doing so I would check that everityng is working fine using just the simple information I mentioned before.

1 Like

Thank you for your help.