Use of Replica Volume or Divided?

_Geant4 Version:_V11.2.2
_Operating System:_Linux Ubuntu 24.04 LTS

Hello G4 expert,
I would like to simulate a detection system composed of about ten concentric cylindrical tracks occupying an entire disk, as shown in the simple diagram below.

Each track will then be treated as a sensitive detector.

I was thinking of using the concept of Volume Replica with a division along the R axis.

I found an example in a SLAC document with a Phi division, which is quite straightforward.

But I’m having trouble extrapolating to an R division because the Rmin and Rmax of each track, which I was thinking of using a G4Tubs, are a function of the track number (i).

Perhaps there is a more suitable method than Replicas?
If you have an example or more explicit documentation, I would appreciate it.

Replica assumes the same dimensions for each replica, so you likely won’t be able to do this. G4VPVParameterisation could be used but that would require writing your own subclass I think.

What comes to mind is 1) either russian dolls for progressively smaller solid cylinder radii where each is a daughter of the previous volume or 2) Just making the annular cylinders in a loop as you are really doing here or 3) Don’t this at all and just keep tracking of the radii in event Action.

(1) has the advantage that it will automatically clean up boundary issues between regions but the indexing will be awkward. (2) you will almost certainly have to clean up boundary/floating point errors between the regions but the indexing can be done through the copy numbers. (3) is the most Geant4 way. The idea is you would create/clear an X (in this case 10) length array where each index is one of your radii. Then in your stepping action, you would just figure out which “bin” you are in and then add the energy deposited in the step there. At the end of the event action you would record this in your ntuple, and clear the array for the next event. I think Accumulables could work for this as well but I have less experience with those.

Hi Justin
Thank you for your reply.
Solution number 3 is indeed the best.
However, I think the Geant4 documentation isn’t that clear.

I am still wondering hot to do radial replica ?

Depending on what you’re scoring, and assuming all your concentric rings are the same material, you might also be interested in building only one cylinder and using a cylindrical scoring mesh. The computational time does scale pretty quickly with meshes, so I would advise against this for a large number of rings.

So in looking at the documentation I was able to hunt down what this is referring to. Buried deep in the include statements there is an enumerated EAxis data type here wherein to call for replication along the radial direction you specify “kRho”. So close to something like this.

G4double ringThickness = (rMaxMother - rMinMother) / nDiv;

auto solidRing = new G4Tubs("Ring", rMinMother, rMinMother + ringThickness, h/2, 0.0, 360.0);
auto logicRing = new G4LogicalVolume(solidRing, material, "LogicRing");

new G4PVReplica("RadialRing",
                logicRing,
                logicMother,
                kRho,         // from the enum
                nDiv,         // 10
                ringThickness  // mother thickness/10
);

The mother would just need to be the outermost ring since every replica will be inside it. My gut tells me that the visualization settings might need to be tweaked for this. The slide example you found was for the arc segments. Learned something new since I always thought the daughters had to be the same size.