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 ( const edm::ParameterSet iConfig,
std::string  name 
)

Definition at line 147 of file MuonGeometrySanityCheck.cc.

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

Referenced by MuonGeometrySanityCheck::MuonGeometrySanityCheck().

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 }
T getParameter(std::string const &) const
CLHEP::HepMatrix AlgebraicMatrix

Member Function Documentation

GlobalPoint MuonGeometrySanityCheckCustomFrame::transform ( GlobalPoint  point) const

Definition at line 173 of file MuonGeometrySanityCheck.cc.

References input, matrix, convertSQLitetoXML_cfg::output, and PV3DBase< T, PVType, FrameType >::x().

Referenced by Vispa.Views.LineDecayView.DecayLine::boundingRect(), Vispa.Views.LineDecayView.DecayLine::containsPoint(), and Vispa.Views.LineDecayView.DecayLine::paint().

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 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static std::string const input
Definition: EdmProvDump.cc:48
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:59
GlobalPoint MuonGeometrySanityCheckCustomFrame::transformInverse ( GlobalPoint  point) const

Definition at line 182 of file MuonGeometrySanityCheck.cc.

References input, matrixInverse, convertSQLitetoXML_cfg::output, and PV3DBase< T, PVType, FrameType >::x().

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 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static std::string const input
Definition: EdmProvDump.cc:48
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:59

Member Data Documentation

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrix

Definition at line 53 of file MuonGeometrySanityCheck.cc.

Referenced by MuonGeometrySanityCheckCustomFrame(), and transform().

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrixInverse