Sensitive Detector ProcessHits

I am trying to implement a Sensitive Detector for several pieces of silicon in a instrument design.

The creation of the SD and assignment to the relevant logical volumes seems ok (as far as I can tell) and the SD::Initialize and SD::EndofEvent get called when I shoot a photon at the silicon, but I am having a tough time trying to understand why SD::ProcessHits never gets called at each step while there is a track in the Silicon.

I can see by having tracking/verbose at 2 that the photon (5.9keV) and the resulting secondaries are interacting as expected in the silicon, but the kernel is just not calling SD::ProcessEvents, so I am unable to extract the hit info I need.

If anyone has any suggestions or tricks on how I might debug this problem, I would be most grateful to hear from you.


I set a breakpoint in a user stepping action to query what was going on when I was going thru what I believe was the sensitive detector volume. and found something I cannot explain, which may be related to the problem.
For context, I am reading in my geometry via a GDML file and using the example G04 example in persistency as a guide.

But when I look at the information about the logical volume, there is a “_refl” appended to the name that I did not expect.
(i.e I expected “DEPFETB0x__2474515599744__vol_refl” to be “DEPFETB0x__2474515599744__vol”

I am not sure what created DEPFETB0x__2474515599744__vol_refl, as I did not explicitly do it.

Hi Richard,
the appended “_refl” string means that the original geometry from which your GDML was generated, includes reflected volumes (or tree of volumes). Therefore those volumes with “_refl” appended belong to the reflected tree of volumes.
Cheers, Gabriele

Ok, when the GDML parser generates DEPFETB0x__2474515599744__vol_refl, it is not making it a sensitive volume like DEPFETB0x__2474515599744__vol (ala Example G04), since DEPFETB0x__2474515599744__vol_refl is not explicitly defined in the GDML file.

Is there anyway to get the GDML parser to make sensitive the reflected logical volumes it creates?

Sensitive detectors are not part of the GDML schema. Example G04 shows how to define the association with sensitive detectors as custom auxiliary information and demonstrates how to import a GDML file with such information built-in. You need to define such association in your GDML file explicitly.

Yes, I am doing that now I know to look for DEPFETB0x__2474515599744__vol_refl in the Logical volume store after I read in the gdml file and set it to be sensitive. I am now seeing SD::ProcessHits being called, which seems like progress. But the problem, it is being called with a valid G4Step* , but the G4TouchableHistory* is NULL causing a fault. I suspect that may be another issue.