CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PerigeeKinematicState.cc
Go to the documentation of this file.
5 
7  point(pt), inState(state), errorIsAvailable(true),vl(true)
8 {
9  if(!(state.isValid())) throw VertexException("PerigeeKinematicState::kinematic state passed is not valid!");
10 
11 //working with parameters:
13  par = conversions.extendedPerigeeFromKinematicParameters(state,pt);
14 
15 //creating the error
17 
18 //making jacobian for curvilinear frame
20  AlgebraicMatrix67 ki2cu;
21  ki2cu.Place_at(jj.jacobian(),0,0);
22  ki2cu(5,6) = 1.;
23  AlgebraicMatrix66 cu2pe;
25  cu2pe(5,5) = 1.;
26  AlgebraicMatrix67 jacobian = cu2pe*ki2cu;
27 
28  cov = ExtendedPerigeeTrajectoryError(ROOT::Math::Similarity(jacobian, err));
29 
30 }
31 
32 /*
33 AlgebraicMatrix PerigeeKinematicState::jacobianKinematicToExPerigee(const KinematicState& state,
34  const GlobalPoint& pt)const
35 {
36 
37  AlgebraicMatrix jac(6,7,0);
38  jac(6,7) = 1;
39  jac(5,3) = 1;
40  AlgebraicVector par = state.kinematicParameters().vector();
41  GlobalVector impactDistance = state.globalPosition() - point;
42  double field = TrackingTools::FakeField::Field::inGeVPerCentimeter(state.globalPosition()).z();
43  double signTC = -state.particleCharge();
44  double theta = state.globalMomentum().theta();
45  double phi = state.globalMomentum().phi();
46  double ptr = state.globalMomentum().transverse();
47  double transverseCurvature = field/ptr*signTC;
48 //making a proper sign for epsilon
49  double positiveMomentumPhi = ((phi>0) ? phi : (2*M_PI + phi));
50  double positionPhi = impactDistance.phi();
51  double positivePositionPhi =
52  ( (positionPhi>0) ? positionPhi : (2*M_PI+positionPhi) );
53  double phiDiff = positiveMomentumPhi - positivePositionPhi;
54  if (phiDiff<0.0) phiDiff+= (2*M_PI);
55  double signEpsilon = ( (phiDiff > M_PI) ? -1.0 : 1.0);
56 
57  double epsilon = signEpsilon *
58  sqrt(impactDistance.x()*impactDistance.x() +
59  impactDistance.y()*impactDistance.y());
60 
61 //jacobian corrections
62 
63 // jac(1,4) = -(field*signTC/(transverseCurvature*transverseCurvature))* cos(phi);
64 // jac(1,5) = -(field*signTC/(transverseCurvature*transverseCurvature))* sin(phi);
65 // jac(1,6) = -(field*signTC/(transverseCurvature*transverseCurvature))*tan(theta);
66 
67  jac(1,4) = (1/ptr*signTC) * cos(phi);
68  jac(1,5) = (1/ptr*signTC) * sin(phi);
69  jac(1,6) = (1/ptr*signTC) * tan(theta);
70 
71  jac(2,6) = (ptr)/(cos(theta) * cos(theta));
72  jac(3,1) = - epsilon * cos(phi);
73  jac(3,2) = - epsilon * sin(phi);
74 
75 
76 // jac(3,4) =
77  jac(3,4) = - ptr * sin(phi);
78  jac(3,5) = ptr * cos(phi);
79  jac(4,1) = - sin(phi);
80  jac(4,2) = cos(phi);
81  return jac;
82 
83 }
84 
85 
86 
87 AlgebraicMatrix PerigeeKinematicState::jacobianExPerigeeToKinematic(const ExtendedPerigeeTrajectoryParameters& state,
88  const GlobalPoint& point)const
89 {
90 
91  AlgebraicMatrix jac(7,6,0);
92  return jac;
93 
94 }
95 */
96 //temporary method move
bool isValid() const
const GlobalTrajectoryParameters & parameters() const
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepStd< double, 6, 6 > > AlgebraicMatrix66
Common base class.
ExtendedPerigeeTrajectoryError cov
AlgebraicSymMatrix77 const & matrix() const
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
Definition: Matrices.h:8
KinematicParametersError const & kinematicParametersError() const
ExtendedPerigeeTrajectoryParameters par
ExtendedPerigeeTrajectoryParameters extendedPerigeeFromKinematicParameters(const KinematicState &state, const GlobalPoint &point) const
ROOT::Math::SMatrix< double, 6, 7, ROOT::Math::MatRepStd< double, 6, 7 > > AlgebraicMatrix67
Definition: Matrices.h:10
AlgebraicMatrix55 jacobianCurvilinear2Perigee(const FreeTrajectoryState &fts)
FreeTrajectoryState freeTrajectoryState() const
*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