Energy deposition curves shown zero deposition while the interaction is occuring

I am willing to modify the exampleB1 such that it could return energy deposition of gamma - rays in the fscoringvolume only. In order to do this, I have edited B1SteppingAction, B1RunAction and B1EventAction classes. (3.2 KB) (4.4 KB) (3.3 KB)

And, I used FTFP_BERT as my physics list.
After doing this modification in codes, It returns B1.root file which shows me the histogram:

Where I got all those 10^5 entries at zero energy deposition (shown by a red dot). But the Geant4 simulation shows several interactions of gamma rays inside the fscoringvolume.
If someone could tell me where the problem can lie on?