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.Place_at(pc.jacobianCurvilinear2Perigee(state.freeTrajectoryState()),0,0);
26  cu2pe(5,5) = 1.;
27  AlgebraicMatrix67 jacobian = cu2pe*ki2cu;
28 
29  cov = ExtendedPerigeeTrajectoryError(ROOT::Math::Similarity(jacobian, err));
30 
31 }
32 
33 /*
34 AlgebraicMatrix PerigeeKinematicState::jacobianKinematicToExPerigee(const KinematicState& state,
35  const GlobalPoint& pt)const
36 {
37 
38  AlgebraicMatrix jac(6,7,0);
39  jac(6,7) = 1;
40  jac(5,3) = 1;
41  AlgebraicVector par = state.kinematicParameters().vector();
42  GlobalVector impactDistance = state.globalPosition() - point;
43  double field = TrackingTools::FakeField::Field::inGeVPerCentimeter(state.globalPosition()).z();
44  double signTC = -state.particleCharge();
45  double theta = state.globalMomentum().theta();
46  double phi = state.globalMomentum().phi();
47  double ptr = state.globalMomentum().transverse();
48  double transverseCurvature = field/ptr*signTC;
49 //making a proper sign for epsilon
50  double positiveMomentumPhi = ((phi>0) ? phi : (2*M_PI + phi));
51  double positionPhi = impactDistance.phi();
52  double positivePositionPhi =
53  ( (positionPhi>0) ? positionPhi : (2*M_PI+positionPhi) );
54  double phiDiff = positiveMomentumPhi - positivePositionPhi;
55  if (phiDiff<0.0) phiDiff+= (2*M_PI);
56  double signEpsilon = ( (phiDiff > M_PI) ? -1.0 : 1.0);
57 
58  double epsilon = signEpsilon *
59  sqrt(impactDistance.x()*impactDistance.x() +
60  impactDistance.y()*impactDistance.y());
61 
62 //jacobian corrections
63 
64 // jac(1,4) = -(field*signTC/(transverseCurvature*transverseCurvature))* cos(phi);
65 // jac(1,5) = -(field*signTC/(transverseCurvature*transverseCurvature))* sin(phi);
66 // jac(1,6) = -(field*signTC/(transverseCurvature*transverseCurvature))*tan(theta);
67 
68  jac(1,4) = (1/ptr*signTC) * cos(phi);
69  jac(1,5) = (1/ptr*signTC) * sin(phi);
70  jac(1,6) = (1/ptr*signTC) * tan(theta);
71 
72  jac(2,6) = (ptr)/(cos(theta) * cos(theta));
73  jac(3,1) = - epsilon * cos(phi);
74  jac(3,2) = - epsilon * sin(phi);
75 
76 
77 // jac(3,4) =
78  jac(3,4) = - ptr * sin(phi);
79  jac(3,5) = ptr * cos(phi);
80  jac(4,1) = - sin(phi);
81  jac(4,2) = cos(phi);
82  return jac;
83 
84 }
85 
86 
87 
88 AlgebraicMatrix PerigeeKinematicState::jacobianExPerigeeToKinematic(const ExtendedPerigeeTrajectoryParameters& state,
89  const GlobalPoint& point)const
90 {
91 
92  AlgebraicMatrix jac(7,6,0);
93  return jac;
94 
95 }
96 */
97 //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
ROOT::Math::SMatrix< double, 7, 7, ROOT::Math::MatRepSym< double, 7 > > AlgebraicSymMatrix77
Definition: Matrices.h:8
KinematicParametersError const & kinematicParametersError() const
AlgebraicMatrix55 jacobianCurvilinear2Perigee(const FreeTrajectoryState &fts) 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
char state
Definition: procUtils.cc:75
FreeTrajectoryState freeTrajectoryState() const
AlgebraicSymMatrix77 matrix() 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