Dear All: I built a meshed phantom using G4PVParameterised and a derived class from G4PhantomParameterisation. For example, I assumed the number of voxels along three axes are NbOfVoxelX, NbOfVoxelY, and NbOfVoxelZ. The total number is NbOfVoxels = NbOfVoxelX*NbOfVoxelY*NbOfVoxelZ There is a pointer param pointing to an object of myclass MyPhantomParameterisation derived from G4PhantomParameterisation. I set the number of voxels using below method. param->SetNoVoxel(NbOfVoxelX,NbOfVoxelY,NbOfVoxelZ); Finally, I built this prameterised physical volume like below: G4PVParameterised * patient_voxels_phys = new G4PVParameterised("PatientVoxels", voxel_logical, patientContainerLogical, kXAxis, NbOfVoxels,//nReplicas member param); The correct and reasonable value of nReplicas in building the parameterised geometry should be NbOfVoxels here. Yes, there wasn't any problems for visualization and running until now. However, if I changed the value of nReplicas to a smaller number, like NbOfVoxels/3 or other smaller number, somthing happened. For visualization, only first one third of the total voxels were shown. But for running, there was no significant difference between the two cases in the simulation results, like enery deposition in the whole phantom. So, my conclusions are: 1, for running the problem, the number of voxels came from "param" (G4PhantomParameterisation) 2, for visulization, the number of voxels shown came from "nReplicas" used in G4Parameterised class. Now, my question is: When and where is the nReplicas invoked in visualization and running? My suggestion is: Adding a judging statement if the nReplicas is not equal to the total number of voxels in parameterisation. Thanks a lot. Best regards. Fada
Your assumptions are simply wrong. The total number of voxels (NbOfVoxels) does NOT correspond to the number of replicas on one axis (nReplicas).