|Message: Re: Logical Border Surface - How to use logical volume vs physical?||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)|
On Fri, 20 Oct 2017 17:02:55 GMT, Scott Dow wrote:
> So I am using placement volumes in a for loop to achieve what might > normally be done in a parameterised volume - placing cylinders in a > hexagonal array. This is due to the execution time being terrible > otherwise. This works well to speed up my simulation, however, I have an > issue now where I'd like to specify surface properties for different > sides of the cylinders based on which surface they are touching. I can't > use logical skin surfaces because the surface properties aren't the same > for all surfaces. > > The problem is this: logical border surfaces are specified using > physical volumes in an ordered pair, not logical volumes. So either I > need a way to loop through and assign a logical border surface to the > physical volume of each and every cylinder, or I need a way to specify > an logical border surface with a logical volume instead of a physical > volume! Not sure where to start for this.
Unfortunately, you can't. Border surfaces are only definable with a pair of PVs. I have the same problem in my own simulation geometry, for a similar reason. There are a couple of ways you can work around it; neither are pretty :-/
Below, I will presume that you are not making border surfaces for adjacent cylinders. Since they only touch at a tangent line, the border surface will have zero measure. Instead, I guess that you are making border surfaces for each endcap of the cylinder, touching some other volume (the mother or a sibling).
First, you can maintain for yourself a "registry" of the desired PV pointers as you construct your full geometry. Then, once your geometry is built but before you "close" it, go through that registry and use the PV pairs to create the border surfaces you need. Think of it as being analogous to the "ConstructSDandField()" function, but you call it yourself towards the end of "Construct()" in your geometry class.
Second, if your cylinders all share some common name, you can go through at the end of Construct() and scan the G4PhysicalVolumeStore for all PVs with that name string, and build the appropriate border surfaces for each of them (along with whatever the other PV is that you need).
In either case, you get to write all the code yourself :-/
-- Michael Kelsey
|Inline Depth:||Outline Depth:||Add message:|