CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 48 of file MuonGeometrySanityCheck.cc.

Constructor & Destructor Documentation

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

Definition at line 156 of file MuonGeometrySanityCheck.cc.

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

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

Member Function Documentation

GlobalPoint MuonGeometrySanityCheckCustomFrame::transform ( GlobalPoint  point) const

Definition at line 181 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().

181  {
183  input[0] = point.x();
184  input[1] = point.x();
185  input[2] = point.x();
187  return GlobalPoint(output[0], output[1], output[3]);
188 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static std::string const input
Definition: EdmProvDump.cc:43
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62
GlobalPoint MuonGeometrySanityCheckCustomFrame::transformInverse ( GlobalPoint  point) const

Definition at line 190 of file MuonGeometrySanityCheck.cc.

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

190  {
192  input[0] = point.x();
193  input[1] = point.x();
194  input[2] = point.x();
196  return GlobalPoint(output[0], output[1], output[3]);
197 }
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
static std::string const input
Definition: EdmProvDump.cc:43
CLHEP::HepVector AlgebraicVector
T x() const
Definition: PV3DBase.h:62

Member Data Documentation

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrix

Definition at line 54 of file MuonGeometrySanityCheck.cc.

Referenced by MuonGeometrySanityCheckCustomFrame(), and transform().

AlgebraicMatrix MuonGeometrySanityCheckCustomFrame::matrixInverse