Hi! I am trying to iterate my x-ray target thickness through 1um-30um. I am trying to do this by iterating through a file called Thickness.txt using a while loop in detectorConstruction.cc. In my while loop, I have the below code to ensure the target volume is replaced on each iteration to prevent overlaps. However, I am still getting error messages related to geometry overlap of TargetPhysical with TargetPhysical (the associated physical volume here). Is there something wrong with the way I am deleting the logical volume? Am I missing something here?
if (TargetLogic) {
delete TargetLogic->GetSolid();
delete TargetLogic;
}