[1199] | 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: F02DetectorConstruction.hh,v 1.2 2006/06/29 18:27:09 gunter Exp $ |
---|
| 28 | // GEANT4 tag $Name: HEAD $ |
---|
| 29 | // |
---|
| 30 | // |
---|
| 31 | |
---|
| 32 | #ifndef F02DetectorConstruction_h |
---|
| 33 | #define F02DetectorConstruction_h 1 |
---|
| 34 | |
---|
| 35 | #include "G4VUserDetectorConstruction.hh" |
---|
| 36 | #include "globals.hh" |
---|
| 37 | #include "G4ios.hh" |
---|
| 38 | |
---|
| 39 | class G4Box; |
---|
| 40 | class G4Tubs; |
---|
| 41 | class G4LogicalVolume; |
---|
| 42 | class G4VPhysicalVolume; |
---|
| 43 | class G4Material; |
---|
| 44 | class G4UniformMagField; |
---|
| 45 | class F02DetectorMessenger; |
---|
| 46 | class F02CalorimeterSD; |
---|
| 47 | class F02ElectroMagneticField; |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | class F02DetectorConstruction : public G4VUserDetectorConstruction |
---|
| 51 | { |
---|
| 52 | public: |
---|
| 53 | |
---|
| 54 | F02DetectorConstruction(); |
---|
| 55 | ~F02DetectorConstruction(); |
---|
| 56 | |
---|
| 57 | public: |
---|
| 58 | |
---|
| 59 | void SetAbsorberMaterial (G4String); |
---|
| 60 | void SetAbsorberThickness(G4double); |
---|
| 61 | void SetAbsorberRadius(G4double); |
---|
| 62 | |
---|
| 63 | void SetAbsorberZpos(G4double); |
---|
| 64 | |
---|
| 65 | void SetWorldMaterial(G4String); |
---|
| 66 | void SetWorldSizeZ(G4double); |
---|
| 67 | void SetWorldSizeR(G4double); |
---|
| 68 | |
---|
| 69 | void SetMagField(G4double); |
---|
| 70 | |
---|
| 71 | G4VPhysicalVolume* Construct(); |
---|
| 72 | |
---|
| 73 | void UpdateGeometry(); |
---|
| 74 | |
---|
| 75 | public: |
---|
| 76 | |
---|
| 77 | void PrintCalorParameters(); |
---|
| 78 | |
---|
| 79 | G4Material* GetWorldMaterial() {return WorldMaterial;}; |
---|
| 80 | G4double GetWorldSizeZ() {return WorldSizeZ;}; |
---|
| 81 | G4double GetWorldSizeR() {return WorldSizeR;}; |
---|
| 82 | |
---|
| 83 | G4double GetAbsorberZpos() {return zAbsorber;}; |
---|
| 84 | G4double GetzstartAbs() {return zstartAbs;}; |
---|
| 85 | G4double GetzendAbs() {return zendAbs;}; |
---|
| 86 | |
---|
| 87 | G4Material* GetAbsorberMaterial() {return AbsorberMaterial;}; |
---|
| 88 | G4double GetAbsorberThickness() {return AbsorberThickness;}; |
---|
| 89 | G4double GetAbsorberRadius() {return AbsorberRadius;}; |
---|
| 90 | |
---|
| 91 | const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;}; |
---|
| 92 | const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;}; |
---|
| 93 | G4LogicalVolume* GetLogicalAbsorber() {return logicAbsorber;}; |
---|
| 94 | |
---|
| 95 | private: |
---|
| 96 | |
---|
| 97 | G4bool worldchanged; |
---|
| 98 | G4Material* AbsorberMaterial; |
---|
| 99 | G4double AbsorberThickness; |
---|
| 100 | G4double AbsorberRadius; |
---|
| 101 | |
---|
| 102 | G4Material* fWindowMat ; |
---|
| 103 | G4double fWindowThick ; |
---|
| 104 | |
---|
| 105 | G4Material* fElectrodeMat ; |
---|
| 106 | G4double fElectrodeThick ; |
---|
| 107 | |
---|
| 108 | G4Material* fGapMat ; |
---|
| 109 | G4double fGapThick ; |
---|
| 110 | |
---|
| 111 | |
---|
| 112 | G4double zAbsorber ; |
---|
| 113 | G4double zstartAbs , zendAbs ; |
---|
| 114 | |
---|
| 115 | G4Material* WorldMaterial; |
---|
| 116 | G4double WorldSizeR; |
---|
| 117 | G4double WorldSizeZ; |
---|
| 118 | |
---|
| 119 | G4Tubs* solidWorld; //pointer to the solid World |
---|
| 120 | G4LogicalVolume* logicWorld; //pointer to the logical World |
---|
| 121 | G4VPhysicalVolume* physiWorld; //pointer to the physical World |
---|
| 122 | |
---|
| 123 | // TR radiator volumes and dimensions |
---|
| 124 | |
---|
| 125 | G4Tubs* fSolidRadSlice; // pointer to the solid z-slice |
---|
| 126 | G4LogicalVolume* fLogicRadSlice; // pointer to the logical z-slide |
---|
| 127 | G4VPhysicalVolume* fPhysicRadSlice; // pointer to the physical z-slide |
---|
| 128 | |
---|
| 129 | G4Tubs* fSolidRadRing; // pointer to the solid R-slice |
---|
| 130 | G4LogicalVolume* fLogicRadRing; // pointer to the logical R-slide |
---|
| 131 | G4VPhysicalVolume* fPhysicRadRing; // pointer to the physical R-slide |
---|
| 132 | |
---|
| 133 | G4Material* fRadiatorMat; //pointer to the TR radiator material |
---|
| 134 | |
---|
| 135 | G4double fRadThickness ; |
---|
| 136 | G4double fGasGap ; |
---|
| 137 | |
---|
| 138 | G4int fFoilNumber ; |
---|
| 139 | |
---|
| 140 | G4double fDetThickness ; |
---|
| 141 | G4double fDetLength ; |
---|
| 142 | G4double fDetGap ; |
---|
| 143 | |
---|
| 144 | G4double fStartR ; |
---|
| 145 | G4double fStartZ ; |
---|
| 146 | |
---|
| 147 | G4int fModuleNumber ; // the number of Rad-Det modules |
---|
| 148 | |
---|
| 149 | G4Tubs* solidAbsorber; //pointer to the solid Absorber |
---|
| 150 | G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber |
---|
| 151 | G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber |
---|
| 152 | |
---|
| 153 | G4UniformMagField* magField; //pointer to the magnetic field |
---|
| 154 | F02ElectroMagneticField* fEmField; |
---|
| 155 | F02DetectorMessenger* detectorMessenger; //pointer to the Messenger |
---|
| 156 | F02CalorimeterSD* calorimeterSD; //pointer to the sensitive detector |
---|
| 157 | |
---|
| 158 | private: |
---|
| 159 | |
---|
| 160 | void DefineMaterials(); |
---|
| 161 | void ComputeCalorParameters(); |
---|
| 162 | G4VPhysicalVolume* ConstructCalorimeter(); |
---|
| 163 | }; |
---|
| 164 | |
---|
| 165 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 166 | |
---|
| 167 | inline void F02DetectorConstruction::ComputeCalorParameters() |
---|
| 168 | { |
---|
| 169 | // Compute derived parameters of the calorimeter |
---|
| 170 | if(!worldchanged) |
---|
| 171 | { |
---|
| 172 | // WorldSizeR=2.*AbsorberRadius ; |
---|
| 173 | // WorldSizeZ=2.*AbsorberThickness ; |
---|
| 174 | } |
---|
| 175 | |
---|
| 176 | zstartAbs = zAbsorber-0.5*AbsorberThickness; |
---|
| 177 | zendAbs = zAbsorber+0.5*AbsorberThickness; |
---|
| 178 | |
---|
| 179 | } |
---|
| 180 | |
---|
| 181 | #endif |
---|
| 182 | |
---|