Ejemplo n.º 1
0
                # Add the energy.
                hadd_etot = sum([ha.E for ha in h_add])
                for ha in h_add:
                    ha.energy += h1.E*(ha.E/hadd_etot)
                    
        # Check the sum of the energy.
        #e1 = sum([hh.E for hh in hc_all.hits])
        #e2 = sum([hh.E for hh in hc.hits])
        #if(abs(e1 - e2) > 0.001):
        #    print("ERROR")

#########################################################################################################
## HITS
if(os.path.isfile(hits_file)):
    hits_all = load_hits(hits_file)
    hits = load_hits_skipping_NN(hits_file)

    # Modifies the list of non-NN hits.
    merge_NN_hits(hits_all,hits)
else:
    print("ERROR: hits not found.")
    exit()

# Open the Pytables file to contain the hits information.
h5f = tables.open_file(evt_file+'_hits.h5', "w", filters=tables.Filters(complib="blosc", complevel=9))
group_Reco = h5f.create_group(h5f.root, "Reco")
Reco_table = h5f.create_table(group_Reco, "Reco", Reco, "Reco", tables.Filters(0))

fvox = h5py.File(evt_file+'_voxels.h5')

# Create the corrected hit collections (summed over all runs) for 
Ejemplo n.º 2
0
def TlMC_hits_skipping_NN(ICDATADIR):
    hits_file_name = "dst_NEXT_v1_00_05_Tl_ACTIVE_100_0_7bar_DST_10.h5"
    hits_file_name = os.path.join(ICDATADIR, hits_file_name)
    hits = load_hits_skipping_NN(hits_file_name)
    return hits