source: trunk/examples/advanced/raredecay_calorimetry/include/PhotInDetectorConstruction.hh@ 1344

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

update

File size: 5.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//
27// $Id: PhotInDetectorConstruction.hh,v 1.3 2006/06/29 16:24:41 gunter Exp $
28// GEANT4 tag $Name: $
29//
30//
31
32#ifndef PhotInDetectorConstruction_h
33#define PhotInDetectorConstruction_h 1
34
35#include "G4VUserDetectorConstruction.hh"
36
37#include "PhotInLayerParameterisation.hh"
38#include "PhotInGapParameterisation.hh"
39#include "PhotInCalorimeterSD.hh"
40#include "PhotInConstants.hh"
41
42#include "globals.hh"
43#include "G4ios.hh"
44#include "G4LogicalVolume.hh"
45#include "G4VPhysicalVolume.hh"
46#include "G4PVParameterised.hh"
47#include "G4PVPlacement.hh"
48#include "G4Material.hh"
49#include "G4Box.hh"
50#include "G4RunManager.hh"
51#include "G4SDManager.hh"
52#include "G4VisAttributes.hh"
53#include "G4Colour.hh"
54
55class PhotInDetectorConstruction : public G4VUserDetectorConstruction
56{
57public:
58 // Constructor ^ Distructor
59 PhotInDetectorConstruction(G4double x=1., G4double y=1., G4double z=1.);
60 virtual ~PhotInDetectorConstruction();
61
62 // Interface for the Geometry Construction (can be overloaded)
63 virtual G4VPhysicalVolume* Construct();
64
65 // Member functions
66 void CreateMaterial(G4String materialChoice);
67 void UpdateGeometry();
68 void PrintCalorParameters() const;
69 void SetAbsorberMaterial(G4String materialChoice);
70 void SetGapMaterial(G4String materialChoice);
71 void SetSerialGeometry(G4bool ser);
72 void SetNumberOfLayers(G4int ln);
73 void SetNumberOfSlabs(G4int sn);
74 void SetSamplingFraction(G4double sf);
75 //void SetSectionHalfDimensions(G4double xhd,G4double xhd, G4double xhd);
76 // Immediate definition of Get functions
77 G4double GetHalfZThickness() { return zHD; }
78 G4double GetHalfYWidth() { return yHD; }
79 G4double GetHalfXHight() { return xHD; }
80 G4String GetAbsorberMaterial() const { return absorberMaterial->GetName();}
81 G4String GetGapMaterial() const { return gapMaterial->GetName();};
82 G4int GetNumberOfLayers() const { return numberOfLayers; }
83 G4int GetNumberOfSlabs() const { return numberOfSlabs; }
84 G4double GetSamplingFraction() const { return samplingFraction; }
85 G4bool IsSerial() const { return serial; }
86
87private:
88 void DefineMaterials();
89
90 // ---- Body ----
91 G4int numberOfLayers; // #of layers in one section of Calorimeter
92 G4int numberOfSlabs; // #of slabs of the active gap in a layer
93 G4double samplingFraction; // gap_thickness/total_thickness
94 G4double xHD; // Dimension of the section along the slab
95 G4double yHD; // Dimension of the section perpend the slab
96 G4double zHD; // Dimension of the section perpen the layer
97
98 G4bool serial; // A flag of serial or parallel layout
99
100 G4Material* worldMaterial; // Material of the WORLD volume (?shape)
101 G4Material* absorberMaterial; // Material of the Absorber (variable)
102 G4Material* gapMaterial; // Material of the Active Gap (variable)
103
104 G4Box* layerSolid; // Layer of absorber including a gap
105 G4Box* slabSolid; // Active Gap (SD=Sensitive Detector)
106 G4LogicalVolume* calorLogical[PhotInNumSections]; // logVol's for CalorSections
107 G4LogicalVolume* layerLogical[PhotInNumSections]; // logVol's for LayersOfSects
108 G4LogicalVolume* slabLogical[PhotInNumSections]; // logVol's for SlabsOfLayers
109 G4VPhysicalVolume* calorPhysical[PhotInNumSections];//physVol's for CalSections
110 G4PVParameterised* layerPhysical[PhotInNumSections];//physVol's for LayersOfSects
111 G4PVParameterised* slabPhysical[PhotInNumSections]; //physVol's for SlabsOfLayers
112
113 PhotInLayerParameterisation* layerParam; // Parameterization of layers
114 PhotInGapParameterisation* gapParam; // Parameterization of gaps
115
116};
117
118#endif
119
Note: See TracBrowser for help on using the repository browser.