Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
BAORadio
AnaPAON4
Commits
7c4759cc
Commit
7c4759cc
authored
Mar 05, 2019
by
Reza ANSARI
Browse files
Amelioration print des resultats du fit des baselines, Reza 05/03/2019
parent
e0d562c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
trkfit.cc
trkfit.cc
+13
-5
No files found.
trkfit.cc
View file @
7c4759cc
...
...
@@ -1033,11 +1033,11 @@ int CxBaselineFitter::dofit(string outfilename, bool fgfixbaseline, bool fgphi0o
if
(
fgphi0only
)
mFit
.
SetFix
(
2
*
i
+
1
,
0.
);
v_err_phi_0
[
i
]
=
0.
;
v_err_a_phi
[
i
]
=
0.
;
sprintf
(
pname
,
"BaselineShift_X_%d"
,(
int
)(
i
+
2
));
mFit
.
SetParam
(
6
+
3
*
i
,
pname
,
v_baselineshits
[
i
].
X
(),
0.0
2
,
-
0.25
,
0.25
);
mFit
.
SetParam
(
6
+
3
*
i
,
pname
,
v_baselineshits
[
i
].
X
(),
0.0
1
,
-
0.25
,
0.25
);
sprintf
(
pname
,
"BaselineShift_Y_%d"
,(
int
)(
i
+
2
));
mFit
.
SetParam
(
7
+
3
*
i
,
pname
,
v_baselineshits
[
i
].
Y
(),
0.0
2
,
-
0.25
,
0.25
);
mFit
.
SetParam
(
7
+
3
*
i
,
pname
,
v_baselineshits
[
i
].
Y
(),
0.0
1
,
-
0.25
,
0.25
);
sprintf
(
pname
,
"BaselineShift_Z_%d"
,(
int
)(
i
+
2
));
mFit
.
SetParam
(
8
+
3
*
i
,
pname
,
v_baselineshits
[
i
].
Z
(),
0.0
2
,
-
0.25
,
0.25
);
mFit
.
SetParam
(
8
+
3
*
i
,
pname
,
v_baselineshits
[
i
].
Z
(),
0.0
1
,
-
0.25
,
0.25
);
if
(
fgfixbaseline
)
{
cout
<<
" ... fitting phases only, fixed baselines "
<<
endl
;
mFit
.
SetFix
(
6
+
3
*
i
);
mFit
.
SetFix
(
7
+
3
*
i
);
mFit
.
SetFix
(
8
+
3
*
i
);
...
...
@@ -1046,7 +1046,7 @@ int CxBaselineFitter::dofit(string outfilename, bool fgfixbaseline, bool fgphi0o
cout
<<
" Performing the fit (tot_npoints_fit= "
<<
tot_npoints_fit
<<
" ?= (npoints2="
<<
npoints2
<<
") ..."
<<
endl
;
rcfit
=
mFit
.
doFit
();
xi2red
=-
99999.
;
cout
<<
"------ Fit result Reduce_Chisquare = "
<<
mFit
.
GetChi2Red
()
<<
" nstep="
<<
mFit
.
GetNStep
()
<<
" rc="
<<
rcfit
<<
endl
;
mFit
.
PrintFit
();
if
(
_prtlevel_
>
1
)
mFit
.
PrintFit
();
for
(
size_t
j
=
0
;
j
<
4
;
j
++
)
for
(
size_t
i
=
0
;
i
<
(
NB_ANTENNES
-
1
);
i
++
)
{
...
...
@@ -1067,7 +1067,15 @@ int CxBaselineFitter::dofit(string outfilename, bool fgfixbaseline, bool fgphi0o
double
ezs
=
mFit
.
GetParmErr
(
i
*
3
+
8
);
v_baselineshits
[
i
]
=
Vector3d
(
xs
,
ys
,
zs
);
v_err_baselineshits
[
i
]
=
Vector3d
(
exs
,
eys
,
ezs
);
// on calcule la phase ajustee pour la frequence de reference 1300 MHz
double
phase
=
gxi2
.
getPhase4Freq
(
v_phi_0
[
i
],
v_a_phi
[
i
],
1300.
);
while
(
phase
<
0.
)
phase
+=
2.
*
M_PI
;
while
(
phase
>
2.
*
M_PI
)
phase
-=
2.
*
M_PI
;
cout
<<
"---Ant["
<<
i
+
2
<<
" Phase(@1300MHz)= "
<<
setw
(
10
)
<<
Angle
(
phase
).
ToDegree
()
<<
" phi_0= "
<<
setw
(
10
)
<<
Angle
(
v_phi_0
[
i
]).
ToDegree
()
<<
" +/- "
<<
setw
(
10
)
<<
Angle
(
v_err_phi_0
[
i
]).
ToDegree
()
<<
" deg."
<<
" a_phi= "
<<
setw
(
8
)
<<
Angle
(
v_a_phi
[
i
]).
ToDegree
()
<<
" +/- "
<<
setw
(
10
)
<<
Angle
(
v_err_a_phi
[
i
]).
ToDegree
()
<<
" deg/250 MHz"
<<
endl
;
cout
<<
" Baselineshift["
<<
i
+
2
<<
" = "
<<
v_baselineshits
[
i
]
<<
" +/- "
<<
v_err_baselineshits
[
i
]
<<
" m."
<<
endl
;
}
fit_done
=
true
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment