G4VSolid* slabIN= new G4Box("slabIN",14*cm,14*cm,14.375*cm); G4VSolid* slabOUT = new G4Box("slabOUT",15*cm,15*cm,15*cm); G4VSolid* slabph= new G4SubtractionSolid("slabPhantom", slabOUT, slabIN, 0,G4ThreeVector(0,0,-0.375*cm)); G4LogicalVolume* logicslabph = new G4LogicalVolume(slabph, //its solid pmma_mat, //its material "slabph"); //its name new G4PVPlacement(0, //no rotation G4ThreeVector(0,0,15.365*cm), //at (0,0,0) logicslabph, //its logical volume "slabph", //its name logicEnv, //its mother volume true, //no boolean operation 0, //copy number checkOverlaps); //overlaps checking G4VisAttributes* slabphVisAtt= new G4VisAttributes(G4Colour(1.0,0.0,0.0)); logicslabph->SetVisAttributes(slabphVisAtt); G4Material* water = nist->FindOrBuildMaterial("G4_WATER"); G4LogicalVolume* logicwater = new G4LogicalVolume(slabIN, //its solid water, //its material "water"); //its name new G4PVPlacement(0, //no rotation G4ThreeVector(0,0,14.990*cm), //at (0,0,0) logicwater, //its logical volume "water", //its name logicEnv, //its mother volume false, //no boolean operation 0, //copy number checkOverlaps); //overlaps checking