Skip to content
Snippets Groups Projects
Verified Commit d660b47c authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Rename MuonScanFitResult to MuonScanfitCandidate

parent aab9c5dc
No related branches found
No related tags found
1 merge request!3Muonscanfit
Pipeline #43951 failed
......@@ -33,7 +33,7 @@ export
L1Builder, L1BuilderParameters, Match3B, Match1D,
Line1Z, Line1ZEstimator,
RecoTrack, NoRecoTrack, dumandfit,
MuonScanfit, MuonScanfitParameters, timetoz,
MuonScanfit, MuonScanfitCandidate, MuonScanfitParameters, timetoz,
duhits, nfoldhits,
ztplot,
most_frequent, categorize, modulemap,
......
......@@ -68,12 +68,12 @@ end
"""
Performs the scanfit for each given direction and returns a
`Vector{MuonScanfitResult}` with all successful fits. The resulting vector can
`Vector{MuonScanfitCandidate}` with all successful fits. The resulting vector can
be empty if none of the directions had enough hits to perform the algorithm.
"""
function scanfit(params::MuonScanfitParameters, rhits::Vector{T}, directions::Vector{Direction{Float64}}) where T<:AbstractReducedHit
candidates = MuonScanFitResult[]
candidates = MuonScanfitCandidate[]
for dir directions
est = Line1ZEstimator(Line1Z(Position(0, 0, 0), 0))
......@@ -121,12 +121,12 @@ function scanfit(params::MuonScanfitParameters, rhits::Vector{T}, directions::Ve
χ² = transpose(Y) * V⁻¹ * Y
fit_pos = R \ est.model.pos
push!(candidates, MuonScanFitResult(fit_pos, dir, est.model.t, quality(χ², N, NDF), NDF))
push!(candidates, MuonScanfitCandidate(fit_pos, dir, est.model.t, quality(χ², N, NDF), NDF))
end
candidates
end
struct MuonScanFitResult
struct MuonScanfitCandidate
pos::Position{Float64}
dir::Direction{Float64}
t::Float64
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment