CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
PerigeeLinearizedTrackState Class Referencefinal

#include <PerigeeLinearizedTrackState.h>

Inheritance diagram for PerigeeLinearizedTrackState:
LinearizedTrackState< 5 > ReferenceCounted

Public Types

typedef ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
 
- Public Types inherited from LinearizedTrackState< 5 >
typedef ROOT::Math::SMatrix< double, N - 2, 3, ROOT::Math::MatRepStd< double, N - 2, 3 > > AlgebraicMatrixM3
 
typedef ROOT::Math::SMatrix< double, N, 3, ROOT::Math::MatRepStd< double, N, 3 > > AlgebraicMatrixN3
 
typedef ROOT::Math::SMatrix< double, N, N - 2, ROOT::Math::MatRepStd< double, N, N - 2 > > AlgebraicMatrixNM
 
typedef ROOT::Math::SMatrix< double, N - 2, N - 2, ROOT::Math::MatRepSym< double, N - 2 > > AlgebraicSymMatrixMM
 
typedef ROOT::Math::SMatrix< double, N, N, ROOT::Math::MatRepSym< double, N > > AlgebraicSymMatrixNN
 
typedef ROOT::Math::SMatrix< double, N+1, N+1, ROOT::Math::MatRepSym< double, N+1 > > AlgebraicSymMatrixOO
 
typedef ROOT::Math::SVector< double, N - 2 > AlgebraicVectorM
 
typedef ROOT::Math::SVector< double, NAlgebraicVectorN
 
typedef ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
 

Public Member Functions

void checkParameters (AlgebraicVector5 &parameters) const override
 
std::vector< ReferenceCountingPointer< LinearizedTrackState< 5 > > > components () const override
 
const AlgebraicVector5constantTerm () const override
 
RefCountedRefittedTrackState createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVector3 &vectorParameters, const AlgebraicSymMatrix66 &covarianceMatrix) const override
 
bool isValid () const override
 
const GlobalPointlinearizationPoint () const override
 
const AlgebraicMatrix53momentumJacobian () const override
 
const AlgebraicVector5parametersFromExpansion () const override
 
const AlgebraicMatrix53positionJacobian () const override
 
const TrajectoryStateClosestToPointpredictedState () const
 
AlgebraicSymMatrix55 predictedStateError () const override
 
AlgebraicSymMatrix33 predictedStateMomentumError () const override
 
AlgebraicVector3 predictedStateMomentumParameters () const override
 
AlgebraicVector5 predictedStateParameters () const override
 
AlgebraicSymMatrix55 predictedStateWeight (int &error) const override
 
AlgebraicVector5 refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const override
 
const TrajectoryStateOnSurface state () const
 
RefCountedLinearizedTrackState stateWithNewLinearizationPoint (const GlobalPoint &newLP) const override
 
reco::TransientTrack track () const override
 
double weightInMixture () const override
 
- Public Member Functions inherited from LinearizedTrackState< 5 >
virtual TrackCharge charge () const=0
 
virtual void checkParameters (AlgebraicVectorN &parameters) const
 
virtual RefCountedRefittedTrackState createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const=0
 
virtual bool hasError () const=0
 
virtual bool operator== (LinearizedTrackState< N > &other) const=0
 
virtual AlgebraicVectorN refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const=0
 
 ~LinearizedTrackState () override
 

Private Member Functions

void compute3DImpactPoint () const
 
void computeChargedJacobians () const
 
void computeJacobians () const
 
