Sensitive Detector Output is Dependent on Detector Material

I’m using a sensitive detector in my simulation, and collecting output of x-ray hits using the sensitive detector/hit collection method. When my detector is constructed of air, I see no output to my histograms. However, if the detector is made of tungsten, I do get output. This is not ideal for what is meant to be a non-interacting virtual detector - is there something clearly wrong here?

It seems to not run the ProcessHits method of my SensitiveDetector.cc file at all unless the detector material has a larger density than vacuum/air - is this a step size issue?


1 Like

I’ve discovered the issue was this line:

if (aStep->GetPostStepPoint()->GetStepStatus()==fGeomBoundary){return true;}

I’d be interested to know if anyone knows why this would cause no readout? My understanding was it was included to ensure the output was created at the initial step in the detecting volume but perhaps this is not the case

An SD is not a physical “detector”. It’s the block of code which records the information about what happened inside the volume of material where it’s attached. You can think of it as a mini-SteppingAction which has the “if (volume == X)” already done.

So if you attach an SD to an air volume, you’re probably not going to see very many interactions, but if you attach it to a tungsten volume, you’ll see lots and lots of hits.

That condition says that if the track is exiting the volume (postStep is at volume boundary), don’t do anything, just quit the SD.

Hi,
Thank you, this is helpful! Is there a way to measure particles “passing through” a volume in that case (i.e. not necessarily stopping/scattering) but propagating through a given volume?

You need to make a custom stepping action that checks if the particle is inside the volume and assigns some action to it. What would you like to record?
One option could be that the stepping action checks that the pre-step was inside some other volume and the post-step was inside the monitored volume. Thus, you can gather information on what incident particles you get for a detector. I used such a way to monitor the incident angle in a detector stack for each layer to account for straggling and energy errors due to the 1/cos effect.