-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDetectorConstruction.hh~
135 lines (97 loc) · 4.38 KB
/
DetectorConstruction.hh~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#ifndef DetectorConstruction_h
#define DetectorConstruction_h 1
#include "G4VUserDetectorConstruction.hh"
#include "G4Cache.hh"
class G4Box;
class G4Tubs;
class G4LogicalVolume;
class G4VPhysicalVolume;
class G4Material;
class G4UniformMagField;
class DetectorMessenger;
class ElectricFieldSetup;
class DetectorConstruction : public G4VUserDetectorConstruction
{
public:
DetectorConstruction();
virtual ~DetectorConstruction();
public:
void SetAbsorberMaterial (G4String);
void SetAbsorberThickness(G4double);
void SetAbsorberRadius(G4double);
void SetAbsorberInnerRadius(G4double);
void SetAbsorberZpos(G4double);
void SetPMTMaterial (G4String);
void SetWinMaterial (G4String);
void SetSSMaterial(G4String);
void SetWorldMaterial(G4String);
void SetWorldSizeZ(G4double);
void SetWorldSizeR(G4double);
virtual G4VPhysicalVolume* Construct();
virtual void ConstructSDandField();
public:
void PrintCalorParameters();
G4Material* GetWorldMaterial() {return fWorldMaterial;}
G4double GetWorldSizeZ() {return fWorldSizeZ;}
G4double GetWorldSizeR() {return fWorldSizeR;}
G4double GetAbsorberZpos() {return fZAbsorber;}
G4double GetZStartAbs() {return fZStartAbs;}
G4double GetZEndAbs() {return fZEndAbs;}
G4Material* GetAbsorberMaterial() {return fAbsorberMaterial;}
G4double GetAbsorberThickness(){return fAbsorberThickness;}
G4double GetAbsorberRadius() {return fAbsorberRadius;}
G4double GetAbsorberInnerRadius() {return fAbsorberInnerRadius;}
G4Material* GetPMTMaterial() {return fWorldMaterial;}
G4Material* GetWinMaterial() {return fWinMaterial;}
G4Material* GetSSMaterial() {return fSSMaterial;}
const G4VPhysicalVolume* GetPhysiWorld() {return fPhysiWorld;}
const G4VPhysicalVolume* GetAbsorber() {return fPhysiAbsorber;}
const G4VPhysicalVolume* GetPhysiPMT() {return fPhysiPMT;}
const G4VPhysicalVolume* GetPhysiWin() {return fPhysiWin;}
const G4VPhysicalVolume* GetPhysiSS() {return fPhysiSS;}
G4LogicalVolume* GetLogicalAbsorber() {return fLogicAbsorber;}
private:
DetectorMessenger* fDetectorMessenger; // pointer -> Messenger
//G4Cache<CalorimeterSD*> fCalorimeterSD; // pointer -> sensitive detector
G4Cache<ElectricFieldSetup*> fEmFieldSetup;
G4Tubs* fSolidWorld; // pointer to the solid World
G4LogicalVolume* fLogicWorld; // pointer to the logical World
G4VPhysicalVolume* fPhysiWorld; // pointer to the physical World
G4Tubs* fSolidAbsorber; // pointer to the solid Absorber
G4LogicalVolume* fLogicAbsorber; // pointer to the logical Absorber
G4VPhysicalVolume* fPhysiAbsorber; // pointer to the physical Absorber
G4VPhysicalVolume* fPhysiAbsorber2; // pointer to the physical Absorber
G4Box* fSolidPMT; // pointer to the solid PMT
G4LogicalVolume* fLogicPMT; // pointer to the logical PMT
G4VPhysicalVolume* fPhysiPMT; // pointer to the physical PMT
G4Tubs* fSolidWin; // pointer to the solid Window
G4LogicalVolume* fLogicWin; // pointer to the logical Window
G4VPhysicalVolume* fPhysiWin; // pointer to the physical Window
G4Tubs* fSolidSS; // pointer to the solid Sample Space
G4LogicalVolume* fLogicSS; // pointer to the logical Sample Space
G4VPhysicalVolume* fPhysiSS; // pointer to the physical Sample Space
G4Material* fAbsorberMaterial;
G4double fAbsorberThickness;
G4double fAbsorberRadius;
G4double fAbsorberInnerRadius;
G4bool fWorldChanged;
G4double fZAbsorber;
G4double fZStartAbs, fZEndAbs;
G4Material* fWinMaterial;
G4Material* fSSMaterial;
G4Material* fWorldMaterial;
G4double fWorldSizeR;
G4double fWorldSizeZ;
private:
void DefineMaterials();
void ComputeCalorParameters();
G4VPhysicalVolume* ConstructCalorimeter();
G4LogicalVolume *fLogicalPMT;
};
inline void DetectorConstruction::ComputeCalorParameters()
{
// Compute derived parameters of the calorimeter
fZStartAbs = fZAbsorber-0.5*fAbsorberThickness;
fZEndAbs = fZAbsorber+0.5*fAbsorberThickness;
}
#endif