Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:47

0001 #!/usr/bin/env python
0002 """
0003 ::
0004 
0005     run ~/opticks/ana/debug_buffer.py  
0006 
0007 """
0008 import os, numpy as np
0009 np.set_printoptions(suppress=True)
0010 
0011 os.environ.setdefault("OPTICKS_EVENT_BASE",os.path.expandvars("/tmp/$USER/opticks"))
0012 path = os.path.expandvars("$OPTICKS_EVENT_BASE/G4OKTest/evt/g4live/natural/1/dg.npy")
0013 dg = np.load(path)
0014 
0015 sensorIndex = dg[:,0,3].view(np.uint32)
0016 #tid = dg[:,0,3].view(np.uint32)    
0017 
0018 sel = sensorIndex > 0
0019 #sel = tid > 0x5000000   # for DYB this means landing (but not necessarily "hitting") a volume of the instanced PMT assembly   
0020 
0021 dgi = sensorIndex[sel]
0022 dgs = dg[sel]
0023 
0024  
0025 
0026 
0027