File indexing completed on 2026-06-07 07:53:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029 #include "ExN04CalorimeterROGeometry.hh"
0030
0031 #include "ExN04DummySD.hh"
0032
0033 #include "G4Box.hh"
0034 #include "G4LogicalVolume.hh"
0035 #include "G4Material.hh"
0036 #include "G4PVPlacement.hh"
0037 #include "G4PVReplica.hh"
0038 #include "G4SDManager.hh"
0039 #include "G4SystemOfUnits.hh"
0040 #include "G4ThreeVector.hh"
0041 #include "G4Tubs.hh"
0042 #include "G4VPhysicalVolume.hh"
0043
0044
0045 ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry() : G4VReadOutGeometry()
0046 {
0047 #include "ExN04DetectorParameterDef.icc"
0048 }
0049
0050
0051 ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry(G4String aString)
0052 : G4VReadOutGeometry(aString)
0053 {
0054 #include "ExN04DetectorParameterDef.icc"
0055 }
0056
0057
0058 ExN04CalorimeterROGeometry::~ExN04CalorimeterROGeometry() {}
0059
0060
0061 G4VPhysicalVolume* ExN04CalorimeterROGeometry::Build()
0062 {
0063
0064
0065
0066 G4Material* dummyMat = new G4Material(name = "dummyMat", 1., 1. * g / mole, 1. * g / cm3);
0067
0068
0069 G4Box* ROWorldBox = new G4Box("ROWorldBox", fexpHall_x, fexpHall_y, fexpHall_z);
0070 G4LogicalVolume* ROWorldLog =
0071 new G4LogicalVolume(ROWorldBox, dummyMat, "ROWorldLogical", 0, 0, 0);
0072 G4PVPlacement* ROWorldPhys =
0073 new G4PVPlacement(0, G4ThreeVector(), "ROWorldPhysical", ROWorldLog, 0, false, 0);
0074
0075 G4VSolid* caloROtub = new G4Tubs("caloROtub", fcaloTubs_rmin, fcaloTubs_rmax, fcaloTubs_dz,
0076 fcaloTubs_sphi, fcaloTubs_dphi);
0077 G4LogicalVolume* caloROlog = new G4LogicalVolume(caloROtub, dummyMat, "caloROlogical", 0, 0, 0);
0078 G4VPhysicalVolume* caloROphys =
0079 new G4PVPlacement(0, G4ThreeVector(), "calROphysical", caloROlog, ROWorldPhys, false, 0);
0080
0081
0082
0083
0084
0085 G4VSolid* caloROphiDivisionTub = new G4Tubs("caloROphiDivision", fcaloCell_rmin, fcaloCell_rmax,
0086 fcaloCell_dz, fcaloCell_sphi, fcaloCell_dphi);
0087 G4LogicalVolume* caloROphiDivisionLog =
0088 new G4LogicalVolume(caloROphiDivisionTub, dummyMat, "caloROphiDivisionLogical", 0, 0, 0);
0089 G4VPhysicalVolume* caloROphiDivisionPhys =
0090 new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog, caloROphys, kPhi,
0091 fsegmentsinPhi, fcaloCell_dphi);
0092
0093 G4VSolid* caloROcellTub = new G4Tubs("caloROcellTub", fcaloRing_rmin, fcaloRing_rmax,
0094 fcaloRing_dz, fcaloRing_sphi, fcaloRing_dphi);
0095 G4LogicalVolume* caloROcellLog =
0096 new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical", 0, 0, 0);
0097
0098 new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionPhys, kZAxis, fsegmentsinZ,
0099 2. * fcaloRing_dz);
0100
0101
0102
0103
0104 ExN04DummySD* dummySensi = new ExN04DummySD;
0105 caloROcellLog->SetSensitiveDetector(dummySensi);
0106
0107 return ROWorldPhys;
0108 }