File indexing completed on 2024-04-06 12:02:25
0001 #include "CondFormats/PCLConfig/interface/AlignPCLThreshold.h"
0002 #include "FWCore/Utilities/interface/Exception.h"
0003
0004 AlignPCLThreshold::AlignPCLThreshold(coordThresholds X,
0005 coordThresholds tX,
0006 coordThresholds Y,
0007 coordThresholds tY,
0008 coordThresholds Z,
0009 coordThresholds tZ,
0010 std::vector<coordThresholds> extraDOF) {
0011 m_xCoord = X;
0012 m_yCoord = Y;
0013 m_zCoord = Z;
0014 m_thetaXCoord = tX;
0015 m_thetaYCoord = tY;
0016 m_thetaZCoord = tZ;
0017 m_extraDOF = extraDOF;
0018 };
0019
0020
0021 std::array<float, 4> AlignPCLThreshold::getExtraDOFCuts(const unsigned int i) const {
0022 if (i < m_extraDOF.size()) {
0023 return {{m_extraDOF[i].m_Cut, m_extraDOF[i].m_sigCut, m_extraDOF[i].m_errorCut, m_extraDOF[i].m_maxMoveCut}};
0024 } else {
0025 throw cms::Exception("AlignPCLThreshold") << "No extra DOF thresholds defined for index" << i << "\n";
0026 }
0027 }
0028
0029
0030 std::string AlignPCLThreshold::getExtraDOFLabel(const unsigned int i) const {
0031 if (i < m_extraDOF.size()) {
0032 return m_extraDOF[i].m_label;
0033 } else {
0034 throw cms::Exception("AlignPCLThreshold") << "No extra DOF label defined for index" << i << "\n";
0035 }
0036 }