Here is the piece of code:
G4double pmtGlassThickness = 2.0mm;
G4double pmtGlassRadius = 53.0mm;
G4double pmtCylRadius = 40.15mm;
G4double pmtTubeRadius = 26.1mm;
G4double pmtCylHeight = 18.0mm;
G4double pmtConeHeight = 20.0mm;
///////////////////////////////Defining World Volume/////////////////////////////////
G4Sphere mainSolid = new G4Sphere(“mainSolid”,
339.9mm,
340.mm,
0.0deg, 360.0deg,
0.0, 8.02deg);
G4Tubs coneWorld = new G4Tubs(“coneSolid”,
46.9mm,
47*mm,
51.*mm,
0.*deg, 360.*deg);
G4UnionSolid *motherSolid = new G4UnionSolid(“motherSolid”,
coneWorld,
mainSolid,
0,
G4ThreeVector(0.,0.,-286.*mm));
////////////////////////////////////////////////////////////////////////////////////
G4LogicalVolume *logicWorld = new G4LogicalVolume(//solidWorld,
motherSolid,
Air1,
//Water,
“logicWorld”);
G4Cons *SolidCone = new G4Cons(“pmtCone”,
pmtTubeRadius-pmtGlassThickness,
pmtTubeRadius,
pmtCylRadius-pmtGlassThickness,
pmtCylRadius,
pmtConeHeight/2.*mm,
0.*deg, 360.*deg);
G4Tubs *tube = new G4Tubs(“tube”,
pmtCylRadius-pmtGlassThickness,
pmtCylRadius,
pmtCylHeight/2.*mm,
0.*deg, 360.*deg);
G4UnionSolid combineSolid1 = new G4UnionSolid(“tubeplusreflection”,
SolidCone,
tube,
0,
G4ThreeVector(0.,0.,19.0mm));
G4LogicalVolume *logicCombine1 = new G4LogicalVolume(combineSolid1,
PMTGlass,
“logicCombine1”);
G4VPhysicalVolume *glassTube = new G4PVPlacement(0,
G4ThreeVector(0.,0.,0.),
logicCombine1,
“glassTube”,
logicWorld,
false,
0,
true);
G4Box *solidCutOff = new G4Box(“cutOffTubs”,
pmtGlassRadius+1.*cm,
pmtGlassRadius+1.cm,
34.597mm);
G4Sphere pmtGlassSolid = new G4Sphere(“pmtglass”,
pmtGlassRadius-pmtGlassThickness,
pmtGlassRadius,
0.0deg, 360.0deg,
0.0, 90deg);
G4SubtractionSolid pmtBulb = new G4SubtractionSolid(“pmtInnerglass”,
pmtGlassSolid,
solidCutOff);
G4Transform3D transform(G4Translate3D(0.0, 0.0, -17.702mm));
pmtGlassLogic = new G4LogicalVolume(pmtBulb,
PMTGlass,
“pmtGlassLogic”);
G4VPhysicalVolume pmtSphere = new G4PVPlacement(0,
//G4ThreeVector(0.,0.,-18.097mm),
G4ThreeVector(0.,0.,-6.597*mm),
pmtGlassLogic,
“pmtSphere”,
logicWorld,
false,
0,
true);