void computeNeutralJacobians () const
 
 PerigeeLinearizedTrackState (const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
 

Private Attributes

TSCPBuilderNoMaterial builder
 
bool jacobiansAvailable
 
TrackCharge theCharge
 
AlgebraicVector5 theConstantTerm
 
AlgebraicVector5 theExpandedParams
 
GlobalPoint theLinPoint
 
AlgebraicMatrix53 theMomentumJacobian
 
AlgebraicMatrix53 thePositionJacobian
 
TrajectoryStateClosestToPoint thePredState
 
reco::TransientTrack theTrack
 
const TrajectoryStateOnSurface theTSOS
 

Friends

class LinearizedTrackStateFactory
 

Detailed Description

Calculates and stores the ImpactPointMeasurement of the impact point (point of closest approach in 3D) to the given linearization point. (see V.Karimaki, HIP-1997-77 / EXP)

Computes the parameters of the trajectory state at the transverse point of closest approach (in the global transverse plane) to the linearization point, and the jacobiam matrices. (see R.Fruehwirth et al. Data Analysis Techniques in HEP Experiments Second Edition, Cambridge University Press 2000, or R.Fruehwirth et al. Vertex reconstruction and track bundling at the LEP collider using robust algorithms. Computer Physics Communications 96 (1996) 189-208).

Both are done ‘on-demand’ to improve CPU performance.

This particular implementation works with "perigee" helix parametrization: see Billoir et al. NIM in PR A311(1992) 139-150

Definition at line 33 of file PerigeeLinearizedTrackState.h.

Member Typedef Documentation

◆ RefCountedLinearizedTrackState

Definition at line 39 of file PerigeeLinearizedTrackState.h.

Constructor & Destructor Documentation

◆ PerigeeLinearizedTrackState()

PerigeeLinearizedTrackState::PerigeeLinearizedTrackState ( const GlobalPoint linP,
const reco::TransientTrack track,
const TrajectoryStateOnSurface tsos 
)
inlineprivate

Constructor with the linearization point and the track. Private, can only be used by LinearizedTrackFactory.

Definition at line 140 of file PerigeeLinearizedTrackState.h.

Referenced by stateWithNewLinearizationPoint().

Member Function Documentation

◆ checkParameters()

void PerigeeLinearizedTrackState::checkParameters ( AlgebraicVector5 parameters) const
inlineoverride

Definition at line 87 of file PerigeeLinearizedTrackState.cc.

87  {
88  if (parameters(2) > M_PI)
89  parameters(2) -= 2 * M_PI;
90  if (parameters(2) < -M_PI)
91  parameters(2) += 2 * M_PI;
92 }

References M_PI.

◆ components()

std::vector< PerigeeLinearizedTrackState::RefCountedLinearizedTrackState > PerigeeLinearizedTrackState::components ( ) const
overridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 59 of file PerigeeLinearizedTrackState.cc.

60  {
61  std::vector<RefCountedLinearizedTrackState> result;
62  result.reserve(1);
63  result.push_back(RefCountedLinearizedTrackState(const_cast<PerigeeLinearizedTrackState*>(this)));
64  return result;
65 }

References mps_fire::result.

◆ compute3DImpactPoint()

void PerigeeLinearizedTrackState::compute3DImpactPoint ( ) const
private

Method calculating the 3D impact point measurement

◆ computeChargedJacobians()

void PerigeeLinearizedTrackState::computeChargedJacobians ( ) const
private

Method calculating the track parameters and the Jacobians for charged particles.

Definition at line 94 of file PerigeeLinearizedTrackState.cc.

94  {
95  GlobalPoint paramPt(theLinPoint);
96  //tarjectory parameters
97  double field = theTrack.field()->inInverseGeV(thePredState.theState().position()).z();
98  double signTC = -theCharge;
99 
100  double thetaAtEP = thePredState.perigeeParameters().theta();
101  double phiAtEP = thePredState.perigeeParameters().phi();
102  double ptAtEP = thePredState.pt();
103  double transverseCurvatureAtEP = field / ptAtEP * signTC;
104 
105  double x_v = thePredState.theState().position().x();
106  double y_v = thePredState.theState().position().y();
107  double z_v = thePredState.theState().position().z();
108  double X = x_v - paramPt.x() - sin(phiAtEP) / transverseCurvatureAtEP;
109  double Y = y_v - paramPt.y() + cos(phiAtEP) / transverseCurvatureAtEP;
110  double SS = X * X + Y * Y;
111  double S = sqrt(SS);
112 
113  // The track parameters at the expansion point
114 
115  theExpandedParams[0] = transverseCurvatureAtEP;
116  theExpandedParams[1] = thetaAtEP;
117  theExpandedParams[3] = 1 / transverseCurvatureAtEP - signTC * S;
118  double phiFEP;
119  if (std::abs(X) > std::abs(Y)) {
120  double signX = (X > 0.0 ? +1.0 : -1.0);
121  phiFEP = -signTC * signX * acos(signTC * Y / S);
122  } else {
123  phiFEP = asin(-signTC * X / S);
124  if ((signTC * Y) < 0.0)
125  phiFEP = M_PI - phiFEP;
126  }
127  if (phiFEP > M_PI)
128  phiFEP -= 2 * M_PI;
129  theExpandedParams[2] = phiFEP;
130  theExpandedParams[4] =
131  z_v - paramPt.z() - (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP) / transverseCurvatureAtEP;
132 
133  // The Jacobian: (all at the expansion point)
134  // [i,j]
135  // i = 0: rho , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
136  // j = 0: x_v, 1: y_v, 2: z_v
137 
138  thePositionJacobian(2, 0) = -Y / (SS);
139  thePositionJacobian(2, 1) = X / (SS);
140  thePositionJacobian(3, 0) = -signTC * X / S;
141  thePositionJacobian(3, 1) = -signTC * Y / S;
142  thePositionJacobian(4, 0) = thePositionJacobian(2, 0) / tan(thetaAtEP) / transverseCurvatureAtEP;
143  thePositionJacobian(4, 1) = thePositionJacobian(2, 1) / tan(thetaAtEP) / transverseCurvatureAtEP;
144  thePositionJacobian(4, 2) = 1;
145 
146  // [i,j]
147  // i = 0: rho , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
148  // j = 0: rho, 1: theta, 2: phi_v
149  theMomentumJacobian(0, 0) = 1;
150  theMomentumJacobian(1, 1) = 1;
151 
152  theMomentumJacobian(2, 0) =
153  -(X * cos(phiAtEP) + Y * sin(phiAtEP)) / (SS * transverseCurvatureAtEP * transverseCurvatureAtEP);
154 
155  theMomentumJacobian(2, 2) = (Y * cos(phiAtEP) - X * sin(phiAtEP)) / (SS * transverseCurvatureAtEP);
156 
157  theMomentumJacobian(3, 0) =
158  (signTC * (Y * cos(phiAtEP) - X * sin(phiAtEP)) / S - 1) / (transverseCurvatureAtEP * transverseCurvatureAtEP);
159 
160  theMomentumJacobian(3, 2) = signTC * (X * cos(phiAtEP) + Y * sin(phiAtEP)) / (S * transverseCurvatureAtEP);
161 
162  theMomentumJacobian(4, 0) =
163  (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP) / (transverseCurvatureAtEP * transverseCurvatureAtEP) +
164  theMomentumJacobian(2, 0) / tan(thetaAtEP) / transverseCurvatureAtEP;
165 
166  theMomentumJacobian(4, 1) =
167  (phiAtEP - theExpandedParams[2]) * (1 + 1 / (tan(thetaAtEP) * tan(thetaAtEP))) / transverseCurvatureAtEP;
168 
169  theMomentumJacobian(4, 2) = (theMomentumJacobian(2, 2) - 1) / tan(thetaAtEP) / transverseCurvatureAtEP;
170 
171  // And finally the residuals:
172 
173  auto p = thePredState.theState().position();
174  AlgebraicVector3 expansionPoint(p.x(), p.y(), p.z());
175  AlgebraicVector3 momentumAtExpansionPoint(transverseCurvatureAtEP, thetaAtEP, phiAtEP);
176 
178  theMomentumJacobian * momentumAtExpansionPoint);
179 }

