source: trunk/source/geometry/magneticfield/test/field03/include/F03DetectorConstruction.hh @ 1202

Last change on this file since 1202 was 1199, checked in by garnier, 15 years ago

nvx fichiers dans CVS

File size: 6.4 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: F03DetectorConstruction.hh,v 1.2 2006/06/29 18:29:11 gunter Exp $
28// GEANT4 tag $Name: HEAD $
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 F03ElectroMagneticField;
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     void SetMagField(G4double);
70     
71     G4VPhysicalVolume* Construct();
72
73     void UpdateGeometry();
74     
75  public:
76 
77     void PrintCalorParameters(); 
78                   
79     G4Material* GetWorldMaterial()    {return WorldMaterial;};
80     G4double GetWorldSizeZ()          {return WorldSizeZ;}; 
81     G4double GetWorldSizeR()          {return WorldSizeR;};
82     
83     G4double GetAbsorberZpos()        {return zAbsorber;}; 
84     G4double GetzstartAbs()           {return zstartAbs;};
85     G4double GetzendAbs()             {return zendAbs;};
86
87     G4Material* GetAbsorberMaterial()  {return AbsorberMaterial;};
88     G4double    GetAbsorberThickness() {return AbsorberThickness;};     
89     G4double GetAbsorberRadius()       {return AbsorberRadius;};
90     
91     const G4VPhysicalVolume* GetphysiWorld() {return physiWorld;};           
92     const G4VPhysicalVolume* GetAbsorber()   {return physiAbsorber;};
93     G4LogicalVolume* GetLogicalAbsorber()    {return logicAbsorber;};
94                 
95  private:
96     
97     G4bool             worldchanged;
98     G4Material*        AbsorberMaterial;
99     G4double           AbsorberThickness;
100     G4double           AbsorberRadius;
101
102  G4Material*        fWindowMat ;
103  G4double           fWindowThick ;
104
105  G4Material*        fElectrodeMat ;
106  G4double           fElectrodeThick ;
107
108  G4Material*        fGapMat ;
109  G4double           fGapThick ;
110
111 
112     G4double           zAbsorber ;
113     G4double           zstartAbs , zendAbs ;
114     
115     G4Material*        WorldMaterial;
116     G4double           WorldSizeR;
117     G4double           WorldSizeZ;
118           
119     G4Tubs*             solidWorld;    //pointer to the solid World
120     G4LogicalVolume*   logicWorld;    //pointer to the logical World
121     G4VPhysicalVolume* physiWorld;    //pointer to the physical World
122
123  // TR radiator volumes and dimensions
124         
125     G4Tubs*            fSolidRadSlice;   // pointer to the solid  z-slice
126     G4LogicalVolume*   fLogicRadSlice;   // pointer to the logical z-slide
127     G4VPhysicalVolume* fPhysicRadSlice;  // pointer to the physical z-slide
128
129     G4Tubs*            fSolidRadRing;    // pointer to the solid  R-slice
130     G4LogicalVolume*   fLogicRadRing;    // pointer to the logical R-slide
131     G4VPhysicalVolume* fPhysicRadRing;   // pointer to the physical R-slide
132
133
134     G4Tubs*             solidRadiator;
135     G4LogicalVolume*   logicRadiator; 
136     G4VPhysicalVolume* physiRadiator;
137
138
139     G4Material* fRadiatorMat;        //pointer to the TR radiator material
140
141     G4double fRadThickness ;
142     G4double fGasGap       ;
143
144     G4int fFoilNumber ;
145
146     G4double fDetThickness ;
147     G4double fDetLength    ;
148     G4double fDetGap       ;
149
150     G4double fStartR       ;
151     G4double fStartZ       ;
152
153     G4int fModuleNumber ;   // the number of Rad-Det modules
154
155     G4Tubs*             solidAbsorber; //pointer to the solid Absorber
156     G4LogicalVolume*   logicAbsorber; //pointer to the logical Absorber
157     G4VPhysicalVolume* physiAbsorber; //pointer to the physical Absorber
158     
159     G4UniformMagField* magField;      //pointer to the magnetic field
160     F03ElectroMagneticField* fEmField;     
161     F03DetectorMessenger* detectorMessenger;  //pointer to the Messenger
162     F03CalorimeterSD* calorimeterSD;  //pointer to the sensitive detector
163     
164  private:
165   
166     void DefineMaterials();
167     void ComputeCalorParameters();
168     G4VPhysicalVolume* ConstructCalorimeter();     
169};
170
171//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
172
173inline void F03DetectorConstruction::ComputeCalorParameters()
174{
175  // Compute derived parameters of the calorimeter
176     if(!worldchanged)
177     {
178       //  WorldSizeR=2.*AbsorberRadius ;
179       //  WorldSizeZ=2.*AbsorberThickness ;
180     }
181     
182     zstartAbs = zAbsorber-0.5*AbsorberThickness; 
183     zendAbs   = zAbsorber+0.5*AbsorberThickness; 
184
185}
186
187#endif
188
Note: See TracBrowser for help on using the repository browser.