Missing energy in the SensitiveDetector

Hello,

I do not understand why in some cases the ProcessHits method of my SensitiveDetector class was not called when the particle hit the cell volume (defined as Sensitive Detector). I investigate using /tracking/verbose.
For example, the /tracking/verbose information shows that for the main particle, in the steps 17 and 26 there was energy deposit but I did not get my debug message « THGCalSD::ProcessHits ». In the case of the secondary particle, in the step 10, I got it.
I did not use any cut in the simulation.

Any ideas why this happens or how to investigate further?

Thank you!

G4WT0 > -> Event: 0
G4WT0 >
G4WT0 > *********************************************************************************************************
G4WT0 > * G4Track Information: Particle = e-, Track ID = 1, Parent ID = 0
G4WT0 > *********************************************************************************************************
G4WT0 >
G4WT0 > Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
G4WT0 > 0 0 0 -120 5e+04 0 0 0 World initStep
G4WT0 > 1 0 0 -6.42 5e+04 0.0202 114 114 Absorber Transportation
G4WT0 > 2 7.18e-05 -3.71e-05 -5.67 5e+04 0.79 0.75 114 Absorber eBrem
G4WT0 > 3 8.24e-05 -4.86e-05 -5.49 4.93e+04 0.23 0.184 115 Absorber eBrem
G4WT0 > 4 0.000103 -0.000112 -5.15 4.36e+04 0.377 0.333 115 Absorber eBrem
……………………….
G4WT0 > 14 0.00121 -0.00284 -1.96 8.36e+03 0.217 0.212 118 Absorber eBrem
G4WT0 > 15 0.00211 -0.00429 -0.82 8.36e+03 1.58 1.14 119 World Transportation
G4WT0 > 16 0.00216 -0.00463 -0.32 8.36e+03 0.000151 0.5 120 Cell Transportation
G4WT0 > 17 0.00219 -0.00485 0 8.36e+03 0.095 0.32 120 World Transportation
G4WT0 > 18 0.00241 -0.00607 1.58 8.36e+03 0.000229 1.58 122 Absorber Transportation
G4WT0 > 19 0.00276 -0.00654 2.41 8.36e+03 0.937 0.829 122 Absorber eBrem
……………………………….
G4WT0 > 24 0.00384 -0.0117 7.18 3.58e+03 0.0537 0.0305 127 World Transportation
G4WT0 > 25 0.0039 -0.0124 7.68 3.58e+03 0.000153 0.5 128 Cell Transportation
G4WT0 > 26 0.00393 -0.0129 8 3.58e+03 0.112 0.32 128 World Transportation
G4WT0 > 27 0.00714 -0.0365 27.5 3.58e+03 0.00412 19.5 148 World eIoni
G4WT0 > 28 0.0257 -0.149 120 3.58e+03 0.0195 92.5 240 OutOfWorld Transportation

G4WT0 > *********************************************************************************************************
G4WT0 > * G4Track Information: Particle = e-, Track ID = 135, Parent ID = 116
G4WT0 > *********************************************************************************************************
G4WT0 >
G4WT0 > Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolume ProcName
G4WT0 > 0 -0.00666 0.03 2.23 72.3 0 0 0 Absorber initStep
G4WT0 > 1 -0.000328 0.0208 2.65 70.8 0.512 0.412 0.412 Absorber eBrem
G4WT0 > 2 0.103 -0.127 4.65 66.5 2.62 2.03 2.44 Absorber eIoni
G4WT0 > 3 0.805 -0.945 5.52 64.1 1.71 1.38 3.83 Absorber eBrem
G4WT0 > 4 1.22 -1.92 6.24 54.9 1.77 1.28 5.11 Absorber eBrem
G4WT0 > 5 1.46 -2.48 6.8 53.4 1.18 0.826 5.94 Absorber eBrem
G4WT0 > 6 1.49 -2.59 6.88 53 0.171 0.142 6.08 Absorber eBrem
G4WT0 > 7 1.55 -2.75 7.02 39.4 0.241 0.226 6.31 Absorber eBrem
G4WT0 > 8 1.61 -2.93 7.18 39.1 0.263 0.245 6.55 World Transportation
G4WT0 > 9 1.74 -3.49 7.68 39.1 5.92e-05 0.762 7.31 Cell Transportation
G4WT0 > 10 1.83 -3.85 8 39 0.176 0.488 7.8 World Transportation
G4WT0 > THGCalSD::ProcessHits
G4WT0 > 1 cellID: 121 volPos: (2,-3.464101615137754,8) edep: 0.1758702335547624
G4WT0 > 11 11.7 -38.5 39.2 38.9 0.00677 47.6 55.4 World eIoni
G4WT0 > 12 16.3 -55 54.2 38.9 0.00298 22.8 78.3 World eIoni
G4WT0 > 13 34.6 -120 113 38.9 0.0185 89.6 168 OutOfWorld Transportation

Hi Emilia

It does indeed look strange. Are you sure your output statements are called in all circumstances?

Could you compile in Debug mode, then run in a debugger and put a breakpoint at the start of your ProcessHits method, and see what is happening?

John