Message: Re: fGeomBoundary and SensitiveDetector problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: fGeomBoundary and SensitiveDetector problem 

Forum: Event and Track Management
Re: Question fGeomBoundary and SensitiveDetector problem (Gergely Soti)
Re: Disagree Re: fGeomBoundary and SensitiveDetector problem (Gumplinger Peter)
Re: More Re: fGeomBoundary and SensitiveDetector problem (Gergely Soti)
Date: 20 Jan, 2009
From: Gumplinger Peter <Gumplinger Peter>

Hello Gergely,

As you know, ProcessHit is called for the first time after the first step inside your sensitive detector. At that moment, the track's kinetic energy has already been reduced by the energy lost during that first step. You could use UserTrackInformation (G4VUserTrackInformation) to store the kin. energy of the track when it enters your SD - in SteppingAction, and then retrieve the info in ProcessHit. A bit cumbersome, I admit, but it follows the G4 design. Or, you can be clever, and simply add the energy lost during your first step to the kin. energy of your particle, and bingo!

Peter

P.S. G4double edep = aStep->GetTotalEnergyDeposit();

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 More: Re: fGeomBoundary and SensitiveDetector problem   (Gergely Soti - 22 Jan, 2009)
(_ Sad: Re: fGeomBoundary and SensitiveDetector problem   (Gumplinger Peter - 22 Jan, 2009)
 Add Message Add Message
to: "Re: fGeomBoundary and SensitiveDetector problem"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]