-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwcdpmt.cc
86 lines (69 loc) · 1.45 KB
/
wcdpmt.cc
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
// Geant4 Libraries
//
#include "G4PVPlacement.hh"
#include "G4LogicalVolume.hh"
#include "G4ThreeVector.hh"
#include "G4Material.hh"
#include "G4LogicalVolume.hh"
#include "G4UnitsTable.hh"
#include "G4SystemOfUnits.hh"
#include "G4NistManager.hh"
// Local Libraries
//
#include "wcdpmt.hh"
wcdpmt::wcdpmt()
{
G4cout << "...pmt..." << G4endl;
// Initializing for mechanical detector
//
pmt_geo = NULL;
pmt_log = NULL;
pmt_phy = NULL;
}
wcdpmt::~wcdpmt()
{}
void wcdpmt::DefineMaterials()
{
G4NistManager* nist = G4NistManager::Instance();
pmt_mat
= nist->FindOrBuildMaterial("G4_AIR");
}
void wcdpmt::buildDetector(G4LogicalVolume* log_mother, G4double postZ, G4bool* overLaps)
{
G4double pxSemiAxis = 10.1*cm;
G4double pySemiAxis = 10.1*cm;
G4double pzSemiAxis = 6.5*cm;
G4double pzBottomCut = -pzSemiAxis;
G4double pzTopCut = 0.*cm;
pmt_geo
= new G4Ellipsoid("pmt_geo",
pxSemiAxis,
pySemiAxis,
pzSemiAxis,
pzBottomCut,
pzTopCut
);
pmt_log
= new G4LogicalVolume(pmt_geo,
pmt_mat,
pmt_geo->GetName()
);
pmt_phy
= new G4PVPlacement(0,
G4ThreeVector (0.*cm, 0.*cm, postZ/2.), //60.*cm),//45.*cm),//80.*cm),//295.*cm),//60.*cm),
pmt_log,
pmt_log->GetName(),
log_mother,
false,
0,
overLaps
);
}
G4VPhysicalVolume* wcdpmt::getPhysVolume()
{
return pmt_phy;
}
G4LogicalVolume* wcdpmt::getLogVolume()
{
return pmt_log;
}