Where does G4VPVParameterisation::ComputeDimensions get called in the source code?

Hi folks,

Today I’ve been working on creating a concrete instance of G4VPVParameterisation, and it occured to me that I don’t have a strong knowledge of how Geant4 handles these or G4PVReplicas. So to be clear, my question is not how to create or work with a G4VPVParameterisation, I’m comfortable with them and am familiar with the documentation out there.

My question is, once I’ve created my G4VPVParameterisation, and passed it to G4PVParameterised, where do the ComputeDimensions and ComputeTransformation functions later get called from in the Geant4 source code? I can see that the G4PVParameterised takes the parameterisation and stores it in the fparam pointer, but not what is done with it later. I understand that G4VPVParameterisation inherits from G4PVReplica, which inherits from G4VPhysicalVolume, so I assume that the code I’m looking for is inherited from some other class, but I haven’t been able to find it.

Thanks in advance for your help and pointing me in the right direction,


They are called during navigation, for example in G4Navigator::SetupHierarchy().
A search for case kParameterised should show you most places in the code where the parameterization is used, including calls to ComputeDimensions and ComputeTransformation.

Thank you so much. Exactly what I was looking for.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.