CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
MuonGeometrySanityCheckCustomFrame Class Reference

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
 

Detailed Description

Definition at line 47 of file MuonGeometrySanityCheck.cc.

Constructor & Destructor Documentation

◆ MuonGeometrySanityCheckCustomFrame()

MuonGeometrySanityCheckCustomFrame::MuonGeometrySanityCheckCustomFrame ( const edm::ParameterSet iConfig,
std::string  name 
)

Definition at line 147 of file MuonGeometrySanityCheck.cc.

148  {
149  std::vector<double> numbers = iConfig.getParameter<std::vector<double> >("matrix");
150  if (numbers.size() != 9) {
151  throw cms::Exception("BadConfig") << "Custom frame \"" << name << "\" has a matrix which is not 3x3." << std::endl;
152  }
153 
154  matrix = AlgebraicMatrix(3, 3);
155  matrix[0][0] = numbers[0];
156  matrix[0][1] = numbers[1];
157  matrix[0][2] = numbers[2];
158  matrix[1][0] = numbers[3];
159  matrix[1][1] = numbers[4];
160  matrix[1][2] = numbers[5];
161  matrix[2][0] = numbers[6];
162  matrix[2][1] = numbers[7];
163  matrix[2][2] = numbers[8];
164 
165  int ierr;
167  matrixInverse.invert(ierr);
168  if (ierr != 0) {
169  throw cms::Exception("BadConfig") << "Could not invert matrix for custom frame \"" << name << "\"." << std::endl;
170  }
171 }

References Exception, edm::ParameterSet::getParameter(), matrix, matrixInverse, and Skims_PA_cff::name.

Member Function Documentation

◆ transform()

GlobalPoint MuonGeometrySanityCheckCustomFrame::transform ( GlobalPoint  point) const

Definition at line 173 of file MuonGeometrySanityCheck.cc.

173  {
175  input[0] = point.x();
176  input[1] = point.x();
177  input[2] = point.x();
179  return GlobalPoint(output[0], output[1], output[3]);
180 }

References input, matrix, convertSQLitetoXML_cfg::output, and point.

◆ transformInverse()

GlobalPoint MuonGeometrySanityCheckCustomFrame::transformInverse ( GlobalPoint  point) const

Definition at line 182 of file MuonGeometrySanityCheck.cc.

182  {
184  input[0] = point.x();
185  input[1] = point.x();
186  input[2] = point.x();
188  return GlobalPoint(output[0], output[1], output[3]);
189 }

References input, matrixInverse, convertSQLitetoXML_cfg::output, and point.

Member Data Documentation

◆ matrix

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrix

Definition at line 53 of file MuonGeometrySanityCheck.cc.

Referenced by MuonGeometrySanityCheckCustomFrame(), and transform().

◆ matrixInverse

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrixInverse
input
static const std::string input
Definition: EdmProvDump.cc:48
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
MuonGeometrySanityCheckCustomFrame::matrix
AlgebraicMatrix matrix
Definition: MuonGeometrySanityCheck.cc:53
AlgebraicVector
CLHEP::HepVector AlgebraicVector
Definition: AlgebraicObjects.h:13
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
MuonGeometrySanityCheckCustomFrame::matrixInverse
AlgebraicMatrix matrixInverse
Definition: MuonGeometrySanityCheck.cc:54
AlgebraicMatrix
CLHEP::HepMatrix AlgebraicMatrix
Definition: AlgebraicObjects.h:14
Exception
Definition: hltDiff.cc:246
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5