Message: Re: Logical Border Surface - How to use logical volume vs physical? Not Logged In (login)

## Re: Logical Border Surface - How to use logical volume vs physical?

Forum: Processes Involving Optical Photons
Re: Logical Border Surface - How to use logical volume vs physical? (Scott Dow)
Date: 20 Oct, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

 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:

1 Re: Logical Border Surface - How to use logical volume vs physical?   (Scott Dow - 24 Oct, 2017)
Re: Logical Border Surface - How to use logical volume vs physical?   (Mike Kelsey - 24 Oct, 2017)
 to: "Re: Logical Border Surface - How to use logical volume vs physical?"
This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews