G4Tubs Center Of mass

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_V11.2.1
_Operating System:_Linux Fedora 40
_Compiler/Version:_gcc 14.2.1
_CMake Version:_3.28.2

In geant4-v11.2.1 G4Tubs GetCenterOfMass() always gives G4ThreeVector(0, 0, 0). This is clearly only true for DeltaPhi = 360 deg. That is not the case for DeltaPhi != 360. Other solids (such as G4Sphere) give the correct center fo mass. Was this corrected in v11.2.2, or is it still missing?

Where is this function defined? I couldn’t find GetCenterOfMass() in the Geant4 sources.

Oh dear! My mistake! I had actually started implementing a GetCenterOfMass function for G4VSolid several months ago and implemented it for several solids , but not all of them and forgot that I did that! I generated my own DOxygen documentation for my sources and it showed G4VSolid having GetCenterOfMass and forgot completely that I inserted that.

Thanks for checking!