CMS 3D CMS Logo

PerigeeMultiLTS.cc
Go to the documentation of this file.
6 
7 
8 
9 using namespace std;
10 
13  : theLinPoint(linP), theTrack(track), theTSOS(tsos),
14  theCharge(theTrack.charge()), collapsedStateAvailable(false)
15 {
16  //Extract the TSOS components:
17 
18  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
19  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
20  ltComp.reserve(tsosComp.size());
21  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin();
22  it != tsosComp.end(); it++) {
23  // cout <<(*it).globalPosition()<<endl;
25  }
26 
27 }
28 
29 
31 {
34  }
36 }
37 
38 
43 {
45  return collapsedStateLT->constantTerm();
46 }
47 
52 {
54  return collapsedStateLT->positionJacobian();
55 }
56 
61 {
63  return collapsedStateLT->momentumJacobian();
64 }
65 
69 {
71  return collapsedStateLT->parametersFromExpansion();
72 }
73 
79 {
81  const PerigeeLinearizedTrackState* otherP =
82  dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
83  return otherP->predictedState();
84 }
85 
86 
88 {
90  return collapsedStateLT->hasError();
91 }
92 
94 {
96  return collapsedStateLT->predictedStateParameters();
97 }
98 
100 {
102  return collapsedStateLT->predictedStateMomentumParameters();
103 }
104 
106 {
108  return collapsedStateLT->predictedStateWeight(error) ;
109 }
110 
112 {
115 }
116 
118 {
120  return collapsedStateLT->predictedStateMomentumError() ;
121 }
122 
124 {
125  const PerigeeMultiLTS* otherP =
126  dynamic_cast<const PerigeeMultiLTS*>(&other);
127  if (otherP == nullptr) {
128  throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
129  }
130  return (otherP->track() == theTrack);
131 }
132 
133 
136  (const GlobalPoint & newLP) const
137 {
139  new PerigeeMultiLTS(newLP, track(), theTSOS));
140 }
141 
144  const GlobalPoint & vertexPosition,
145  const AlgebraicVectorM & vectorParameters,
146  const AlgebraicSymMatrixOO & covarianceMatrix) const
147 {
148  TrajectoryStateClosestToPoint refittedTSCP =
150  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
151  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
152 }
153 
155  const RefCountedRefittedTrackState & theRefittedState) const
156 {
157  AlgebraicVector3 vertexPosition;
158  vertexPosition(0) = theRefittedState->position().x();
159  vertexPosition(1) = theRefittedState->position().y();
160  vertexPosition(2) = theRefittedState->position().z();
161  AlgebraicVectorN param = constantTerm() +
162  positionJacobian() * vertexPosition +
163  momentumJacobian() * theRefittedState->momentumVector();
164  if (param(2) > M_PI) param(2)-= 2*M_PI;
165  if (param(2) < -M_PI) param(2)+= 2*M_PI;
166 
167  return param;
168 }
169 
170 
172 {
173  if (parameters(2) > M_PI) parameters(2)-= 2*M_PI;
174  if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
175 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
AlgebraicVectorN predictedStateParameters() const override
reco::TransientTrack theTrack
AlgebraicVectorM predictedStateMomentumParameters() const override
ROOT::Math::SVector< double, N > AlgebraicVectorN
Common base class.
const AlgebraicVectorN & parametersFromExpansion() const override
const TrajectoryStateClosestToPoint & predictedState() const
AlgebraicSymMatrixNN predictedStateWeight(int &error) const override
const MagneticField * field() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
const TrajectoryStateOnSurface theTSOS
const AlgebraicMatrixN3 & positionJacobian() const override
AlgebraicSymMatrixNN predictedStateError() const override
TrackCharge charge() const override
ROOT::Math::SMatrix< double, 5, 3, ROOT::Math::MatRepStd< double, 5, 3 > > AlgebraicMatrix53
void checkParameters(AlgebraicVector5 &parameters) const override
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
const TrajectoryStateClosestToPoint & predictedState() const
GlobalPoint theLinPoint
ROOT::Math::SVector< double, 3 > AlgebraicVector3
ROOT::Math::SVector< double, N-2 > AlgebraicVectorM
LinearizedTrackStateFactory theLTSfactory
void prepareCollapsedState() const
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
const AlgebraicMatrixNM & momentumJacobian() const override
#define M_PI
AlgebraicVector5 refittedParamFromEquation(const RefCountedRefittedTrackState &theRefittedState) const override
AlgebraicSymMatrixMM predictedStateMomentumError() const override
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
ROOT::Math::SVector< double, 5 > AlgebraicVector5
ROOT::Math::SMatrix< double, N+1, N+1, ROOT::Math::MatRepSym< double, N+1 > > AlgebraicSymMatrixOO
bool hasError() const override
RefCountedRefittedTrackState createRefittedTrackState(const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const override
RefCountedLinearizedTrackState stateWithNewLinearizationPoint(const GlobalPoint &newLP) const override
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
RefCountedLinearizedTrackState collapsedStateLT
reco::TransientTrack track() const override
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
Components const & components() const
const AlgebraicVectorN & constantTerm() const override
std::vector< RefCountedLinearizedTrackState > ltComp
bool operator==(LinearizedTrackState< 5 > &other) const override