[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: GammaRayTelDetectorConstruction.hh,v 1.10 2006/06/29 15:55:09 gunter Exp $ |
---|
[1230] | 28 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
[807] | 29 | // ------------------------------------------------------------ |
---|
| 30 | // GEANT 4 class header file |
---|
| 31 | // CERN Geneva Switzerland |
---|
| 32 | // |
---|
| 33 | // |
---|
| 34 | // ------------ GammaRayTelDetectorConstruction ------ |
---|
| 35 | // by F.Longo, R.Giannitrapani & G.Santin (13 nov 2000) |
---|
| 36 | // |
---|
| 37 | // ************************************************************ |
---|
| 38 | |
---|
| 39 | #ifndef GammaRayTelDetectorConstruction_h |
---|
| 40 | #define GammaRayTelDetectorConstruction_h 1 |
---|
| 41 | |
---|
| 42 | #include "G4VUserDetectorConstruction.hh" |
---|
| 43 | #include "globals.hh" |
---|
| 44 | |
---|
| 45 | class G4Box; |
---|
| 46 | class G4LogicalVolume; |
---|
| 47 | class G4VPhysicalVolume; |
---|
| 48 | class G4Material; |
---|
| 49 | class G4UniformMagField; |
---|
| 50 | class G4Region; |
---|
| 51 | class GammaRayTelDetectorMessenger; |
---|
| 52 | class GammaRayTelTrackerSD; |
---|
| 53 | class GammaRayTelAnticoincidenceSD; |
---|
| 54 | class GammaRayTelCalorimeterSD; |
---|
| 55 | class GammaRayTelTrackerROGeometry; |
---|
| 56 | |
---|
| 57 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 58 | |
---|
| 59 | class GammaRayTelDetectorConstruction : public G4VUserDetectorConstruction |
---|
| 60 | { |
---|
| 61 | public: |
---|
| 62 | |
---|
| 63 | GammaRayTelDetectorConstruction(); |
---|
| 64 | ~GammaRayTelDetectorConstruction(); |
---|
| 65 | |
---|
| 66 | public: |
---|
| 67 | |
---|
| 68 | void SetNbOfTKRLayers (G4int); // TKR number of layers, material, detector |
---|
| 69 | void SetTKRTileSizeXY (G4double); |
---|
| 70 | void SetNbOfTKRTiles (G4int); |
---|
| 71 | void SetTKRSiliconThickness(G4double); |
---|
| 72 | void SetTKRSiliconPitch(G4double); |
---|
| 73 | |
---|
| 74 | void SetTKRLayerDistance (G4double); |
---|
| 75 | void SetTKRViewsDistance (G4double); |
---|
| 76 | |
---|
| 77 | void SetConverterMaterial (G4String); // TKR Converter material & thickness |
---|
| 78 | void SetConverterThickness(G4double); |
---|
| 79 | |
---|
| 80 | void SetNbOfCALLayers (G4int); // CAL material, lenght, thickness |
---|
| 81 | void SetNbOfCALBars (G4int); |
---|
| 82 | void SetCALBarThickness(G4double); |
---|
| 83 | |
---|
| 84 | void SetACDThickness (G4double); //ACD Thickness |
---|
| 85 | |
---|
| 86 | void SetMagField(G4double); // Magnetic Field |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | G4VPhysicalVolume* Construct(); |
---|
| 90 | void UpdateGeometry(); |
---|
| 91 | |
---|
| 92 | public: |
---|
| 93 | |
---|
| 94 | void PrintPayloadParameters(); |
---|
| 95 | |
---|
| 96 | |
---|
| 97 | G4double GetWorldSizeZ() {return WorldSizeZ;}; |
---|
| 98 | G4double GetWorldSizeXY() {return WorldSizeXY;}; |
---|
| 99 | |
---|
| 100 | G4double GetPayloadSizeZ() {return PayloadSizeZ;}; |
---|
| 101 | G4double GetPayloadSizeXY() {return PayloadSizeXY;}; |
---|
| 102 | |
---|
| 103 | G4double GetTKRSizeZ() {return TKRSizeZ;}; |
---|
| 104 | G4double GetTKRSizeXY() {return TKRSizeXY;}; |
---|
| 105 | |
---|
| 106 | G4double GetCALSizeZ() {return CALSizeZ;}; |
---|
| 107 | G4double GetCALTKRDistance() {return CALTKRDistance;}; |
---|
| 108 | |
---|
| 109 | G4double GetTKRSiliconThickness() {return TKRSiliconThickness;}; |
---|
| 110 | G4double GetTKRSiliconTileXY() {return TKRSiliconTileXY;}; |
---|
| 111 | G4double GetTKRSiliconPitch() {return TKRSiliconPitch;}; |
---|
| 112 | G4int GetNbOfTKRLayers() {return NbOfTKRLayers;}; |
---|
| 113 | G4int GetNbOfTKRTiles() {return NbOfTKRTiles;}; |
---|
| 114 | G4int GetNbOfTKRStrips() {return NbOfTKRStrips;}; |
---|
| 115 | G4double GetTKRLayerDistance() {return TKRLayerDistance;}; |
---|
| 116 | G4double GetTKRViewsDistance() {return TKRViewsDistance;}; |
---|
| 117 | |
---|
| 118 | G4double GetTKRActiveTileXY() {return TKRActiveTileXY;}; |
---|
| 119 | G4double GetTKRActiveTileZ() {return TKRActiveTileZ;}; |
---|
| 120 | G4double GetSiliconGuardRing() {return SiliconGuardRing;} |
---|
| 121 | G4double GetTilesSeparation() {return TilesSeparation;}; |
---|
| 122 | |
---|
| 123 | G4Material* GetConverterMaterial() {return ConverterMaterial;}; |
---|
| 124 | G4double GetConverterThickness() {return ConverterThickness;}; |
---|
| 125 | |
---|
| 126 | G4double GetCALBarThickness() {return CALBarThickness;}; |
---|
| 127 | G4int GetNbOfCALLayers() {return NbOfCALLayers;}; |
---|
| 128 | G4int GetNbOfCALBars() {return NbOfCALBars;}; |
---|
| 129 | |
---|
| 130 | G4double GetACDThickness() {return ACDThickness;}; |
---|
| 131 | G4int GetNbOfACDTopTiles() {return NbOfACDTopTiles;}; |
---|
| 132 | G4int GetNbOfACDLateralTiles() {return NbOfACDLateralTiles;}; |
---|
| 133 | |
---|
| 134 | private: |
---|
| 135 | |
---|
| 136 | G4Material* ConverterMaterial; |
---|
| 137 | G4double ConverterThickness; |
---|
| 138 | |
---|
| 139 | G4double TKRSiliconThickness; |
---|
| 140 | G4double TKRSiliconTileXY; |
---|
| 141 | G4double TKRSiliconPitch; |
---|
| 142 | |
---|
| 143 | G4double TKRSizeXY; |
---|
| 144 | G4double TKRSizeZ; |
---|
| 145 | |
---|
| 146 | G4double TKRLayerDistance; |
---|
| 147 | G4double TKRViewsDistance; |
---|
| 148 | G4double TKRSupportThickness; |
---|
| 149 | |
---|
| 150 | G4int NbOfTKRLayers; |
---|
| 151 | G4int NbOfTKRTiles; |
---|
| 152 | |
---|
| 153 | G4double CALBarThickness; |
---|
| 154 | G4int NbOfCALLayers; |
---|
| 155 | G4int NbOfCALBars; |
---|
| 156 | G4double CALSizeXY; |
---|
| 157 | G4double CALSizeZ; |
---|
| 158 | |
---|
| 159 | G4double CALBarX; |
---|
| 160 | G4double CALBarY; |
---|
| 161 | G4double CALBarZ; |
---|
| 162 | |
---|
| 163 | G4double ACDThickness; |
---|
| 164 | G4double ACTSizeXY; |
---|
| 165 | G4double ACTSizeZ; |
---|
| 166 | |
---|
| 167 | G4double ACL1SizeX; |
---|
| 168 | G4double ACL1SizeY; |
---|
| 169 | G4double ACL1SizeZ; |
---|
| 170 | |
---|
| 171 | G4double ACL2SizeX; |
---|
| 172 | G4double ACL2SizeY; |
---|
| 173 | G4double ACL2SizeZ; |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | G4int NbOfACDLateralTiles; |
---|
| 177 | G4int NbOfACDTopTiles; |
---|
| 178 | |
---|
| 179 | G4double TilesSeparation; |
---|
| 180 | G4double ACDTKRDistance; |
---|
| 181 | G4double CALTKRDistance; |
---|
| 182 | G4double TKRActiveTileXY; |
---|
| 183 | G4double TKRActiveTileZ; |
---|
| 184 | |
---|
| 185 | G4double SiliconGuardRing; |
---|
| 186 | G4int NbOfTKRStrips; |
---|
| 187 | |
---|
| 188 | G4double TKRXStripX; |
---|
| 189 | G4double TKRYStripX; |
---|
| 190 | G4double TKRXStripY; |
---|
| 191 | G4double TKRYStripY; |
---|
| 192 | G4double TKRZStrip; |
---|
| 193 | |
---|
| 194 | G4double PayloadSizeZ; |
---|
| 195 | G4double PayloadSizeXY; |
---|
| 196 | |
---|
| 197 | G4Material* defaultMaterial; |
---|
| 198 | G4Material* CALMaterial; |
---|
| 199 | G4Material* TKRMaterial; |
---|
| 200 | G4Material* ACDMaterial; |
---|
| 201 | G4double WorldSizeXY; |
---|
| 202 | G4double WorldSizeZ; |
---|
| 203 | |
---|
| 204 | G4Box* solidWorld; // World |
---|
| 205 | G4LogicalVolume* logicWorld; |
---|
| 206 | G4VPhysicalVolume* physiWorld; |
---|
| 207 | |
---|
| 208 | G4Box* solidPayload; // Payload |
---|
| 209 | G4LogicalVolume* logicPayload; |
---|
| 210 | G4VPhysicalVolume* physiPayload; |
---|
| 211 | |
---|
| 212 | G4Box* solidTKR; // Tracker |
---|
| 213 | G4LogicalVolume* logicTKR; |
---|
| 214 | G4VPhysicalVolume* physiTKR; |
---|
| 215 | |
---|
| 216 | G4Box* solidCAL; // Calorimeter |
---|
| 217 | G4LogicalVolume* logicCAL; |
---|
| 218 | G4VPhysicalVolume* physiCAL; |
---|
| 219 | |
---|
| 220 | G4Box* solidACT; // Top Anticoincidence |
---|
| 221 | G4LogicalVolume* logicACT; |
---|
| 222 | G4VPhysicalVolume* physiACT; |
---|
| 223 | |
---|
| 224 | G4Box* solidACL1; // Lateral Anticoincidence |
---|
| 225 | G4LogicalVolume* logicACL1; |
---|
| 226 | G4VPhysicalVolume* physiACL1; |
---|
| 227 | |
---|
| 228 | G4Box* solidACL2; |
---|
| 229 | G4LogicalVolume* logicACL2; |
---|
| 230 | G4VPhysicalVolume* physiACL2; |
---|
| 231 | |
---|
| 232 | G4Box* solidTKRDetectorX; // Tracker PLANE X |
---|
| 233 | G4LogicalVolume* logicTKRDetectorX; |
---|
| 234 | G4VPhysicalVolume* physiTKRDetectorX; |
---|
| 235 | |
---|
| 236 | G4Box* solidTKRDetectorY; // Tracker PLANE Y |
---|
| 237 | G4LogicalVolume* logicTKRDetectorY; |
---|
| 238 | G4VPhysicalVolume* physiTKRDetectorY; |
---|
| 239 | |
---|
| 240 | G4Box* solidCALLayerX; // Calorimeter PLANE X |
---|
| 241 | G4LogicalVolume* logicCALLayerX; |
---|
| 242 | G4VPhysicalVolume* physiCALLayerX; |
---|
| 243 | |
---|
| 244 | G4Box* solidCALLayerY; // Calorimeter PLANE Y |
---|
| 245 | G4LogicalVolume* logicCALLayerY; |
---|
| 246 | G4VPhysicalVolume* physiCALLayerY; |
---|
| 247 | |
---|
| 248 | G4Box* solidCALDetectorX; // Calorimeter DETECTOR X |
---|
| 249 | G4LogicalVolume* logicCALDetectorX; |
---|
| 250 | G4VPhysicalVolume* physiCALDetectorX; |
---|
| 251 | |
---|
| 252 | G4Box* solidCALDetectorY; // Calorimeter DETECTOR Y |
---|
| 253 | G4LogicalVolume* logicCALDetectorY; |
---|
| 254 | G4VPhysicalVolume* physiCALDetectorY; |
---|
| 255 | |
---|
| 256 | G4Box* solidPlane; // Support Plane |
---|
| 257 | G4LogicalVolume* logicPlane; |
---|
| 258 | G4VPhysicalVolume* physiPlane; |
---|
| 259 | |
---|
| 260 | G4Box* solidConverter; // Converter |
---|
| 261 | G4LogicalVolume* logicConverter; |
---|
| 262 | G4VPhysicalVolume* physiConverter; |
---|
| 263 | |
---|
| 264 | G4UniformMagField* magField; //pointer to the magnetic field |
---|
| 265 | |
---|
| 266 | GammaRayTelDetectorMessenger* detectorMessenger; //pointer to the Messenger |
---|
| 267 | GammaRayTelTrackerSD* trackerSD; //pointer to the sensitive detector |
---|
| 268 | GammaRayTelCalorimeterSD* calorimeterSD; //pointer to the sensitive detector |
---|
| 269 | GammaRayTelAnticoincidenceSD* anticoincidenceSD; //pointer to the sensitive detector |
---|
| 270 | |
---|
| 271 | G4Region* aTKRRegion; // TKR cut region |
---|
| 272 | G4Region* aCALRegion; // CAL cut region |
---|
| 273 | |
---|
| 274 | private: |
---|
| 275 | |
---|
| 276 | void DefineMaterials(); |
---|
| 277 | void ComputePayloadParameters(); |
---|
| 278 | G4VPhysicalVolume* ConstructPayload(); |
---|
| 279 | }; |
---|
| 280 | |
---|
| 281 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 282 | |
---|
| 283 | inline void GammaRayTelDetectorConstruction::ComputePayloadParameters() |
---|
| 284 | { |
---|
| 285 | // Compute derived parameters of the payload |
---|
| 286 | |
---|
| 287 | TKRSupportThickness =TKRLayerDistance -2.*TKRSiliconThickness |
---|
| 288 | - TKRViewsDistance - ConverterThickness; |
---|
| 289 | TKRSizeXY = NbOfTKRTiles*TKRSiliconTileXY + (NbOfTKRTiles+1)*TilesSeparation; |
---|
| 290 | TKRSizeZ = NbOfTKRLayers*TKRLayerDistance; |
---|
| 291 | |
---|
| 292 | TKRActiveTileXY = TKRSiliconTileXY - 2*SiliconGuardRing; |
---|
| 293 | TKRActiveTileZ = TKRSiliconThickness; |
---|
| 294 | NbOfTKRStrips = G4int(TKRActiveTileXY/TKRSiliconPitch); |
---|
| 295 | |
---|
| 296 | SiliconGuardRing = TKRActiveTileXY - NbOfTKRStrips*TKRSiliconPitch; |
---|
| 297 | TKRActiveTileXY = TKRSiliconTileXY - 2*SiliconGuardRing; |
---|
| 298 | |
---|
| 299 | TKRXStripX = TKRYStripY = TKRSiliconPitch; |
---|
| 300 | TKRYStripX = TKRXStripY = TKRActiveTileXY; |
---|
| 301 | TKRZStrip = TKRSiliconThickness; |
---|
| 302 | |
---|
| 303 | CALSizeXY = TKRSizeXY; |
---|
| 304 | CALSizeZ = 2.*NbOfCALLayers*CALBarThickness; |
---|
| 305 | |
---|
| 306 | CALBarX = CALSizeXY; |
---|
| 307 | CALBarY = CALSizeXY/(NbOfCALBars); |
---|
| 308 | CALBarZ = CALBarThickness; |
---|
| 309 | |
---|
| 310 | ACTSizeXY = TKRSizeXY + 2*ACDTKRDistance + 2*ACDThickness; |
---|
| 311 | ACTSizeZ = ACDThickness; |
---|
| 312 | |
---|
| 313 | ACL1SizeX = TKRSizeXY + 2*ACDTKRDistance + ACDThickness; |
---|
| 314 | ACL1SizeY = ACDThickness; |
---|
| 315 | ACL1SizeZ = TKRSizeZ + CALSizeZ + ACDTKRDistance + CALTKRDistance; |
---|
| 316 | |
---|
| 317 | ACL2SizeX = ACDThickness; |
---|
| 318 | ACL2SizeY = TKRSizeXY + 2*ACDTKRDistance + ACDThickness; |
---|
| 319 | ACL2SizeZ = TKRSizeZ + CALSizeZ + ACDTKRDistance + CALTKRDistance; |
---|
| 320 | |
---|
| 321 | PayloadSizeZ = 1.1*(ACL1SizeZ + ACTSizeZ); |
---|
| 322 | PayloadSizeXY = (ACTSizeXY); |
---|
| 323 | |
---|
| 324 | WorldSizeZ = 1.5*PayloadSizeZ; WorldSizeXY = 1.5*PayloadSizeXY; |
---|
| 325 | |
---|
| 326 | } |
---|
| 327 | |
---|
| 328 | #endif |
---|
| 329 | |
---|
| 330 | |
---|
| 331 | |
---|
| 332 | |
---|
| 333 | |
---|
| 334 | |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | |
---|