File indexing completed on 2025-04-10 08:05:40
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
0030
0031 #include "ExN04CalorimeterROGeometry.hh"
0032
0033 #include "ExN04DummySD.hh"
0034
0035 #include "G4Box.hh"
0036 #include "G4LogicalVolume.hh"
0037 #include "G4Material.hh"
0038 #include "G4PVPlacement.hh"
0039 #include "G4PVReplica.hh"
0040 #include "G4SDManager.hh"
0041 #include "G4SystemOfUnits.hh"
0042 #include "G4ThreeVector.hh"
0043 #include "G4Tubs.hh"
0044 #include "G4VPhysicalVolume.hh"
0045
0046
0047 ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry() : G4VReadOutGeometry()
0048 {
0049 #include "ExN04DetectorParameterDef.icc"
0050 }
0051
0052
0053 ExN04CalorimeterROGeometry::ExN04CalorimeterROGeometry(G4String aString)
0054 : G4VReadOutGeometry(aString)
0055 {
0056 #include "ExN04DetectorParameterDef.icc"
0057 }
0058
0059
0060 ExN04CalorimeterROGeometry::~ExN04CalorimeterROGeometry() {}
0061
0062
0063 G4VPhysicalVolume* ExN04CalorimeterROGeometry::Build()
0064 {
0065
0066
0067
0068 G4Material* dummyMat = new G4Material(name = "dummyMat", 1., 1. * g / mole, 1. * g / cm3);
0069
0070
0071 G4Box* ROWorldBox = new G4Box("ROWorldBox", fexpHall_x, fexpHall_y, fexpHall_z);
0072 G4LogicalVolume* ROWorldLog =
0073 new G4LogicalVolume(ROWorldBox, dummyMat, "ROWorldLogical", 0, 0, 0);
0074 G4PVPlacement* ROWorldPhys =
0075 new G4PVPlacement(0, G4ThreeVector(), "ROWorldPhysical", ROWorldLog, 0, false, 0);
0076
0077 G4VSolid* caloROtub = new G4Tubs("caloROtub", fcaloTubs_rmin, fcaloTubs_rmax, fcaloTubs_dz,
0078 fcaloTubs_sphi, fcaloTubs_dphi);
0079 G4LogicalVolume* caloROlog = new G4LogicalVolume(caloROtub, dummyMat, "caloROlogical", 0, 0, 0);
0080 G4VPhysicalVolume* caloROphys =
0081 new G4PVPlacement(0, G4ThreeVector(), "calROphysical", caloROlog, ROWorldPhys, false, 0);
0082
0083
0084
0085
0086
0087 G4VSolid* caloROphiDivisionTub = new G4Tubs("caloROphiDivision", fcaloCell_rmin, fcaloCell_rmax,
0088 fcaloCell_dz, fcaloCell_sphi, fcaloCell_dphi);
0089 G4LogicalVolume* caloROphiDivisionLog =
0090 new G4LogicalVolume(caloROphiDivisionTub, dummyMat, "caloROphiDivisionLogical", 0, 0, 0);
0091 G4VPhysicalVolume* caloROphiDivisionPhys =
0092 new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog, caloROphys, kPhi,
0093 fsegmentsinPhi, fcaloCell_dphi);
0094
0095 G4VSolid* caloROcellTub = new G4Tubs("caloROcellTub", fcaloRing_rmin, fcaloRing_rmax,
0096 fcaloRing_dz, fcaloRing_sphi, fcaloRing_dphi);
0097 G4LogicalVolume* caloROcellLog =
0098 new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical", 0, 0, 0);
0099
0100 new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionPhys, kZAxis, fsegmentsinZ,
0101 2. * fcaloRing_dz);
0102
0103
0104
0105
0106 ExN04DummySD* dummySensi = new ExN04DummySD;
0107 caloROcellLog->SetSensitiveDetector(dummySensi);
0108
0109 return ROWorldPhys;
0110 }