Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Hello,
I’m a newbie of geant4.
And I have a question.
I created a detector by arranging rectangular parallelepiped pixels of the same size in a 21*41 grid, and each pixel of the detector was numbered from 0 to 860.
I want to record the pixel number corresponding to the location where the primary particle is StopAndKill, and I would like to know how to deal with it conventionally if it becomes StopAndKill at the “intersection of the grid” or the “boundary of the two pixels”.
When I tested it (I shot the particle at the intersection of the detector and checked the incident pixels), one of the values of four or two adjacent pixels was recorded at the intersection or the boundary of two pixels.
However, in reality, I think it is impossible for particles to exist on the boundary accurately, so I think the above results are wrong.
I guess boundary issues might be very common in geant4 simulation, and I would like to know how experts at geant4 cope with these situations to overcome the limitations of these simulations.
The question is really do you have actually segmented silicon or if its only the readout (of a monolithic slab) that you have. If it is the former than a signal generated in one pixel, even if its boundary, would not induce a signal in another at least related to the charge (electronic cross talk would be outside what Geant4 is designed for). If it is the latter than it is better to just record the x, y, z of the particle at rest. But really you would want to know the entire track history. So it depends on what you are doing or trying to model.
If you just want to know where the particle is stopped than the easiest thing would be to overwrite PostUserTrackingAction. PostUserTrackingAction is called whenever the track ends including if it triggers AtRest processes or is killed. You could check that the particle is your particle type of interest and just record the x,y, and z position there. If the silicon is pixelated you could use paramterized geometry placement which would allow for you to assign a pixel ID to the individual pixel. If its a slab, then just keep the x, y, z and handle later.
In my case, I’m dealing with segmented silicon.
In your answer, “If it is the former than a signal generated in one pixel, even if its boundary, would not induce a signal in another at least related to the charge.”
I have a few more questions.
It’s a very small probability, but if the particle ended the process at exactly the boundary of two pixels, for example, if the particle stopped at the complete boundary between pixel 1 and pixel 2, should this particle be stopped at pixel 1 or stopped at pixel 2, or should I exclude such low probability cases?
I’ve personally considered this approach:
What do you think about making a gap between each pixel less than the minimum distance recognized by geant4, wrapping all the pixels using silicon, and excluding the event that the particles come to rest in the gap between each pixel?
I know that this would happen rarely, maybe I’m just concentrating on unnecessary things.
But I want to know about the experts’ ideas or conventions as a newbie geant4 user.
I really thank you for your apply, it helps me a lot! Thank you.
I am not sure why you are expecting such events to take place. There should be no “boundary” cases since the volumes should not overlap. If the pixels are sensitive, than a particle will only ever interact with/stop in 1 pixel at a time.
What do you think about making a gap between each pixel less than the minimum distance recognized by geant4
There is no such distance outside of floating point errors. The production cut range for charged particles is to avoid runaway infrared cascade.