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

TrackCharge charge () const override
 
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 hasError () const override
 
bool isValid () const override
 
const GlobalPointlinearizationPoint () const override
 
const AlgebraicMatrix53momentumJacobian () const override
 
bool operator== (LinearizedTrackState< 5 > &other) const override
 
bool operator== (ReferenceCountingPointer< LinearizedTrackState< 5 > > &other) const
 
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 void checkParameters (AlgebraicVectorN &parameters) const
 
virtual RefCountedRefittedTrackState createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) 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

◆ charge()

TrackCharge PerigeeLinearizedTrackState::charge ( void  ) const
inlineoverridevirtual

Method returning the impact point measurement

Implements LinearizedTrackState< 5 >.

Definition at line 111 of file PerigeeLinearizedTrackState.h.

References theCharge.

Referenced by createRefittedTrackState().

◆ checkParameters()

void PerigeeLinearizedTrackState::checkParameters ( AlgebraicVector5 parameters) const
inlineoverride

Definition at line 87 of file PerigeeLinearizedTrackState.cc.

References M_PI.

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 }
#define M_PI

◆ components()

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

Implements LinearizedTrackState< 5 >.

Definition at line 59 of file PerigeeLinearizedTrackState.cc.

References mps_fire::result.

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

◆ 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.

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

Referenced by computeJacobians().

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  // Fix calculation for case where magnetic field swaps sign between previous state and current state
106  if (field * theTrack.field()->inInverseGeV(theTSOS.globalPosition()).z() < 0.) {
107  signTC = -signTC;
108  }
109 
110  double x_v = thePredState.theState().position().x();
111  double y_v = thePredState.theState().position().y();
112  double z_v = thePredState.theState().position().z();
113  double X = x_v - paramPt.x() - sin(phiAtEP) / transverseCurvatureAtEP;
114  double Y = y_v - paramPt.y() + cos(phiAtEP) / transverseCurvatureAtEP;
115  double SS = X * X + Y * Y;
116  double S = sqrt(SS);
117 
118  // The track parameters at the expansion point
119 
120  theExpandedParams[0] = transverseCurvatureAtEP;
121  theExpandedParams[1] = thetaAtEP;
122  theExpandedParams[3] = 1 / transverseCurvatureAtEP - signTC * S;
123  double phiFEP;
124  if (std::abs(X) > std::abs(Y)) {
125  double signX = (X > 0.0 ? +1.0 : -1.0);
126  phiFEP = -signTC * signX * acos(signTC * Y / S);
127  } else {
128  phiFEP = asin(-signTC * X / S);
129  if ((signTC * Y) < 0.0)
130  phiFEP = M_PI - phiFEP;
131  }
132  if (phiFEP > M_PI)
133  phiFEP -= 2 * M_PI;
134  theExpandedParams[2] = phiFEP;
135  theExpandedParams[4] =
136  z_v - paramPt.z() - (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP) / transverseCurvatureAtEP;
137 
138  // The Jacobian: (all at the expansion point)
139  // [i,j]
140  // i = 0: rho , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
141  // j = 0: x_v, 1: y_v, 2: z_v
142 
143  thePositionJacobian(2, 0) = -Y / (SS);
144  thePositionJacobian(2, 1) = X / (SS);
145  thePositionJacobian(3, 0) = -signTC * X / S;
146  thePositionJacobian(3, 1) = -signTC * Y / S;
147  thePositionJacobian(4, 0) = thePositionJacobian(2, 0) / tan(thetaAtEP) / transverseCurvatureAtEP;
148  thePositionJacobian(4, 1) = thePositionJacobian(2, 1) / tan(thetaAtEP) / transverseCurvatureAtEP;
149  thePositionJacobian(4, 2) = 1;
150 
151  // [i,j]
152  // i = 0: rho , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
153  // j = 0: rho, 1: theta, 2: phi_v
154  theMomentumJacobian(0, 0) = 1;
155  theMomentumJacobian(1, 1) = 1;
156 
157  theMomentumJacobian(2, 0) =
158  -(X * cos(phiAtEP) + Y * sin(phiAtEP)) / (SS * transverseCurvatureAtEP * transverseCurvatureAtEP);
159 
160  theMomentumJacobian(2, 2) = (Y * cos(phiAtEP) - X * sin(phiAtEP)) / (SS * transverseCurvatureAtEP);
161 
162  theMomentumJacobian(3, 0) =
163  (signTC * (Y * cos(phiAtEP) - X * sin(phiAtEP)) / S - 1) / (transverseCurvatureAtEP * transverseCurvatureAtEP);
164 
165  theMomentumJacobian(3, 2) = signTC * (X * cos(phiAtEP) + Y * sin(phiAtEP)) / (S * transverseCurvatureAtEP);
166 
167  theMomentumJacobian(4, 0) =
168  (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP) / (transverseCurvatureAtEP * transverseCurvatureAtEP) +
169  theMomentumJacobian(2, 0) / tan(thetaAtEP) / transverseCurvatureAtEP;
170 
171  theMomentumJacobian(4, 1) =
172  (phiAtEP - theExpandedParams[2]) * (1 + 1 / (tan(thetaAtEP) * tan(thetaAtEP))) / transverseCurvatureAtEP;
173 
174  theMomentumJacobian(4, 2) = (theMomentumJacobian(2, 2) - 1) / tan(thetaAtEP) / transverseCurvatureAtEP;
175 
176  // And finally the residuals:
177 
178  auto p = thePredState.theState().position();
179  AlgebraicVector3 expansionPoint(p.x(), p.y(), p.z());
180  AlgebraicVector3 momentumAtExpansionPoint(transverseCurvatureAtEP, thetaAtEP, phiAtEP);
181 
183  theMomentumJacobian * momentumAtExpansionPoint);
184 }
T z() const
Definition: PV3DBase.h:61
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
#define X(str)
Definition: MuonsGrabber.cc:38
GlobalPoint position() const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
TrajectoryStateClosestToPoint thePredState
GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:19
const TrajectoryStateOnSurface theTSOS
const MagneticField * field() const
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const PerigeeTrajectoryParameters & perigeeParameters() const
#define M_PI
const FreeTrajectoryState & theState() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3

