Message: GetTotalEnergyDeposit in PreStep or PostStep? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None GetTotalEnergyDeposit in PreStep or PostStep? 

Forum: Event and Track Management
Date: 11 May, 2012
From: Bo <Bo>

Hello,

I'm confused about the TotalEnergyDeposit.I see in TestEm5 and G4PSDoseDeposition, the Energy is deposited in the preStep.

However, in TestEm11, the energy is deposited in a random point between pre and post steps, see following:
 G4ThreeVector prePoint  = aStep->GetPreStepPoint() ->GetPosition();
 G4ThreeVector postPoint = aStep->GetPostStepPoint()->GetPosition();
 G4ThreeVector point = prePoint + G4UniformRand()*(postPoint - prePoint);
 G4double x = point.x() + 0.5*detector->GetAbsorSizeX();  
 histoManager->FillHisto(1, x, edep);  

I wonder which one is better and more reasonable.

Thanks in advance.

Bo

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

1 Feedback: Re: GetTotalEnergyDeposit in PreStep or PostStep?   (Gumplinger Peter - 11 May, 2012)
2 None: Re: GetTotalEnergyDeposit in PreStep or PostStep?   (michel maire - 11 May, 2012)
 Add Message Add Message
to: "GetTotalEnergyDeposit in PreStep or PostStep?"

 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 ]