source: trunk/examples/extended/electromagnetic/TestEm3/include/DetectorConstruction.hh@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 4.6 KB
Line 
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.13 2006/06/29 16:51:06 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
38class G4Box;
39class G4LogicalVolume;
40class G4VPhysicalVolume;
41class G4Material;
42class G4UniformMagField;
43class DetectorMessenger;
44
45 const G4int MaxAbsor = 10; // 0 + 9
46
47//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
48
49class DetectorConstruction : public G4VUserDetectorConstruction
50{
51public:
52
53 DetectorConstruction();
54 ~DetectorConstruction();
55
56public:
57
58 void SetNbOfAbsor (G4int);
59 void SetAbsorMaterial (G4int,const G4String&);
60 void SetAbsorThickness(G4int,G4double);
61
62 void SetWorldMaterial (const G4String&);
63 void SetCalorSizeYZ (G4double);
64 void SetNbOfLayers (G4int);
65
66 void SetMagField (G4double);
67
68 G4VPhysicalVolume* Construct();
69
70 void UpdateGeometry();
71
72public:
73
74 void PrintCalorParameters();
75
76 G4double GetWorldSizeX() {return WorldSizeX;};
77 G4double GetWorldSizeYZ() {return WorldSizeYZ;};
78
79 G4double GetCalorThickness() {return CalorThickness;};
80 G4double GetCalorSizeYZ() {return CalorSizeYZ;};
81
82 G4int GetNbOfLayers() {return NbOfLayers;};
83
84 G4int GetNbOfAbsor() {return NbOfAbsor;};
85 G4Material* GetAbsorMaterial(G4int i) {return AbsorMaterial[i];};
86 G4double GetAbsorThickness(G4int i) {return AbsorThickness[i];};
87
88 const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
89 const G4Material* GetWorldMaterial() {return defaultMaterial;};
90 const G4VPhysicalVolume* GetAbsorber(G4int i) {return physiAbsor[i];};
91
92private:
93
94 G4int NbOfAbsor;
95 G4Material* AbsorMaterial [MaxAbsor];
96 G4double AbsorThickness[MaxAbsor];
97
98 G4int NbOfLayers;
99 G4double LayerThickness;
100
101 G4double CalorSizeYZ;
102 G4double CalorThickness;
103
104 G4Material* defaultMaterial;
105 G4double WorldSizeYZ;
106 G4double WorldSizeX;
107
108 G4Box* solidWorld;
109 G4LogicalVolume* logicWorld;
110 G4VPhysicalVolume* physiWorld;
111
112 G4Box* solidCalor;
113 G4LogicalVolume* logicCalor;
114 G4VPhysicalVolume* physiCalor;
115
116 G4Box* solidLayer;
117 G4LogicalVolume* logicLayer;
118 G4VPhysicalVolume* physiLayer;
119
120 G4Box* solidAbsor[MaxAbsor];
121 G4LogicalVolume* logicAbsor[MaxAbsor];
122 G4VPhysicalVolume* physiAbsor[MaxAbsor];
123
124 G4UniformMagField* magField;
125
126 DetectorMessenger* detectorMessenger;
127
128private:
129
130 void DefineMaterials();
131 void ComputeCalorParameters();
132 G4VPhysicalVolume* ConstructCalorimeter();
133};
134
135//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
136
137#endif
138
Note: See TracBrowser for help on using the repository browser.