source: trunk/examples/extended/field/field03/include/F03DetectorConstruction.hh@ 1036

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

update

File size: 5.6 KB
RevLine 
[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: F03DetectorConstruction.hh,v 1.6 2006/06/29 17:18:40 gunter Exp $
28// GEANT4 tag $Name: $
29//
30//
31
32#ifndef F03DetectorConstruction_h
33#define F03DetectorConstruction_h 1
34
35#include "G4VUserDetectorConstruction.hh"
36#include "globals.hh"
37#include "G4ios.hh"
38
39class G4Box;
40class G4Tubs;
41class G4LogicalVolume;
42class G4VPhysicalVolume;
43class G4Material;
44class G4UniformMagField;
45class F03DetectorMessenger;
46class F03CalorimeterSD;
47class F03FieldSetup;
48
49
50class F03DetectorConstruction : public G4VUserDetectorConstruction
51{
52 public:
53
54 F03DetectorConstruction();
55 ~F03DetectorConstruction();
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 G4VPhysicalVolume* Construct();
70
71 void UpdateGeometry();
72
73 public:
74
75 void PrintCalorParameters();
76
77 G4Material* GetWorldMaterial() {return WorldMaterial;};
78 G4double GetWorldSizeZ() {return WorldSizeZ;};
79 G4double GetWorldSizeR() {return WorldSizeR;};
80
81 G4double GetAbsorberZpos() {return zAbsorber;};
82 G4double GetzstartAbs() {return zstartAbs;};
83 G4double GetzendAbs() {return zendAbs;};
84
85 G4Material* GetAbsorberMaterial() {return AbsorberMaterial;};
86 G4double GetAbsorberThickness() {return AbsorberThickness;};
87 G4double GetAbsorberRadius() {return AbsorberRadius;};
88
89 const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};
90 const G4VPhysicalVolume* GetAbsorber() {return physiAbsorber;};
91 G4LogicalVolume* GetLogicalAbsorber() {return logicAbsorber;};
92
93 private:
94
95 G4Tubs* solidWorld; // pointer to the solid World
96 G4LogicalVolume* logicWorld; // pointer to the logical World
97 G4VPhysicalVolume* physiWorld; // pointer to the physical World
98
99 G4Tubs* solidAbsorber; // pointer to the solid Absorber
100 G4LogicalVolume* logicAbsorber; // pointer to the logical Absorber
101 G4VPhysicalVolume* physiAbsorber; // pointer to the physical Absorber
102
103 G4UniformMagField* magField; // pointer to the magnetic field
104 F03FieldSetup* fEmFieldSetup;
105 F03DetectorMessenger* detectorMessenger; // pointer to the Messenger
106 F03CalorimeterSD* calorimeterSD; // pointer to the sensitive detector
107
108 // TR radiator volumes and dimensions
109
110 G4Tubs* fSolidRadSlice; // pointer to the solid z-slice
111 G4LogicalVolume* fLogicRadSlice; // pointer to the logical z-slide
112 G4VPhysicalVolume* fPhysicRadSlice; // pointer to the physical z-slide
113
114 G4Tubs* solidRadiator;
115 G4LogicalVolume* logicRadiator;
116 G4VPhysicalVolume* physiRadiator;
117
118 G4Material* AbsorberMaterial;
119 G4double AbsorberThickness;
120 G4double AbsorberRadius;
121 G4Material* fRadiatorMat; // pointer to the TR radiator material
122 G4bool worldchanged;
123
124 G4double zAbsorber ;
125 G4double zstartAbs , zendAbs ;
126
127 G4Material* WorldMaterial;
128 G4double WorldSizeR;
129 G4double WorldSizeZ;
130
131 G4double fRadThickness ;
132 G4double fGasGap ;
133
134 G4int fFoilNumber ;
135
136 G4double fDetGap ;
137
138 G4double fStartR ;
139 G4double fStartZ ;
140
141 private:
142
143 void DefineMaterials();
144 void ComputeCalorParameters();
145 G4VPhysicalVolume* ConstructCalorimeter();
146};
147
148//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
149
150inline void F03DetectorConstruction::ComputeCalorParameters()
151{
152 // Compute derived parameters of the calorimeter
153
154 zstartAbs = zAbsorber-0.5*AbsorberThickness;
155 zendAbs = zAbsorber+0.5*AbsorberThickness;
156
157}
158
159#endif
Note: See TracBrowser for help on using the repository browser.