From 2e074a8a9c9539bc0284669c8e043bd7193e8c25 Mon Sep 17 00:00:00 2001 From: afehr Date: Mon, 22 Apr 2024 15:47:56 +0200 Subject: [PATCH 1/6] Comment out input field which prevents running over many runs after each other --- eudaq/analog_qa_ce65v2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eudaq/analog_qa_ce65v2.py b/eudaq/analog_qa_ce65v2.py index 290a046..85b1c18 100755 --- a/eudaq/analog_qa_ce65v2.py +++ b/eudaq/analog_qa_ce65v2.py @@ -292,7 +292,7 @@ def noise_type(qadb): maskFile.write(f'p\t{ix}\t{iy}\n') print(f'[-] Mask file write to {maskFile.name} ({args.mask})') -cmd = input("Exit after checking plots: ") +# cmd = input("Exit after checking plots: ") c.SaveAs(f'{args.output}.pdf') outputFile = ROOT.TFile(f'{args.output}.root','RECREATE') From 0066007d0a8fc94866efbad4c0117926c0a0f2c9 Mon Sep 17 00:00:00 2001 From: afehr Date: Mon, 22 Apr 2024 15:48:22 +0200 Subject: [PATCH 2/6] Adding in-pixel efficiency analysis - functionality to be checked --- SPS202404/config/analysis_SPS-GAP18SQ_HV10.conf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/SPS202404/config/analysis_SPS-GAP18SQ_HV10.conf b/SPS202404/config/analysis_SPS-GAP18SQ_HV10.conf index 5576c0b..2d0c414 100644 --- a/SPS202404/config/analysis_SPS-GAP18SQ_HV10.conf +++ b/SPS202404/config/analysis_SPS-GAP18SQ_HV10.conf @@ -75,13 +75,13 @@ calibration_noise=hnoisepl1 # CE65 calibration file - TH2D noise amp. threshold_seed=200 # Cut to find seeds thresholdSNR_seed=3 -# [AnalysisEfficiency] -# chi2ndof_cut = 1 -# reject_by_roi=true -# require_associated_cluster_on=CE65_6 -# spatial_cut_sensoredge=2 -# n_charge_bins=20000 -# charge_histo_range=20000 +[AnalysisEfficiency] +time_cut_frameedge=20ns +chi2ndof_cut=5 +prune_tracks = true +use_closest_cluster=true +inpixel_bin_size=1um +spatial_cut_sensoredge=1 [AnalysisTracks] From 401337b9114cbfa3bab0b496a1cec8773c17ee4b Mon Sep 17 00:00:00 2001 From: afehr Date: Mon, 22 Apr 2024 18:44:00 +0200 Subject: [PATCH 3/6] Making mask file paths relative --- SPS202404/geometry/SPS-GAP18SQ_HV10.geo | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SPS202404/geometry/SPS-GAP18SQ_HV10.geo b/SPS202404/geometry/SPS-GAP18SQ_HV10.geo index 08168eb..7bf0f21 100644 --- a/SPS202404/geometry/SPS-GAP18SQ_HV10.geo +++ b/SPS202404/geometry/SPS-GAP18SQ_HV10.geo @@ -12,7 +12,7 @@ material_budget = 0.001 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="/local/ITS3utils/DESY202311/masks/ref-plane0.txt" +mask_file="../../../ITS3utils/DESY202311/masks/ref-plane0.txt" orientation = 0deg, 0deg, 0deg role = "reference" @@ -27,7 +27,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="/local/ITS3utils/DESY202311/masks/ref-plane1.txt" +mask_file="../../../ITS3utils/DESY202311/masks/ref-plane1.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_2] @@ -41,7 +41,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="/local/ITS3utils/DESY202311/masks/ref-plane2.txt" +mask_file="../../../ITS3utils/DESY202311/masks/ref-plane2.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_3] @@ -55,7 +55,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="/local/ITS3utils/DESY202311/masks/ref-plane3.txt" +mask_file="../../../ITS3utils/DESY202311/masks/ref-plane3.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_4] @@ -69,7 +69,7 @@ material_budget = 0.001 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="/local/ITS3utils/DESY202311/masks/ref-plane4.txt" +mask_file="../../../ITS3utils/DESY202311/masks/ref-plane4.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_5] @@ -83,7 +83,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="/local/ITS3utils/DESY202311/masks/ref-plane5.txt" +mask_file="../../../ITS3utils/DESY202311/masks/ref-plane5.txt" orientation = 0deg, 0deg, 0deg [CE65_6] From 59beaebbeb41abcc01e06eff576b668240a75f55 Mon Sep 17 00:00:00 2001 From: afehr Date: Mon, 22 Apr 2024 18:52:09 +0200 Subject: [PATCH 4/6] Now correctly using relative paths --- SPS202404/geometry/SPS-GAP18SQ_HV10.geo | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SPS202404/geometry/SPS-GAP18SQ_HV10.geo b/SPS202404/geometry/SPS-GAP18SQ_HV10.geo index 7bf0f21..d6b74cd 100644 --- a/SPS202404/geometry/SPS-GAP18SQ_HV10.geo +++ b/SPS202404/geometry/SPS-GAP18SQ_HV10.geo @@ -12,7 +12,7 @@ material_budget = 0.001 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="../../../ITS3utils/DESY202311/masks/ref-plane0.txt" +mask_file="../../../DESY202311/masks/ref-plane0.txt" orientation = 0deg, 0deg, 0deg role = "reference" @@ -27,7 +27,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="../../../ITS3utils/DESY202311/masks/ref-plane1.txt" +mask_file="../../../DESY202311/masks/ref-plane1.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_2] @@ -41,7 +41,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="../../../ITS3utils/DESY202311/masks/ref-plane2.txt" +mask_file="../../../DESY202311/masks/ref-plane2.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_3] @@ -55,7 +55,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="../../../ITS3utils/DESY202311/masks/ref-plane3.txt" +mask_file="../../../DESY202311/masks/ref-plane3.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_4] @@ -69,7 +69,7 @@ material_budget = 0.001 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="../../../ITS3utils/DESY202311/masks/ref-plane4.txt" +mask_file="../../../DESY202311/masks/ref-plane4.txt" orientation = 0deg, 0deg, 0deg [ALPIDE_5] @@ -83,7 +83,7 @@ material_budget = 0.0005 coordinates = "cartesian" orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg -mask_file="../../../ITS3utils/DESY202311/masks/ref-plane5.txt" +mask_file="../../../DESY202311/masks/ref-plane5.txt" orientation = 0deg, 0deg, 0deg [CE65_6] From dbe2956e3639d3d11ab075cff3e995547e802726 Mon Sep 17 00:00:00 2001 From: afehr Date: Wed, 8 May 2024 11:20:36 +0200 Subject: [PATCH 5/6] Changes necessary for DESY2024-04 TB, so for the windows size. Not fixing fixed definition of window in CE65RawEvent2StdEventConverter --- .../config/align_dut_DESY-GAP18SQ_HV10.conf | 60 +++++++++++ .../config/align_tel_DESY-GAP18SQ_HV10.conf | 44 ++++++++ .../config/analysis_DESY-GAP18SQ_HV10.conf | 87 +++++++++++++++ .../prealign_dut_DESY-GAP18SQ_HV10.conf | 59 ++++++++++ .../prealign_tel_DESY-GAP18SQ_HV10.conf | 33 ++++++ DESY202405/geometry/DESY-GAP18SQ_HV10.geo | 101 ++++++++++++++++++ eudaq/CE65V2Dump.py | 30 +++--- eudaq/analog_qa_ce65v2.py | 18 ++-- 8 files changed, 411 insertions(+), 21 deletions(-) create mode 100644 DESY202405/config/align_dut_DESY-GAP18SQ_HV10.conf create mode 100644 DESY202405/config/align_tel_DESY-GAP18SQ_HV10.conf create mode 100644 DESY202405/config/analysis_DESY-GAP18SQ_HV10.conf create mode 100644 DESY202405/config/prealign_dut_DESY-GAP18SQ_HV10.conf create mode 100644 DESY202405/config/prealign_tel_DESY-GAP18SQ_HV10.conf create mode 100644 DESY202405/geometry/DESY-GAP18SQ_HV10.geo diff --git a/DESY202405/config/align_dut_DESY-GAP18SQ_HV10.conf b/DESY202405/config/align_dut_DESY-GAP18SQ_HV10.conf new file mode 100644 index 0000000..660b830 --- /dev/null +++ b/DESY202405/config/align_dut_DESY-GAP18SQ_HV10.conf @@ -0,0 +1,60 @@ +[Corryvreckan] +log_level = "INFO" +log_format = "DEFAULT" + +detectors_file = "../geometry/DESY-GAP18SQ_HV10_prealigned_dut.conf" +detectors_file_updated = "../geometry/DESY-GAP18SQ_HV10_aligned_dut.conf" +histogram_file = "alignment_dut_DESY-GAP18SQ_HV10.root" + +number_of_events = -1 + +[Metronome] +triggers=1 + +[EventLoaderEUDAQ2] +file_name = "../data/ce65v2_pcb02_hv10_beam_run482100624_231128100629.raw" + +[ClusteringSpatial] +type=ALPIDE +use_trigger_timestamp=false +charge_weighting=true +reject_by_roi=true + +[ClusteringAnalog] +name=CE65_6 +# reject_by_roi=true # ROI rejection for cluster +analysis_shape=true +window_size=1 # matrix width to find neighbours +threshold_type="mix" +threshold_seed=900 # Cut to find seeds +threshold_neighbor=100 # Cut to find neighbours +thresholdSNR_seed = 9 +thresholdSNR_neighbor = 1 +method=cluster # Clustering method - cluster, seed, sum3x3 +seeding_method=multi # Seed selection - multi, max (single seed with max. charge) +calibration_pedestal=hPedestalpl1 # CE65 calibration file ROOT::TH2F +calibration_noise=hnoisepl1 # CE65 calibration file ROOT::TH2F + +[Tracking4D] +#track_model="straightline" +track_model="gbl" +require_detectors=ALPIDE_0,ALPIDE_1,ALPIDE_2,ALPIDE_3,ALPIDE_4,ALPIDE_5 +min_hits_on_track=6 +time_cut_abs=10s +momentum=4GeV +exclude_dut = true +spatial_cut_abs=100um,100um +reject_by_roi=false + +[DUTAssociation] +#log_level="DEBUG" +spatial_cut_abs=100um,100um +time_cut_abs=1e99 +use_cluster_centre=true + +[AlignmentDUTResidual] +iterations=3 +align_position=true +align_position_axes=xy +align_orientation_axes="z" +max_track_chi2ndof=2 diff --git a/DESY202405/config/align_tel_DESY-GAP18SQ_HV10.conf b/DESY202405/config/align_tel_DESY-GAP18SQ_HV10.conf new file mode 100644 index 0000000..94e7900 --- /dev/null +++ b/DESY202405/config/align_tel_DESY-GAP18SQ_HV10.conf @@ -0,0 +1,44 @@ +[Corryvreckan] +log_level = "INFO" +log_format = "DEFAULT" + +detectors_file = "../geometry/DESY-GAP18SQ_HV10_prealigned_tel.conf" +detectors_file_updated = "../geometry/DESY-GAP18SQ_HV10_aligned_tel.conf" +histogram_file = "alignment_tel_DESY-GAP18SQ_HV10.root" + +number_of_events = -1 + +[Metronome] +triggers=1 + +[EventLoaderEUDAQ2] +file_name = "../data/ce65v2_pcb02_hv10_beam_run482100624_231128100629.raw" + +[ClusteringSpatial] +type=ALPIDE +use_trigger_timestamp=false +charge_weighting=true +reject_by_roi=false + +# [Correlations] + +[Tracking4D] +track_model="straightline" +#track_model="gbl" +require_detectors=ALPIDE_0,ALPIDE_1,ALPIDE_2,ALPIDE_3,ALPIDE_4,ALPIDE_5 +min_hits_on_track=6 +time_cut_abs=10s +momentum=4GeV +exclude_dut = true +spatial_cut_abs=100um,100um +reject_by_roi=false + +[AlignmentMillepede] +residual_cut = 0.05mm +residual_cut_init = 1mm +iterations = 3 +dofs = true, true, false, false, false, true +sigmas = 50um, 50um, 50um, 0.005rad, 0.005rad, 0.005rad +exclude_dut = true +number_of_stddev = 0 +convergence = 10e-5 diff --git a/DESY202405/config/analysis_DESY-GAP18SQ_HV10.conf b/DESY202405/config/analysis_DESY-GAP18SQ_HV10.conf new file mode 100644 index 0000000..2d0c414 --- /dev/null +++ b/DESY202405/config/analysis_DESY-GAP18SQ_HV10.conf @@ -0,0 +1,87 @@ +[Corryvreckan] +log_level = "INFO" +log_format = "DEFAULT" +#log_level = "TRACE" +#log_format = "LONG" + +detectors_file = "../geometry/DESY-GAP18SQ_HV10_aligned_dut.conf" +detectors_file_updated = "../geometry/DESY-GAP18SQ_HV10_aligned_dut_analysed.conf" +histogram_file="analysis_DESY-GAP18SQ_HV10_482100624_231128100629_seedthr200_nbh50_snr3_cluster.root" + +number_of_events = -1 + +[Metronome] +triggers=1 + +[EventLoaderEUDAQ2] +file_name = "../data/ce65v2_pcb02_hv10_beam_run482100624_231128100629.raw" + + +[ClusteringSpatial] +type=ALPIDE +use_trigger_timestamp=false +charge_weighting=true +reject_by_roi=true + +[ClusteringAnalog] +# log_level = "DEBUG" +name=CE65_6 +reject_by_roi=true # ROI rejection for cluster +analysis_shape=true +window_size=1 # matrix width to find neighbours +threshold_type="fix" +threshold_seed=200 # Cut to find seeds +threshold_neighbor=50 # Cut to find neighbours +thresholdSNR_seed = 3 +thresholdSNR_neighbor = 2 +method=cluster # Clustering method - cluster, seed, window +# method="window" # Clustering method - cluster, seed, window +seeding_method=multi # Seed selection - multi, max (single seed with max. charge) +calibration_pedestal=hPedestalpl1 # CE65 calibration file ROOT::TH2F +calibration_noise=hnoisepl1 # CE65 calibration file ROOT::TH2F + +[Correlations] + + +[Tracking4D] +track_model="straightline" +require_detectors=ALPIDE_0,ALPIDE_1,ALPIDE_2,ALPIDE_3,ALPIDE_4,ALPIDE_5 +min_hits_on_track=6 +time_cut_abs=10s +momentum=4GeV +exclude_dut = true +spatial_cut_abs=100um,100um +reject_by_roi=true +# unique_cluster_usage=true + +[DUTAssociation] +# log_level = "DEBUG" +spatial_cut_abs=100um,100um +time_cut_abs=1e99 +use_cluster_centre=true + +[AnalysisCE65] +# log_level = "DEBUG" +name=CE65_6 +use_closest_cluster=true +chi2ndof_cut=1 +spatial_cut_sensoredge=2 +correlations=true +n_charge_bins=20000 +charge_histo_range=20000 +raw_histo_range=20000 +calibration_pedestal=hPedestalpl1 # CE65 calibration file - TH2D pedestal +calibration_noise=hnoisepl1 # CE65 calibration file - TH2D noise amp. +threshold_seed=200 # Cut to find seeds +thresholdSNR_seed=3 + +[AnalysisEfficiency] +time_cut_frameedge=20ns +chi2ndof_cut=5 +prune_tracks = true +use_closest_cluster=true +inpixel_bin_size=1um +spatial_cut_sensoredge=1 + + +[AnalysisTracks] diff --git a/DESY202405/config/prealign_dut_DESY-GAP18SQ_HV10.conf b/DESY202405/config/prealign_dut_DESY-GAP18SQ_HV10.conf new file mode 100644 index 0000000..0785a8f --- /dev/null +++ b/DESY202405/config/prealign_dut_DESY-GAP18SQ_HV10.conf @@ -0,0 +1,59 @@ +[Corryvreckan] +log_level = "WARNING" +log_format = "DEFAULT" + +detectors_file = "../geometry/DESY-GAP18SQ_HV10_aligned_tel.conf" +detectors_file_updated = "../geometry/DESY-GAP18SQ_HV10_prealigned_dut.conf" +histogram_file = "prealignment_dut_DESY-GAP18SQ_HV10.root" + +number_of_events = -1 + +[Metronome] +triggers=1 + +[EventLoaderEUDAQ2] +file_name = "../data/ce65v2_pcb02_hv10_beam_run482100624_231128100629.raw" + +[ClusteringSpatial] +type=ALPIDE +use_trigger_timestamp=false +charge_weighting=true +reject_by_roi=false + + +[ClusteringAnalog] +name=CE65_6 +# reject_by_roi=true # ROI rejection for cluster +analysis_shape=true +window_size=1 # matrix width to find neighbours +threshold_type="mix" +threshold_seed=900 # Cut to find seeds +threshold_neighbor=100 # Cut to find neighbours +thresholdSNR_seed = 9 +thresholdSNR_neighbor = 1 +method=cluster # Clustering method - cluster, seed, sum3x3 +seeding_method=multi # Seed selection - multi, max (single seed with max. charge) +calibration_pedestal=hPedestalpl1 # CE65 calibration file ROOT::TH2F +calibration_noise=hnoisepl1 # CE65 calibration file ROOT::TH2F + +# name=CE65_4 +# reject_by_roi=true # ROI rejection for cluster +# analysis_shape=true +# window_size=3 # matrix width to find neighbours +# threshold_type="mix" +# threshold_seed=10 # Cut to find seeds +# threshold_neighbour=1 # Cut to find neighbours +# method=cluster # Clustering method - cluster, seed, sum3x3 +# seeding_method=multi # Seed selection - multi, max (single seed with max. charge) +# calibration_pedestal=hPedestalpl1 # CE65 calibration file ROOT::TH2F +# calibration_noise=hnoisepl1 # CE65 calibration file ROOT::TH2F + +[Correlations] + +[Prealignment] +name = CE65_6 +damping_factor=1 +max_correlation_rms=6mm +method=gauss_fit +fit_range_rel=100 +time_cut_abs=1e99 diff --git a/DESY202405/config/prealign_tel_DESY-GAP18SQ_HV10.conf b/DESY202405/config/prealign_tel_DESY-GAP18SQ_HV10.conf new file mode 100644 index 0000000..883ebae --- /dev/null +++ b/DESY202405/config/prealign_tel_DESY-GAP18SQ_HV10.conf @@ -0,0 +1,33 @@ +[Corryvreckan] +log_level = "WARNING" +log_format = "DEFAULT" + +detectors_file = "../geometry/DESY-GAP18SQ_HV10.geo" +detectors_file_updated = "../geometry/DESY-GAP18SQ_HV10_prealigned_tel.conf" +histogram_file = "prealignment_tel_DESY-GAP18SQ_HV10.root" + +number_of_events = -1 + +[Metronome] +triggers=1 + +[EventLoaderEUDAQ2] +file_name = "../data/ce65v2_pcb02_hv10_beam_run482100624_231128100629.raw" +#log_level = "DEBUG" + +[ClusteringSpatial] +type=ALPIDE +use_trigger_timestamp=false +charge_weighting=true +reject_by_roi=false + +[Correlations] + +[Prealignment] +type = ALPIDE +damping_factor=1 +max_correlation_rms=6mm +method=gauss_fit +fit_range_rel=90 +#range_abs=15 +time_cut_abs=1e99 # no timestamp for CE65 now, use max value to disable time cuts diff --git a/DESY202405/geometry/DESY-GAP18SQ_HV10.geo b/DESY202405/geometry/DESY-GAP18SQ_HV10.geo new file mode 100644 index 0000000..855baf3 --- /dev/null +++ b/DESY202405/geometry/DESY-GAP18SQ_HV10.geo @@ -0,0 +1,101 @@ +#Geometry file for CE65 for May 2022 beam test at PS-CERN +#Telescope B1, https://twiki.cern.ch/twiki/bin/viewauth/ALICE/ITS3WP3PS2022May + +[ALPIDE_0] +type = "ALPIDE" +position = 0um,0um,0mm +number_of_pixels = 1024,512 +pixel_pitch = 29.24um, 26.88um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.001 +coordinates = "cartesian" +orientation_mode = "xyz" +# orientation = 180deg, 180deg, 0deg +mask_file="../../../DESY202311/masks/ref-plane0.txt" +orientation = 0deg, 0deg, 0deg +role = "reference" + +[ALPIDE_1] +type = "ALPIDE" +position = 0um,0um,25mm +number_of_pixels = 1024,512 +pixel_pitch = 29.24um, 26.88um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.0005 +coordinates = "cartesian" +orientation_mode = "xyz" +# orientation = 180deg, 180deg, 0deg +mask_file="../../../DESY202311/masks/ref-plane1.txt" +orientation = 0deg, 0deg, 0deg + +[ALPIDE_2] +type = "ALPIDE" +position = 0um,0um,50mm +number_of_pixels = 1024,512 +pixel_pitch = 29.24um, 26.88um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.0005 +coordinates = "cartesian" +orientation_mode = "xyz" +# orientation = 180deg, 180deg, 0deg +mask_file="../../../DESY202311/masks/ref-plane2.txt" +orientation = 0deg, 0deg, 0deg + +[ALPIDE_3] +type = "ALPIDE" +position = 0um,0um,150mm +number_of_pixels = 1024,512 +pixel_pitch = 29.24um, 26.88um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.0005 +coordinates = "cartesian" +orientation_mode = "xyz" +# orientation = 180deg, 180deg, 0deg +mask_file="../../../DESY202311/masks/ref-plane3.txt" +orientation = 0deg, 0deg, 0deg + +[ALPIDE_4] +type = "ALPIDE" +position = 0um,0um,175mm +number_of_pixels = 1024,512 +pixel_pitch = 29.24um, 26.88um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.001 +coordinates = "cartesian" +orientation_mode = "xyz" +# orientation = 180deg, 180deg, 0deg +mask_file="../../../DESY202311/masks/ref-plane4.txt" +orientation = 0deg, 0deg, 0deg + +[ALPIDE_5] +type = "ALPIDE" +position = 0um,0um,200mm +number_of_pixels = 1024,512 +pixel_pitch = 29.24um, 26.88um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.0005 +coordinates = "cartesian" +orientation_mode = "xyz" +# orientation = 180deg, 180deg, 0deg +mask_file="../../../DESY202311/masks/ref-plane5.txt" +orientation = 0deg, 0deg, 0deg + +[CE65_6] +type = "CE65V2" +orientation_mode = "xyz" +orientation = 180deg, 180deg, 0deg +position = 0um,0mm,100mm +number_of_pixels = 8,8 +pixel_pitch = 18um, 18um +spatial_resolution = 5.00um, 5.00um +time_resolution = 2us +material_budget = 0.0005 +coordinates = "cartesian" +calibration_file = "../qa/DESY-GAP18SQ_HV10-noisemap.root" +role = "dut" diff --git a/eudaq/CE65V2Dump.py b/eudaq/CE65V2Dump.py index ca9ed16..6cef26b 100755 --- a/eudaq/CE65V2Dump.py +++ b/eudaq/CE65V2Dump.py @@ -11,7 +11,7 @@ #CE65V2Dump.py # Constants and Options -NX, NY, N_FRAME = 48, 24, 9 +N_FRAME = 9 FIXED_TRIGGER_FRAME = 2 FIXED_TRIGGER_WIDTH = 1 SUBMATRIX_N = 1 @@ -47,6 +47,10 @@ help='Simple threshold for each submatrix') parser.add_argument('--skip', default=0, help='Skip total events in raw file') +parser.add_argument('--nx', default=48, + type=int, help='Number of pixels in x') +parser.add_argument('--ny', default=24, + type=int, help='Number of pixels in y') args = parser.parse_args() @@ -121,9 +125,9 @@ def eventCut(evdata): # ADCu = val - baseline [1st frame] eventPass = False sigMax, frMax = 0, 0 - for ix in range(NX): + for ix in range(args.nx): # if(ix > SUBMATRIX_EDGE): - for iy in range(NY): + for iy in range(args.ny): frdata = list(evdata[ix][iy]) pol = SUBMATRIX_POLARITY val, ifr = signalAmp(frdata, args.signal, pol) @@ -138,12 +142,12 @@ def eventCut(evdata): qaOut = TFile(args.output + '-qa.root','RECREATE') for sigTag in SIGNAL_METHOD: h2qa[sigTag] = TH2F(f'h2qa_{sigTag}',f'Noise distribution (method={sigTag});Pixel ID;ADCu;#ev', - NX*NY, -0.5, NX*NY-0.5, + args.nx*args.ny, -0.5, args.nx*args.ny-0.5, 4000, -2000, 2000) def analogue_qa(evdata): - for ix in range(NX): - for iy in range(NY): - iPx = iy + ix * NY + for ix in range(args.nx): + for iy in range(args.ny): + iPx = iy + ix * args.ny for sigTag in SIGNAL_METHOD: val, ifr = signalAmp(list(evdata[ix][iy]), sigTag) h2qa[sigTag].Fill(iPx, val) @@ -155,17 +159,17 @@ def decode_event(raw): if(nFrame != N_FRAME): print(f'[X] WARNING - Number of frames changes from {N_FRAME} to {nFrame}') N_FRAME = nFrame - evdata = np.empty((NX, NY, N_FRAME),dtype=np.short) + evdata = np.empty((args.nx, args.ny, N_FRAME),dtype=np.short) for ifr in range(nFrame): rawfr = raw.GetBlock(ifr) - assert(len(rawfr) == 2*NX*NY) + assert(len(rawfr) == 2*args.nx*args.ny) # if nFrame > 4: # continue # print(len(rawfr), nFrame) - for ix in range(NX): - for iy in range(NY): - iPx = iy + ix * NY - # print(event_number, ix, iy, iPx, NX, NY, len(rawfr), N_FRAME) + for ix in range(args.nx): + for iy in range(args.ny): + iPx = iy + ix * args.ny + # print(event_number, ix, iy, iPx, args.nx, args.ny, len(rawfr), N_FRAME) # uint8_t *2 => short try: evdata[ix][iy][ifr] = np.array(int(rawfr[2*iPx+1]<<8) + int(rawfr[2*iPx])).astype(np.short) diff --git a/eudaq/analog_qa_ce65v2.py b/eudaq/analog_qa_ce65v2.py index 85b1c18..23d62f0 100755 --- a/eudaq/analog_qa_ce65v2.py +++ b/eudaq/analog_qa_ce65v2.py @@ -2,7 +2,7 @@ # Noise QA for analogue sensors -# Input: (N_EVENT, NX, NY, N_FRAME) +# Input: (N_EVENT, nx, nx, N_FRAME) # Method for noise: RMS, sigma (gaus), FWHM, TAF @@ -20,10 +20,12 @@ parser.add_argument('--rts', help='Strict mode to identify pixels with RTS effect', default=False, action='store_true') parser.add_argument('--frac', help='Fraction inside 3 sigma, used for RTS', type=float, default=0.95) parser.add_argument('--debug','-v', help='Debug for fitting by pixels', default=False, action='store_true') +parser.add_argument('--nx', default=48, type=int, help='Number of pixels in x') +parser.add_argument('--ny', default=24, type=int, help='Number of pixels in y') + args = parser.parse_args() -NX, NY = 48, 24 SUBMATRIX_EDGE = 48 SUBMATRIX_NOISE_CUT = 200 SUBMATRIX_BINWIDTH = 10 @@ -48,11 +50,11 @@ hFrac = ROOT.TH1F('hfrac','Fraction of counts in 3#sigma region;Fraction_{3#sigma};# pixels', 100, 0.01, 1.01) hChiFit = ROOT.TH1F('hchifit','Gaussian fitting quality;#chi^{2} / Ndf;# pixels', 1000, 0., 10.) hPedestalMap = ROOT.TH2F('hPedestalpl1','Map of pixel pedestal;pixel X;Pixel Y;#pixels', - NX,-0.5,NX-0.5,NY,-0.5,NY-0.5) + args.nx,-0.5,args.nx-0.5,args.ny,-0.5,args.ny-0.5) hNoiseMap = ROOT.TH2F('hnoisepl1','Map of pixel noise amplitude;pixel X;Pixel Y;#pixels', - NX,-0.5,NX-0.5,NY,-0.5,NY-0.5) + args.nx,-0.5,args.nx-0.5,args.ny,-0.5,args.ny-0.5) hNoiseMapType = ROOT.TH2F('h2noisetype','Map of pixel noise type;pixel X;Pixel Y;#pixels', - NX,-0.5,NX-0.5,NY,-0.5,NY-0.5) + args.nx,-0.5,args.nx-0.5,args.ny,-0.5,args.ny-0.5) # root_plot root_objs = [] @@ -143,12 +145,12 @@ def noise_type(qadb): # QA for each pixel pixel_qa = [] cmd = '' -for ipx in range(1,1152+1): +for ipx in range(1,args.nx*args.ny+1): pixel_qa.append({}) qadb = pixel_qa[-1] qadb['id'] = ipx - # qadb['pos'] = (int((ipx-200)/NY), (ipx-10)%NY) - qadb['pos'] = (int((ipx-1)/NY), (ipx-1)%NY) + # qadb['pos'] = (int((ipx-200)/args.ny), (ipx-10)%args.ny) + qadb['pos'] = (int((ipx-1)/args.ny), (ipx-1)%args.ny) # qadb['pos'] = (int(int(20), int(10))) ix, iy= qadb['pos'] qadb['noise'] = hqa.ProjectionY(f'_py_{ipx}',ipx,ipx) From 274fcba2134e053cf45d5cded82e2d10eaaf49dd Mon Sep 17 00:00:00 2001 From: afehr Date: Wed, 8 May 2024 11:48:13 +0200 Subject: [PATCH 6/6] Fixing wrong plane positioning in DESY202405 and SPS202404 geometry files --- DESY202405/geometry/DESY-GAP18SQ_HV10.geo | 10 +++++----- SPS202404/geometry/SPS-GAP18SQ_HV10.geo | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/DESY202405/geometry/DESY-GAP18SQ_HV10.geo b/DESY202405/geometry/DESY-GAP18SQ_HV10.geo index 855baf3..5947bd1 100644 --- a/DESY202405/geometry/DESY-GAP18SQ_HV10.geo +++ b/DESY202405/geometry/DESY-GAP18SQ_HV10.geo @@ -14,7 +14,6 @@ orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg mask_file="../../../DESY202311/masks/ref-plane0.txt" orientation = 0deg, 0deg, 0deg -role = "reference" [ALPIDE_1] type = "ALPIDE" @@ -46,7 +45,7 @@ orientation = 0deg, 0deg, 0deg [ALPIDE_3] type = "ALPIDE" -position = 0um,0um,150mm +position = 0um,0um,125mm number_of_pixels = 1024,512 pixel_pitch = 29.24um, 26.88um spatial_resolution = 5.00um, 5.00um @@ -57,10 +56,11 @@ orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg mask_file="../../../DESY202311/masks/ref-plane3.txt" orientation = 0deg, 0deg, 0deg +role = "reference" [ALPIDE_4] type = "ALPIDE" -position = 0um,0um,175mm +position = 0um,0um,150mm number_of_pixels = 1024,512 pixel_pitch = 29.24um, 26.88um spatial_resolution = 5.00um, 5.00um @@ -74,7 +74,7 @@ orientation = 0deg, 0deg, 0deg [ALPIDE_5] type = "ALPIDE" -position = 0um,0um,200mm +position = 0um,0um,175mm number_of_pixels = 1024,512 pixel_pitch = 29.24um, 26.88um spatial_resolution = 5.00um, 5.00um @@ -90,7 +90,7 @@ orientation = 0deg, 0deg, 0deg type = "CE65V2" orientation_mode = "xyz" orientation = 180deg, 180deg, 0deg -position = 0um,0mm,100mm +position = 0um,0mm,75mm number_of_pixels = 8,8 pixel_pitch = 18um, 18um spatial_resolution = 5.00um, 5.00um diff --git a/SPS202404/geometry/SPS-GAP18SQ_HV10.geo b/SPS202404/geometry/SPS-GAP18SQ_HV10.geo index d6b74cd..4e5c1c1 100644 --- a/SPS202404/geometry/SPS-GAP18SQ_HV10.geo +++ b/SPS202404/geometry/SPS-GAP18SQ_HV10.geo @@ -14,7 +14,6 @@ orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg mask_file="../../../DESY202311/masks/ref-plane0.txt" orientation = 0deg, 0deg, 0deg -role = "reference" [ALPIDE_1] type = "ALPIDE" @@ -46,7 +45,7 @@ orientation = 0deg, 0deg, 0deg [ALPIDE_3] type = "ALPIDE" -position = 0um,0um,150mm +position = 0um,0um,125mm number_of_pixels = 1024,512 pixel_pitch = 29.24um, 26.88um spatial_resolution = 5.00um, 5.00um @@ -57,10 +56,11 @@ orientation_mode = "xyz" # orientation = 180deg, 180deg, 0deg mask_file="../../../DESY202311/masks/ref-plane3.txt" orientation = 0deg, 0deg, 0deg +role = "reference" [ALPIDE_4] type = "ALPIDE" -position = 0um,0um,175mm +position = 0um,0um,150mm number_of_pixels = 1024,512 pixel_pitch = 29.24um, 26.88um spatial_resolution = 5.00um, 5.00um @@ -74,7 +74,7 @@ orientation = 0deg, 0deg, 0deg [ALPIDE_5] type = "ALPIDE" -position = 0um,0um,200mm +position = 0um,0um,175mm number_of_pixels = 1024,512 pixel_pitch = 29.24um, 26.88um spatial_resolution = 5.00um, 5.00um @@ -90,7 +90,7 @@ orientation = 0deg, 0deg, 0deg type = "CE65V2" orientation_mode = "xyz" orientation = 180deg, 180deg, 0deg -position = 0um,0mm,100mm +position = 0um,0mm,75mm number_of_pixels = 48,24 pixel_pitch = 18um, 18um spatial_resolution = 5.00um, 5.00um