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 151 of file MuonGeometrySanityCheck.cc.

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

152  {
153  std::vector<double> numbers = iConfig.getParameter<std::vector<double> >("matrix");
154  if (numbers.size() != 9) {
155  throw cms::Exception("BadConfig") << "Custom frame \"" << name << "\" has a matrix which is not 3x3." << std::endl;
156  }
157 
158  matrix = AlgebraicMatrix(3, 3);
159  matrix[0][0] = numbers[0];
160  matrix[0][1] = numbers[1];
161  matrix[0][2] = numbers[2];
162  matrix[1][0] = numbers[3];
163  matrix[1][1] = numbers[4];
164  matrix[1][2] = numbers[5];
165  matrix[2][0] = numbers[6];
166  matrix[2][1] = numbers[7];
167  matrix[2][2] = numbers[8];
168 
169  int ierr;
171  matrixInverse.invert(ierr);
172  if (ierr != 0) {
173  throw cms::Exception("BadConfig") << "Could not invert matrix for custom frame \"" << name << "\"." << std::endl;
174  }
175 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
CLHEP::HepMatrix AlgebraicMatrix

Member Function Documentation

◆ transform()

GlobalPoint MuonGeometrySanityCheckCustomFrame::transform ( GlobalPoint  point) const

Definition at line 177 of file MuonGeometrySanityCheck.cc.

References input, matrix, and point.

177  {
179  input[0] = point.x();
180  input[1] = point.x();
181  input[2] = point.x();
183  return GlobalPoint(output[0], output[1], output[3]);
184 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static std::string const input
Definition: EdmProvDump.cc:50
CLHEP::HepVector AlgebraicVector
Definition: output.py:1
*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

◆ transformInverse()

GlobalPoint MuonGeometrySanityCheckCustomFrame::transformInverse ( GlobalPoint  point) const

Definition at line 186 of file MuonGeometrySanityCheck.cc.

References input, matrixInverse, and point.

186  {
188  input[0] = point.x();
189  input[1] = point.x();
190  input[2] = point.x();
192  return GlobalPoint(output[0], output[1], output[3]);
193 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static std::string const input
Definition: EdmProvDump.cc:50
CLHEP::HepVector AlgebraicVector
Definition: output.py:1
*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

Member Data Documentation

◆ matrix

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrix

Definition at line 53 of file MuonGeometrySanityCheck.cc.

Referenced by MuonGeometrySanityCheckCustomFrame(), and transform().

◆ matrixInverse

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrixInverse