CMS 3D CMS Logo

FreeTrajectoryState.cc
Go to the documentation of this file.
4 
6 
8 
10 
11 #include <cmath>
12 #include<sstream>
13 
14 // void bPoint(){}
15 
17  std::stringstream form;
18  form<< "FreeTrajectoryState: attempt to access errors when none available" <<
19  "\nCurvilinear error valid/values :"<< theCurvilinearError.valid() << "\n"
21  edm::LogWarning("FreeTrajectoryState") << "(was exception) " << form.str();
22  // throw TrajectoryStateException(form.str());
23  // bPoint();
24 }
25 
26 // implementation of non-trivial methods of FreeTrajectoryState
27 
28 // Warning: these methods violate constness
29 
30 // convert curvilinear errors to cartesian
32 
34  const AlgebraicMatrix65& jac = curv2Cart.jacobian();
35 
36  aCartesianError =
37  ROOT::Math::Similarity(jac, theCurvilinearError.matrix());
38 }
39 
40 // convert cartesian errors to curvilinear
42 
44  const AlgebraicMatrix56& jac = cart2Curv.jacobian();
45 
47  ROOT::Math::Similarity(jac, aCartesianError.matrix());
48 
49 }
50 
51 
52 void FreeTrajectoryState::rescaleError(double factor) {
53  if UNLIKELY(!hasError()) return;
54  bool zeroField = (parameters().magneticField().nominalValue()==0);
55  if UNLIKELY(zeroField) theCurvilinearError.zeroFieldScaling(factor*factor);
56  else theCurvilinearError *= (factor*factor);
57 }
58 
59 
60 
61 
62 
63 
64 
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.
Definition: MagneticField.h:58
const AlgebraicMatrix56 & jacobian() const
CurvilinearTrajectoryError theCurvilinearError
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
#define UNLIKELY(x)