CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
ParticleKinematicLinearizedTrackState Class Reference

#include <ParticleKinematicLinearizedTrackState.h>

Inheritance diagram for ParticleKinematicLinearizedTrackState:
LinearizedTrackState< 6 > ReferenceCounted

Public Types

typedef ReferenceCountingPointer< LinearizedTrackState< 6 > > RefCountedLinearizedTrackState
 
- Public Types inherited from LinearizedTrackState< 6 >
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 (AlgebraicVectorN &parameters) const override
 
std::vector< ReferenceCountingPointer< LinearizedTrackState< 6 > > > components () const override
 
const AlgebraicVector6constantTerm () const override
 
const GlobalPointlinearizationPoint () const override
 
const AlgebraicMatrix64momentumJacobian () const override
 
const AlgebraicVector6parametersFromExpansion () const override
 
 ParticleKinematicLinearizedTrackState ()
 
const AlgebraicMatrix63positionJacobian () const override
 
AlgebraicSymMatrix66 predictedStateError () const override
 
AlgebraicSymMatrix44 predictedStateMomentumError () const override
 
AlgebraicVectorM predictedStateMomentumParameters () const override
 
AlgebraicVector6 predictedStateParameters () const override
 
AlgebraicSymMatrix66 predictedStateWeight (int &error) const override
 
AlgebraicVectorN refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const override
 
ReferenceCountingPointer< LinearizedTrackState< 6 > > stateWithNewLinearizationPoint (const GlobalPoint &newLP) const override
 
reco::TransientTrack track () const override
 
double weightInMixture () const override
 
- Public Member Functions inherited from LinearizedTrackState< 6 >
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 isValid () const
 
virtual bool operator== (LinearizedTrackState< N > &other) const=0
 
virtual AlgebraicVectorN refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const=0
 
 ~LinearizedTrackState () override
 

Private Member Functions

void computeChargedJacobians () const
 
void computeJacobians () const
 
void computeNeutralJacobians () const
 
 ParticleKinematicLinearizedTrackState (const GlobalPoint &linP, RefCountedKinematicParticle &prt)
 

Private Attributes

TransientTrackKinematicStateBuilder builder
 
bool errorAvailable
 
bool impactPointAvailable
 
bool jacobiansAvailable
 
RefCountedKinematicParticle part
 
TrackCharge theCharge
 
AlgebraicVector6 theConstantTerm
 
AlgebraicVector6 theExpandedParams
 
GlobalPoint theLinPoint
 
AlgebraicMatrix64 theMomentumJacobian
 
AlgebraicMatrix63 thePositionJacobian
 
PerigeeKinematicState thePredState
 

Friends

class ParticleKinematicLinearizedTrackStateFactory
 

Detailed Description

Definition at line 13 of file ParticleKinematicLinearizedTrackState.h.

Member Typedef Documentation

◆ RefCountedLinearizedTrackState

Definition at line 16 of file ParticleKinematicLinearizedTrackState.h.

Constructor & Destructor Documentation

◆ ParticleKinematicLinearizedTrackState() [1/2]

ParticleKinematicLinearizedTrackState::ParticleKinematicLinearizedTrackState ( )
inline

Definition at line 18 of file ParticleKinematicLinearizedTrackState.h.

18 { jacobiansAvailable = false; }

References jacobiansAvailable.

Referenced by stateWithNewLinearizationPoint().

◆ ParticleKinematicLinearizedTrackState() [2/2]

ParticleKinematicLinearizedTrackState::ParticleKinematicLinearizedTrackState ( const GlobalPoint linP,
RefCountedKinematicParticle prt 
)
inlineprivate

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

Definition at line 115 of file ParticleKinematicLinearizedTrackState.h.

116  : theLinPoint(linP),
117  part(prt),
118  jacobiansAvailable(false),
119  theCharge(prt->currentState().particleCharge()),
120  impactPointAvailable(false)
121 
122  {}

Member Function Documentation

◆ checkParameters()

void ParticleKinematicLinearizedTrackState::checkParameters ( AlgebraicVectorN parameters) const
inlineoverride

