# Dimesions pixel_size = (250, 50) # um z_positions = [0., 1.95, 10.88, 12.83] # in cm; optional, can be also deduced from data, but usually not with high precision (~ mm) output_folder = os.path.split(data_files[0])[0] # define a folder where all output data and plots are stored cluster_files = [data_file[:-3] + '_cluster.h5' for data_file in data_files] # The following shows a complete test beam analysis by calling the seperate function in correct order # Correlate the row/col of each DUT atb.correlate_hits(data_files, alignment_file=output_folder + r'/Alignment.h5', fraction=1) atb.plot_correlations(alignment_file=output_folder + r'/Alignment.h5', output_pdf=output_folder + r'/Correlations.pdf') # Create alignment data for the DUT positions to the first DUT from the correlation data atb.align_hits(alignment_file=output_folder + r'/Alignment.h5', output_pdf=output_folder + r'/Alignment.pdf', fit_offset_cut=(2. / 10., 5.0), fit_error_cut=(15. / 1000., 30. / 1000.)) # Cluster hits off all DUTs Pool().map(atb.cluster_hits, data_files) # find cluster on all DUT data files in parallel on multiple cores atb.plot_cluster_size(cluster_files, output_pdf=output_folder + r'/Cluster_Size.pdf') # Correct all DUT hits via alignment information and merge the cluster tables to one tracklets table aligned at the event number atb.merge_cluster_data(cluster_files, alignment_file=output_folder + r'/Alignment.h5', tracklets_file=output_folder + r'/Tracklets.h5') # Check alignment of hits in position and time atb.check_hit_alignment(output_folder + r'/Tracklets.h5', output_folder + r'/Alignment_Check.pdf') # Find tracks from the tracklets and stores the with quality indicator into track candidates table atb.find_tracks(tracklets_file=output_folder + r'/Tracklets.h5', alignment_file=output_folder + r'/Alignment.h5', track_candidates_file=output_folder + r'/TrackCandidates.h5') # optional: try to deduce the devices z positions. Difficult for parallel tracks / bad resolution and does actually not really help here. Still good for cross check.
# Dimesions pixel_size = (250, 50) # um z_positions = [0., 5., 10.] # in cm; optional, can be also deduced from data, but usually not with high precision (~ mm) output_folder = os.path.split(data_files[0])[0] # define a folder where all output data and plots are stored cluster_files = [data_file[:-3] + '_cluster.h5' for data_file in data_files] # The following shows a complete test beam analysis by calling the seperate function in correct order # Correlate the row/col of each DUT atb.correlate_hits(data_files, alignment_file=output_folder + r'/Alignment.h5', fraction=1) atb.plot_correlations(alignment_file=output_folder + r'/Alignment.h5', output_pdf=output_folder + r'/Correlations.pdf') # Create alignment data for the DUT positions to the first DUT from the correlation data atb.align_hits(alignment_file=output_folder + r'/Alignment.h5', output_pdf=output_folder + r'/Alignment.pdf', fit_offset_cut=(2. / 10., 5.0), fit_error_cut=(10. / 1000., 110. / 1000.), show_plots=False) # Cluster hits off all DUTs Pool().map(atb.cluster_hits, data_files) # find cluster on all DUT data files in parallel on multiple cores atb.plot_cluster_size(cluster_files, output_pdf=output_folder + r'/Cluster_Size.pdf') # Correct all DUT hits via alignment information and merge the cluster tables to one tracklets table aligned at the event number atb.merge_cluster_data(cluster_files, alignment_file=output_folder + r'/Alignment.h5', tracklets_file=output_folder + r'/Tracklets.h5') atb.optimize_hit_alignment(output_folder + r'/Tracklets.h5') # Check alignment of hits in position and time atb.check_hit_alignment(output_folder + r'/Tracklets.h5', output_folder + r'/Alignment_Check.pdf') # Find tracks from the tracklets and stores the with quality indicator into track candidates table atb.find_tracks(tracklets_file=output_folder + r'/Tracklets.h5', alignment_file=output_folder + r'/Alignment.h5', track_candidates_file=output_folder + r'/TrackCandidates.h5')