Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3df17e5
update INV_VREF_LUND to account for multiple ROCs
knh3dg Jun 11, 2026
538718f
changed starting inv_vref
knh3dg Jun 11, 2026
3a0c41c
updated linear fit and noinv_vref selection
knh3dg Jun 15, 2026
450298f
fixed a typo and formatting
github-actions[bot] Jun 15, 2026
beab93e
saving to swap branches
knh3dg Jun 17, 2026
7d08da9
find bunch crossing and scan over range
knh3dg Jun 18, 2026
e33f365
update get_calibs.cxx to find correct bx
knh3dg Jun 22, 2026
3a0de7b
rewrite tot scan and add a way to examine phase parameters
knh3dg Jun 30, 2026
3b070bf
Merge remote-tracking branch 'origin/main' into ToT
knh3dg Jul 1, 2026
fd69509
small updates
knh3dg Jul 1, 2026
f6167ee
added comments to code
knh3dg Jul 1, 2026
0e6ba22
Apply clang-format --style=Google
github-actions[bot] Jul 1, 2026
e394c1f
add new trim_toa command
knh3dg Jul 1, 2026
58d3190
removed other tot scan
knh3dg Jul 2, 2026
afbc479
Apply clang-format --style=Google
github-actions[bot] Jul 2, 2026
1e06af1
bug fix
knh3dg Jul 2, 2026
b5b85d1
Merge remote-tracking branch 'origin/ToT' into ToT
knh3dg Jul 2, 2026
2bbaa8e
Merge branch 'ToT' into toa
knh3dg Jul 3, 2026
36e9636
update toa and tot scans
knh3dg Jul 13, 2026
be02aac
removed unused code
knh3dg Jul 13, 2026
dadbbb5
Apply clang-format --style=Google
github-actions[bot] Jul 13, 2026
c1e6653
Merge branch 'main' into toa-tot
tomeichlersmith Jul 15, 2026
c486306
Merge branch 'main' into toa-tot
tomeichlersmith Jul 23, 2026
cb757c5
delete stale toa csv scan
tomeichlersmith Jul 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ana/tot/s-curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def toa_conv(df):
ax[1].plot(ch_df['calib'], toa_conv(ch_df))
plt.show()

quit()
#quit()

if (args.plot_adc):
fig, ax = plt.subplots(1,1)
Expand Down Expand Up @@ -73,6 +73,7 @@ def toa_conv(df):
fig_toa, ax_toa = plt.subplots(1, 2, sharey=True)
fig_tot, ax_tot = plt.subplots(1, 2, sharey=True)
fig_adc, ax_adc = plt.subplots(1, 1)
fig_ch, ax_ch = plt.subplots(8,9, sharex=True)

# Efficiency calculation
def efficiency(vals):
Expand Down Expand Up @@ -110,7 +111,7 @@ def condition_max(vals):
max_non_saturated = 0
for ch_id, ch_df in ch_group:
if ch_id == 0:
ax_toa[0].plot(ch_df['calib'], ch_df['toa_eff'], label=f'channels')
ax_toa[0].plot(ch_df['calib'], ch_df['toa_eff'], label=f'channels', linewidth = 0.2)
ax_tot[0].plot(ch_df['calib'], ch_df['tot_eff'], label=f'channels')
ax_toa[1].plot(ch_df['max_adc'], ch_df['toa_eff'], label=f'channels')
ax_tot[1].plot(ch_df['max_adc'], ch_df['tot_eff'], label=f'channels')
Expand All @@ -125,6 +126,7 @@ def condition_max(vals):
max_val = temp_df['max_adc'].max()
if (max_val > max_non_saturated):
max_non_saturated = max_val
ax_ch[ch_id // 9, ch_id % 9].plot(ch_df['calib'], ch_df['toa_eff'], label=ch_id)

ax_adc.axhline(y = max_non_saturated, linestyle='--', color='b', label=f'max non-saturated at {max_non_saturated}')

Expand All @@ -144,6 +146,7 @@ def condition_max(vals):
fig_toa.savefig("toa_s_curve.png", dpi=400)
fig_tot.savefig("tot_s_curve.png", dpi=400)
fig_adc.savefig("adc_linearity.png", dpi=400)
#fig_ch.savefig("toa_s_curve_channel.png", dpi=400)
plt.show()
#fig_toa.savefig('toa_efficiency.png', dpi=400, bbox_inches='tight')
#fig_tot.savefig('tot_efficiency.png', dpi=400, bbox_inches='tight')
82 changes: 0 additions & 82 deletions app/tool/algorithm/get_calibs.cxx

This file was deleted.

10 changes: 6 additions & 4 deletions app/tool/algorithm/global_pedestal_level.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ void DataFitter::sort_and_append(std::vector<int>& inv_vrefs,
};
std::vector<DerivPoint> slope_points;

// derivs should be around -1.4 in the linear region. These upper and lower
// bounds sort outliers.
double flat_threshold = 0.1;
double linear_threshold = 10;
double linear_threshold = 5;
std::vector<double> LH_derivs;
std::vector<double> LH_stdevs;
std::vector<double> RH_derivs;
Expand Down Expand Up @@ -125,8 +127,8 @@ int DataFitter::linear_fit(int& target) {
pflib_log(info) << "Fitting Data";

// preform a linear fit
int x_sum = 0;
int y_sum = 0;
double x_sum = 0;
double y_sum = 0;

for (const auto& p : linear_) {
x_sum += p.x_;
Expand Down Expand Up @@ -246,7 +248,7 @@ global_pedestal_level(Target* tgt) {
}
}

int target_adc = 200;
int target_adc = 150;

DecodeAndBuffer buffer{nevents, tgt->nrocs() * 2};

Expand Down
Loading