Skip to content

Commit 228398a

Browse files
committed
Merge branch 'USRYIELD'
2 parents f950061 + 2e96813 commit 228398a

File tree

4 files changed

+375
-5
lines changed

4 files changed

+375
-5
lines changed

bin/usysuw2root

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../mctools/fluka/usysuw2root.py

mctools/fluka/fluka2root.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def __init__(self, args):
5959
Estimator("USRCOLL", "ustsuw"),
6060
Estimator("USRTRACK", "ustsuw"),
6161
Estimator("DETECT", "detsuw"),
62+
Estimator("USRYIELD", "usysuw"),
6263
Estimator("RESNUCLE", "usrsuw")]
6364
self.opened = {} # dict of opened units (if any)
6465

@@ -356,7 +357,7 @@ def main():
356357
c = Converter(args)
357358
c.Merge()
358359
val = c.Convert()
359-
print(c.root)
360+
# print(c.root)
360361

361362
# title = c.getRunTitle()
362363

mctools/fluka/ustsuw2root.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def readHeader(self, filename):
6767
""" Reads the file header info
6868
Based on Data.Usrbdx
6969
"""
70-
f = Data.Usrxxx.readHeader(self, filename)
70+
f = super().readHeader(self, filename)
7171
# self.sayHeader()
7272

7373
while True:
@@ -112,7 +112,7 @@ def readHeader(self, filename):
112112
print(f"{det.name}: Low energy neutrons scored with {det.ngroup} groups")
113113
else:
114114
det.ngroup = 0
115-
det.egroup = []
115+
det.egroup = ()
116116

117117
size = (det.ngroup+det.ne) * 4
118118
if size != fortran.skip(f):
@@ -209,8 +209,8 @@ def main():
209209
h.SetBinContent(i+1, val[i])
210210
h.SetBinError(i+1, err[n-i-1]*val[i])
211211

212-
h.SetEntries(b.weight)
213-
h.Write()
212+
h.SetEntries(b.weight)
213+
h.Write()
214214

215215
# not implemented - bugs with theINFN FLUKA, but it seems works with the CERN FLUKA
216216
if det.lowneu:

0 commit comments

Comments
 (0)