CMS 3D CMS Logo

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