Definition at line 172 of file ParticleKinematicLinearizedTrackState.cc.

172  {
173  if (parameters(2) > M_PI)
174  parameters(2) -= 2 * M_PI;
175  if (parameters(2) < -M_PI)
176  parameters(2) += 2 * M_PI;
177 }

References M_PI.

◆ components()

std::vector< ReferenceCountingPointer< LinearizedTrackState< 6 > > > ParticleKinematicLinearizedTrackState::components ( ) const
overridevirtual

Implements LinearizedTrackState< 6 >.

Definition at line 140 of file ParticleKinematicLinearizedTrackState.cc.

141  {
142  std::vector<ReferenceCountingPointer<LinearizedTrackState<6> > > res;
143  res.reserve(1);
144  res.push_back(RefCountedLinearizedTrackState(const_cast<ParticleKinematicLinearizedTrackState*>(this)));
145  return res;
146 }

◆ computeChargedJacobians()

void ParticleKinematicLinearizedTrackState::computeChargedJacobians ( ) const
private

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

Definition at line 179 of file ParticleKinematicLinearizedTrackState.cc.

179  {
180  GlobalPoint paramPt(theLinPoint);
181 
182  double field = part->currentState().magneticField()->inInverseGeV(thePredState.theState().globalPosition()).z();
183  double signTC = -part->currentState().particleCharge();
184 
185  double thetaAtEP = thePredState.theState().globalMomentum().theta();
186  double phiAtEP = thePredState.theState().globalMomentum().phi();
187  double ptAtEP = thePredState.theState().globalMomentum().perp();
188  double transverseCurvatureAtEP = field / ptAtEP * signTC;
189 
190  double x_v = thePredState.theState().globalPosition().x();
191  double y_v = thePredState.theState().globalPosition().y();
192  double z_v = thePredState.theState().globalPosition().z();
193  double X = x_v - paramPt.x() - sin(phiAtEP) / transverseCurvatureAtEP;
194  double Y = y_v - paramPt.y() + cos(phiAtEP) / transverseCurvatureAtEP;
195  double SS = X * X + Y * Y;
196  double S = sqrt(SS);
197 
198  // The track parameters at the expansion point
199  theExpandedParams[0] = transverseCurvatureAtEP;
200  theExpandedParams[1] = thetaAtEP;
201  theExpandedParams[3] = 1 / transverseCurvatureAtEP - signTC * S;
202 
203  theExpandedParams[5] = part->currentState().mass();
204 
205  double phiFEP;
206  if (std::abs(X) > std::abs(Y)) {
207  double signX = (X > 0.0 ? +1.0 : -1.0);
208  phiFEP = -signTC * signX * acos(signTC * Y / S);
209  } else {
210  phiFEP = asin(-signTC * X / S);
211  if ((signTC * Y) < 0.0)
212  phiFEP = M_PI - phiFEP;
213  }
214  if (phiFEP > M_PI)
215  phiFEP -= 2 * M_PI;
216  theExpandedParams[2] = phiFEP;
217  theExpandedParams[4] =
218  z_v - paramPt.z() - (phiAtEP - theExpandedParams[2]) / tan(thetaAtEP) / transverseCurvatureAtEP;
219 
220  thePositionJacobian(2, 0) = -Y / (SS);
221  thePositionJacobian(2, 1) = X / (SS);
222  thePositionJacobian(3, 0) = -signTC * X / S;
223  thePositionJacobian(3, 1) = -signTC * Y / S;
224  thePositionJacobian(4, 0) = thePositionJacobian(2, 0) / tan(thetaAtEP) / transverseCurvatureAtEP;
225  thePositionJacobian(4, 1) = thePositionJacobian(2, 1) / tan(thetaAtEP) / transverseCurvatureAtEP;
226  thePositionJacobian(4, 2) = 1;
227 
228  //debug code - to be removed later
229  // cout<<"parameters for momentum jacobian: X "<<X<<endl;
230  // cout<<"parameters for momentum jacobian: Y "<<Y<<endl;
231  // cout<<"parameters for momentum jacobian: SS "<<SS<<endl;
232  // cout<<"parameters for momentum jacobian: PhiAtEP "<<phiAtEP<<endl;
233  // cout<<"parameters for momentum jacobian: curv "<<transverseCurvatureAtEP<<endl;
234  // cout<<"sin phi Atep "<<sin(phiAtEP)<<endl;
235  // cout<<"cos phi at EP "<<cos(phiAtEP)<<endl;
236  // cout<<"upper part is "<<X*cos(phiAtEP) + Y*sin(phiAtEP) <<endl;
237  // cout<<"lower part is"<<SS*transverseCurvatureAtEP*transverseCurvatureAtEP<<endl;
238 
239  theMomentumJacobian(0, 0) = 1;
240  theMomentumJacobian(1, 1) = 1;
241 
242  theMomentumJacobian(2, 0) =
243  -(X * cos(phiAtEP) + Y * sin(phiAtEP)) / (SS * transverseCurvatureAtEP * transverseCurvatureAtEP);
244 
245  theMomentumJacobian(2, 2) = (Y * cos(phiAtEP) - X * sin(phiAtEP)) / (SS * transverseCurvatureAtEP);
246 
247  theMomentumJacobian(3, 0) =
248  (signTC * (Y * cos(phiAtEP) - X * sin(phiAtEP)) / S - 1) / (transverseCurvatureAtEP * transverseCurvatureAtEP);
249 
250  theMomentumJacobian(3, 2) = signTC * (X * cos(phiAtEP) + Y * sin(phiAtEP)) / (S * transverseCurvatureAtEP);
251 
252  theMomentumJacobian(4, 0) =
253  (phiAtEP - theExpandedParams(2)) / tan(thetaAtEP) / (transverseCurvatureAtEP * transverseCurvatureAtEP) +
254  theMomentumJacobian(2, 0) / tan(thetaAtEP) / transverseCurvatureAtEP;
255 
256  theMomentumJacobian(4, 1) =
257  (phiAtEP - theExpandedParams(2)) * (1 + 1 / (tan(thetaAtEP) * tan(thetaAtEP))) / transverseCurvatureAtEP;
258 
259  theMomentumJacobian(4, 2) = (theMomentumJacobian(2, 2) - 1) / tan(thetaAtEP) / transverseCurvatureAtEP;
260 
261  theMomentumJacobian(5, 3) = 1;
262 
263  // And finally the residuals:
264  AlgebraicVector3 expansionPoint;
265  expansionPoint[0] = thePredState.theState().globalPosition().x();
266  expansionPoint[1] = thePredState.theState().globalPosition().y();
267  expansionPoint[2] = thePredState.theState().globalPosition().z();
268  AlgebraicVector4 momentumAtExpansionPoint;
269  momentumAtExpansionPoint[0] = transverseCurvatureAtEP; // Transverse Curv
270  momentumAtExpansionPoint[1] = thetaAtEP;
271  momentumAtExpansionPoint[2] = phiAtEP;
272  momentumAtExpansionPoint[3] = theExpandedParams[5];
273 
275  theMomentumJacobian * momentumAtExpansionPoint);
276 }

