Message: Re: problem about prestep and poststep Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: problem about prestep and poststep 

Forum: Event and Track Management
Re: Question problem about prestep and poststep (Xiaosong Yan)
Date: 06 Nov, 2014
From: Gumplinger Peter <Gumplinger Peter>

Hi Yan,

>      I implement the process in the processhits method as:
> if ( aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary ){..}

>      But I'm not sure whether this step can be the step when the photon just leaves the SD volume, because there is possibility that the prestep is at the fGeoBoundary but the poststep is outside the SD. Then I tried to implement some more sentences like:
> 
> if ( aStep->GetPreStepPoint()->GetStepStatus() == fGeomBoundary ) {
> 
> G4cout<<"Pre Volume: "<<aStep->GetPreStepPoint()->GetPhysicalVolume()->GetName()<<G4endl;
> G4cout<<"Post Volume: "<<aStep->GetPostStepPoint()->GetPhysicalVolume()->GetName()<<G4endl;}
> 
>     I found that the prestep volume is the SD volume, while the post step volume is another volume.

Yes, this is the first step inside the SD volume. The PostStep point is in your case pointing into the next volume (behind) the SD volume; e.g. the step crosses your entire SD volume.

 I just can't understand the result, I just expect the prestep volume shoud be some other volume and the post volume should be the SD volume because the photon is just incidenting on the SD volume.

It is the PostStep point that has the StepStatus == fGeomBoundary when a track arrives at a boundary. It is the PreStep point that has the fGeomBoundary status for the first step in a new volume. That step may or may not cross the entire new volume.

Peter

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

1 Agree: Re: problem about prestep and poststep   (Xiaosong Yan - 06 Nov, 2014)
 Add Message Add Message
to: "Re: problem about prestep and 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 ]