Message: Help with G4PVReplica Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Help with G4PVReplica 

Forum: Geometry
Date: 22 Jun, 2010
From: Jainil Shah <Jainil Shah>

I have been trying to create a box, filled with voxels(3D) using only G4PVReplica but somehow haven't been able to manage it.

Here's a snippet of my code, can someone please look at it and help..


box_width = 2 *cm;

voxelHalfDimX = 0.5 *cm; 
voxelHalfDimY = 0.5 *cm; 
voxelHalfDimZ = 0.5 *cm; 
 nVoxelX = box_width/(voxelHalfDimX*2); 
 nVoxelY = box_width/(voxelHalfDimY*2); 
 nVoxelZ = box_width/(voxelHalfDimZ*2); 

 solidChamber = new G4Box("Chamber", 
  logicChamber = new G4LogicalVolume(solidChamber, breast, "LogicChamber", 0, 0, 0); 

  physiChamber = new G4PVPlacement(0, 


 // Z axis(10X1) 
replicaSolid = new G4Box("Layer",box_width/2,voxelHalfDimZ*2,voxelHalfDimZ,voxelHalfDimZ);

  replicaLogical = new G4LogicalVolume(replicaSolid,breast,"Replica1");
  replicaPhysical = new G4PVReplica("Replica1Layer",replicaLogical,logicChamber,kZAxis,nVoxelZ/2,voxelHalfDimZ*2);

  //X axis(10X10) 
  replicaSolid2 = new G4Box("Layer2",voxelHalfDimX,voxelHalfDimX,voxelHalfDimX);

  replicaLogical2 = new G4LogicalVolume(replicaSolid2,breast,"Replica2");
  replicaPhysical2 = new G4PVReplica("Replica2Layer",replicaLogical2,replicaLogical,kXAxis,nVoxelX,voxelHalfDimX*2); //1*cm);

  //Y axis (10X10X10) 
  replicaSolid3 = new G4Box("Layer3",voxelHalfDimY,voxelHalfDimY,voxelHalfDimY);

  replicaLogical3 = new G4LogicalVolume(replicaSolid3,breast,"Replica3");
  replicaPhysical3 = new G4PVReplica("Replica3Layer",replicaLogical3,replicaLogical2,kYAxis,nVoxelY,voxelHalfDimY*2) 

The next step is using a neutron beam on the voxelized box. But as soon as i run the beam, the code crashes with the following error message:

ERROR - G4SmartVoxelHeader::BuildReplicaVoxels()
        Replicated geometry, logical volume: LogicChamber

*** G4Exception : FatalError
      issued by : G4SmartVoxelHeader::BuildReplicaVoxels
Sanity check: wrong solid extent.
*** Fatal Exception *** core dump ***

*** G4Exception: Aborting execution *** Abort

Does anyone have any suggestions ?

 Add Message Add Message
to: "Help with G4PVReplica"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]