Commit 11733868 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

AlignmentMillepede: fix enumeration of DUTs

parent db83de9e
Pipeline #1361031 passed with stages
in 21 minutes and 27 seconds
......@@ -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()];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment