Message: Re: problem getting volume name Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: problem getting volume name 

Forum: Geometry
Re: Question problem getting volume name (Summit)
Date: 16 Sep, 2011
From: Marc Verderi <Marc Verderi>

Hello Summit,

     This is the typical trap with the PostStepPoint : when arriving at 
the world boundary, the PostStepPoint volume (ie the one in which the 
next would go) is zero : there is no volume beyond the world volume. So 
your crash is due to the fact the GetPhysicalVolume() returns 0 , while 
your are calling GetName() on it.
     BTW, please let me remind you that a step always occurs in the 
PreStepPoint volume : if you use the PostStepPoint volume to assign 
whatever occured in the step, you would assign things to the wrong volume.

Cheers,
Marc

Le 16/09/2011 14:57, Summit a écrit :
> *** Discussion title: Geometry
>
> Hello Geant4experts,
>
> I tried to divide detector in tallies. In order to get fluence of
> particle after tally, i included
>
> G4cout<<"Post Volume:
> "<<step->GetPostStepPoint()->GetPhysicalVolume()->GetName()<<"\n";
>
> but I am getting segmentation fault
>
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: slice1
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
> Post Volume: Absorber
>
> Post Segmentation fault
>
> any suggestions please
>
> thanks
>
> Summit
>
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at:
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1150.html

 Add Message Add Message
to: "Re: problem getting volume name"

 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 ]