Open mirguest opened 11 years ago
但因为GLG4中PMT实现的限制,我们要改动似乎挺麻烦的。
在事例运行前,到底为何会卡住呢?
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 190743 kByte
Total CPU time elapsed for geometry optimisation: 1.7e+02 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
99.97 169.78 0.11 190743k lTarget
0.00 0.00 0.00 0k PMT_20inch_water_body_log
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
-9.95 190743k 59493 5456083 9864297 169.78 lTarget
0.00 0k 1 2 4 0.00 PMT_20inch_water_body_log
LSExpAnalysisManager: Histograms are booked and the run has been started
### Run : 0
在提示start closing geometry后,我们发现会停留一段时间。这句话出自
G4RunManagerKernel::ResetNavigator
。
但是很奇怪的是,我将PMT的构建移掉后,占用的资源就很少:
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 0 kByte
Total CPU time elapsed for geometry optimisation: 0 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
0.00 0.00 0.00 0k PMT_20inch_water_body_log
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
100.00 0k 1 2 4 0.00 PMT_20inch_water_body_log
LSExpAnalysisManager: Histograms are booked and the run has been started
### Run : 0
说明我们PMT的形状可能太过于复杂,直接用TorusStack导致效率变低。???
我们可以看看lintao-dev-master
中的,因为PMT外面其实是圆柱,所以对geant4本身来说,就比较简单。
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 7637 kByte
Total CPU time elapsed for geometry optimisation: 9.5 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
99.89 9.46 0.01 7638k lTarget
0.00 0.00 0.00 0k PMT_20inch_water_body_log
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
100.00 7637k 19568 171144 502847 9.46 lTarget
0.00 0k 1 2 4 0.00 PMT_20inch_water_body_log
LSExpAnalysisManager: Histograms are booked and the run has been started
### Run : 0
如果将PMT放置于某个简单的几何中,应该就可以避免这样的问题吧??? 需要测试一下。
我在摆放PMT的代码处,稍微做了修改,先创建一个Tub的Logical Volume,里面放置PMT。 然后再摆这些Tub,这样消耗就小了很多。
Start closing geometry.
G4GeometryManager::ReportVoxelStats -- Voxel Statistics
Total memory consumed for geometry optimisation: 8238 kByte
Total CPU time elapsed for geometry optimisation: 9.9 seconds
Voxelisation: top CPU users:
Percent Total CPU System CPU Memory Volume
------- ---------- ---------- -------- ----------
100.00 9.95 0.00 8238k lTarget
0.00 0.00 0.00 0k PMT_20inch_water_body_log
Voxelisation: top memory users:
Percent Memory Heads Nodes Pointers Total CPU Volume
------- -------- ------ ------ -------- ---------- ----------
100.00 8238k 21419 184219 540992 9.95 lTarget
0.00 0k 1 2 4 0.00 PMT_20inch_water_body_log
LSExpAnalysisManager: Histograms are booked and the run has been started
### Run : 0
而且,运行时似乎也没有什么问题了。
所以,我们应该还是可以继续去完善PMT的构建。只是构建后,最好放置到一个简单的几何之中。
完善PMT的接口,使得使用更为方便。
另外,就是考虑如何将在某个Volume中产生的代码与具体的产生子代码分离。
目前实现了球形PMT的外部几何,没有设置dynode等复杂的。 现在需要考虑编写在PMT产生的代码。
建立tag:issue-149-check-pmt
用于测试新型的PMT有没有问题。
我们以长方体的罩子试试,看看效果如何。 罩子到PMT距离20cm。
建立tag:issue-149-box-cover
看看能量分辨率如何。
理论上,是变差了的。
此次的作业有overlap。看来直接放长方体,还是比较麻烦的。
bug:#151 #152
我们需要合理的初始化指针变量。
在 #145 中,我尝试过修改PMT,并去除圆柱。但可能我们的改动有些太多,导致不知道具体的问题在哪里。所以,新建一个issue,重新进行去除PMT的工作。