CMS 3D CMS Logo

PerigeeMultiLTS.cc
Go to the documentation of this file.
6 
7 using namespace std;
8 
11  const TrajectoryStateOnSurface& tsos)
12  : theLinPoint(linP), theTrack(track), theTSOS(tsos), theCharge(theTrack.charge()), collapsedStateAvailable(false) {
13  //Extract the TSOS components:
14 
15  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
16  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
17  ltComp.reserve(tsosComp.size());
18  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin(); it != tsosComp.end(); it++) {
19  // cout <<(*it).globalPosition()<<endl;
21  }
22 }
23 
27  }
29 }
30 
37  return collapsedStateLT->constantTerm();
38 }
39 
46  return collapsedStateLT->positionJacobian();
47 }
48 
55  return collapsedStateLT->momentumJacobian();
56 }
57 
63  return collapsedStateLT->parametersFromExpansion();
64 }
65 
73  const PerigeeLinearizedTrackState* otherP = dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
74  return otherP->predictedState();
75 }
76 
80  return collapsedStateLT->hasError();
81 }
82 
86  return collapsedStateLT->predictedStateParameters();
87 }
88 
92  return collapsedStateLT->predictedStateMomentumParameters();
93 }
94 
98  return collapsedStateLT->predictedStateWeight(error);
99 }
100 
104  return collapsedStateLT->predictedStateError();
105 }
106 
110  return collapsedStateLT->predictedStateMomentumError();
111 }
112 
114  const PerigeeMultiLTS* otherP = dynamic_cast<const PerigeeMultiLTS*>(&other);
115  if (otherP == nullptr) {
116  throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
117  }
118  return (otherP->track() == theTrack);
119 }
120 
122  const GlobalPoint& newLP) const {
124 }
125 
127  const GlobalPoint& vertexPosition,
128  const AlgebraicVectorM& vectorParameters,
129  const AlgebraicSymMatrixOO& covarianceMatrix) const {
131  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
132  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
133 }
134 
136  AlgebraicVector3 vertexPosition;
137  vertexPosition(0) = theRefittedState->position().x();
138  vertexPosition(1) = theRefittedState->position().y();
139  vertexPosition(2) = theRefittedState->position().z();
140  AlgebraicVectorN param =
141  constantTerm() + positionJacobian() * vertexPosition + momentumJacobian() * theRefittedState->momentumVector();
142  if (param(2) > M_PI)
143  param(2) -= 2 * M_PI;
144  if (param(2) < -M_PI)
145  param(2) += 2 * M_PI;
146 
147  return param;
148 }
149 
151  if (parameters(2) > M_PI)
152  parameters(2) -= 2 * M_PI;
153  if (parameters(2) < -M_PI)
154  parameters(2) += 2 * M_PI;
155 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
bool hasError() const override
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
ROOT::Math::SMatrix< double, N+1, N+1, ROOT::Math::MatRepSym< double, N+1 > > AlgebraicSymMatrixOO
reco::TransientTrack theTrack
ROOT::Math::SVector< double, N > AlgebraicVectorN
const AlgebraicMatrixN3 & positionJacobian() const override
AlgebraicSymMatrixMM predictedStateMomentumError() const override
Common base class.
const TrajectoryStateClosestToPoint & predictedState() const
ROOT::Math::SVector< double, N - 2 > AlgebraicVectorM
AlgebraicVectorN predictedStateParameters() const override
const TrajectoryStateOnSurface theTSOS
void checkParameters(AlgebraicVector5 &parameters) const override
Components const & components() const
RefCountedRefittedTrackState createRefittedTrackState(const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const override
void prepareCollapsedState() const
ROOT::Math::SMatrix< double, 5, 3, ROOT::Math::MatRepStd< double, 5, 3 > > AlgebraicMatrix53
AlgebraicVector5 refittedParamFromEquation(const RefCountedRefittedTrackState &theRefittedState) const override
AlgebraicSymMatrixNN predictedStateError() const override
const MagneticField * field() const
const AlgebraicVectorN & parametersFromExpansion() const override
GlobalPoint theLinPoint
ROOT::Math::SVector< double, 5 > AlgebraicVector5
LinearizedTrackStateFactory theLTSfactory
const TrajectoryStateClosestToPoint & predictedState() const
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
AlgebraicSymMatrixNN predictedStateWeight(int &error) const override
#define M_PI
const AlgebraicVectorN & constantTerm() const override
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
reco::TransientTrack track() const override
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
bool operator==(LinearizedTrackState< 5 > &other) const override
ROOT::Math::SVector< double, 3 > AlgebraicVector3
RefCountedLinearizedTrackState stateWithNewLinearizationPoint(const GlobalPoint &newLP) const override
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
RefCountedLinearizedTrackState collapsedStateLT
const AlgebraicMatrixNM & momentumJacobian() const override
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
TrackCharge charge() const override
std::vector< RefCountedLinearizedTrackState > ltComp
AlgebraicVectorM predictedStateMomentumParameters() const override