References funct::abs(), funct::cos(), reco::TransientTrack::field(), MagneticField::inInverseGeV(), M_PI, AlCaHLTBitMon_ParallelJobs::p, TrajectoryStateClosestToPoint::perigeeParameters(), PerigeeTrajectoryParameters::phi(), FreeTrajectoryState::position(), TrajectoryStateClosestToPoint::pt(), S(), funct::sin(), mathSSE::sqrt(), funct::tan(), theCharge, theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, TrajectoryStateClosestToPoint::theState(), PerigeeTrajectoryParameters::theta(), theTrack, X, PV3DBase< T, PVType, FrameType >::x(), BeamSpotPI::Y, PV3DBase< T, PVType, FrameType >::y(), z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeJacobians().

◆ computeJacobians()

void PerigeeLinearizedTrackState::computeJacobians ( ) const
private

◆ computeNeutralJacobians()

void PerigeeLinearizedTrackState::computeNeutralJacobians ( ) const
private

Method calculating the track parameters and the Jacobians for neutral particles.

Definition at line 181 of file PerigeeLinearizedTrackState.cc.

181  {
182  GlobalPoint paramPt(theLinPoint);
183 
184  //tarjectory parameters
185  double thetaAtEP = thePredState.theState().momentum().theta();
186  double phiAtEP = thePredState.theState().momentum().phi();
187  double ptAtEP = thePredState.theState().momentum().perp();
188 
189  double x_v = thePredState.theState().position().x();
190  double y_v = thePredState.theState().position().y();
191  double z_v = thePredState.theState().position().z();
192  double X = x_v - paramPt.x();
193  double Y = y_v - paramPt.y();
194 
195  // The track parameters at the expansion point
196 
197  theExpandedParams(0) = 1 / ptAtEP;
198  theExpandedParams(1) = thetaAtEP;
199  theExpandedParams(2) = phiAtEP;
200  theExpandedParams(3) = X * sin(phiAtEP) - Y * cos(phiAtEP);
201  theExpandedParams(4) = z_v - paramPt.z() - (X * cos(phiAtEP) + Y * sin(phiAtEP)) / tan(thetaAtEP);
202 
203  // The Jacobian: (all at the expansion point)
204  // [i,j]
205  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
206  // j = 0: x_v, 1: y_v, 2: z_v
207 
208  thePositionJacobian(3, 0) = sin(phiAtEP);
209  thePositionJacobian(3, 1) = -cos(phiAtEP);
210  thePositionJacobian(4, 0) = -cos(phiAtEP) / tan(thetaAtEP);
211  thePositionJacobian(4, 1) = -sin(phiAtEP) / tan(thetaAtEP);
212  thePositionJacobian(4, 2) = 1;
213 
214  // [i,j]
215  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
216  // j = 0: rho = 1/pt , 1: theta, 2: phi_v
217 
218  theMomentumJacobian(0, 0) = 1;
219  theMomentumJacobian(1, 1) = 1;
220  theMomentumJacobian(2, 2) = 1;
221 
222  theMomentumJacobian(3, 2) = X * cos(phiAtEP) + Y * sin(phiAtEP);
223 
224  theMomentumJacobian(4, 1) = theMomentumJacobian(3, 2) * (1 + 1 / (tan(thetaAtEP) * tan(thetaAtEP)));
225 
226  theMomentumJacobian(4, 2) = (X * sin(phiAtEP) - Y * cos(phiAtEP)) / tan(thetaAtEP);
227 
228  // And finally the residuals:
229 
230  auto p = thePredState.theState().position();
231  AlgebraicVector3 expansionPoint(p.x(), p.y(), p.z());
232  AlgebraicVector3 momentumAtExpansionPoint(1. / ptAtEP, thetaAtEP, phiAtEP);
233 
235  theMomentumJacobian * momentumAtExpansionPoint);
236 }

