|Message: Re: Materials for G4OpticalPhoton simulation||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)|
Thanks for the quick reply! Your answers to 3) and 4) go a long way towards solving my problems. For 1) and 2), it seems I've oversimplified the description of my geometry for the sake of making the question more concise. The geometry isn't really a voxelization, and I don't implement it using a parameterized volume. It's a mesh of tessellated solids generated from a CAD model. I've got a big world box, and in that box I place a large number (millions, maybe more in the future) of G4TessellatedSolids. They are all direct daughters of the world. Each cell has a different shape, so each cell gets its own solid and logical volume. In the end, the number of logical volumes equals the number of cells - The only way not to spend time in G4ProductionCutsTable::ScanAndSetCouple is to reduce the number of G4Materials.
The simplest way to think of the geometry is probably as a tunnel filled with an absorbing/scattering medium. The shape of the tunnel wall is nontrivial, and the properties of the medium changes rapidly along the tunnel. The tunnel wall is not a problem because all of its cells can use the same material. But in the absorbing/scattering medium, each cell needs to have its own G4MaterialPropertiesTable.
5) Can I give the cells in my medium unique G4MaterialPropertiesTables without also giving them unique G4Materials? Technically I guess I could build a data structure to store all the geometry info myself, wrap it in a parameterized volume and assign PropertiesTables in ComputeMaterial. But that feels a bit unnatural (the motivation for parameterized volumes is less memory consumption, which doesn't apply here) and messy from a design perspective.
For the sake of completion, I should add that reflection is assumed to take place only on the wall-medium boundary. All the medium cells are assigned the same refractive index. It's the absorption and scattering properties that change.
When it comes down to it, I can probably afford giving each cell a unique material memory-wise. The real problem is the time spent in ScanAndSetCouple. I don't have a full understanding of the initialization procedure, but it feels like an easy solution could be to let the user opt out of calling G4ProductionCutsTable::UpdateCoupleTable.
6) Would there be any consequences of skipping UpdateCoupleTable in a simulation where no physical process creates new particles? It is feasible to add an opt-out functionality?