◆ computeJacobians()

void PerigeeLinearizedTrackState::computeJacobians ( ) const
private

Method calculating the track parameters and the Jacobians.

Definition at line 9 of file PerigeeLinearizedTrackState.cc.

References funct::abs(), builder, computeChargedJacobians(), computeNeutralJacobians(), MillePedeFileConverter_cfg::e, reco::TransientTrack::field(), MagneticField::inInverseGeV(), TrajectoryStateClosestToPoint::isValid(), jacobiansAvailable, FreeTrajectoryState::position(), theCharge, theLinPoint, thePredState, TrajectoryStateClosestToPoint::theState(), theTrack, theTSOS, UNLIKELY, and z.

Referenced by constantTerm(), hasError(), isValid(), momentumJacobian(), parametersFromExpansion(), positionJacobian(), predictedState(), predictedStateError(), predictedStateMomentumError(), predictedStateMomentumParameters(), predictedStateParameters(), and predictedStateWeight().

9  {
10  GlobalPoint paramPt(theLinPoint);
11 
12  thePredState = builder(theTSOS, paramPt);
14  return;
15 
16  double field = theTrack.field()->inInverseGeV(thePredState.theState().position()).z();
17 
18  if ((std::abs(theCharge) < 1e-5) || (fabs(field) < 1.e-10)) {
19  //neutral track
21  } else {
22  //charged track
24  }
25 
26  jacobiansAvailable = true;
27 }
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
GlobalPoint position() const
TrajectoryStateClosestToPoint thePredState
const TrajectoryStateOnSurface theTSOS
const MagneticField * field() const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const FreeTrajectoryState & theState() const
#define UNLIKELY(x)
Definition: Likely.h:21

◆ computeNeutralJacobians()

void PerigeeLinearizedTrackState::computeNeutralJacobians ( ) const
private

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

Definition at line 186 of file PerigeeLinearizedTrackState.cc.

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().

