Message: Re: Problem with GetProcessName() Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Problem with GetProcessName() 

Forum: Event and Track Management
Re: None Problem with GetProcessName() (Aram)
Re: None Re: Problem with GetProcessName() (Marc Verderi)
Date: 26 May, 2008
From: Aram <>

Hi Marc,

that is correct the problem arises only if I try to output to the screen (or assign to a G4String) the result of aTrack->GetCreatorProcess()->GetProcessName();

this can be easily tested if you copy those lines into the stepping action of novice example N02.

But that is true aTrack->GetCreatorProcess() is 0 for primary particles.

thanks, Aram

>>Hello Aram,
>>Have you checked that "aTrack->GetCreatorProcess() != 0" ? I would guess 
>>that primary particles (ie the ones produced by the generator, which are 
>>those having aTrack->GetTrack() == 1) do not have a 
>>"GetProcessCreator()" defined.
>>PS : I am a bit surprised that the lines :
>>  G4Track* aTrack = aStep->GetTrack();
>>  if(aTrack->GetTrackID()==1)
>>    aTrack->GetCreatorProcess()->GetProcessName();
>>do not show the problem... Do you confirm you don't have problems with 
>>these lines ?

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

 Add Message Add Message
to: "Re: Problem with GetProcessName()"

 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 ]