Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ExN03DetectorConstruction.hh
Go to the documentation of this file.
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 66892 2013-01-17 10:57:59Z gunter $
28 //
29 //
30 
31 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
34 #ifndef ExN03DetectorConstruction_h
35 #define ExN03DetectorConstruction_h 1
36 
38 #include "globals.hh"
39 
40 class G4Box;
41 class G4LogicalVolume;
42 class G4VPhysicalVolume;
43 class G4Material;
44 class G4UniformMagField;
46 
47 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48 
50 {
51  public:
52 
55 
56  public:
57 
60 
61  void SetGapMaterial (G4String);
63 
64  void SetCalorSizeYZ(G4double);
65  void SetNbOfLayers (G4int);
66 
67  void SetMagField(G4double);
68 
70 
71  void UpdateGeometry();
72 
73  public:
74 
75  void PrintCalorParameters();
76 
77  G4double GetWorldSizeX() {return WorldSizeX;};
78  G4double GetWorldSizeYZ() {return WorldSizeYZ;};
79 
80  G4double GetCalorThickness() {return CalorThickness;};
81  G4double GetCalorSizeYZ() {return CalorSizeYZ;};
82 
83  G4int GetNbOfLayers() {return NbOfLayers;};
84 
85  G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
86  G4double GetAbsorberThickness() {return AbsorberThickness;};
87 
88  G4Material* GetGapMaterial() {return GapMaterial;};
89  G4double GetGapThickness() {return GapThickness;};
90 
91  const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
92  const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
93  const G4VPhysicalVolume* GetGap() {return physiGap;};
94 
95  private:
96 
97  G4Material* AbsorberMaterial;
98  G4double AbsorberThickness;
99 
100  G4Material* GapMaterial;
101  G4double GapThickness;
102 
103  G4int NbOfLayers;
104  G4double LayerThickness;
105 
106  G4double CalorSizeYZ;
107  G4double CalorThickness;
108 
109  G4Material* defaultMaterial;
110  G4double WorldSizeYZ;
111  G4double WorldSizeX;
112 
113  G4Box* solidWorld; //pointer to the solid World
114  G4LogicalVolume* logicWorld; //pointer to the logical World
115  G4VPhysicalVolume* physiWorld; //pointer to the physical World
116 
117  G4Box* solidCalor; //pointer to the solid Calor
118  G4LogicalVolume* logicCalor; //pointer to the logical Calor
119  G4VPhysicalVolume* physiCalor; //pointer to the physical Calor
120 
121  G4Box* solidLayer; //pointer to the solid Layer
122  G4LogicalVolume* logicLayer; //pointer to the logical Layer
123  G4VPhysicalVolume* physiLayer; //pointer to the physical Layer
124 
125  G4Box* solidAbsorber; //pointer to the solid Absorber
126  G4LogicalVolume* logicAbsorber; //pointer to the logical Absorber
127  G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
128 
129  G4Box* solidGap; //pointer to the solid Gap
130  G4LogicalVolume* logicGap; //pointer to the logical Gap
131  G4VPhysicalVolume* physiGap; //pointer to the physical Gap
132 
133  G4UniformMagField* magField; //pointer to the magnetic field
134 
135  ExN03DetectorMessenger* detectorMessenger; //pointer to the Messenger
136 
137  private:
138 
139  void DefineMaterials();
140  void ComputeCalorParameters();
141  G4VPhysicalVolume* ConstructCalorimeter();
142 };
143 
144 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
145 
146 inline void ExN03DetectorConstruction::ComputeCalorParameters()
147 {
148  // Compute derived parameters of the calorimeter
149  LayerThickness = AbsorberThickness + GapThickness;
150  CalorThickness = NbOfLayers*LayerThickness;
151 
152  WorldSizeX = 1.2*CalorThickness; WorldSizeYZ = 1.2*CalorSizeYZ;
153 }
154 
155 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
156 
157 #endif
158 
Definition: G4Box.hh:63
const G4VPhysicalVolume * GetGap()
int G4int
Definition: G4Types.hh:78
const G4VPhysicalVolume * GetphysiWorld()
const G4VPhysicalVolume * GetAbsorber()
double G4double
Definition: G4Types.hh:76