References funct::abs(), funct::cos(), KinematicState::globalMomentum(), KinematicState::globalPosition(), M_PI, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), S(), funct::sin(), mathSSE::sqrt(), funct::tan(), theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, PerigeeKinematicState::theState(), PV3DBase< T, PVType, FrameType >::theta(), 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 ParticleKinematicLinearizedTrackState::computeJacobians ( ) const
private

Method calculating the track parameters and the Jacobians.

Definition at line 79 of file ParticleKinematicLinearizedTrackState.cc.

79  {
80  GlobalPoint paramPt(theLinPoint);
81  thePredState = builder(part->currentState(), paramPt);
82  // bool valid = thePredState.isValid();
83  // if (!valid) std::cout <<"Help!!!!!!!!! State is invalid\n";
84  // if (!valid) return;
85  if (std::abs(theCharge) < 1e-5) {
86  //neutral track
88  } else {
89  //charged track
91  }
92  jacobiansAvailable = true;
93 }

References funct::abs(), builder, computeChargedJacobians(), computeNeutralJacobians(), MillePedeFileConverter_cfg::e, jacobiansAvailable, theCharge, theLinPoint, and thePredState.

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

◆ computeNeutralJacobians()

void ParticleKinematicLinearizedTrackState::computeNeutralJacobians ( ) const
private

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

