for specific reasons I’m trying to score the deposited energy in a volume using a WrapperProcess class I have registered to all of the processes in my physics list.
I’m doing this using :
if(step->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()->GetRegion() == sensitiveAirRegion)
G4double total = step->GetTotalEnergyDeposit();
G4double dose = total*step->GetPreStepPoint()->GetWeight();
Then I sum up the GetEnergyVar in Run.
To compare this with a similar implementation that’s already part of Geant I’m using a G4MultiFunctionalDetector, also scoring the energy.
But if I compare the numbers of G4MultiFunctionalDetector and my own scoring algorithm in Run I can see that they differ. Less energy is scored in my process class than in the G4MultiFunctionalDetector map.
This can also be seen accessing the energy deposit from SteppingAction. For some processes, the step in Sepping Action has a value for the energy deposit, but if I access the step via the Wraping Process, there’s no energy at all.
As I’m quite new to Geant4, can anybody see some general misconception?