SteppingAction,Sensitive detector. Can't GEANT4 use both methods at the same time

2020-08-11 10-34-27 的屏幕截图
2020-08-11 10-36-02 的屏幕截图

when I used SteppingAction to collect the information, the sensitive detector is not working.

an’t GEANT4 use both methods at the same time?

Hi,

Yes, it can. Try set your sensitive detectors in parallel world.

Thanks a lot!
Even the SteppingAction is not applyed in the sensitive detector, it also need to set it in parallel world?

No, the sensitive detector can work without parallel world. I think they both can. Using parallel world you can avoid overlapping geometry with your detectors. Did you register your detectors in G4SDManager?

I’m having a similar problem, I’m using steppingAction to collect information and it’s not working. I’m not sure if it’s related to using the sensitive detector

Both stepping action and sensitive detector can be used simultaneously. First, a sensitive detector will be called, and then a user stepping action.

Yes, SD and stepping action can be used simultaneously . May be you can post the error message so that we can find the issue.
Best,
Ananta

Thank you very much. Sorry for Lated reply.
Yes, the sensitive detector and stepping action can be used simultaneously. The issue in my process is due to the initial energy. The incident energy of heavy ions is to small to reach in SD, which is result in nothing can be collect in my SD.