import ROOT
%jsroot on
import atlas_mpl_style as ampl
import pathlib
try:
script_dir = pathlib.Path(__file__).parent
except:
script_dir = pathlib.Path().cwd()
# import mplhep as hep
# hep.style.use([hep.style.ATLAS])
from getTracks_config import Config, SeedingAlgorithm, DetectorName, SeedFinderConfigName
import getTracks_getters as gtg
from getTracks_getters import *
from getTracks_plotters import *
Welcome to JupyROOT 6.26/10
# change this variable to the data path
gtg.main_dir = pathlib.Path("/home/couthures/Bureau/HashingWork/results/")
# main_dir = pathlib.Path("/home/couthures/Bureau/EOS_CERN/data")
# main_dir = pathlib.Path("/home/couthures/Bureau/EOS_CERN")
default_config_list = []
for mu in [0, 50, 100, 150]:
default_config_list.append(Config(mu=mu, bucketSize=0, maxSeedsPerSpM=1, seedFinderConfig=SeedFinderConfigName.TrackML,
detector=DetectorName.generic, seedingAlgorithm=SeedingAlgorithm.Default))
default_config_list = tuple(default_config_list)
best_config_list = (
Config(mu=50, bucketSize=100, seedingAlgorithm=SeedingAlgorithm.HashingSeeding, metric="dphi", AnnoySeed=123456789, zBins=100),
Config(mu=100, bucketSize=100, seedingAlgorithm=SeedingAlgorithm.HashingSeeding, metric="dphi", AnnoySeed=123456789, zBins=100),
Config(mu=150, bucketSize=100, seedingAlgorithm=SeedingAlgorithm.HashingSeeding, metric="dphi", AnnoySeed=123456789, zBins=100),
)
best_config_list_no_cut = (
Config(mu=50, bucketSize=100, maxSeedsPerSpM=1000, seedingAlgorithm=SeedingAlgorithm.HashingSeeding, metric="dphi", AnnoySeed=123456789, zBins=100),
Config(mu=100, bucketSize=100, maxSeedsPerSpM=1000, seedingAlgorithm=SeedingAlgorithm.HashingSeeding, metric="dphi", AnnoySeed=123456789, zBins=100),
Config(mu=150, bucketSize=100, maxSeedsPerSpM=1000, seedingAlgorithm=SeedingAlgorithm.HashingSeeding, metric="dphi", AnnoySeed=123456789, zBins=100),
)
default_config_list_no_cut = []
for mu in [50, 100, 150]:
default_config_list_no_cut.append(Config(mu=mu, bucketSize=0, maxSeedsPerSpM=1000, seedFinderConfig=SeedFinderConfigName.TrackML,
detector=DetectorName.generic, seedingAlgorithm=SeedingAlgorithm.Default))
default_config_list_no_cut = tuple(default_config_list_no_cut)
colors = {
SeedingAlgorithm.Default: '#2ca02c', # green
SeedingAlgorithm.Orthogonal: '#ff7f0e', # orange
SeedingAlgorithm.HashingSeeding: '#1f77b4'# blue
}
gtg.main_dir = pathlib.Path("/home/couthures/Bureau/HashingWork/results/")
config_list = best_config_list
_ = plot_perf_configs(config_list, different_mu=True)
plot_timing_configs(config_list, title="Time per event Hashing\nbucketSize=100 zBins=100", filename="runningTime_Hashing_bucketSize_100_zBins_100.png")
legendLabel: #mu: 50 legendLabel: #mu: 100 legendLabel: #mu: 150
config_list = list(best_config_list)
config_list += list(best_config_list_no_cut)
plot_hashing_parts_timing(config_list)
config_list = list(default_config_list)
config_list += list(best_config_list)
# config_list += list(best_config_list_no_cut)
plot_seeding_timing_vs_spacepoints(config_list)
config_list = list(default_config_list)
config_list += list(default_config_list_no_cut)
config_list += list(best_config_list)
config_list += list(best_config_list_no_cut)
plot_full_timing_vs_spacepoints(config_list)
plot_ratios(best_config_list, default_config_list)
/home/couthures/Bureau/HashingWork/results/detector_generic_output_hashing_mu_50_bucket_100_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_HashingSeeding_metric_dphi_AnnoySeed_123456789_zBins_100/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_mu_50_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_Default/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_hashing_mu_100_bucket_100_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_HashingSeeding_metric_dphi_AnnoySeed_123456789_zBins_100/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_mu_100_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_Default/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_hashing_mu_150_bucket_100_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_HashingSeeding_metric_dphi_AnnoySeed_123456789_zBins_100/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_mu_150_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_Default/performance_ckf.root
/home/couthures/Bureau/Codes/getTracks_plotters.py:839: UserWarning: Matplotlib is currently using module://matplotlib_inline.backend_inline, which is a non-GUI backend, so cannot show the figure. fig.show()
gtg.main_dir = pathlib.Path("/home/couthures/Bureau/HashingWork/results/")
config_list = best_config_list_no_cut
_ = plot_perf_configs(config_list, different_mu=True)
plot_timing_configs(config_list, title="Time per event Hashing\nbucketSize=100 zBins=100 maxSeedsPerSpM=1000", filename="runningTime_Hashing_bucketSize_100_zBins_100_maxSeedsPerSpM_1000.png")
legendLabel: #mu: 50 legendLabel: #mu: 100 legendLabel: #mu: 150
Warning in <TCanvas::Constructor>: Deleting canvas with same name: efd_eta Warning in <TCanvas::Constructor>: Deleting canvas with same name: efd_pT Warning in <TCanvas::Constructor>: Deleting canvas with same name: efd_phi
plot_ratios(best_config_list_no_cut, default_config_list, top_label=r"$\Delta\phi$ (No cut)")
/home/couthures/Bureau/HashingWork/results/detector_generic_output_hashing_mu_50_bucket_100_maxSeedsPerSpM_1000_seedFinderConfig_TrackML_seedingAlgorithm_HashingSeeding_metric_dphi_AnnoySeed_123456789_zBins_100/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_mu_50_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_Default/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_hashing_mu_100_bucket_100_maxSeedsPerSpM_1000_seedFinderConfig_TrackML_seedingAlgorithm_HashingSeeding_metric_dphi_AnnoySeed_123456789_zBins_100/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_mu_100_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_Default/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_hashing_mu_150_bucket_100_maxSeedsPerSpM_1000_seedFinderConfig_TrackML_seedingAlgorithm_HashingSeeding_metric_dphi_AnnoySeed_123456789_zBins_100/performance_ckf.root /home/couthures/Bureau/HashingWork/results/detector_generic_output_mu_150_maxSeedsPerSpM_1_seedFinderConfig_TrackML_seedingAlgorithm_Default/performance_ckf.root
/home/couthures/Bureau/Codes/getTracks_plotters.py:839: UserWarning: Matplotlib is currently using module://matplotlib_inline.backend_inline, which is a non-GUI backend, so cannot show the figure. fig.show()