186  {
187  GlobalPoint paramPt(theLinPoint);
188 
189  //tarjectory parameters
190  double thetaAtEP = thePredState.theState().momentum().theta();
191  double phiAtEP = thePredState.theState().momentum().phi();
192  double ptAtEP = thePredState.theState().momentum().perp();
193 
194  double x_v = thePredState.theState().position().x();
195  double y_v = thePredState.theState().position().y();
196  double z_v = thePredState.theState().position().z();
197  double X = x_v - paramPt.x();
198  double Y = y_v - paramPt.y();
199 
200  // The track parameters at the expansion point
201 
202  theExpandedParams(0) = 1 / ptAtEP;
203  theExpandedParams(1) = thetaAtEP;
204  theExpandedParams(2) = phiAtEP;
205  theExpandedParams(3) = X * sin(phiAtEP) - Y * cos(phiAtEP);
206  theExpandedParams(4) = z_v - paramPt.z() - (X * cos(phiAtEP) + Y * sin(phiAtEP)) / tan(thetaAtEP);
207 
208  // The Jacobian: (all at the expansion point)
209  // [i,j]
210  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
211  // j = 0: x_v, 1: y_v, 2: z_v
212 
213  thePositionJacobian(3, 0) = sin(phiAtEP);
214  thePositionJacobian(3, 1) = -cos(phiAtEP);
215  thePositionJacobian(4, 0) = -cos(phiAtEP) / tan(thetaAtEP);
216  thePositionJacobian(4, 1) = -sin(phiAtEP) / tan(thetaAtEP);
217  thePositionJacobian(4, 2) = 1;
218 
219  // [i,j]
220  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
221  // j = 0: rho = 1/pt , 1: theta, 2: phi_v
222 
223  theMomentumJacobian(0, 0) = 1;
224  theMomentumJacobian(1, 1) = 1;
225  theMomentumJacobian(2, 2) = 1;
226 
227  theMomentumJacobian(3, 2) = X * cos(phiAtEP) + Y * sin(phiAtEP);
228 
229  theMomentumJacobian(4, 1) = theMomentumJacobian(3, 2) * (1 + 1 / (tan(thetaAtEP) * tan(thetaAtEP)));
230 
231  theMomentumJacobian(4, 2) = (X * sin(phiAtEP) - Y * cos(phiAtEP)) / tan(thetaAtEP);
232 
233  // And finally the residuals:
234 
235  auto p = thePredState.theState().position();
236  AlgebraicVector3 expansionPoint(p.x(), p.y(), p.z());
237  AlgebraicVector3 momentumAtExpansionPoint(1. / ptAtEP, thetaAtEP, phiAtEP);
238 
240  theMomentumJacobian * momentumAtExpansionPoint);
241 }
T perp() const
Definition: PV3DBase.h:69
T z() const
Definition: PV3DBase.h:61
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
#define X(str)
Definition: MuonsGrabber.cc:38
GlobalPoint position() const
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
TrajectoryStateClosestToPoint thePredState
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
GlobalVector momentum() const
ROOT::Math::SVector< double, 5 > AlgebraicVector5
const FreeTrajectoryState & theState() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72

◆ 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.

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

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

176  {
179  return theConstantTerm;
180 }
#define UNLIKELY(x)
Definition: Likely.h:21

◆ createRefittedTrackState()

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

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

Definition at line 50 of file PerigeeLinearizedTrackState.cc.

References charge(), reco::TransientTrack::field(), theTrack, and PerigeeConversions::trajectoryStateClosestToPoint().

