Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Corryvreckan
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Naomi Davis
Corryvreckan
Commits
9c259a9e
Commit
9c259a9e
authored
5 years ago
by
Katharina Dort
Committed by
Jens Kroeger
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Formatting changes
(cherry picked from commit
1ec226dc
)
parent
bd6a6a94
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
src/modules/Prealignment/Prealignment.cpp
+10
-12
10 additions, 12 deletions
src/modules/Prealignment/Prealignment.cpp
src/modules/Prealignment/Prealignment.h
+4
-4
4 additions, 4 deletions
src/modules/Prealignment/Prealignment.h
with
14 additions
and
16 deletions
src/modules/Prealignment/Prealignment.cpp
+
10
−
12
View file @
9c259a9e
...
...
@@ -127,23 +127,21 @@ void Prealignment::finalise() {
double
shift_X
=
0.
;
double
shift_Y
=
0.
;
LOG
(
INFO
)
<<
"Using prealignment method: "
<<
prealign_method
;
if
(
prealign_method
==
"gauss_fit"
){
correlationX
->
Fit
(
"gaus"
,
"Q"
,
""
,
fit_low
,
fit_high
);
correlationY
->
Fit
(
"gaus"
,
"Q"
,
""
,
fit_low
,
fit_high
);
LOG
(
INFO
)
<<
"Using prealignment method: "
<<
prealign_method
;
if
(
prealign_method
==
"gauss_fit"
)
{
correlationX
->
Fit
(
"gaus"
,
"Q"
,
""
,
fit_low
,
fit_high
);
correlationY
->
Fit
(
"gaus"
,
"Q"
,
""
,
fit_low
,
fit_high
);
shift_X
=
correlationX
->
GetFunction
(
"gaus"
)
->
GetParameter
(
1
);
shift_Y
=
correlationY
->
GetFunction
(
"gaus"
)
->
GetParameter
(
1
);
}
else
if
(
prealign_method
==
"mean"
){
}
else
if
(
prealign_method
==
"mean"
)
{
shift_X
=
correlationX
->
GetMean
();
shift_Y
=
correlationY
->
GetMean
();
}
else
if
(
prealign_method
==
"maximum"
)
{
int
binMaxX
=
correlationX
->
GetMaximumBin
();
shift_X
=
correlationX
->
GetXaxis
()
->
GetBinCenter
(
binMaxX
);
int
binMaxY
=
correlationY
->
GetMaximumBin
();
shift_Y
=
correlationY
->
GetXaxis
()
->
GetBinCenter
(
binMaxY
);
}
else
if
(
prealign_method
==
"maximum"
){
int
binMaxX
=
correlationX
->
GetMaximumBin
();
shift_X
=
correlationX
->
GetXaxis
()
->
GetBinCenter
(
binMaxX
);
int
binMaxY
=
correlationY
->
GetMaximumBin
();
shift_Y
=
correlationY
->
GetXaxis
()
->
GetBinCenter
(
binMaxY
);
}
LOG
(
INFO
)
<<
"Detector "
<<
m_detector
->
name
()
<<
": x = "
<<
Units
::
display
(
shift_X
,
{
"mm"
,
"um"
})
<<
" , y = "
<<
Units
::
display
(
shift_Y
,
{
"mm"
,
"um"
});
...
...
This diff is collapsed.
Click to expand it.
src/modules/Prealignment/Prealignment.h
+
4
−
4
View file @
9c259a9e
...
...
@@ -12,9 +12,9 @@
#define PREALIGNMENT_H 1
#include
<TCanvas.h>
#include
<TF1.h>
#include
<TH1F.h>
#include
<TH2F.h>
#include
<TF1.h>
#include
<iostream>
#include
"core/module/Module.hpp"
#include
"objects/Cluster.hpp"
...
...
@@ -50,9 +50,9 @@ namespace corryvreckan {
double
max_correlation_rms
;
double
damping_factor
;
double
timeCut
;
std
::
string
prealign_method
;
double
fit_high
;
double
fit_low
;
std
::
string
prealign_method
;
double
fit_high
;
double
fit_low
;
};
}
// namespace corryvreckan
#endif // PREALIGNMENT_H
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