Skip to content

Commit

Permalink
Update histogram boundary values in A/E ctc
Browse files Browse the repository at this point in the history
  • Loading branch information
fhagemann committed Nov 20, 2024
1 parent 0a6dce2 commit 8d78a4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/aoe_ctc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function ctc_aoe(aoe_all::Vector{<:Real}, ecal_all::Vector{<:Unitful.RealOrRealQ
_aoe_ctc = aoe_all .+ PolCalFunc(0.0, fct...).(qdrift_e_all)

Check warning on line 100 in src/aoe_ctc.jl

View check run for this annotation

Codecov / codecov/patch

src/aoe_ctc.jl#L100

Added line #L100 was not covered by tests

# normalize once again to μ = 0 and σ = 1
h_norm = fit(Histogram, _aoe_ctc, -50:bin_width:30) ### hard-coded values: should include some tolerance to higher values
h_norm = fit(Histogram, _aoe_ctc, -20:bin_width:3) ### hard-coded values: should include some tolerance to higher values
ps_norm = estimate_single_peak_stats(h_norm)
result_norm, report_norm = fit_single_aoe_compton(h_norm, ps_norm, fit_func=:aoe_two_bck, pseudo_prior = pseudo_prior_all, uncertainty=true)
μ_norm = mvalue(result_norm.μ)
Expand All @@ -111,7 +111,7 @@ function ctc_aoe(aoe_all::Vector{<:Real}, ecal_all::Vector{<:Unitful.RealOrRealQ
aoe_ctc_func = "( $(aoe_expression) + " * join(["$(fct[i]) * ( qdrift / $(e_expression) )^$(i)" for i in eachindex(fct)], " + ") * " - $(μ_norm) ) / $(σ_norm) "

Check warning on line 111 in src/aoe_ctc.jl

View check run for this annotation

Codecov / codecov/patch

src/aoe_ctc.jl#L111

Added line #L111 was not covered by tests

# create final histograms
h_after = fit(Histogram, aoe_ctc, -50:bin_width:30) ### hard-coded values: should include some tolerance to higher values
h_after = fit(Histogram, aoe_ctc, -20:bin_width:3) ### hard-coded values: should include some tolerance to higher values
ps_after = estimate_single_peak_stats(h_after)
result_after, report_after = fit_single_aoe_compton(h_after, ps_after, fit_func=:aoe_two_bck, pseudo_prior = pseudo_prior, uncertainty=true)

Check warning on line 116 in src/aoe_ctc.jl

View check run for this annotation

Codecov / codecov/patch

src/aoe_ctc.jl#L114-L116

Added lines #L114 - L116 were not covered by tests

Expand Down

0 comments on commit 8d78a4d

Please sign in to comment.