Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
11733868
Commit
11733868
authored
Jan 22, 2020
by
Simon Spannagel
Browse files
AlignmentMillepede: fix enumeration of DUTs
parent
db83de9e
Pipeline
#1361031
passed with stages
in 21 minutes and 27 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/modules/AlignmentMillepede/AlignmentMillepede.cpp
View file @
11733868
...
...
@@ -42,7 +42,7 @@ void AlignmentMillepede::initialise() {
// Renumber the planes in Millepede, ignoring masked planes.
unsigned
int
index
=
0
;
for
(
const
auto
&
det
:
get_detectors
())
{
if
(
det
->
isDUT
())
{
if
(
det
->
isDUT
()
&&
m_excludeDUT
)
{
continue
;
}
m_millePlanes
[
det
->
name
()]
=
index
;
...
...
@@ -166,7 +166,7 @@ void AlignmentMillepede::setConstraints(const size_t nPlanes) {
// Calculate the mean z-position.
double
avgz
=
0.
;
for
(
const
auto
&
det
:
get_detectors
())
{
if
(
det
->
isDUT
())
{
if
(
det
->
isDUT
()
&&
m_excludeDUT
)
{
continue
;
}
avgz
+=
det
->
displacement
().
Z
();
...
...
@@ -175,7 +175,7 @@ void AlignmentMillepede::setConstraints(const size_t nPlanes) {
// Calculate the variance.
double
varz
=
0.0
;
for
(
const
auto
&
det
:
get_detectors
())
{
if
(
det
->
isDUT
())
{
if
(
det
->
isDUT
()
&&
m_excludeDUT
)
{
continue
;
}
const
double
dz
=
det
->
displacement
().
Z
()
-
avgz
;
...
...
@@ -197,7 +197,7 @@ void AlignmentMillepede::setConstraints(const size_t nPlanes) {
m_constraints
.
clear
();
for
(
const
auto
&
det
:
get_detectors
())
{
if
(
det
->
isDUT
())
{
if
(
det
->
isDUT
()
&&
m_excludeDUT
)
{
continue
;
}
const
unsigned
int
i
=
m_millePlanes
[
det
->
name
()];
...
...
@@ -574,13 +574,13 @@ bool AlignmentMillepede::fitTrack(const std::vector<Equation>& equations,
void
AlignmentMillepede
::
updateGeometry
()
{
auto
nPlanes
=
num_detectors
();
for
(
const
auto
&
det
:
get_detectors
())
{
if
(
det
->
isDUT
())
{
if
(
det
->
isDUT
()
&&
m_excludeDUT
)
{
nPlanes
--
;
}
}
for
(
const
auto
&
det
:
get_detectors
())
{
if
(
det
->
isDUT
())
{
if
(
det
->
isDUT
()
&&
m_excludeDUT
)
{
continue
;
}
auto
plane
=
m_millePlanes
[
det
->
name
()];
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment