Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Pawian
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PWA
Pawian
Commits
51d4d0f0
Commit
51d4d0f0
authored
1 year ago
by
Bertram Kopf
Browse files
Options
Downloads
Patches
Plain Diff
minor improvements for fitting the pole positions
parent
267b3c1e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
KMatrixExtract/TMatrixErrorExtr.cc
+17
-14
17 additions, 14 deletions
KMatrixExtract/TMatrixErrorExtr.cc
KMatrixExtract/TMatrixExtrFcn.cc
+2
-1
2 additions, 1 deletion
KMatrixExtract/TMatrixExtrFcn.cc
with
19 additions
and
15 deletions
KMatrixExtract/TMatrixErrorExtr.cc
+
17
−
14
View file @
51d4d0f0
...
...
@@ -213,23 +213,26 @@ std::complex<double> TMatrixErrorExtr::CalcMassWidth(std::shared_ptr<AbsPawianPa
InfoMsg
<<
"Start Migrad "
<<
endmsg
;
FunctionMinimum
min
=
migrad
();
InfoMsg
<<
"refit with current parameters"
<<
endmsg
;
MnUserParameters
upar1a
;
upar1a
.
Add
(
"eReal"
,
min
.
UserState
().
Value
(
"eReal"
),
0.001
,
_energyMin
.
real
(),
_energyMax
.
real
());
upar1a
.
Add
(
"eImag"
,
min
.
UserState
().
Value
(
"eImag"
),
0.001
,
_energyMin
.
imag
(),
_energyMax
.
imag
());
MnMigrad
migrad1a
(
fitFcn
,
upar1a
);
min
=
migrad1a
();
if
(
!
min
.
IsValid
())
{
// Try with higher strategy
InfoMsg
<<
"FM is invalid, try with strategy = 2."
<<
endmsg
;
MnMigrad
migrad2
(
fitFcn
,
min
.
UserState
(),
MnStrategy
(
2
));
min
=
migrad2
();
// Try again with current params = start params
// InfoMsg <<"FM is invalid, try again with strategy = 1. and current parameters"<< endmsg;
// MnMigrad migrad1a(fitFcn, min.UserState(), MnStrategy(1));
// min = migrad1a();
// if(!min.IsValid()) {
// Try with higher strategy
InfoMsg
<<
"FM is still invalid, try now with strategy = 2."
<<
endmsg
;
MnMigrad
migrad2
(
fitFcn
,
min
.
UserState
(),
MnStrategy
(
2
));
min
=
migrad2
();
// }
}
//start second iteration
// MnMigrad migrad1a(fitFcn, min.UserState(), MnStrategy(1));
// min = migrad1a();
// if(!min.IsValid()) {
// // Try with higher strategy
// InfoMsg <<"FM is invalid, try with strategy = 2."<< endmsg;
// MnMigrad migrad2a(fitFcn, min.UserState(), MnStrategy(2));
// min = migrad2a();
// }
// Save final fit parameters and their errors in variables
double
final_eReal
=
min
.
UserState
().
Value
(
"eReal"
);
double
final_eImag
=
min
.
UserState
().
Value
(
"eImag"
);
...
...
This diff is collapsed.
Click to expand it.
KMatrixExtract/TMatrixExtrFcn.cc
+
2
−
1
View file @
51d4d0f0
...
...
@@ -56,6 +56,7 @@ double TMatrixExtrFcn::operator()(const std::vector<double>& par) const
double
TMatrixExtrFcn
::
Up
()
const
{
return
1.
;
// return 1.;
return
0.5
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment