Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
9f0ad219
Commit
9f0ad219
authored
Dec 07, 2017
by
Morag Williams
Browse files
Changing if statement to avoid unnecessary calculations
parent
4bb67770
Changes
1
Show whitespace changes
Inline
Side-by-side
src/algorithms/Alignment/Alignment.cpp
View file @
9f0ad219
...
...
@@ -63,7 +63,8 @@ StatusCode Alignment::run(Clipboard* clipboard) {
m_alignmenttracks
.
push_back
(
alignmentTrack
);
Clusters
associatedClusters
=
track
->
associatedClusters
();
if
(
alignmentMethod
==
0
)
continue
;
// Find the cluster that needs to have its position recalculated
for
(
auto
&
associatedCluster
:
associatedClusters
)
{
// Recalculate the global position from the local
...
...
@@ -75,7 +76,6 @@ StatusCode Alignment::run(Clipboard* clipboard) {
// Calculate the residuals
double
residualX
=
intercept
.
X
()
-
positionGlobal
.
X
();
double
residualY
=
intercept
.
Y
()
-
positionGlobal
.
Y
();
if
(
alignmentMethod
==
1
)
{
// Fill the alignment residual profile plots
residualsXPlot
->
Fill
(
residualX
);
residualsYPlot
->
Fill
(
residualY
);
...
...
@@ -85,7 +85,6 @@ StatusCode Alignment::run(Clipboard* clipboard) {
profile_dX_Y
->
Fill
(
residualX
,
positionLocal
.
Y
(),
1
);
}
}
}
// If we have enough tracks for the alignment, tell the event loop to finish
if
(
m_alignmenttracks
.
size
()
>=
m_numberOfTracksForAlignment
)
{
LOG
(
STATUS
)
<<
"Accumulated "
<<
m_alignmenttracks
.
size
()
<<
" tracks, interrupting processing."
;
...
...
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