Dear G4s:
It took me several days to figured out the reason of causing code fail
to generate output file. But I don't how to fix it? Please help me!!!
( I already looked at those Q & A related in G4PVDivision).
Here is part of code. I try to define childLogZ as SD.
------------------------------------------------------------------
divSolidX = new G4Box("divSolidX",20*mm, 30*mm, 40*mm);
childLogX = new G4LogicalVolume(divSolidX, water, "childX",0,0,0);
divBoxX = new G4PVDivision("division along X giving nDiv, width and offset",
childLogX, PhantomLog, kXAxis, divnmbX, widthX, offsetX);
.............
divSolidZ = new G4Box("divSolidZ",20*mm, 30*mm, 40*mm);
childLogZ = new G4LogicalVolume(divSolidZ, water, "childZ",0,0,0);
divBoxZ = new G4PVDivision("division along Z giving nDiv, width and offset",
childLogZ, childLogY, kZAxis, divnmbZ, widthZ, offsetZ);
...........
// PhantomLog -> SetSensitiveDetector(phantomSD); //(1)
// childLogZ -> SetSensitiveDetector(phantomSD); //(2)
-----------------------------------------------------------------
My problem is:
Without hooking the G4PVDision to PhantomLog, using line (1), it works;
Hooking the G4PVDision to PhantomLog, using line (1), it dosen't;
hooking the G4PVDision to PhantomLog, using line (2), it dosen't;
Without hooking the G4PVDision to PhantomLog, using line (2),it dosen't;
Thank you so much!
Gao
|