Created attachment 813 [details] from B1 In the G4PVReplica() function, when creating a cylinder model, the child body does not have to be completely filled with the parent body to compile and run properly. just like this. G4Material* shape1_mat = nist->FindOrBuildMaterial("G4_A-150_TISSUE"); G4ThreeVector pos1 = G4ThreeVector(0, 2 * cm, -7 * cm); auto shape1New = new G4Tubs("ShNew", 0 * cm, 5 * cm, 2.5 * cm, 0 * deg, 360 * deg); auto logicShape1 = new G4LogicalVolume(shape1New, shape1_mat, "Shape1"); new G4PVPlacement(nullptr, pos1, logicShape1, "Shape1", logicEnv, false, 0, checkOverlaps); auto TubeSmall = new G4Tubs("TbSmall", 0 * cm, 1 * cm, 2.0 * cm, 0 * deg, 360 * deg); auto logicTubeSmall = new G4LogicalVolume(TubeSmall, shape1_mat, "logicTubeSmall"); new G4PVReplica("RepCyl", logicTubeSmall, logicShape1, kRho, 5, 0.5 * cm, 0);
Slices in G4PVReplica must fully fill the parent body by specification. Your code might build and display, but will not work in tracking. You can define an offset if wished to displace the replication. There is no control done at construction time for such incorrect replica setup definitions.