[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
| 27 | // $Id: ExN03DetectorConstruction.hh,v 1.7 2006/06/29 17:48:32 gunter Exp $ |
---|
| 28 | // GEANT4 tag $Name: $ |
---|
| 29 | // |
---|
| 30 | // |
---|
| 31 | |
---|
| 32 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 33 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 34 | |
---|
| 35 | #ifndef ExN03DetectorConstruction_h |
---|
| 36 | #define ExN03DetectorConstruction_h 1 |
---|
| 37 | |
---|
| 38 | #include "G4VUserDetectorConstruction.hh" |
---|
| 39 | #include "globals.hh" |
---|
| 40 | |
---|
| 41 | class G4Box; |
---|
| 42 | class G4LogicalVolume; |
---|
| 43 | class G4VPhysicalVolume; |
---|
| 44 | class G4Material; |
---|
| 45 | class G4UniformMagField; |
---|
| 46 | class ExN03DetectorMessenger; |
---|
| 47 | |
---|
| 48 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 49 | |
---|
| 50 | class ExN03DetectorConstruction : public G4VUserDetectorConstruction |
---|
| 51 | { |
---|
| 52 | public: |
---|
| 53 | |
---|
| 54 | ExN03DetectorConstruction(); |
---|
| 55 | ~ExN03DetectorConstruction(); |
---|
| 56 | |
---|
| 57 | public: |
---|
| 58 | |
---|
| 59 | void SetAbsorberMaterial (G4String); |
---|
| 60 | void SetAbsorberThickness(G4double); |
---|
| 61 | |
---|
| 62 | void SetGapMaterial (G4String); |
---|
| 63 | void SetGapThickness(G4double); |
---|
| 64 | |
---|
| 65 | void SetCalorSizeYZ(G4double); |
---|
| 66 | void SetNbOfLayers (G4int); |
---|
| 67 | |
---|
| 68 | void SetMagField(G4double); |
---|
| 69 | |
---|
| 70 | G4VPhysicalVolume* Construct(); |
---|
| 71 | |
---|
| 72 | void UpdateGeometry(); |
---|
| 73 | |
---|
| 74 | public: |
---|
| 75 | |
---|
| 76 | void PrintCalorParameters(); |
---|
| 77 | |
---|
| 78 | G4double GetWorldSizeX() {return WorldSizeX;}; |
---|
| 79 | G4double GetWorldSizeYZ() {return WorldSizeYZ;}; |
---|
| 80 | |
---|
| 81 | G4double GetCalorThickness() {return CalorThickness;}; |
---|
| 82 | G4double GetCalorSizeYZ() {return CalorSizeYZ;}; |
---|
| 83 | |
---|
| 84 | G4int GetNbOfLayers() {return NbOfLayers;}; |
---|
| 85 | |
---|
| 86 | G4Material* GetAbsorberMaterial() {return AbsorberMaterial;}; |
---|
| 87 | G4double GetAbsorberThickness() {return AbsorberThickness;}; |
---|
| 88 | |
---|
| 89 | G4Material* GetGapMaterial() {return GapMaterial;}; |
---|
| 90 | G4double GetGapThickness() {return GapThickness;}; |
---|
| 91 | |
---|
| 92 | const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;}; |
---|
| 93 | const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;}; |
---|
| 94 | const G4VPhysicalVolume* GetGap() {return physiGap;}; |
---|
| 95 | |
---|
| 96 | private: |
---|
| 97 | |
---|
| 98 | G4Material* AbsorberMaterial; |
---|
| 99 | G4double AbsorberThickness; |
---|
| 100 | |
---|
| 101 | G4Material* GapMaterial; |
---|
| 102 | G4double GapThickness; |
---|
| 103 | |
---|
| 104 | G4int NbOfLayers; |
---|
| 105 | G4double LayerThickness; |
---|
| 106 | |
---|
| 107 | G4double CalorSizeYZ; |
---|
| 108 | G4double CalorThickness; |
---|
| 109 | |
---|
| 110 | G4Material* defaultMaterial; |
---|
| 111 | G4double WorldSizeYZ; |
---|
| 112 | G4double WorldSizeX; |
---|
| 113 | |
---|
| 114 | G4Box* solidWorld; //pointer to the solid World |
---|
| 115 | G4LogicalVolume* logicWorld; //pointer to the logical World |
---|
| 116 | G4VPhysicalVolume* physiWorld; //pointer to the physical World |
---|
| 117 | |
---|
| 118 | G4Box* solidCalor; //pointer to the solid Calor |
---|
| 119 | G4LogicalVolume* logicCalor; //pointer to the logical Calor |
---|
| 120 | G4VPhysicalVolume* physiCalor; //pointer to the physical Calor |
---|
| 121 | |
---|
| 122 | G4Box* solidLayer; //pointer to the solid Layer |
---|
| 123 | G4LogicalVolume* logicLayer; //pointer to the logical Layer |
---|
| 124 | G4VPhysicalVolume* physiLayer; //pointer to the physical Layer |
---|
| 125 | |
---|
| 126 | G4Box* solidAbsorber; //pointer to the solid Absorber |
---|
| 127 | G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber |
---|
| 128 | G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber |
---|
| 129 | |
---|
| 130 | G4Box* solidGap; //pointer to the solid Gap |
---|
| 131 | G4LogicalVolume* logicGap; //pointer to the logical Gap |
---|
| 132 | G4VPhysicalVolume* physiGap; //pointer to the physical Gap |
---|
| 133 | |
---|
| 134 | G4UniformMagField* magField; //pointer to the magnetic field |
---|
| 135 | |
---|
| 136 | ExN03DetectorMessenger* detectorMessenger; //pointer to the Messenger |
---|
| 137 | |
---|
| 138 | private: |
---|
| 139 | |
---|
| 140 | void DefineMaterials(); |
---|
| 141 | void ComputeCalorParameters(); |
---|
| 142 | G4VPhysicalVolume* ConstructCalorimeter(); |
---|
| 143 | }; |
---|
| 144 | |
---|
| 145 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 146 | |
---|
| 147 | inline void ExN03DetectorConstruction::ComputeCalorParameters() |
---|
| 148 | { |
---|
| 149 | // Compute derived parameters of the calorimeter |
---|
| 150 | LayerThickness = AbsorberThickness + GapThickness; |
---|
| 151 | CalorThickness = NbOfLayers*LayerThickness; |
---|
| 152 | |
---|
| 153 | WorldSizeX = 1.2*CalorThickness; WorldSizeYZ = 1.2*CalorSizeYZ; |
---|
| 154 | } |
---|
| 155 | |
---|
| 156 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 157 | |
---|
| 158 | #endif |
---|
| 159 | |
---|