Public Member Functions | |
MuonGeometrySanityCheckCustomFrame (const edm::ParameterSet &iConfig, std::string name) | |
GlobalPoint | transform (GlobalPoint point) const |
GlobalPoint | transformInverse (GlobalPoint point) const |
Public Attributes | |
AlgebraicMatrix | matrix |
AlgebraicMatrix | matrixInverse |
Definition at line 48 of file MuonGeometrySanityCheck.cc.
MuonGeometrySanityCheckCustomFrame::MuonGeometrySanityCheckCustomFrame | ( | const edm::ParameterSet & | iConfig, |
std::string | name | ||
) |
Definition at line 156 of file MuonGeometrySanityCheck.cc.
References Exception, edm::ParameterSet::getParameter(), matrix, and matrixInverse.
{ std::vector<double> numbers = iConfig.getParameter<std::vector<double> >("matrix"); if (numbers.size() != 9) { throw cms::Exception("BadConfig") << "Custom frame \"" << name << "\" has a matrix which is not 3x3." << std::endl; } matrix = AlgebraicMatrix(3, 3); matrix[0][0] = numbers[0]; matrix[0][1] = numbers[1]; matrix[0][2] = numbers[2]; matrix[1][0] = numbers[3]; matrix[1][1] = numbers[4]; matrix[1][2] = numbers[5]; matrix[2][0] = numbers[6]; matrix[2][1] = numbers[7]; matrix[2][2] = numbers[8]; int ierr; matrixInverse = matrix; matrixInverse.invert(ierr); if (ierr != 0) { throw cms::Exception("BadConfig") << "Could not invert matrix for custom frame \"" << name << "\"." << std::endl; } }
GlobalPoint MuonGeometrySanityCheckCustomFrame::transform | ( | GlobalPoint | point | ) | const |
Definition at line 181 of file MuonGeometrySanityCheck.cc.
References collect_tpl::input, matrix, convertSQLitetoXML_cfg::output, and PV3DBase< T, PVType, FrameType >::x().
{ AlgebraicVector input(3); input[0] = point.x(); input[1] = point.x(); input[2] = point.x(); AlgebraicVector output = matrix * input; return GlobalPoint(output[0], output[1], output[3]); }
GlobalPoint MuonGeometrySanityCheckCustomFrame::transformInverse | ( | GlobalPoint | point | ) | const |
Definition at line 190 of file MuonGeometrySanityCheck.cc.
References collect_tpl::input, matrixInverse, convertSQLitetoXML_cfg::output, and PV3DBase< T, PVType, FrameType >::x().
{ AlgebraicVector input(3); input[0] = point.x(); input[1] = point.x(); input[2] = point.x(); AlgebraicVector output = matrixInverse * input; return GlobalPoint(output[0], output[1], output[3]); }
Definition at line 54 of file MuonGeometrySanityCheck.cc.
Referenced by MuonGeometrySanityCheckCustomFrame(), and transform().
Definition at line 55 of file MuonGeometrySanityCheck.cc.
Referenced by MuonGeometrySanityCheckCustomFrame(), and transformInverse().