Message: Re: Checking if certain coordinate is inside a certain volume Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Ok Re: Checking if certain coordinate is inside a certain volume 

Keywords: Volume location, geometry
Forum: Geometry
Re: Question Checking if certain coordinate is inside a certain volume (Ioannis Sechopoulos)
Date: 10 May, 2006
From: John Apostolakis <John Apostolakis>

Dear Gianni,

You can use the LocateGlobalPointAndSetup method of the G4Navigator to locate a point. If you need you can also use the ComputeStep method to find whether a ray hits a particular part of your setup.

This method returns a physical volume, which in a simple setup is enough to identify your volume. If your setup is complex, I suggest that you use a touchable and the method LocateGlobalPointAndUpdateTouchable. In case your point is on a boundary (within the tolerance), use the direction to help decide which side.

Please search the documentation for the G4Navigator and these methods for further details -- or look at the Geant4 source code on LXR at http://www-geant4.kek.jp/LXR/ Searching for the file name G4Navigator.hh should give you its interface.

In particular the Geant4 User's Guide for Application Developers, eg at http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/index.html

Section 4.1.8 is on the Navigator: http://geant4.web.cern.ch/geant4/G4UsersDocuments/UsersGuides/ForApplicationDeveloper/html/Detector/geomNav.html

To get a pointer to the Navigator for your geometry you can use G4TransportationManager, and its GetTransportationManager and GetNavigatorForTracking methods.

Regards John Apostolakis

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

 Add Message Add Message
to: "Re: Checking if certain coordinate is inside a certain volume"

 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 ]