-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPMTHit.cc
96 lines (83 loc) · 1.62 KB
/
PMTHit.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
87
88
89
90
91
92
93
94
95
// Geant4 Libraries
//
#include "G4SystemOfUnits.hh"
#include "Randomize.hh"
// Local Libraries
//
#include "PMTHit.hh"
G4ThreadLocal G4Allocator<PMTHit>* PMTHitAllocator=0;
PMTHit::PMTHit()
: waveLength(0.)
{}
PMTHit::~PMTHit()
{}
G4int PMTHit::askDetected(G4double phoEner)
{
waveLength = 1240. / (phoEner/(1.*eV));
if(waveLength >= 250. && waveLength < 300.)
{
if(G4UniformRand() <= 0.01)
return 1;
else
return 0;
}
else if(waveLength >= 300. && waveLength < 350.)
{
if(G4UniformRand() <= 0.03*probaCollect)
return 1;
else
return 0;
}
else if(waveLength >= 350. && waveLength < 400.)
{
if(G4UniformRand() <= 0.2*probaCollect)
return 1;
else
return 0;
}
else if(waveLength >= 400. && waveLength < 450.)
{
if(G4UniformRand() <= 0.25*probaCollect)
return 1;
else
return 0;
}
else if(waveLength >= 450. && waveLength < 500.)
{
if(G4UniformRand() <= 0.2*probaCollect)
return 1;
else
return 0;
}
else if(waveLength >= 500. && waveLength < 550.)
{
if(G4UniformRand() <= 0.14*probaCollect)
return 1;
else
return 0;
}
else if(waveLength >= 550. && waveLength < 600.)
{
if(G4UniformRand() <= 0.07*probaCollect)
return 1;
else
return
0;
}
else if(waveLength >= 600. && waveLength < 650.)
{
if(G4UniformRand() <= 0.03*probaCollect)
return 1;
else
return 0;
}
else if(waveLength >= 650. && waveLength < 700.)
{
if(G4UniformRand() <= 0.06*probaCollect)
return 1;
else
return 0;
}
else
return 0;
}