Definition at line 278 of file ParticleKinematicLinearizedTrackState.cc.

278  {
279  GlobalPoint paramPt(theLinPoint);
280  double thetaAtEP = thePredState.theState().globalMomentum().theta();
281  double phiAtEP = thePredState.theState().globalMomentum().phi();
282  double ptAtEP = thePredState.theState().globalMomentum().perp();
283 
284  double x_v = thePredState.theState().globalPosition().x();
285  double y_v = thePredState.theState().globalPosition().y();
286  double z_v = thePredState.theState().globalPosition().z();
287  double X = x_v - paramPt.x();
288  double Y = y_v - paramPt.y();
289 
290  // The track parameters at the expansion point
291  theExpandedParams[0] = 1 / ptAtEP;
292  theExpandedParams[1] = thetaAtEP;
293  theExpandedParams[2] = phiAtEP;
294  theExpandedParams[3] = X * sin(phiAtEP) - Y * cos(phiAtEP);
295  theExpandedParams[4] = z_v - paramPt.z() - (X * cos(phiAtEP) + Y * sin(phiAtEP)) / tan(thetaAtEP);
296  theExpandedParams[5] = part->currentState().mass();
297 
298  // The Jacobian: (all at the expansion point)
299  // [i,j]
300  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
301  // j = 0: x_v, 1: y_v, 2: z_v
302  thePositionJacobian(3, 0) = sin(phiAtEP);
303  thePositionJacobian(3, 1) = -cos(phiAtEP);
304  thePositionJacobian(4, 0) = -cos(phiAtEP) / tan(thetaAtEP);
305  thePositionJacobian(4, 1) = -sin(phiAtEP) / tan(thetaAtEP);
306  thePositionJacobian(4, 2) = 1;
307 
308  // [i,j]
309  // i = 0: rho = 1/pt , 1: theta, 2: phi_p, 3: epsilon, 4: z_p
310  // j = 0: rho = 1/pt , 1: theta, 2: phi_v
311  theMomentumJacobian(0, 0) = 1;
312  theMomentumJacobian(1, 1) = 1;
313  theMomentumJacobian(2, 2) = 1;
314 
315  theMomentumJacobian(3, 2) = X * cos(phiAtEP) + Y * sin(phiAtEP);
316  theMomentumJacobian(4, 1) = theMomentumJacobian(3, 2) * (1 + 1 / (tan(thetaAtEP) * tan(thetaAtEP)));
317 
318  theMomentumJacobian(4, 2) = (X * sin(phiAtEP) - Y * cos(phiAtEP)) / tan(thetaAtEP);
319  theMomentumJacobian(5, 3) = 1;
320 
321  // And finally the residuals:
322  AlgebraicVector3 expansionPoint;
323  expansionPoint[0] = thePredState.theState().globalPosition().x();
324  expansionPoint[1] = thePredState.theState().globalPosition().y();
325  expansionPoint[2] = thePredState.theState().globalPosition().z();
326  AlgebraicVector4 momentumAtExpansionPoint;
327  momentumAtExpansionPoint[0] = 1 / ptAtEP;
328  momentumAtExpansionPoint[1] = thetaAtEP;
329  momentumAtExpansionPoint[2] = phiAtEP;
330  momentumAtExpansionPoint[3] = theExpandedParams[5];
331 
333  theMomentumJacobian * momentumAtExpansionPoint);
334 }

References funct::cos(), KinematicState::globalMomentum(), KinematicState::globalPosition(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), funct::sin(), funct::tan(), theConstantTerm, theExpandedParams, theLinPoint, theMomentumJacobian, thePositionJacobian, thePredState, PerigeeKinematicState::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 AlgebraicVector6 & ParticleKinematicLinearizedTrackState::constantTerm ( ) const
overridevirtual

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

