7 status= ROOT.gSystem.Load(
"libdk.so")
9 print(
"STATUS ",status)
11 input_rfile =
str(sys.argv[1])
13 dk2nu = ROOT.bsim.Dk2Nu
15 _file = ROOT.TFile(input_rfile)
17 _dk2nu = _file.Get(
"dk2nuTree")
19 nentries = _dk2nu.GetEntriesFast()
20 print(
"Total Entries ",nentries)
24 for i
in range(0,nentries):
26 anc_size = _dk2nu.dk2nu.ancestor.size()
27 for j
in range(0,anc_size):
28 mat_name = _dk2nu.dk2nu.ancestor[j].imat
29 vol_name = _dk2nu.dk2nu.ancestor[j].ivol
30 vol_list[vol_name]=mat_name
39 print(vol,vol_list[vol])
40 material_name = vol_list[vol]
42 if material_name==
"Target":
43 material_name=
"Carbon" 44 if material_name==
"TitaniumG5":
45 material_name=
"Titanium" 47 volume.append(volume_name)
48 material.append(material_name)
54 print(
"*********************************")