I construct a G4PhantomParameterisation and register my own scorer class (that derives from G4VPrimitiveScorer) containing a ProcessHits method. If I call SetSkipEqualMaterials(false) in my geometry construct chain, I get no hits in the sensitive detector associated with the G4PhantomParameterisation. If I use SetSkipEqualMaterials(true), it is fine and I get calls to my ProcessHits method as expected. I tried to reproduce with examples/extended/medical/DICOM, but that doesn't score dose with either setting for SetSkipEqualMaterials. The output file dicom.out is empty with either setting. This is also a regression in 4.9.4; the example works for 4.9.3. I will open a separate bug for the example. This is a new issue in 4.9.4 and 4.9.4.p01. Version 4.9.3.p02 works fine.
Filed Problem 1210 about the DICOM example problem that may be related.
Created attachment 108 [details] correct the name of SD There is a bug int the DICOM example: the name of the SD starts with a capital in one place and not in the other. Could you check if it happens the same in your case? It should read: ./src/DicomRunAction.cc: theSDName.push_back(G4String("phantomSD")); ./src/DicomDetectorConstruction.cc: G4String concreteSDname = "phantomSD"; Pedro
This fixed Problem 1210, but not this one. But now you can use this dicom example to reproduce the problem. Run the example as dicom run.mac It will write dose to the file dicom.out. If you add the line param->SetSkipEqualMaterials(true); at, say, line 95 of RegularDicomDetectorConstruction.cc, you will find that no dose is scored. You can change true to false and see that it works again.
I did what you say, using geant4.9.4.p01, and I do get a dose: Number of events processed : 100 User=1.81s Real=1.83s Sys=0.01s ###### EndOfRunAction ============================================================= Number of event processed : 100 ============================================================= opened file dicom.out for dose output Voxel | DoseDeposit | 8127 6.45217e-20 Gy 8128 7.14331e-20 Gy 8255 5.7546e-20 Gy 8256 6.20639e-20 Gy 8383 2.38152e-21 Gy 8384 2.39943e-20 Gy 24511 8.84293e-20 Gy 24512 6.2932e-20 Gy 24639 4.94702e-20 Gy 24640 5.99939e-20 Gy 40895 8.8007e-20 Gy 40896 5.57992e-20 Gy 41023 5.07102e-20 Gy 41024 6.33292e-20 Gy 41151 1.75917e-21 Gy =============================================
My apologies. I meant to say add the line param->SetSkipEqualMaterials(false); There is a bug when you do *not* skip boundaries between equal materials.
Created attachment 109 [details] Output with SetSkipEqualMaterials(true)
Created attachment 110 [details] Output with SetSkipEqualMaterials(false)
Without skipping I get no dose at all, even running 10000 events. I've attached the output of my simulation runs with SetSkipEqualMaterials(true) and SetSkipEqualMaterials(false). You can see that there is no dose reported in false.out.
Created attachment 111 [details] Output with SetSkipEqualMaterials(true)
Created attachment 112 [details] Output with SetSkipEqualMaterials(false)
fix will be included in the next patch and releases
(The fix has been provided to the person reporting the issue.)