Problem 1325 - the nReplicas in G4Parameterised and NbOfVoxels in G4PhantomParameterisation
Summary: the nReplicas in G4Parameterised and NbOfVoxels in G4PhantomParameterisation
Status: RESOLVED INVALID
Alias: None
Product: Geant4
Classification: Unclassified
Component: geometry/navigation (show other problems)
Version: 9.5
Hardware: All All
: P5 trivial
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2012-06-18 17:58 CEST by Fada Guan
Modified: 2012-07-03 12:35 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Fada Guan 2012-06-18 17:58:07 CEST
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
Comment 1 Gabriele Cosmo 2012-07-03 12:35:56 CEST
Your assumptions are simply wrong. The total number of voxels (NbOfVoxels) does NOT correspond to the number of replicas on one axis (nReplicas).