source: trunk/source/processes/electromagnetic/lowenergy/test/hTest/include/hTestDetectorConstruction.hh@ 1201

Last change on this file since 1201 was 1199, checked in by garnier, 16 years ago

nvx fichiers dans CVS

File size: 6.5 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#ifndef hTestDetectorConstruction_h
27#define hTestDetectorConstruction_h 1
28
29// -------------------------------------------------------------
30//
31//
32// -------------------------------------------------------------
33// GEANT4 hTest
34//
35// History: based on object model of
36// 2nd December 1995, G.Cosmo
37// ---------- hTestDetectorConstruction -------
38//
39// Modified: 05.04.01 Vladimir Ivanchenko new design of hTest
40//
41// -------------------------------------------------------------
42
43//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
44//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
45
46#include "G4VUserDetectorConstruction.hh"
47#include "G4VPhysicalVolume.hh"
48#include "G4LogicalVolume.hh"
49#include "G4Box.hh"
50#include "G4Material.hh"
51#include "G4UniformMagField.hh"
52#include "globals.hh"
53#include "G4ios.hh"
54
55class hTestCalorimeterSD;
56class hTestEventAction;
57class hTestDetectorMessenger;
58
59//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
60
61class hTestDetectorConstruction : public G4VUserDetectorConstruction
62{
63 public:
64
65 hTestDetectorConstruction();
66 ~hTestDetectorConstruction();
67
68 public:
69
70 inline void SetAbsorberMaterial(const G4String& v) {nameMatAbsorber = v;};
71 inline G4Material* GetAbsorberMaterial() const {return AbsorberMaterial;};
72 void SetNumberOfAbsorbers(G4int);
73 inline G4int GetNumberOfAbsorbers() const {return NumberOfAbsorbers;};
74 void SetAbsorberThickness(G4double);
75 inline G4double GetAbsorberThickness() const {return AbsorberThickness;};
76 void SetAbsorberSizeXY (G4double);
77 inline G4double GetAbsorberSizeXY() const {return SizeXY;};
78 inline void SetWorldMaterial(const G4String& v) {nameMatWorld = v;};
79 inline G4Material* GetWorldMaterial() const {return WorldMaterial;};
80 void SetWorldSizeZ (G4double);
81 inline G4double GetWorldSizeZ() const {return WorldSizeZ;};
82 void SetGap(G4double val);
83 inline G4double GetGap() const {return gap;};
84 inline void SetNumberOfEvents(G4int val) {nEvents = val;};
85 inline G4int GetNumberOfEvents() const {return nEvents;};
86 inline void SetEventAction(hTestEventAction* p) {theEvent = p;};
87 inline hTestEventAction* GetEventAction() const {return theEvent;};
88 inline void SetVerbose(G4int val) {myVerbose = val;};
89 inline G4int GetVerbose() const {return myVerbose;};
90 inline void SetNumAbsorbersSaved(G4int val) {nAbsSaved = val;};
91 inline G4int GetNumAbsorbersSaved() const {return nAbsSaved;};
92 inline void SetFirstEventToDebug(G4int val) {nFirstEvtToDebug = val;};
93 inline G4int GetFirstEventToDebug() const {return nFirstEvtToDebug;};
94 inline void SetLastEventToDebug(G4int val) {nLastEvtToDebug = val;};
95 inline G4int GetLastEventToDebug() const {return nLastEvtToDebug;};
96 inline G4double GetMaxDeltaEnergy() const {return maxDelta;};
97 inline void SetMaxDeltaEnergy(G4double val) {maxDelta = val;};
98
99 inline const G4VPhysicalVolume* GetPhysWorld() const {return physWorld;};
100 inline const G4LogicalVolume* GetAbsorber() const {return logicAbs;};
101
102 void SetMagField(G4double,G4int);
103
104 G4VPhysicalVolume* Construct();
105 void UpdateGeometry();
106 void PrintGeomParameters();
107
108 private:
109
110 // Methods
111
112 void DefineMaterials();
113 G4Material* GetMaterial(const G4String&);
114 void ComputeGeomParameters();
115 G4VPhysicalVolume* ConstructGeometry();
116 void GeometryIsChanged();
117 void MaterialIsChanged();
118
119 // Members
120
121 G4String nameMatAbsorber;
122 G4Material* AbsorberMaterial;
123 G4double AbsorberThickness; //
124 G4double SizeXY;
125 G4double gap;
126
127 G4int NumberOfAbsorbers;
128
129 G4double ZposAbs;
130
131 G4String nameMatWorld;
132 G4Material* WorldMaterial;
133 G4double WorldSizeZ;
134
135 G4Box* solidWorld; //pointer to the solid World
136 G4LogicalVolume* logicWorld; //pointer to the logical World
137 G4VPhysicalVolume* physWorld; //pointer to the physical World
138
139 G4Box* solidAbs; //pointer to the solid Absorber
140 G4LogicalVolume* logicAbs; //pointer to the logical Absorber
141 G4VPhysicalVolume* physAbs; //pointer to the physical Absorber
142
143 G4UniformMagField* magField; //pointer to the magnetic field
144
145 hTestDetectorMessenger* detectorMessenger;
146 hTestCalorimeterSD* calorimeterSD;
147 hTestEventAction* theEvent;
148
149 G4int myVerbose;
150 G4int nEvents;
151 G4bool detIsConstructed;
152 G4int nAbsSaved;
153 G4int nFirstEvtToDebug;
154 G4int nLastEvtToDebug;
155 G4double maxDelta;
156};
157
158//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
159
160#endif
161
Note: See TracBrowser for help on using the repository browser.