CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FreeTrajectoryState.cc
Go to the documentation of this file.
4 
6 
8 
9 #include <cmath>
10 #include<sstream>
11 
12 // void bPoint(){}
13 
15  std::stringstream form;
16  form<< "FreeTrajectoryState: attempt to access errors when none available" <<
17  "\nCurvilinear error valid/values :"<< theCurvilinearError.valid() << "\n"
19  edm::LogWarning("FreeTrajectoryState") << "(was exception) " << form.str();
20  // throw TrajectoryStateException(form.str());
21  // bPoint();
22 }
23 
24 // implementation of non-trivial methods of FreeTrajectoryState
25 
26 // Warning: these methods violate constness
27 
28 // convert curvilinear errors to cartesian
30 
32  const AlgebraicMatrix65& jac = curv2Cart.jacobian();
33 
34  aCartesianError =
35  ROOT::Math::Similarity(jac, theCurvilinearError.matrix());
36 }
37 
38 // convert cartesian errors to curvilinear
40 
42  const AlgebraicMatrix56& jac = cart2Curv.jacobian();
43 
45  ROOT::Math::Similarity(jac, aCartesianError.matrix());
46 
47 }
48 
49 
50 void FreeTrajectoryState::rescaleError(double factor) {
51  if unlikely(!hasError()) return;
52  bool zeroField = (parameters().magneticField().nominalValue()==0);
53  if unlikely(zeroField) theCurvilinearError.zeroFieldScaling(factor*factor);
54  else theCurvilinearError *= (factor*factor);
55 }
56 
57 
58 
59 
60 
61 
62 
ROOT::Math::SMatrix< double, 5, 6, ROOT::Math::MatRepStd< double, 5, 6 > > AlgebraicMatrix56
const GlobalTrajectoryParameters & parameters() const
int nominalValue() const
The nominal field value for this map in kGauss.
const AlgebraicMatrix56 & jacobian() const
CurvilinearTrajectoryError theCurvilinearError
#define unlikely(x)
Definition: Likely.h:21
GlobalTrajectoryParameters theGlobalParameters
void createCurvilinearError(CartesianTrajectoryError const &aCartesianError) const
const AlgebraicSymMatrix66 & matrix() const
void rescaleError(double factor)
const AlgebraicMatrix65 & jacobian() const
void createCartesianError(CartesianTrajectoryError &aCartesianError) const
ROOT::Math::SMatrix< double, 6, 5, ROOT::Math::MatRepStd< double, 6, 5 > > AlgebraicMatrix65
const AlgebraicSymMatrix55 & matrix() const
const MagneticField & magneticField() const