File indexing completed on 2026-04-09 07:48:46
0001
0002 """
0003
0004 ::
0005
0006 [blyth@localhost GNodeLib]$ ~/opticks/ana/boundary_counts.py
0007 0 : 1 : Galactic///Galactic
0008 1 : 2 : Galactic///Rock
0009 2 : 1 : Rock///Air
0010 3 : 191 : Air///Air
0011 4 : 1 : Air///LS
0012 5 : 1 : Air///Steel
0013 6 : 1 : Air///Tyvek
0014 7 : 504 : Air///Aluminium
0015 8 : 504 : Aluminium///Adhesive
0016 9 : 32256 : Adhesive///TiO2Coating
0017 10 : 32256 : TiO2Coating///Scintillator
0018 11 : 1 : Rock///Tyvek
0019 12 : 1 : Tyvek//VETOTyvekSurface/vetoWater
0020 13 : 1 : vetoWater/CDTyvekSurface//Tyvek
0021 14 : 1 : Tyvek///Water
0022 15 : 20660 : Water///Acrylic
0023 16 : 1 : Acrylic///LS
0024 17 : 46 : LS///Acrylic
0025 18 : 8 : LS///PE_PA
0026 19 : 27370 : Water///Steel
0027 20 : 56 : Water///PE_PA
0028 21 : 43213 : Water///Water
0029 22 : 45612 : Water///Pyrex
0030 23 : 20012 : Pyrex///Pyrex
0031 24 : 12612 : Pyrex/NNVTMCPPMT_PMT_20inch_photocathode_logsurf2/NNVTMCPPMT_PMT_20inch_photocathode_logsurf1/Vacuum
0032 25 : 12612 : Pyrex/NNVTMCPPMT_PMT_20inch_mirror_logsurf2/NNVTMCPPMT_PMT_20inch_mirror_logsurf1/Vacuum
0033 26 : 5000 : Pyrex/HamamatsuR12860_PMT_20inch_photocathode_logsurf2/HamamatsuR12860_PMT_20inch_photocathode_logsurf1/Vacuum
0034 27 : 5000 : Pyrex/HamamatsuR12860_PMT_20inch_mirror_logsurf2/HamamatsuR12860_PMT_20inch_mirror_logsurf1/Vacuum
0035 28 : 25600 : Pyrex/PMT_3inch_photocathode_logsurf2/PMT_3inch_photocathode_logsurf1/Vacuum
0036 29 : 25600 : Pyrex/PMT_3inch_absorb_logsurf2/PMT_3inch_absorb_logsurf1/Vacuum
0037 30 : 1 : Water///LS
0038 31 : 1 : Water/Steel_surface/Steel_surface/Steel
0039 32 : 2400 : vetoWater///Water
0040 33 : 2400 : Pyrex/PMT_20inch_veto_photocathode_logsurf2/PMT_20inch_veto_photocathode_logsurf1/Vacuum
0041 34 : 2400 : Pyrex/PMT_20inch_veto_mirror_logsurf2/PMT_20inch_veto_mirror_logsurf1/Vacuum
0042 [blyth@localhost GNodeLib]$
0043
0044
0045 Loadsa Water///Acrylic only one Acrylic///LS
0046
0047
0048
0049 """
0050 import sys, os, numpy as np, logging, argparse
0051 log = logging.getLogger(__name__)
0052
0053 from opticks.ana.blib import BLib
0054 from opticks.ana.key import keydir
0055 KEYDIR = keydir()
0056
0057
0058 if __name__ == '__main__':
0059
0060 blib = BLib()
0061 names = blib.names().split("\n")
0062
0063 avi = np.load(os.path.join(KEYDIR,"GNodeLib/all_volume_identity.npy"))
0064
0065 volbnd0 = avi[:,2] & 0xffff
0066 b0,n0 = np.unique(volbnd0,return_counts=True)
0067
0068 for i in range(len(b0)):
0069 bidx = b0[i]
0070 bname = names[bidx]
0071 print("%2d : %6d : %s " % (bidx,n0[i],bname))
0072 pass
0073