Compare commits
2 commits
9bc50667a3
...
aec9fdb142
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aec9fdb142 | ||
|
|
8c7e33b1cf |
1 changed files with 33 additions and 25 deletions
24
BigBGO.py
24
BigBGO.py
|
|
@ -90,9 +90,8 @@ def main():
|
|||
l = line.split()
|
||||
if not 'EOF' in l:
|
||||
if l[0] == 'H':
|
||||
T = adc_to_T(l[8])
|
||||
if l[0] == 'EI':
|
||||
if not T=='unknown':
|
||||
T = adc_to_T(int(l[8]))
|
||||
if l[0] == 'EI' and not T=='unknown':
|
||||
if (not args.xray and not args.muon) or(args.xray and isXray(l)) or (args.muon and ismuon(l)):
|
||||
if not args.trigger or (args.trigger and CmV(l,ch[3]) >= thr[3]):
|
||||
for i in range(0,len(ch)):
|
||||
|
|
@ -118,15 +117,14 @@ def main():
|
|||
if not 'EOF' in l:
|
||||
if l[0] == 'H':
|
||||
T = adc_to_T(int(l[8]))
|
||||
if l[0] == 'EI':
|
||||
if not T=='unknown':
|
||||
if l[0] == 'EI' and not T=='unknown':
|
||||
if not args.trigger or (args.trigger and CmV(l,ch[3]) >= thr[3]):
|
||||
if not args.muon or (args.muon and ismuon(l)):
|
||||
if not args.two:
|
||||
data[0].append(CmV(l,ch[0])*u[0]+CmV(l,ch[1])*u[1]+CmV(l,ch[2])*u[2])
|
||||
else:
|
||||
#data[0].append(CmV(l,ch[1])*u[1]+CmV(l,ch[2])*u[2])
|
||||
data[0].append(CmV(l,ch[0])*u[0]+CmV(l,ch[1])*u[1])
|
||||
data[0].append(CmV(l,ch[1])*u[1]+CmV(l,ch[2])*u[2])
|
||||
#data[0].append(CmV(l,ch[0])*u[1]+CmV(l,ch[2])*u[1])
|
||||
|
||||
data[1].append(CmV(l,ch[5])*u[5]+CmV(l,ch[6])*u[6])
|
||||
if args.zero:
|
||||
|
|
@ -197,9 +195,19 @@ def ismuon(l):
|
|||
if not args.two and CmV(l,B1) >= thr[5] and CmV(l,B2) >= thr[6] and \
|
||||
CmV(l,A1) >= thr[0] and CmV(l,A2) >= thr[1] and CmV(l,A3) >= thr[2]: return True
|
||||
if args.two and CmV(l,B1) >= thr[5] and CmV(l,B2) >= thr[6] and \
|
||||
CmV(l,A1) >= thr[0] and CmV(l,A2) >= thr[1]: return True
|
||||
(CmV(l,A2) >= thr[1] and CmV(l,A3) >= thr[2]): return True
|
||||
#CmV(l,A1) >= thr[0] and CmV(l,A2) >= thr[1]: return True
|
||||
|
||||
else: return False
|
||||
|
||||
# def ismuon(l): #single BGO
|
||||
# if not args.two and ( (CmV(l,B1) >= thr[5] and CmV(l,B2) >= thr[6]) or \
|
||||
# (CmV(l,A1) >= thr[0] and CmV(l,A2) >= thr[1] and CmV(l,A3) >= thr[2])): return True
|
||||
# if args.two and ( (CmV(l,B1) >= thr[5] and CmV(l,B2) >= thr[6]) or \
|
||||
# #(CmV(l,A1) >= thr[0] and CmV(l,A2) >= thr[1])): return True
|
||||
# (CmV(l,A2) >= thr[1] and CmV(l,A3) >= thr[2])): return True
|
||||
# else: return False
|
||||
|
||||
|
||||
def polynom(x, a,b,c,d):
|
||||
return np.multiply(np.multiply(np.multiply(a,x),x),x)+np.multiply(np.multiply(b,x),x)+np.multiply(c,x)+d
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue