source: trunk/examples/novice/N07/include/ExN07DetectorConstruction.hh@ 1191

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

update

File size: 3.9 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//
27// $Id: ExN07DetectorConstruction.hh,v 1.5 2006/06/29 17:54:42 gunter Exp $
28// GEANT4 tag $Name: $
29//
30//
31
32#ifndef ExN07DetectorConstruction_h
33#define ExN07DetectorConstruction_h 1
34
35#include "G4VUserDetectorConstruction.hh"
36#include "globals.hh"
37
38class G4LogicalVolume;
39class G4VPhysicalVolume;
40class G4PVReplica;
41class G4Material;
42class G4Box;
43class ExN07DetectorMessenger;
44
45class ExN07DetectorConstruction : public G4VUserDetectorConstruction
46{
47 public:
48 ExN07DetectorConstruction();
49 virtual ~ExN07DetectorConstruction();
50
51 public:
52 virtual G4VPhysicalVolume* Construct();
53
54 public:
55 void PrintCalorParameters() const;
56 void SetAbsorberMaterial(G4String materialChoice);
57 G4String GetAbsorberMaterial() const;
58 void SetGapMaterial(G4String materialChoice);
59 G4String GetGapMaterial() const;
60 void SetSerialGeometry(G4bool ser);
61 void SetNumberOfLayers(G4int nl);
62 inline G4int GetNumberOfLayers() const
63 { return numberOfLayers; }
64 inline G4bool IsSerial() const
65 { return serial; }
66
67 void AddMaterial();
68
69 G4int GetVerboseLevel() const;
70 void SetVerboseLevel(G4int val);
71
72
73 private:
74 void DefineMaterials();
75 void SetupGeometry();
76 void SetupDetectors();
77
78 private:
79 G4int numberOfLayers;
80 G4double totalThickness; // total thinkness of one calorimeter
81 G4double layerThickness; // = totalThickness / numberOfLayers
82
83 G4bool constructed;
84
85 G4String calName[3];
86
87 G4Material* worldMaterial;
88 G4Material* absorberMaterial;
89 G4Material* gapMaterial;
90
91 G4Box* layerSolid;
92 G4Box* gapSolid;
93
94 G4LogicalVolume* worldLogical;
95 G4LogicalVolume* calorLogical[3];
96 G4LogicalVolume* layerLogical[3];
97 G4LogicalVolume* gapLogical[3];
98
99 G4VPhysicalVolume* worldPhysical;
100 G4VPhysicalVolume* calorPhysical[3];
101 G4PVReplica* layerPhysical[3];
102 G4VPhysicalVolume* gapPhysical[3];
103
104 G4bool serial;
105
106 ExN07DetectorMessenger* detectorMessenger;
107
108 G4int verboseLevel;
109
110};
111
112inline G4int ExN07DetectorConstruction::GetVerboseLevel() const
113{
114 return verboseLevel;
115}
116
117inline void ExN07DetectorConstruction::SetVerboseLevel(G4int val)
118{
119 verboseLevel = val;
120}
121
122
123
124#endif
125
Note: See TracBrowser for help on using the repository browser.