Message: Re: possible flagging the process at the prepoint ? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Idea Re: possible flagging the process at the prepoint ? 

Forum: Event and Track Management
Re: Question possible flagging the process at the prepoint ? (David Sangcheol Lee)
Date: 05 Oct, 2018
From: filippo <filippo>

Hi,

You must be sure that the Pre/PostStepPoint exists. You also have to test if the creator process pointer is not NULL, primary particles don't have a "creator process" so if you ask the simulation for the creator process you usually obtain a SIGSEV.

Try to put something like:

if (theStep->GetPre/PostStepPoint() !=0) ...your statements...

and then if it exists you can then test for the CreatorProcess: In my simulation I use:

G4string theCreatorProcess = "test";

if (theStep->GetPre/PostStepPoint()->GetCreatorProcess()!=0) {

theCreatorProcess = theStep->GetPre/PostStepPoint()->GetCreatorProcess()-> GetName();

}

else

theCreatorProcess = "primary";

Hope this help

Best regard

Filippo

On Wed, 03 Oct 2018 12:51:04 GMT, David Sangcheol Lee wrote:

> Hello, I have a question regarding about GetProcessDefine parameter.
> 
> Suppose I have following line to identify the process involved
> 
> theStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
> 
> Can it be started from PreStepPoint instead of PostStepPoint()?
> 
> I tried this and I have segmentation error.
> 
> The gdb debugger shows that the error comes from the string if I put it
> as PreStepPoint().
> 
> I appreciate all your help.
> 

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

1 Ok: Re: possible flagging the process at the prepoint ?   (David Sangcheol Lee - 08 Oct, 2018)
(_ Feedback: Re: possible flagging the process at the prepoint ?   (Michael H. Kelsey - 08 Oct, 2018)
(_ Question: Re: possible flagging the process at the prepoint ?   (David Sangcheol Lee - 09 Oct, 2018)
(_ None: Re: possible flagging the process at the prepoint ?   (Mike Kelsey - 09 Oct, 2018)
(_ Ok: Re: possible flagging the process at the prepoint ?   (David Sangcheol Lee - 09 Oct, 2018)
 Add Message Add Message
to: "Re: possible flagging the process at the prepoint ?"

 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 ]