Skip to content

Commit

Permalink
Enable veto logic for HG PCL alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeuser committed Aug 25, 2022
1 parent 22a8608 commit 7466843
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,9 @@ void MillePedeFileReader ::readMillePedeResultFile() {
<< "=============" << std::endl;

if (std::abs(ObsMove) > thresholds_[detLabel][alignableIndex]) {
if (!isHG_) {
edm::LogWarning("MillePedeFileReader")
<< "Aborting payload creation."
<< " Exceeding maximum thresholds for movement: " << std::abs(ObsMove) << " for" << detLabel << "("
<< coord << ")";
}
edm::LogWarning("MillePedeFileReader") << "Aborting payload creation."
<< " Exceeding maximum thresholds for movement: " << std::abs(ObsMove)
<< " for" << detLabel << "(" << coord << ")";
updateBits_.set(0);
vetoUpdateDB_ = true;
continue;
Expand All @@ -277,11 +274,9 @@ void MillePedeFileReader ::readMillePedeResultFile() {
updateBits_.set(1);

if (std::abs(ObsErr) > errors_[detLabel][alignableIndex]) {
if (!isHG_) {
edm::LogWarning("MillePedeFileReader") << "Aborting payload creation."
<< " Exceeding maximum thresholds for error: " << std::abs(ObsErr)
<< " for" << detLabel << "(" << coord << ")";
}
edm::LogWarning("MillePedeFileReader") << "Aborting payload creation."
<< " Exceeding maximum thresholds for error: " << std::abs(ObsErr)
<< " for" << detLabel << "(" << coord << ")";
updateBits_.set(2);
vetoUpdateDB_ = true;
continue;
Expand Down Expand Up @@ -309,8 +304,7 @@ void MillePedeFileReader ::readMillePedeResultFile() {
}

if (isHG_) { // check fractionCut
updateDB_ = false; // reset both booleans since only fractionCut is considered for HG
vetoUpdateDB_ = false;
updateDB_ = false; // reset booleans since fractionCut is considered for HG
std::stringstream ss;
for (auto& ali : alignables_) {
ss << ali << std::endl;
Expand All @@ -332,7 +326,7 @@ void MillePedeFileReader ::readMillePedeResultFile() {
}
ss << "===================" << std::endl;
}
if (updateDB_) {
if (updateDB_ && !vetoUpdateDB_) {
ss << "Alignment will be updated" << std::endl;
} else {
ss << "Alignment will NOT be updated" << std::endl;
Expand Down

0 comments on commit 7466843

Please sign in to comment.