電磁カロリメーターしたい
付属サンプルB5でカロリメーターを使っています。 カロリメーターは密度の高い結晶シンチレーターを並べて設置し、通過する粒子が落とすエネルギーをシンチレーション光に変換して、吸収したエネルギーを測定する検出器のひとつです。
1class DetectorConstruction : public G4VUserDetectorConstruction
2{
3 public:
4 G4PhysicalVolume* Construct() override;
5 void ConstructSDandField() override;
6 private:
7 G4LogicalVolume* fCellLogical = nullptr;
8}
まずB5/include/DetectorConstruction.hh
で定義されているメソッドやメンバー変数を確認します。
電磁カロリメータの論理ボリューム(fCellLogical
)はプライベート変数で用意されていました。
Construct
メソッドの中でCSI結晶を用意し、それを複製して電磁カロリメーターを組みたてています。
また、ConstructSDandField
メソッドで有感領域を設定しているようです。
1G4PhysicalVolume* DetectorConstruction::Construct()
2{
3 // 材料を調達
4 ConstructMaterials();
5 auto csI = G4Material::GetMaterial("G4_CESIUM_IODIDE");
6
7 // CsIカロリメーター
8 auto emCalorimeterSolid = new G4Box(
9 "EMCalorimeterBox",
10 1.5*m,
11 30.*cm,
12 15.*cm);
13
14 auto emCalorimeterLogical = new G4LogicalVolume(
15 emCalorimeterSolid,
16 csI,
17 "EMCalorimeterLogical");
18
19 new G4PVPlacement(
20 nullptr,
21 G4ThreeVector(0., 0., 2.*m),
22 emCalorimeterLogical,
23 "EMCalorimeterPhysical",
24 secondArmLogical,
25 false
26 0,
27 checkOverlaps);
28
29 // 電磁カロリメーターのセル
30 auto cellSolid = new G4Box(
31 "cellBox",
32 7.5*cm,
33 7.5*cm,
34 15.*cm);
35
36 fCellLogical = new G4LogicalVolume(
37 cellSolid,
38 csI,
39 "cellLogical");
40
41 G4VPVParameterisation* cellParam = new CellParameterisation();
42 new G4PVParameterised(
43 "cellPhysical",
44 fCellLogical,
45 emCalorimeterLogical,
46 kXAxis,
47 kNofEmCells,
48 cellParam);
49
50 // 可視化オプション
51 G4VisAttributes invisibleYellow(false, G4Colour::Yellow());
52 emCalorimeterLogical->SetVisAttributes(invisibleYellow);
53 fCellCalorimeterLogical->SetVisAttributes(yellow);
54}