53  {
55  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
56  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
57 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
TrackCharge charge() const override
const MagneticField * field() const
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState

◆ hasError()

bool PerigeeLinearizedTrackState::hasError ( void  ) const
inlineoverridevirtual

◆ 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.

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.

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

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

194  {
197  return theMomentumJacobian;
198 }
#define UNLIKELY(x)
Definition: Likely.h:21

◆ operator==() [1/2]

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

Definition at line 29 of file PerigeeLinearizedTrackState.cc.

References trackingPlots::other, theTrack, and track().

29  {
30  const PerigeeLinearizedTrackState* otherP = dynamic_cast<const PerigeeLinearizedTrackState*>(&other);
31  if (otherP == nullptr) {
32  throw VertexException("PerigeeLinearizedTrackState: don't know how to compare myself to non-perigee track state");
33  }
34  return (otherP->track() == theTrack);
35 }
Common base class.
reco::TransientTrack track() const override

◆ operator==() [2/2]

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

Definition at line 37 of file PerigeeLinearizedTrackState.cc.

References trackingPlots::other, theTrack, and track().

37  {
38  const PerigeeLinearizedTrackState* otherP = dynamic_cast<const PerigeeLinearizedTrackState*>(other.get());
39  if (otherP == nullptr) {
40  throw VertexException("PerigeeLinearizedTrackState: don't know how to compare myself to non-perigee track state");
41  }
42  return (otherP->track() == theTrack);
43 }
Common base class.
reco::TransientTrack track() const override

◆ 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.

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

202  {
205  return theExpandedParams;
206 }
#define UNLIKELY(x)
Definition: Likely.h:21

◆ 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.

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

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

185  {
188  return thePositionJacobian;
189 }
#define UNLIKELY(x)
Definition: Likely.h:21

◆ 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.

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

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

212  {
215  return thePredState;
216 }
TrajectoryStateClosestToPoint thePredState
#define UNLIKELY(x)
Definition: Likely.h:21

◆ 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.

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

Referenced by TwoBodyDecayEstimator::constructMatrices().

247  {
251 }
const AlgebraicSymMatrix55 & covarianceMatrix() const
const PerigeeTrajectoryError & perigeeError() const
TrajectoryStateClosestToPoint thePredState
#define UNLIKELY(x)
Definition: Likely.h:21

◆ 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.

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

253  {
257 }
const AlgebraicSymMatrix55 & covarianceMatrix() const
const PerigeeTrajectoryError & perigeeError() const
TrajectoryStateClosestToPoint thePredState
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
#define UNLIKELY(x)
Definition: Likely.h:21

◆ 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.

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

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

230  {
234  return AlgebraicVector3(v[0], v[1], v[2]);
235 }
const AlgebraicVector5 & vector() const
TrajectoryStateClosestToPoint thePredState
const PerigeeTrajectoryParameters & perigeeParameters() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
#define UNLIKELY(x)
Definition: Likely.h:21

◆ 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.

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

Referenced by TwoBodyDecayEstimator::constructMatrices().

224  {
225  if (!jacobiansAvailable)
228 }
const AlgebraicVector5 & vector() const
TrajectoryStateClosestToPoint thePredState
const PerigeeTrajectoryParameters & perigeeParameters() const

◆ 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.

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

237  {
240  if (!thePredState.isValid()) {
241  error = 1;
242  return AlgebraicSymMatrix55();
243  }
245 }
const PerigeeTrajectoryError & perigeeError() const
TrajectoryStateClosestToPoint thePredState
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
#define UNLIKELY(x)
Definition: Likely.h:21
const AlgebraicSymMatrix55 & weightMatrix(int &error) const

◆ refittedParamFromEquation()

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

Definition at line 67 of file PerigeeLinearizedTrackState.cc.

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

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 }
ROOT::Math::SVector< double, N > AlgebraicVectorN
AlgebraicVector3 predictedStateMomentumParameters() const override
const AlgebraicVector5 & constantTerm() const override
#define M_PI
const AlgebraicMatrix53 & positionJacobian() const override
const AlgebraicMatrix53 & momentumJacobian() const override
ROOT::Math::SVector< double, 3 > AlgebraicVector3

◆ state()

const TrajectoryStateOnSurface PerigeeLinearizedTrackState::state ( ) const
inline

Definition at line 54 of file PerigeeLinearizedTrackState.h.

References theTSOS.

54 { return theTSOS; }
const TrajectoryStateOnSurface 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.

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

46  {
48 }
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
const TrajectoryStateOnSurface theTSOS
PerigeeLinearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
reco::TransientTrack track() const override

◆ track()

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

◆ weightInMixture()

double PerigeeLinearizedTrackState::weightInMixture ( ) const
inlineoverridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 128 of file PerigeeLinearizedTrackState.h.

References theTSOS, and TrajectoryStateOnSurface::weight().

128 { return theTSOS.weight(); }
const TrajectoryStateOnSurface theTSOS

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

◆ 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