測定器を配置したい(G4PVPlacement

1new G4PVPlacement(
2    const G4Transrom3D &Transform3D,
3    G4LogicalVolume *pLogicalVolume,  // 子ボリューム
4    const G4String &pName,            // 名前
5    G4LogicalVolume *pMotherVolume,   // 親ボリューム,
6    G4bool bMany,                     // ブーリアン演算,
7    G4int aCopyID,                    // コピー番号,
8    G4bool bCheckOverlaps             // 重なり確認
9)

G4PVPlacementで論理ボリュームを配置できます。

複数の測定器を配置したい

 1const G4int n_detectors = 10;
 2G4RotationMatrix rotation = G4RotationMatrix();
 3G4ThreeVector direction = G4ThreeVector(0.*m, 0.*m, 0.*m);
 4G4Transform3D location = G4Transform3D(rotation, direction);
 5
 6G4int z = 0;
 7for (int i = 0; i < n_detectors; i++) {
 8    z = i * 10*cm;
 9    direction = G4ThreeVector(0.*cm, 0.*cm, z);
10    location = G4Transform3D(rotation, direction);
11    new G4PVPlacement(
12        location,
13        pDetectorLogical,
14        "Detector Logical",
15        pWorldLogical,
16        false,
17        i,    // copy number
18        true
19    )
20}

測定器を複数配置する場合は、コピー番号を別々にします。