➢假设我们要建- -个几何模型,分哪几步:

  • 确定几何形状,根据几何形状确定尺寸       代码中体现是 solid volum
G4Cons* solidShape1 =
new G4Cons("Shape1",
shape1_rmina, shape1_rmaxa, shape1_rminb, shape1_rmaxb, shape1_hz,
shape1_phimin, shape1_phimax);

  

  • 材料填充= =>参考系 logical volum
  G4LogicalVolume* logicShape1 =
    new G4LogicalVolume(solidShape1,         //its solid
                        shape1_mat,          //its material
                        "Shape1");           //its name

  

  • 假设建立好几个物体相对位置旋转平移 physical volum
  new G4PVPlacement(0,                       //no rotation(有无旋转)
                    pos1,                    //at position (坐标位置)
                    logicShape1,             //its logical volume (逻辑变量,包括上述的三个参量)
                    "Shape1",                //its name (命名)
                    logicEnv,                //its mother  volume (母变量,他被放在什么里面)
                    false,                   //no boolean operation (有无布尔操作)
                    0,                       //copy number (复制命名)
                    checkOverlaps);          //overlaps checking

  

建模型的时候从外往里建

 posted on 2023-04-06 22:16  笨笨刀  阅读(97)  评论(0编辑  收藏  举报