-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstruction.hh
77 lines (63 loc) · 2.49 KB
/
construction.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
#ifndef CONSTRUCTION_HH
#define CONSTRUCTION_HH
#include "G4VUserDetectorConstruction.hh"
#include "G4VPhysicalVolume.hh"
#include "G4LogicalVolume.hh"
#include "G4Box.hh"
#include "G4Tubs.hh"
#include "G4PVPlacement.hh"
#include "G4PVReplica.hh"
#include "G4NistManager.hh"
#include "G4SystemOfUnits.hh"
#include "detector.hh"
// messenger
#include "G4GenericMessenger.hh"
#include "G4OpticalSurface.hh"
#include "G4LogicalSkinSurface.hh"
#include "G4VisAttributes.hh"
#include "G4TransportationManager.hh"
#include "G4PhysicalVolumeModel.hh"
#include "G4ModelingParameters.hh"
#include "G4UserLimits.hh"
#include <vector>
class MyDetectorConstruction : public G4VUserDetectorConstruction
{
public:
MyDetectorConstruction();
~MyDetectorConstruction();
// create scoring volume to store info only for that
G4LogicalVolume *GetScoringDetector() const { return fScoringDetector; }
G4LogicalVolume *GetScoringTarget() const { return fScoringTarget; }
virtual G4VPhysicalVolume *Construct();
// to access the logical volume from outside the construction function
private:
G4LogicalVolume *logicDetector;
// move this declaration here, so it's not created every time it's modified
G4Tubs *solidTarget, *solidTatDetector, *solidCyilinderEl;
G4Box *solidWorld, *solidRadiator, *solidDetector, *solidScintillator, *solidAtmosphere;
G4LogicalVolume *logicWorld, *logicRadiator, *logicScintillator, *logicTarget, *logicAtmosphere[10], *logicTatDetector;
G4VPhysicalVolume *physWorld, *physRadiator, *physDetector, *physScintillator, *physTatDetector, *physTarget, *physAtmosphere[10], *physCylinder;
G4Material *SiO2,
*H2O, *Aerogel, *worldMat, *NaI, *Air[10], *ScaledH2O;
G4Element *C, *Na, *I, *N, *O;
// let's put here the definition of the materials
void
DefineMaterials();
// function to construct cherenkov detector
void ConstructCherenkov();
// function to construct scintillator cylinder detector
void ConstructScintillator();
void ConstructTatDetector();
void ConstructTatDetector2();
void ConstructAtmosphere();
virtual void ConstructSDandField();
G4GenericMessenger *fMessenger;
G4LogicalVolume *fScoringDetector, *fScoringTarget, *fScoringVolume;
G4int nCols, nRows;
G4double xWorld, yWorld, zWorld;
G4bool isCherenkov, isScintillator, isTat, isAtmosphere;
G4OpticalSurface *mirrorSurface;
G4int n_div_Theta, n_div_Z, n_div_R;
G4double total_length, inner_radius, outer_radius;
};
#endif