SToGS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
SToGS_TwoShellsDetectorConstruction.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 // $Id: SToGS_TwoShellsDetectorConstruction.hh,v 1.8 2006/06/29 17:47:30 gunter Exp $
27 // GEANT4 tag $Name: geant4-08-02 $
28 //
29 #ifndef SToGS_TwoShellsDetectorConstruction_h
30 #define SToGS_TwoShellsDetectorConstruction_h 1
31 
32 #include "globals.hh"
33 #include "G4VUserDetectorConstruction.hh"
34 
35 // std includes
36 #include <iostream>
37 #include <sstream>
38 #include <fstream>
39 
40 class G4Box;
41 class G4Sphere;
42 class G4LogicalVolume;
43 class G4VPhysicalVolume;
44 class G4Material;
45 
47 namespace SToGS {
49 
93  class TwoShellsDetectorConstruction : public G4VUserDetectorConstruction
94  {
95  public:
97 
105  TwoShellsDetectorConstruction(G4String filename);
107 
109  virtual G4VPhysicalVolume* Construct();
111  virtual void ConstructSDandField();
112 
113  private:
115 
118  struct aShell
119  {
120  aShell();
121  aShell(const aShell &);
122 
123  G4String Name;
124  G4String MatName;
125 
126  G4double RMin;
127  G4double RMax;
128  G4double PhiStart;
129  G4double PhiDelta;
130  G4double ThetaStart;
131  G4double ThetaDelta;
132 
133  G4int IsActive;
134 
135  void Print(std::ostream &);
136  };
137  aShell Inner;
138  aShell Outer;
139  std::vector<aShell *> otherShells;
140 
141  public:
143 
149  void ComputeParameters(G4String filename = "DetectorFactory/Generics/TwoShells.geo");
150 
151  private:
152  G4Box* solidWorld; // pointer to the solid envelope
153  G4LogicalVolume* logicWorld; // pointer to the logical envelope
154  G4VPhysicalVolume* physiWorld; // pointer to the physical envelope
155 
156  G4LogicalVolume* logicInner; // pointer to the logical envelope
157  G4LogicalVolume* logicOuter; // pointer to the logical envelope
158  };
159 } // SToGS Namespace
160 
161 #endif
void ComputeParameters(G4String filename="DetectorFactory/Generics/TwoShells.geo")
from a given file, it computes the parameters of the two shells
virtual G4VPhysicalVolume * Construct()
One of the mandatory class to be implemented in order to have G4 working properly.
virtual void ConstructSDandField()
NEW G4.10 ... but also define for G4.9 except is is called explicitely at the end of Construct...
Detector composed of a set of concentric shells with two (possibly one) active shells.