File indexing completed on 2026-03-30 07:51:13
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 "RE01CalorimeterROGeometry.hh"
0030
0031 #include "G4Box.hh"
0032 #include "G4LogicalVolume.hh"
0033 #include "G4Material.hh"
0034 #include "G4NistManager.hh"
0035 #include "G4PVPlacement.hh"
0036 #include "G4PVReplica.hh"
0037 #include "G4SDManager.hh"
0038 #include "G4SystemOfUnits.hh"
0039 #include "G4ThreeVector.hh"
0040 #include "G4Tubs.hh"
0041 #include "G4VPhysicalVolume.hh"
0042
0043
0044 RE01CalorimeterROGeometry::RE01CalorimeterROGeometry(G4String& parallelWorldName)
0045 : G4VUserParallelWorld(parallelWorldName)
0046 {
0047 #include "RE01DetectorParameterDef.icc"
0048 }
0049
0050
0051 RE01CalorimeterROGeometry::~RE01CalorimeterROGeometry()
0052 {
0053 ;
0054 }
0055
0056
0057 void RE01CalorimeterROGeometry::Construct()
0058 {
0059
0060
0061
0062 G4Material* dummyMat = nullptr;
0063
0064
0065 G4VPhysicalVolume* ROWorldPhys = GetWorld();
0066 G4LogicalVolume* ROWorldLog = ROWorldPhys->GetLogicalVolume();
0067
0068
0069 G4VSolid* caloROtub = new G4Tubs("caloROtub", fCaloTubs_rmin, fCaloTubs_rmax, fCaloTubs_dz,
0070 fCaloTubs_sphi, fCaloTubs_dphi);
0071 G4LogicalVolume* caloROlog = new G4LogicalVolume(caloROtub, dummyMat, "caloROlogical", 0, 0, 0);
0072
0073 new G4PVPlacement(0, G4ThreeVector(), caloROlog, "calROphysical", ROWorldLog, false, 0);
0074
0075
0076
0077
0078
0079 G4VSolid* caloROphiDivisionTub = new G4Tubs("caloROphiDivision", fCaloCell_rmin, fCaloCell_rmax,
0080 fCaloCell_dz, fCaloCell_sphi, fCaloCell_dphi);
0081 G4LogicalVolume* caloROphiDivisionLog =
0082 new G4LogicalVolume(caloROphiDivisionTub, dummyMat, "caloROphiDivisionLogical", 0, 0, 0);
0083
0084 new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog, caloROlog, kPhi,
0085 fSegmentsinPhi, fCaloCell_dphi);
0086
0087 G4VSolid* caloROcellTub = new G4Tubs("caloROcellTub", fCaloRing_rmin, fCaloRing_rmax,
0088 fCaloRing_dz, fCaloRing_sphi, fCaloRing_dphi);
0089 G4LogicalVolume* caloROcellLog =
0090 new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical", 0, 0, 0);
0091
0092 new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionLog, kZAxis, fSegmentsinZ,
0093 2. * fCaloRing_dz);
0094 }
0095
0096 #include "RE01CalorimeterSD.hh"
0097
0098 void RE01CalorimeterROGeometry::ConstructSD()
0099 {
0100
0101
0102
0103 G4String calorimeterSDname = "/mydet/calorimeter";
0104 RE01CalorimeterSD* calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
0105 G4SDManager::GetSDMpointer()->AddNewDetector(calorimeterSD);
0106 SetSensitiveDetector("caloROcellLogical", calorimeterSD);
0107 }