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