antplb = ipt['boundaryTpl'][:] antplLength = antpl.shape[0] binwidth = np.int(args.binwidth) chiFitLen = np.int(args.chiFitLen) z = 0 r0Boundary = 15716 #/junofs/users/junoprotondecay/guoyh/offlines/offline3745/simulation_result/Document/SPMTModel/SPMTPosition # 300000 329873 #/cvmfs/juno.ihep.ac.cn/sl6_amd64_gcc830/Pre-Release/J20v1r0-Pre2/offline/Simulation/DetSimV2/DetSimOptions/data # 300000 325600 spmtstart = 300000 spmtend = 325600 iptFiles = args.pd qedep = uproot.lazyarray(iptFiles, "evtinfo", "Qedep") hitTimeSingle = uproot.lazyarray( iptFiles, "evtinfo", "HitTimeSingle", basketcache=uproot.cache.ThreadSafeArrayCache("8 MB")) r0List = uproot.lazyarray(args.pd, "evtinfo", "Edep_PromptR") evtID = uproot.lazyarray(iptFiles, "evtinfo", "evtID") # index = np.where(evtID==5796)[0][0] props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) entries = len(hitTimeSingle) likelihoodList = np.zeros(entries, dtype=[('eid', '<i4'), ('likelihood', '<f4'), ('E1', '<f4'), ('E2', '<f4'), ('E3', '<f4'), ('t1', '<f4'), ('t2', '<f4'), ('t3', '<f4'), ('npeak', '<i2'), ('Qedep', '<f4'),
print(args) up90 = [] shapefeature = np.array([], dtype=[('t10080', '<f4'), ('over5090', '<f4')]) michelinfo = np.array([], dtype=[('nMichel', '<i2'), ('selectnMichel', '<i2'), ('micheldistance', '<f4'), ('nCap', '<i2'), ('selectnCap', '<i2'), ('ndistance', '<f4')]) for u9, sf, mi in zip(args.up90, args.sf, args.michel): with h5py.File(u9, 'r') as ipt: up90 = np.append(up90, ipt['t90'][:]) with h5py.File(sf, 'r') as ipt: shapefeature = np.append( shapefeature, ipt['shapefeature'][:][['t10080', 'over5090']]) with h5py.File(mi, 'r') as ipt: michelinfo = np.append(michelinfo, ipt['michel'][:]) r0List = uproot.lazyarray(args.ipt, "evtinfo", "Edep_PromptR") ncap = uproot.lazyarray(args.ipt, "evtinfo", "CaptureTag") nDist = uproot.lazyarray(args.ipt, "evtinfo", "CaptureTagR") # nmichel = uproot.lazyarray(args.ipt, "evtinfo", "MichelTag") # hitTimeSingle = uproot.lazyarray(args.ipt, "evtinfo", "HitTimeSingle", basketcache=uproot.cache.ThreadSafeArrayCache("8 MB")) entries = len(ncap) fitRes = np.array([], dtype=[('eid', '<i4'), ('likelihood', '<f4'), ('E1', '<f4'), ('E2', '<f4'), ('E3', '<f4'), ('t1', '<f4'), ('t2', '<f4'), ('t3', '<f4'), ('npeak', '<i2'), ('Qedep', '<f4'), ('bkg', '<f4'), ('chisquare1', '<f4'), ('chisquare2', '<f4'), ('chi1', '<f4'), ('chi2', '<f4'), ('ndf', '<i2')]) mergeinfo = np.zeros(entries, dtype=[('eid', '<i4'), ('likelihood', '<f4'), ('E1', '<f4'), ('E2', '<f4'), ('E3', '<f4'),
psr.add_argument('-m', dest='michel', nargs='+', help='michel info') args = psr.parse_args() print(args) up90 = [] shapefeature = np.array([], dtype=[('t10080', '<f4'), ('over5090', '<f4')]) michelinfo = np.array([], dtype=[('nMichel', '<i2'), ('micheldistance', '<f4')]) for u9, sf, mi in zip(args.up90, args.sf, args.michel): with h5py.File(u9, 'r') as ipt: up90 = np.append(up90, ipt['t90'][:]) with h5py.File(sf, 'r') as ipt: shapefeature = np.append( shapefeature, ipt['shapefeature'][:][['t10080', 'over5090']]) with h5py.File(mi, 'r') as ipt: michelinfo = np.append(michelinfo, ipt['michel'][:]) r0List = uproot.lazyarray(args.ipt, "evtinfo", "Edep_PromptR") ncap = uproot.lazyarray(args.ipt, "evtinfo", "CaptureTag") # nmichel = uproot.lazyarray(args.ipt, "evtinfo", "MichelTag") hitTimeSingle = uproot.lazyarray( args.ipt, "evtinfo", "HitTimeSingle", basketcache=uproot.cache.ThreadSafeArrayCache("8 MB")) entries = len(ncap) fitRes = np.array([], dtype=[('eid', '<i4'), ('likelihood', '<f4'), ('E1', '<f4'), ('E2', '<f4'), ('E3', '<f4'), ('t1', '<f4'), ('t2', '<f4'), ('t3', '<f4'), ('npeak', '<i2'), ('Qedep', '<f4'), ('bkg', '<f4'), ('chisquare1', '<f4'), ('chisquare2', '<f4'), ('chi1', '<f4'), ('chi2', '<f4'), ('ndf', '<i2')])
antplLength = antpl.shape[0] binwidth = np.int(args.binwidth) chiFitLen = np.int(args.chiFitLen) checkEventId = np.array([int(id) for id in args.ipt]) z = 0 r0Boundary = 15716 #/junofs/users/junoprotondecay/guoyh/offlines/offline3745/simulation_result/Document/SPMTModel/SPMTPosition # 300000 329873 #/cvmfs/juno.ihep.ac.cn/sl6_amd64_gcc830/Pre-Release/J20v1r0-Pre2/offline/Simulation/DetSimV2/DetSimOptions/data # 300000 325600 spmtstart = 300000 spmtend = 325600 iptFiles = args.pd evtID = [i for i in uproot.lazyarray(iptFiles, "evtinfo", "evtID")] print(checkEventId) # print(evtID==54233) warning : 54233 is scalar not array.it return false selectIndex = [] #np.array([np.where(r==evtID)[0][0] for r in checkEventId]) qedep = uproot.lazyarray(iptFiles, "evtinfo", "Qedep") kaonStopTime = uproot.lazyarray(iptFiles, "evtinfo", "KaonStopTime") r0List = uproot.lazyarray(args.pd, "evtinfo", "Edep_PromptR") decayChannel = uproot.lazyarray(iptFiles, "evtinfo", "DecayChannel") michelT = uproot.lazyarray(iptFiles, "evtinfo", "MichelStartT") pdncT = uproot.lazyarray(iptFiles, "evtinfo", "PDNCStartT") hitTimeSingle = uproot.lazyarray( iptFiles, "evtinfo", "HitTimeSingle",
antplLength = antpl.shape[0] binwidth = np.int(args.binwidth) chiFitLen = np.int(args.chiFitLen) checkEventId = np.array([int(id) for id in args.ipt]) z = 0 r0Boundary = 15716 #/junofs/users/junoprotondecay/guoyh/offlines/offline3745/simulation_result/Document/SPMTModel/SPMTPosition # 300000 329873 #/cvmfs/juno.ihep.ac.cn/sl6_amd64_gcc830/Pre-Release/J20v1r0-Pre2/offline/Simulation/DetSimV2/DetSimOptions/data # 300000 325600 spmtstart = 300000 spmtend = 325600 iptFiles = args.pd evtID = [i for i in uproot.lazyarray(iptFiles, "evtinfo", "evtID")] print(checkEventId) # print(evtID==54233) warning : 54233 is scalar not array.it return false selectIndex = [] #np.array([np.where(r==evtID)[0][0] for r in checkEventId]) qedep = uproot.lazyarray(iptFiles, "evtinfo", "Qedep") kaonStopTime = uproot.lazyarray(iptFiles, "evtinfo", "KaonStopTime") r0List = uproot.lazyarray(args.pd, "evtinfo", "Edep_PromptR") treeName = 'evtinfo' hitTimeSingle = uproot.lazyarray( iptFiles, "evtinfo", "HitTimeSingle", basketcache=uproot.cache.ThreadSafeArrayCache("8 MB")) chi_sList = uproot.lazyarray(args.gyh, treeName, 'chi_s') chi_dList = uproot.lazyarray(args.gyh, treeName, 'chi_d')