Implements LinearizedTrackState< 6 >.

Definition at line 5 of file ParticleKinematicLinearizedTrackState.cc.

5  {
8  return theConstantTerm;
9 }

References computeJacobians(), jacobiansAvailable, and theConstantTerm.

Referenced by refittedParamFromEquation().

◆ linearizationPoint()

const GlobalPoint& ParticleKinematicLinearizedTrackState::linearizationPoint ( ) const
inlineoverridevirtual

The point at which the track state has been linearized

Implements LinearizedTrackState< 6 >.

Definition at line 30 of file ParticleKinematicLinearizedTrackState.h.

30 { return theLinPoint; }

References theLinPoint.

◆ momentumJacobian()

const AlgebraicMatrix64 & ParticleKinematicLinearizedTrackState::momentumJacobian ( ) const
overridevirtual

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

Implements LinearizedTrackState< 6 >.

Definition at line 17 of file ParticleKinematicLinearizedTrackState.cc.

17  {
18  if (!jacobiansAvailable)
20  return theMomentumJacobian;
21 }

References computeJacobians(), jacobiansAvailable, and theMomentumJacobian.

Referenced by refittedParamFromEquation().

◆ parametersFromExpansion()

const AlgebraicVector6 & ParticleKinematicLinearizedTrackState::parametersFromExpansion ( ) const
overridevirtual

Method returning the parameters of the Taylor expansion

Implements LinearizedTrackState< 6 >.

Definition at line 23 of file ParticleKinematicLinearizedTrackState.cc.

23  {
24  if (!jacobiansAvailable)
26  return theExpandedParams;
27 }

References computeJacobians(), jacobiansAvailable, and theExpandedParams.

◆ positionJacobian()

const AlgebraicMatrix63 & ParticleKinematicLinearizedTrackState::positionJacobian ( ) const
overridevirtual

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

Implements LinearizedTrackState< 6 >.

Definition at line 11 of file ParticleKinematicLinearizedTrackState.cc.

11  {
12  if (!jacobiansAvailable)
14  return thePositionJacobian;
15 }

References computeJacobians(), jacobiansAvailable, and thePositionJacobian.

Referenced by refittedParamFromEquation().

◆ predictedStateError()

AlgebraicSymMatrix66 ParticleKinematicLinearizedTrackState::predictedStateError ( ) const
overridevirtual

◆ predictedStateMomentumError()

AlgebraicSymMatrix44 ParticleKinematicLinearizedTrackState::predictedStateMomentumError ( ) const
overridevirtual

4x4 error matrix ofe xtended perigee mometum components

Implements LinearizedTrackState< 6 >.

Definition at line 124 of file ParticleKinematicLinearizedTrackState.cc.

124  {
125  int error;
126  if (!jacobiansAvailable)
130  res.Place_at(m3, 0, 0);
135  return res;
136 }

References computeJacobians(), relativeConstraints::error, jacobiansAvailable, PerigeeKinematicState::perigeeError(), thePredState, and ExtendedPerigeeTrajectoryError::weightMatrix().

◆ predictedStateMomentumParameters()

AlgebraicVector4 ParticleKinematicLinearizedTrackState::predictedStateMomentumParameters ( ) const
overridevirtual

returns predicted 4-momentum in extended perigee parametrization

Implements LinearizedTrackState< 6 >.

Definition at line 113 of file ParticleKinematicLinearizedTrackState.cc.

113  {
114  if (!jacobiansAvailable)
121  return res;
122 }

References computeJacobians(), jacobiansAvailable, PerigeeKinematicState::perigeeParameters(), thePredState, and ExtendedPerigeeTrajectoryParameters::vector().

Referenced by refittedParamFromEquation().

◆ predictedStateParameters()

AlgebraicVector6 ParticleKinematicLinearizedTrackState::predictedStateParameters ( ) const
overridevirtual

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). extended perigee predicted parameters

Implements LinearizedTrackState< 6 >.

Definition at line 29 of file ParticleKinematicLinearizedTrackState.cc.

29  {
30  if (!jacobiansAvailable)
33 }