References funct::cos(), FreeTrajectoryState::momentum(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), funct::sin(), funct::tan(), theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, TrajectoryStateClosestToPoint::theState(), PV3DBase< T, PVType, FrameType >::theta(), X, PV3DBase< T, PVType, FrameType >::x(), BeamSpotPI::Y, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by computeJacobians().

◆ constantTerm()

const AlgebraicVector5 & PerigeeLinearizedTrackState::constantTerm ( ) const
inlineoverridevirtual

Method returning the constant term of the Taylor expansion of the measurement equation

Implements LinearizedTrackState< 5 >.

Definition at line 176 of file PerigeeLinearizedTrackState.h.

176  {
177  if
179  return theConstantTerm;
180 }

References computeJacobians(), jacobiansAvailable, theConstantTerm, and UNLIKELY.

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

◆ createRefittedTrackState()

PerigeeLinearizedTrackState::RefCountedRefittedTrackState PerigeeLinearizedTrackState::createRefittedTrackState ( const GlobalPoint vertexPosition,
const AlgebraicVector3 vectorParameters,
const AlgebraicSymMatrix66 covarianceMatrix 
) const
override

Method returning the impact point measurement ‍/ ImpactPointMeasurement impactPointMeasurement() const;

TrackCharge charge() const override { return theCharge; }

bool hasError() const override;

bool operator==(LinearizedTrackState<5>& other) const override;

bool operator==(ReferenceCountingPointer<LinearizedTrackState<5> >& other) const;

