|Message: Re: Solid position - finding the global-to-local transformation for a physical volume||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Dear Kirill, A Solid can exist in many copies, at many locations inside many different volumes. I will interpret your question in terms of obtaining the transformation for a G4Placement physical volume, which is an instance of a logical volume that uses this solid. Even a G4Placement can represent many volumes in a detector: the logical volume in which it is placed can be used. World | | P1 P2 placement physical volumes (different) L1 L1 logical volume (same one) | | P3 P3 <== this placement appears twice ( it is the same instance, the same object in memory, but represents two distinct volumes in the physical setup. ) L2 L2 This means that the 'back' pointer from a physical (or logical) volume to its parent logical volume is not unique in some geometries. This one of the reasons that Geant4 does not offer the capability to do this in a simple way "out of the box". 1) If when you created a geometry in which each logical volume is used to create only one placement volume, and you have initialized the information of the back pointers, then it should be possible to go from a physical volume to its parent volume, all the way up the geometry tree - and thus 2) A more robust way is to calculate the composition of transformations, e.g. in the ConstructDetector method you use to build the geometry 3) Else, if you can make an approximate calculation of the transformation, you can use an inverse procedure: - locate a point which should be in the physical volume of interest using the Navigator's LocateGlobalPointAndSetup method - If you get the 'correct' answer, ie the physical volume you are interested in, then create a 'Touchable' and ask for its transformation. You will need to be sure that either you have only one copy of this volume, or 4) You could also randomly sample points within a box (or sphere) around the approximate location in order to find a 'hit', as in 3). You can also try to use the 'GPS' module - the General Particle Source, in particular if you want your source to have other complex properties which it can provide. Good success, John =================================================== John Apostolakis, PH Department, CERN On Feb 26, 2014, at 9:17 PM, Kirill wrote: > > *** Discussion title: Geometry > > Hello! > > I want to know how can i get position (in the global coordinate system, > not local) some solid in the complex geometry (with rotations, > replications, assamblies) at initialization level. So to place a > particle generetor at the same position. > > Thanks! > > ------------------------------------------------------------- > Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: > http://hypernews.slac.stanford.edu/HyperNews/geant4/get/geometry/1326.html