References computeJacobians(), jacobiansAvailable, PerigeeKinematicState::perigeeParameters(), thePredState, and ExtendedPerigeeTrajectoryParameters::vector().

◆ predictedStateWeight()

AlgebraicSymMatrix66 ParticleKinematicLinearizedTrackState::predictedStateWeight ( int &  error) const
overridevirtual

Full predicted weight matrix

Implements LinearizedTrackState< 6 >.

Definition at line 35 of file ParticleKinematicLinearizedTrackState.cc.

35  {
36  if (!jacobiansAvailable)
38  int i = 0;
40  error = i;
41  return z;
42  // return thePredState.perigeeError().weightMatrix(error);
43 }

References computeJacobians(), relativeConstraints::error, mps_fire::i, jacobiansAvailable, PerigeeKinematicState::perigeeError(), thePredState, ExtendedPerigeeTrajectoryError::weightMatrix(), and z.

◆ refittedParamFromEquation()

AlgebraicVector6 ParticleKinematicLinearizedTrackState::refittedParamFromEquation ( const RefCountedRefittedTrackState theRefittedState) const
override
    Method returning the impact point measurement
   &zwj;/

ImpactPointMeasurement impactPointMeasurement() const;

TrackCharge charge() const override;

RefCountedKinematicParticle particle() const;

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

bool hasError() const override;

RefCountedRefittedTrackState createRefittedTrackState(const GlobalPoint& vertexPosition, const AlgebraicVectorM& vectorParameters, const AlgebraicSymMatrix77& covarianceMatrix) const override;

