[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 | // $Id: DetectorConstruction.hh,v 1.2 2006/06/29 16:57:29 gunter Exp $ |
---|
| 27 | // GEANT4 tag $Name: $ |
---|
| 28 | // |
---|
| 29 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 30 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 31 | |
---|
| 32 | #ifndef DetectorConstruction_h |
---|
| 33 | #define DetectorConstruction_h 1 |
---|
| 34 | |
---|
| 35 | #include "G4VUserDetectorConstruction.hh" |
---|
| 36 | #include "globals.hh" |
---|
| 37 | #include "G4ThreeVector.hh" |
---|
| 38 | |
---|
| 39 | class G4LogicalVolume; |
---|
| 40 | class G4Material; |
---|
| 41 | class G4UniformMagField; |
---|
| 42 | class DetectorMessenger; |
---|
| 43 | |
---|
| 44 | const G4int MaxTally = 20; |
---|
| 45 | |
---|
| 46 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 47 | |
---|
| 48 | class DetectorConstruction : public G4VUserDetectorConstruction |
---|
| 49 | { |
---|
| 50 | public: |
---|
| 51 | |
---|
| 52 | DetectorConstruction(); |
---|
| 53 | ~DetectorConstruction(); |
---|
| 54 | |
---|
| 55 | public: |
---|
| 56 | |
---|
| 57 | void SetSizeX (G4double); |
---|
| 58 | void SetSizeYZ (G4double); |
---|
| 59 | void SetMaterial (G4String); |
---|
| 60 | void SetMagField (G4double); |
---|
| 61 | |
---|
| 62 | void SetTallySize (G4ThreeVector); |
---|
| 63 | void SetTallyMaterial (G4String); |
---|
| 64 | void SetTallyPosition (G4ThreeVector); |
---|
| 65 | |
---|
| 66 | G4VPhysicalVolume* Construct(); |
---|
| 67 | void UpdateGeometry(); |
---|
| 68 | |
---|
| 69 | public: |
---|
| 70 | |
---|
| 71 | G4double GetWorldSizeX() {return worldSizeX;}; |
---|
| 72 | G4double GetWorldSizeYZ() {return worldSizeYZ;}; |
---|
| 73 | G4Material* GetWorldMaterial() {return worldMaterial;}; |
---|
| 74 | G4double GetAbsorSizeX() {return absorSizeX;}; |
---|
| 75 | G4double GetAbsorSizeYZ() {return absorSizeYZ;}; |
---|
| 76 | G4Material* GetAbsorMaterial() {return absorMaterial;}; |
---|
| 77 | |
---|
| 78 | G4LogicalVolume* GetLogicalTally() {return lTally;} |
---|
| 79 | G4double GetTallyMass() {return tallyMass;}; |
---|
| 80 | G4int GetTallyNumber() {return tallyNumber;}; |
---|
| 81 | |
---|
| 82 | void PrintParameters(); |
---|
| 83 | |
---|
| 84 | private: |
---|
| 85 | |
---|
| 86 | G4double worldSizeX; |
---|
| 87 | G4double worldSizeYZ; |
---|
| 88 | G4Material* worldMaterial; |
---|
| 89 | G4double absorSizeX; |
---|
| 90 | G4double absorSizeYZ; |
---|
| 91 | G4Material* absorMaterial; |
---|
| 92 | G4UniformMagField* magField; |
---|
| 93 | G4LogicalVolume* lAbsor; |
---|
| 94 | |
---|
| 95 | G4ThreeVector tallySize; |
---|
| 96 | G4Material* tallyMaterial; |
---|
| 97 | G4double tallyMass; |
---|
| 98 | G4int tallyNumber; |
---|
| 99 | G4ThreeVector* tallyPosition; |
---|
| 100 | G4LogicalVolume* lTally; |
---|
| 101 | |
---|
| 102 | DetectorMessenger* detectorMessenger; |
---|
| 103 | |
---|
| 104 | private: |
---|
| 105 | |
---|
| 106 | void DefineMaterials(); |
---|
| 107 | G4VPhysicalVolume* ConstructVolumes(); |
---|
| 108 | }; |
---|
| 109 | |
---|
| 110 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... |
---|
| 111 | |
---|
| 112 | #endif |
---|
| 113 | |
---|