/** Creates the correct refitted state according to the results of the track refit.

Definition at line 50 of file PerigeeLinearizedTrackState.cc.

53  {
55  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
56  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
57 }

References LinearizedTrackState< 5 >::charge(), reco::TransientTrack::field(), theTrack, and PerigeeConversions::trajectoryStateClosestToPoint().

◆ isValid()

bool PerigeeLinearizedTrackState::isValid ( void  ) const
inlineoverridevirtual

◆ linearizationPoint()

const GlobalPoint& PerigeeLinearizedTrackState::linearizationPoint ( ) const
inlineoverridevirtual

The point at which the track state has been linearized

Implements LinearizedTrackState< 5 >.

Definition at line 50 of file PerigeeLinearizedTrackState.h.

50 { return theLinPoint; }

References theLinPoint.

Referenced by TwoBodyDecayEstimator::constructMatrices().

◆ momentumJacobian()

const AlgebraicMatrix53 & PerigeeLinearizedTrackState::momentumJacobian ( ) const
inlineoverridevirtual

Method returning the Momentum Jacobian from the Taylor expansion (Matrix B)

Method returning the Momentum Jacobian (Matrix B)

Implements LinearizedTrackState< 5 >.

Definition at line 194 of file PerigeeLinearizedTrackState.h.

194  {
195  if
197  return theMomentumJacobian;
198 }

References computeJacobians(), jacobiansAvailable, theMomentumJacobian, and UNLIKELY.

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

◆ parametersFromExpansion()

const AlgebraicVector5 & PerigeeLinearizedTrackState::parametersFromExpansion ( ) const
inlineoverridevirtual

Method returning the parameters of the Taylor expansion

Implements LinearizedTrackState< 5 >.

Definition at line 202 of file PerigeeLinearizedTrackState.h.

202  {
203  if
205  return theExpandedParams;
206 }

References computeJacobians(), jacobiansAvailable, theExpandedParams, and UNLIKELY.

◆ positionJacobian()

const AlgebraicMatrix53 & PerigeeLinearizedTrackState::positionJacobian ( ) const
inlineoverridevirtual

Method returning the Position Jacobian from the Taylor expansion (Matrix A)

Method returning the Position Jacobian (Matrix A)

Implements LinearizedTrackState< 5 >.

Definition at line 185 of file PerigeeLinearizedTrackState.h.

185  {
186  if
188  return thePositionJacobian;
189 }

References computeJacobians(), jacobiansAvailable, thePositionJacobian, and UNLIKELY.

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

◆ predictedState()

const TrajectoryStateClosestToPoint & PerigeeLinearizedTrackState::predictedState ( ) const
inline

Method returning the track state at the point of closest approach to the linearization point, in the transverse plane (a.k.a. transverse impact point).

Method returning the TrajectoryStateClosestToPoint at the point of closest approch to the z-axis (a.k.a. transverse impact point)

Definition at line 212 of file PerigeeLinearizedTrackState.h.

212  {
213  if
215  return thePredState;
216 }

References computeJacobians(), jacobiansAvailable, thePredState, and UNLIKELY.

Referenced by TwoBodyDecayLinearizationPointFinder::getLinearizationPoint(), and PerigeeMultiLTS::predictedState().

◆ predictedStateError()

AlgebraicSymMatrix55 PerigeeLinearizedTrackState::predictedStateError ( ) const
inlineoverridevirtual

Method returning the covariance matrix of the track state at the transverse impact point.

Implements LinearizedTrackState< 5 >.

Definition at line 247 of file PerigeeLinearizedTrackState.h.

247  {
248  if
251 }

References computeJacobians(), PerigeeTrajectoryError::covarianceMatrix(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeError(), thePredState, and UNLIKELY.

Referenced by TwoBodyDecayEstimator::constructMatrices().

◆ predictedStateMomentumError()

AlgebraicSymMatrix33 PerigeeLinearizedTrackState::predictedStateMomentumError ( ) const
inlineoverridevirtual

Method returning the momentum covariance matrix of the track state at the transverse impact point.

Implements LinearizedTrackState< 5 >.

Definition at line 253 of file PerigeeLinearizedTrackState.h.

253  {
254  if
257 }

References computeJacobians(), PerigeeTrajectoryError::covarianceMatrix(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeError(), thePredState, and UNLIKELY.

◆ predictedStateMomentumParameters()

AlgebraicVector3 PerigeeLinearizedTrackState::predictedStateMomentumParameters ( ) const
inlineoverridevirtual

Method returning the momentum part of the parameters of the track state at the linearization point.

Implements LinearizedTrackState< 5 >.

Definition at line 230 of file PerigeeLinearizedTrackState.h.

230  {
231  if
234  return AlgebraicVector3(v[0], v[1], v[2]);
235 }

References computeJacobians(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeParameters(), thePredState, UNLIKELY, findQualityFiles::v, and PerigeeTrajectoryParameters::vector().

Referenced by TwoBodyDecayEstimator::constructMatrices(), and refittedParamFromEquation().

◆ predictedStateParameters()

AlgebraicVector5 PerigeeLinearizedTrackState::predictedStateParameters ( ) const
inlineoverridevirtual

Method returning the parameters of the track state at the transverse impact point.

Implements LinearizedTrackState< 5 >.

Definition at line 224 of file PerigeeLinearizedTrackState.h.

224  {
225  if (!jacobiansAvailable)
228 }

References computeJacobians(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeParameters(), thePredState, and PerigeeTrajectoryParameters::vector().

Referenced by TwoBodyDecayEstimator::constructMatrices().

◆ predictedStateWeight()

AlgebraicSymMatrix55 PerigeeLinearizedTrackState::predictedStateWeight ( int &  error) const
inlineoverridevirtual

Method returning the weight matrix of the track state at the transverse impact point. The error variable is 0 in case of success.

Implements LinearizedTrackState< 5 >.

Definition at line 237 of file PerigeeLinearizedTrackState.h.

237  {
238  if
240  if (!thePredState.isValid()) {
241  error = 1;
242  return AlgebraicSymMatrix55();
243  }
245 }

References computeJacobians(), relativeConstraints::error, TrajectoryStateClosestToPoint::isValid(), jacobiansAvailable, TrajectoryStateClosestToPoint::perigeeError(), thePredState, UNLIKELY, and PerigeeTrajectoryError::weightMatrix().

◆ refittedParamFromEquation()

AlgebraicVector5 PerigeeLinearizedTrackState::refittedParamFromEquation ( const RefCountedRefittedTrackState theRefittedState) const
override

Definition at line 67 of file PerigeeLinearizedTrackState.cc.

68  {
69  auto p = theRefittedState->position();
70  AlgebraicVector3 vertexPosition(p.x(), p.y(), p.z());
71  AlgebraicVector3 momentum = theRefittedState->momentumVector();
72  if ((momentum(2) * predictedStateMomentumParameters()(2) < 0) && (fabs(momentum(2)) > M_PI / 2)) {
74  momentum(2) -= 2 * M_PI;
76  momentum(2) += 2 * M_PI;
77  }
78  AlgebraicVectorN param = constantTerm() + positionJacobian() * vertexPosition + momentumJacobian() * momentum;
79  if (param(2) > M_PI)
80  param(2) -= 2 * M_PI;
81  if (param(2) < -M_PI)
82  param(2) += 2 * M_PI;
83 
84  return param;
85 }

References constantTerm(), M_PI, momentumJacobian(), AlCaHLTBitMon_ParallelJobs::p, positionJacobian(), and predictedStateMomentumParameters().

◆ state()

const TrajectoryStateOnSurface PerigeeLinearizedTrackState::state ( ) const
inline

Definition at line 54 of file PerigeeLinearizedTrackState.h.

54 { return theTSOS; }

References theTSOS.

◆ stateWithNewLinearizationPoint()

PerigeeLinearizedTrackState::RefCountedLinearizedTrackState PerigeeLinearizedTrackState::stateWithNewLinearizationPoint ( const GlobalPoint newLP) const
overridevirtual

Returns a new linearized state with respect to a new linearization point. A new object of the same type is returned, without change to the existing one.

Implements LinearizedTrackState< 5 >.

Definition at line 45 of file PerigeeLinearizedTrackState.cc.

46  {
48 }

References PerigeeLinearizedTrackState(), theTSOS, and track().

◆ track()

reco::TransientTrack PerigeeLinearizedTrackState::track ( ) const
inlineoverridevirtual

◆ weightInMixture()

double PerigeeLinearizedTrackState::weightInMixture ( ) const
inlineoverridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 128 of file PerigeeLinearizedTrackState.h.

128 { return theTSOS.weight(); }

References theTSOS, and TrajectoryStateOnSurface::weight().

Friends And Related Function Documentation

◆ LinearizedTrackStateFactory

friend class LinearizedTrackStateFactory
friend

Friend class properly dealing with creation of reference-counted pointers to LinearizedTrack objects

Definition at line 38 of file PerigeeLinearizedTrackState.h.

Member Data Documentation

◆ builder

TSCPBuilderNoMaterial PerigeeLinearizedTrackState::builder
private

Definition at line 167 of file PerigeeLinearizedTrackState.h.

Referenced by computeJacobians().

◆ jacobiansAvailable

bool PerigeeLinearizedTrackState::jacobiansAvailable
mutableprivate

◆ theCharge

TrackCharge PerigeeLinearizedTrackState::theCharge
private

Definition at line 169 of file PerigeeLinearizedTrackState.h.

Referenced by computeChargedJacobians(), and computeJacobians().

◆ theConstantTerm

AlgebraicVector5 PerigeeLinearizedTrackState::theConstantTerm
mutableprivate

◆ theExpandedParams

AlgebraicVector5 PerigeeLinearizedTrackState::theExpandedParams
mutableprivate

◆ theLinPoint

GlobalPoint PerigeeLinearizedTrackState::theLinPoint
private

◆ theMomentumJacobian

AlgebraicMatrix53 PerigeeLinearizedTrackState::theMomentumJacobian
mutableprivate

◆ thePositionJacobian

AlgebraicMatrix53 PerigeeLinearizedTrackState::thePositionJacobian
mutableprivate

◆ thePredState

TrajectoryStateClosestToPoint PerigeeLinearizedTrackState::thePredState
mutableprivate

◆ theTrack

reco::TransientTrack PerigeeLinearizedTrackState::theTrack
private

◆ theTSOS

const TrajectoryStateOnSurface PerigeeLinearizedTrackState::theTSOS
private
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
PerigeeLinearizedTrackState::jacobiansAvailable
bool jacobiansAvailable
Definition: PerigeeLinearizedTrackState.h:170
AlgebraicVector3
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Definition: AlgebraicROOTObjects.h:12
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
AlgebraicSymMatrix33
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
Definition: AlgebraicROOTObjects.h:21
PerigeeLinearizedTrackState::track
reco::TransientTrack track() const override
Definition: PerigeeLinearizedTrackState.h:52
PerigeeTrajectoryError::weightMatrix
const AlgebraicSymMatrix55 & weightMatrix(int &error) const
Definition: PerigeeTrajectoryError.h:35
PerigeeLinearizedTrackState::computeJacobians
void computeJacobians() const
Definition: PerigeeLinearizedTrackState.cc:9
PerigeeLinearizedTrackState::theMomentumJacobian
AlgebraicMatrix53 theMomentumJacobian
Definition: PerigeeLinearizedTrackState.h:162
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
LinearizedTrackState< 5 >::charge
virtual TrackCharge charge() const=0
X
#define X(str)
Definition: MuonsGrabber.cc:38
reco::TransientTrack::charge
TrackCharge charge() const
Definition: TransientTrack.h:102
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
PerigeeLinearizedTrackState::theTSOS
const TrajectoryStateOnSurface theTSOS
Definition: PerigeeLinearizedTrackState.h:160
PerigeeLinearizedTrackState::constantTerm
const AlgebraicVector5 & constantTerm() const override
Definition: PerigeeLinearizedTrackState.h:176
PerigeeLinearizedTrackState::thePositionJacobian
AlgebraicMatrix53 thePositionJacobian
Definition: PerigeeLinearizedTrackState.h:162
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
findQualityFiles.v
v
Definition: findQualityFiles.py:179
PerigeeLinearizedTrackState::theConstantTerm
AlgebraicVector5 theConstantTerm
Definition: PerigeeLinearizedTrackState.h:164
PerigeeLinearizedTrackState::momentumJacobian
const AlgebraicMatrix53 & momentumJacobian() const override
Definition: PerigeeLinearizedTrackState.h:194
relativeConstraints.error
error
Definition: relativeConstraints.py:53
PerigeeLinearizedTrackState::theTrack
reco::TransientTrack theTrack
Definition: PerigeeLinearizedTrackState.h:159
PerigeeRefittedTrackState
Definition: PerigeeRefittedTrackState.h:18
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
PerigeeLinearizedTrackState::positionJacobian
const AlgebraicMatrix53 & positionJacobian() const override
Definition: PerigeeLinearizedTrackState.h:185
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
PerigeeConversions::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
Definition: PerigeeConversions.cc:97
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
PerigeeTrajectoryParameters::phi
double phi() const
Definition: PerigeeTrajectoryParameters.h:62
TrajectoryStateOnSurface::weight
double weight() const
Definition: TrajectoryStateOnSurface.h:80
TrajectoryStateClosestToPoint::perigeeError
const PerigeeTrajectoryError & perigeeError() const
Definition: TrajectoryStateClosestToPoint.h:84
Point3DBase< float, GlobalTag >
TrajectoryStateClosestToPoint::perigeeParameters
const PerigeeTrajectoryParameters & perigeeParameters() const
Definition: TrajectoryStateClosestToPoint.h:73
PerigeeLinearizedTrackState::thePredState
TrajectoryStateClosestToPoint thePredState
Definition: PerigeeLinearizedTrackState.h:163
MagneticField::inInverseGeV
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
PerigeeLinearizedTrackState::PerigeeLinearizedTrackState
PerigeeLinearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
Definition: PerigeeLinearizedTrackState.h:140
PerigeeLinearizedTrackState::computeNeutralJacobians
void computeNeutralJacobians() const
Definition: PerigeeLinearizedTrackState.cc:181
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:97
PerigeeLinearizedTrackState::computeChargedJacobians
void computeChargedJacobians() const
Definition: PerigeeLinearizedTrackState.cc:94
PerigeeLinearizedTrackState::theExpandedParams
AlgebraicVector5 theExpandedParams
Definition: PerigeeLinearizedTrackState.h:165
PerigeeLinearizedTrackState::predictedStateMomentumParameters
AlgebraicVector3 predictedStateMomentumParameters() const override
Definition: PerigeeLinearizedTrackState.h:230
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
TrajectoryStateClosestToPoint::pt
double pt() const
Definition: TrajectoryStateClosestToPoint.h:78
PerigeeLinearizedTrackState::theCharge
TrackCharge theCharge
Definition: PerigeeLinearizedTrackState.h:169
PerigeeTrajectoryParameters::vector
const AlgebraicVector5 & vector() const
Definition: PerigeeTrajectoryParameters.h:82
LinearizedTrackState< 5 >::RefCountedRefittedTrackState
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
Definition: LinearizedTrackState.h:47
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
AlgebraicVector5
ROOT::Math::SVector< double, 5 > AlgebraicVector5
Definition: AlgebraicROOTObjects.h:14
reco::TransientTrack::field
const MagneticField * field() const
Definition: TransientTrack.h:110
PerigeeTrajectoryError::covarianceMatrix
const AlgebraicSymMatrix55 & covarianceMatrix() const
Definition: PerigeeTrajectoryError.h:29
LinearizedTrackState< 5 >::AlgebraicVectorN
ROOT::Math::SVector< double, N > AlgebraicVectorN
Definition: LinearizedTrackState.h:38
PerigeeLinearizedTrackState::builder
TSCPBuilderNoMaterial builder
Definition: PerigeeLinearizedTrackState.h:167
BeamSpotPI::Y
Definition: BeamSpotPayloadInspectorHelper.h:32
S
Definition: CSCDBL1TPParametersExtended.h:16
TrajectoryStateClosestToPoint::isValid
bool isValid() const
Definition: TrajectoryStateClosestToPoint.h:111
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PerigeeLinearizedTrackState::theLinPoint
GlobalPoint theLinPoint
Definition: PerigeeLinearizedTrackState.h:158
TrajectoryStateClosestToPoint::theState
const FreeTrajectoryState & theState() const
Definition: TrajectoryStateClosestToPoint.h:96
AlgebraicSymMatrix55
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
Definition: AlgebraicROOTObjects.h:23
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
PerigeeLinearizedTrackState::RefCountedLinearizedTrackState
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
Definition: PerigeeLinearizedTrackState.h:39
PerigeeTrajectoryParameters::theta
double theta() const
Definition: PerigeeTrajectoryParameters.h:56
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37