/** Method returning the parameters of the Taylor expansion evaluated with the refitted state.

Definition at line 148 of file ParticleKinematicLinearizedTrackState.cc.

149  {
150  AlgebraicVectorM momentum = theRefittedState->momentumVector();
151  if ((momentum(2) * predictedStateMomentumParameters()(2) < 0) && (std::fabs(momentum(2)) > M_PI / 2)) {
152  if (predictedStateMomentumParameters()(2) < 0.)
153  momentum(2) -= 2 * M_PI;
154  if (predictedStateMomentumParameters()(2) > 0.)
155  momentum(2) += 2 * M_PI;
156  }
157 
158  AlgebraicVector3 vertexPosition;
159  vertexPosition(0) = theRefittedState->position().x();
160  vertexPosition(1) = theRefittedState->position().y();
161  vertexPosition(2) = theRefittedState->position().z();
162  AlgebraicVector6 param = constantTerm() + positionJacobian() * vertexPosition + momentumJacobian() * momentum;
163 
164  if (param(2) > M_PI)
165  param(2) -= 2 * M_PI;
166  if (param(2) < -M_PI)
167  param(2) += 2 * M_PI;
168 
169  return param;
170 }

References constantTerm(), M_PI, momentumJacobian(), positionJacobian(), and predictedStateMomentumParameters().

◆ stateWithNewLinearizationPoint()

ReferenceCountingPointer< LinearizedTrackState< 6 > > ParticleKinematicLinearizedTrackState::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< 6 >.

Definition at line 96 of file ParticleKinematicLinearizedTrackState.cc.

96  {
98  return new ParticleKinematicLinearizedTrackState(newLP, pr);
99 }

References part, and ParticleKinematicLinearizedTrackState().

◆ track()

reco::TransientTrack ParticleKinematicLinearizedTrackState::track ( ) const
overridevirtual

Implements LinearizedTrackState< 6 >.

Definition at line 336 of file ParticleKinematicLinearizedTrackState.cc.

336  {
337  throw VertexException(" ParticleKinematicLinearizedTrackState:: no TransientTrack to return");
338 }

◆ weightInMixture()

double ParticleKinematicLinearizedTrackState::weightInMixture ( ) const
overridevirtual

Implements LinearizedTrackState< 6 >.

Definition at line 138 of file ParticleKinematicLinearizedTrackState.cc.

138 { return 1.; }

Friends And Related Function Documentation

◆ ParticleKinematicLinearizedTrackStateFactory

Definition at line 15 of file ParticleKinematicLinearizedTrackState.h.

Member Data Documentation

◆ builder

TransientTrackKinematicStateBuilder ParticleKinematicLinearizedTrackState::builder
private

Definition at line 140 of file ParticleKinematicLinearizedTrackState.h.

Referenced by computeJacobians().

◆ errorAvailable

bool ParticleKinematicLinearizedTrackState::errorAvailable
mutableprivate

Definition at line 142 of file ParticleKinematicLinearizedTrackState.h.

◆ impactPointAvailable

bool ParticleKinematicLinearizedTrackState::impactPointAvailable
mutableprivate

Definition at line 152 of file ParticleKinematicLinearizedTrackState.h.

◆ jacobiansAvailable

bool ParticleKinematicLinearizedTrackState::jacobiansAvailable
mutableprivate

◆ part

RefCountedKinematicParticle ParticleKinematicLinearizedTrackState::part
private

◆ theCharge

TrackCharge ParticleKinematicLinearizedTrackState::theCharge
private

Definition at line 150 of file ParticleKinematicLinearizedTrackState.h.

Referenced by computeJacobians().

◆ theConstantTerm

AlgebraicVector6 ParticleKinematicLinearizedTrackState::theConstantTerm
mutableprivate

◆ theExpandedParams

AlgebraicVector6 ParticleKinematicLinearizedTrackState::theExpandedParams
mutableprivate

◆ theLinPoint

GlobalPoint ParticleKinematicLinearizedTrackState::theLinPoint
private

◆ theMomentumJacobian

AlgebraicMatrix64 ParticleKinematicLinearizedTrackState::theMomentumJacobian
mutableprivate

◆ thePositionJacobian

AlgebraicMatrix63 ParticleKinematicLinearizedTrackState::thePositionJacobian
mutableprivate

◆ thePredState

PerigeeKinematicState ParticleKinematicLinearizedTrackState::thePredState
mutableprivate
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
mps_fire.i
i
Definition: mps_fire.py:428
ParticleKinematicLinearizedTrackState::positionJacobian
const AlgebraicMatrix63 & positionJacobian() const override
Definition: ParticleKinematicLinearizedTrackState.cc:11
VertexException
Common base class.
Definition: VertexException.h:12
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
ParticleKinematicLinearizedTrackState::theMomentumJacobian
AlgebraicMatrix64 theMomentumJacobian
Definition: ParticleKinematicLinearizedTrackState.h:145
X
#define X(str)
Definition: MuonsGrabber.cc:38
ParticleKinematicLinearizedTrackState::theCharge
TrackCharge theCharge
Definition: ParticleKinematicLinearizedTrackState.h:150
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
KinematicState::globalMomentum
GlobalVector globalMomentum() const
Definition: KinematicState.h:67
ReferenceCountingPointer< KinematicParticle >
relativeConstraints.error
error
Definition: relativeConstraints.py:53
ParticleKinematicLinearizedTrackState::computeChargedJacobians
void computeChargedJacobians() const
Definition: ParticleKinematicLinearizedTrackState.cc:179
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ParticleKinematicLinearizedTrackState::jacobiansAvailable
bool jacobiansAvailable
Definition: ParticleKinematicLinearizedTrackState.h:143
ParticleKinematicLinearizedTrackState::predictedStateMomentumParameters
AlgebraicVectorM predictedStateMomentumParameters() const override
Definition: ParticleKinematicLinearizedTrackState.cc:113
part
part
Definition: HCALResponse.h:20
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
ParticleKinematicLinearizedTrackState::theLinPoint
GlobalPoint theLinPoint
Definition: ParticleKinematicLinearizedTrackState.h:138
ParticleKinematicLinearizedTrackState::constantTerm
const AlgebraicVector6 & constantTerm() const override
Definition: ParticleKinematicLinearizedTrackState.cc:5
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
AlgebraicSymMatrix66
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Definition: AlgebraicROOTObjects.h:24
DDAxes::z
ExtendedPerigeeTrajectoryError::weightMatrix
const AlgebraicSymMatrix66 & weightMatrix(int &error) const
Definition: ExtendedPerigeeTrajectoryError.h:24
ParticleKinematicLinearizedTrackState::thePositionJacobian
AlgebraicMatrix63 thePositionJacobian
Definition: ParticleKinematicLinearizedTrackState.h:144
Point3DBase< float, GlobalTag >
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:97
ExtendedPerigeeTrajectoryParameters::vector
AlgebraicVector6 vector() const
Definition: ExtendedPerigeeTrajectoryParameters.h:28
ParticleKinematicLinearizedTrackState::computeJacobians
void computeJacobians() const
Definition: ParticleKinematicLinearizedTrackState.cc:79
sipixeldigitoraw
Definition: SiPixelDigiToRaw.cc:32
ParticleKinematicLinearizedTrackState::theConstantTerm
AlgebraicVector6 theConstantTerm
Definition: ParticleKinematicLinearizedTrackState.h:147
ParticleKinematicLinearizedTrackState::ParticleKinematicLinearizedTrackState
ParticleKinematicLinearizedTrackState()
Definition: ParticleKinematicLinearizedTrackState.h:18
ParticleKinematicLinearizedTrackState::part
RefCountedKinematicParticle part
Definition: ParticleKinematicLinearizedTrackState.h:139
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
PerigeeKinematicState::perigeeError
const ExtendedPerigeeTrajectoryError & perigeeError() const
Definition: PerigeeKinematicState.h:59
PerigeeKinematicState::theState
const KinematicState & theState() const
Definition: PerigeeKinematicState.h:40
res
Definition: Electron.h:6
AlgebraicVector6
ROOT::Math::SVector< double, 6 > AlgebraicVector6
Definition: AlgebraicROOTObjects.h:15
AlgebraicSymMatrix44
ROOT::Math::SMatrix< double, 4, 4, ROOT::Math::MatRepSym< double, 4 > > AlgebraicSymMatrix44
Definition: AlgebraicROOTObjects.h:22
AlgebraicVector4
ROOT::Math::SVector< double, 4 > AlgebraicVector4
Definition: AlgebraicROOTObjects.h:13
ParticleKinematicLinearizedTrackState::RefCountedLinearizedTrackState
ReferenceCountingPointer< LinearizedTrackState< 6 > > RefCountedLinearizedTrackState
Definition: ParticleKinematicLinearizedTrackState.h:16
BeamSpotPI::Y
Definition: BeamSpotPayloadInspectorHelper.h:32
S
Definition: CSCDBL1TPParametersExtended.h:16
ParticleKinematicLinearizedTrackState::theExpandedParams
AlgebraicVector6 theExpandedParams
Definition: ParticleKinematicLinearizedTrackState.h:148
ParticleKinematicLinearizedTrackState::impactPointAvailable
bool impactPointAvailable
Definition: ParticleKinematicLinearizedTrackState.h:152
ExtendedPerigeeTrajectoryError::covarianceMatrix
const AlgebraicSymMatrix66 & covarianceMatrix() const
Definition: ExtendedPerigeeTrajectoryError.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ParticleKinematicLinearizedTrackState::builder
TransientTrackKinematicStateBuilder builder
Definition: ParticleKinematicLinearizedTrackState.h:140
ParticleKinematicLinearizedTrackState::momentumJacobian
const AlgebraicMatrix64 & momentumJacobian() const override
Definition: ParticleKinematicLinearizedTrackState.cc:17
PerigeeKinematicState::perigeeParameters
const ExtendedPerigeeTrajectoryParameters & perigeeParameters() const
Definition: PerigeeKinematicState.h:70
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
ParticleKinematicLinearizedTrackState::thePredState
PerigeeKinematicState thePredState
Definition: ParticleKinematicLinearizedTrackState.h:146
LinearizedTrackState< 6 >::AlgebraicVectorM
ROOT::Math::SVector< double, N - 2 > AlgebraicVectorM
Definition: LinearizedTrackState.h:39
ParticleKinematicLinearizedTrackState::computeNeutralJacobians
void computeNeutralJacobians() const
Definition: ParticleKinematicLinearizedTrackState.cc:278
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
KinematicState::globalPosition
GlobalPoint globalPosition() const
Definition: KinematicState.h:69