I cannot find documentation on what G4VNestedParameterisation::GetMaterial(int) is supposed to do, and for that matter G4VNestedParameterisation::GetNumberOfMaterials().
Thank you! Just to confirm: I need to implement my own GetMaterial (for my class deriving from G4VNestedParameterisation), so the definition of CopyID seems to be entirely up to me.
This is in contrast with G4VNestedParameterisation::ComputeMaterial, which is more intuitive to implement, because I know it should return (and set…) the material for the nested volume. But I am not sure where GetMaterial is called and what it is supposed to do…
The CopyID of the volume depends on how the parameterised geometry has been done (order of subdivisions along X, Y and Z).
The GetMaterial(i) method in G4VNestedParameterisation is virtual. How I use it in my simulation is to return the material of voxel i. But it seems to me that the use of this method is optional to the user.
As far as I could tell, the method was called for all values of i from 0 to GetNumberOfMaterials()-1. If I did not go through one of the materials set in the volume, my program crashed. I do not think it is optional…