CMS 3D CMS Logo

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

#include <PerigeeMultiLTS.h>

Inheritance diagram for PerigeeMultiLTS:
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 AlgebraicVectorNconstantTerm () const override
 
RefCountedRefittedTrackState createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const override
 
bool hasError () const override
 
const GlobalPointlinearizationPoint () const override
 
const AlgebraicMatrixNMmomentumJacobian () const override
 
bool operator== (LinearizedTrackState< 5 > &other) const override
 
const AlgebraicVectorNparametersFromExpansion () const override
 
const AlgebraicMatrixN3positionJacobian () const override
 
const TrajectoryStateClosestToPointpredictedState () const
 
AlgebraicSymMatrixNN predictedStateError () const override
 
AlgebraicSymMatrixMM predictedStateMomentumError () const override
 
AlgebraicVectorM predictedStateMomentumParameters () const override
 
AlgebraicVectorN predictedStateParameters () const override
 
AlgebraicSymMatrixNN 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 isValid () const
 
virtual bool operator== (LinearizedTrackState< N > &other) const=0
 
virtual AlgebraicVectorN refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const=0
 
 ~LinearizedTrackState () override
 

Private Member Functions

 PerigeeMultiLTS (const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
 
void prepareCollapsedState () const
 

Private Attributes

bool collapsedStateAvailable
 
RefCountedLinearizedTrackState collapsedStateLT
 
std::vector< RefCountedLinearizedTrackStateltComp
 
TrackCharge theCharge
 
GlobalPoint theLinPoint
 
LinearizedTrackStateFactory theLTSfactory
 
reco::TransientTrack theTrack
 
const TrajectoryStateOnSurface theTSOS
 

Friends

class MultiPerigeeLTSFactory
 

Detailed Description

Multi-state version of PerigeeLinearizedTrackState

Definition at line 14 of file PerigeeMultiLTS.h.

Member Typedef Documentation

◆ RefCountedLinearizedTrackState

Definition at line 16 of file PerigeeMultiLTS.h.

Constructor & Destructor Documentation

◆ PerigeeMultiLTS()

PerigeeMultiLTS::PerigeeMultiLTS ( const GlobalPoint linP,
const reco::TransientTrack track,
const TrajectoryStateOnSurface tsos 
)
private

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

Parameters
linPThe linearization point
trackThe RecTrack
tsosThe original (multi-state) TrajectoryStateOnSurface

Definition at line 9 of file PerigeeMultiLTS.cc.

13  //Extract the TSOS components:
14 
15  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
16  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
17  ltComp.reserve(tsosComp.size());
18  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin(); it != tsosComp.end(); it++) {
19  // cout <<(*it).globalPosition()<<endl;
21  }
22 }

References TrajectoryStateOnSurface::components(), LinearizedTrackStateFactory::linearizedTrackState(), ltComp, theLinPoint, theLTSfactory, theTrack, and theTSOS.

Referenced by stateWithNewLinearizationPoint().

Member Function Documentation

◆ charge()

TrackCharge PerigeeMultiLTS::charge ( void  ) const
inlineoverridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 95 of file PerigeeMultiLTS.h.

95 { return theCharge; }

References theCharge.

Referenced by createRefittedTrackState().

◆ checkParameters()

void PerigeeMultiLTS::checkParameters ( AlgebraicVector5 parameters) const
inlineoverride

Definition at line 150 of file PerigeeMultiLTS.cc.

150  {
151  if (parameters(2) > M_PI)
152  parameters(2) -= 2 * M_PI;
153  if (parameters(2) < -M_PI)
154  parameters(2) += 2 * M_PI;
155 }

References M_PI.

◆ components()

std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > PerigeeMultiLTS::components ( ) const
inlineoverridevirtual

Vector of individual components in the mixture.

Implements LinearizedTrackState< 5 >.

Definition at line 122 of file PerigeeMultiLTS.h.

122 { return ltComp; }

References ltComp.

◆ constantTerm()

const AlgebraicVector5 & PerigeeMultiLTS::constantTerm ( ) const
overridevirtual

Method returning the constant term of the Taylor expansion of the measurement equation for the collapsed track state

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

Implements LinearizedTrackState< 5 >.

Definition at line 34 of file PerigeeMultiLTS.cc.

34  {
37  return collapsedStateLT->constantTerm();
38 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation().

◆ createRefittedTrackState()

PerigeeMultiLTS::RefCountedRefittedTrackState PerigeeMultiLTS::createRefittedTrackState ( const GlobalPoint vertexPosition,
const AlgebraicVectorM vectorParameters,
const AlgebraicSymMatrixOO covarianceMatrix 
) const
override

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

Definition at line 126 of file PerigeeMultiLTS.cc.

129  {
131  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
132  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
133 }

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

◆ hasError()

bool PerigeeMultiLTS::hasError ( void  ) const
overridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 77 of file PerigeeMultiLTS.cc.

77  {
80  return collapsedStateLT->hasError();
81 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

◆ linearizationPoint()

const GlobalPoint& PerigeeMultiLTS::linearizationPoint ( ) const
inlineoverridevirtual

The point at which the track state has been linearized

Implements LinearizedTrackState< 5 >.

Definition at line 33 of file PerigeeMultiLTS.h.

33 { return theLinPoint; }

References theLinPoint.

◆ momentumJacobian()

const AlgebraicMatrix53 & PerigeeMultiLTS::momentumJacobian ( ) const
overridevirtual

Method returning the Momentum Jacobian from the Taylor expansion (Matrix B) for the collapsed track state

Method returning the Momentum Jacobian (Matrix B)

Implements LinearizedTrackState< 5 >.

Definition at line 52 of file PerigeeMultiLTS.cc.

52  {
55  return collapsedStateLT->momentumJacobian();
56 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation().

◆ operator==()

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

Definition at line 113 of file PerigeeMultiLTS.cc.

113  {
114  const PerigeeMultiLTS* otherP = dynamic_cast<const PerigeeMultiLTS*>(&other);
115  if (otherP == nullptr) {
116  throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
117  }
118  return (otherP->track() == theTrack);
119 }

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

◆ parametersFromExpansion()

const AlgebraicVector5 & PerigeeMultiLTS::parametersFromExpansion ( ) const
overridevirtual

Method returning the parameters of the Taylor expansion for the collapsed track state

Method returning the parameters of the Taylor expansion

Implements LinearizedTrackState< 5 >.

Definition at line 60 of file PerigeeMultiLTS.cc.

60  {
63  return collapsedStateLT->parametersFromExpansion();
64 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

◆ positionJacobian()

const AlgebraicMatrix53 & PerigeeMultiLTS::positionJacobian ( ) const
overridevirtual

Method returning the Position Jacobian from the Taylor expansion (Matrix A) for the collapsed track state

Method returning the Position Jacobian (Matrix A)

Implements LinearizedTrackState< 5 >.

Definition at line 43 of file PerigeeMultiLTS.cc.

43  {
46  return collapsedStateLT->positionJacobian();
47 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation().

◆ predictedState()

const TrajectoryStateClosestToPoint & PerigeeMultiLTS::predictedState ( ) const

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), for the collapsed track state

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

Definition at line 70 of file PerigeeMultiLTS.cc.

70  {
73  const PerigeeLinearizedTrackState* otherP = dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
74  return otherP->predictedState();
75 }

References collapsedStateAvailable, collapsedStateLT, PerigeeLinearizedTrackState::predictedState(), and prepareCollapsedState().

◆ predictedStateError()

AlgebraicSymMatrix55 PerigeeMultiLTS::predictedStateError ( ) const
overridevirtual

Method returning the covariance matrix of the track state at the transverse impact point, for the collapsed track state

Implements LinearizedTrackState< 5 >.

Definition at line 101 of file PerigeeMultiLTS.cc.

101  {
104  return collapsedStateLT->predictedStateError();
105 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

◆ predictedStateMomentumError()

AlgebraicSymMatrix33 PerigeeMultiLTS::predictedStateMomentumError ( ) const
overridevirtual

Method returning the momentum covariance matrix of the track state at the transverse impact point, for the collapsed track state

Implements LinearizedTrackState< 5 >.

Definition at line 107 of file PerigeeMultiLTS.cc.

107  {
110  return collapsedStateLT->predictedStateMomentumError();
111 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

◆ predictedStateMomentumParameters()

AlgebraicVector3 PerigeeMultiLTS::predictedStateMomentumParameters ( ) const
overridevirtual

Method returning the momentum part of the parameters of the track state at the linearization point, for the collapsed track state

Implements LinearizedTrackState< 5 >.

Definition at line 89 of file PerigeeMultiLTS.cc.

89  {
92  return collapsedStateLT->predictedStateMomentumParameters();
93 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

◆ predictedStateParameters()

AlgebraicVector5 PerigeeMultiLTS::predictedStateParameters ( ) const
overridevirtual

Method returning the parameters of the track state at the transverse impact point, for the collapsed track state

Implements LinearizedTrackState< 5 >.

Definition at line 83 of file PerigeeMultiLTS.cc.

83  {
86  return collapsedStateLT->predictedStateParameters();
87 }

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

◆ predictedStateWeight()

AlgebraicSymMatrix55 PerigeeMultiLTS::predictedStateWeight ( int &  error) const
overridevirtual

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

Implements LinearizedTrackState< 5 >.

Definition at line 95 of file PerigeeMultiLTS.cc.

95  {
98  return collapsedStateLT->predictedStateWeight(error);
99 }

References collapsedStateAvailable, collapsedStateLT, relativeConstraints::error, and prepareCollapsedState().

◆ prepareCollapsedState()

void PerigeeMultiLTS::prepareCollapsedState ( ) const
private

◆ refittedParamFromEquation()

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

Definition at line 135 of file PerigeeMultiLTS.cc.

135  {
136  AlgebraicVector3 vertexPosition;
137  vertexPosition(0) = theRefittedState->position().x();
138  vertexPosition(1) = theRefittedState->position().y();
139  vertexPosition(2) = theRefittedState->position().z();
140  AlgebraicVectorN param =
141  constantTerm() + positionJacobian() * vertexPosition + momentumJacobian() * theRefittedState->momentumVector();
142  if (param(2) > M_PI)
143  param(2) -= 2 * M_PI;
144  if (param(2) < -M_PI)
145  param(2) += 2 * M_PI;
146 
147  return param;
148 }

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

◆ state()

const TrajectoryStateOnSurface PerigeeMultiLTS::state ( ) const
inline

Returns theoriginal (multi-state) TrajectoryStateOnSurface whith which this instance has been created with.

Definition at line 41 of file PerigeeMultiLTS.h.

41 { return theTSOS; }

References theTSOS.

◆ stateWithNewLinearizationPoint()

PerigeeMultiLTS::RefCountedLinearizedTrackState PerigeeMultiLTS::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 121 of file PerigeeMultiLTS.cc.

122  {
124 }

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

◆ track()

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

Implements LinearizedTrackState< 5 >.

Definition at line 35 of file PerigeeMultiLTS.h.

35 { return theTrack; }

References theTrack.

Referenced by operator==(), and stateWithNewLinearizationPoint().

◆ weightInMixture()

double PerigeeMultiLTS::weightInMixture ( ) const
inlineoverridevirtual

The weight of this state. It will be the sum of the weights of the individual components in the mixture.

Implements LinearizedTrackState< 5 >.

Definition at line 116 of file PerigeeMultiLTS.h.

116 { return theTSOS.weight(); }

References theTSOS, and TrajectoryStateOnSurface::weight().

Friends And Related Function Documentation

◆ MultiPerigeeLTSFactory

friend class MultiPerigeeLTSFactory
friend

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

Definition at line 21 of file PerigeeMultiLTS.h.

Member Data Documentation

◆ collapsedStateAvailable

bool PerigeeMultiLTS::collapsedStateAvailable
mutableprivate

◆ collapsedStateLT

RefCountedLinearizedTrackState PerigeeMultiLTS::collapsedStateLT
mutableprivate

◆ ltComp

std::vector<RefCountedLinearizedTrackState> PerigeeMultiLTS::ltComp
private

Definition at line 141 of file PerigeeMultiLTS.h.

Referenced by components(), and PerigeeMultiLTS().

◆ theCharge

TrackCharge PerigeeMultiLTS::theCharge
private

Definition at line 144 of file PerigeeMultiLTS.h.

Referenced by charge().

◆ theLinPoint

GlobalPoint PerigeeMultiLTS::theLinPoint
private

Definition at line 137 of file PerigeeMultiLTS.h.

Referenced by linearizationPoint(), PerigeeMultiLTS(), and prepareCollapsedState().

◆ theLTSfactory

LinearizedTrackStateFactory PerigeeMultiLTS::theLTSfactory
private

Definition at line 143 of file PerigeeMultiLTS.h.

Referenced by PerigeeMultiLTS(), and prepareCollapsedState().

◆ theTrack

reco::TransientTrack PerigeeMultiLTS::theTrack
private

◆ theTSOS

const TrajectoryStateOnSurface PerigeeMultiLTS::theTSOS
private
AlgebraicVector3
ROOT::Math::SVector< double, 3 > AlgebraicVector3
Definition: AlgebraicROOTObjects.h:12
BeamSpotPI::parameters
parameters
Definition: BeamSpotPayloadInspectorHelper.h:30
PerigeeMultiLTS::theTrack
reco::TransientTrack theTrack
Definition: PerigeeMultiLTS.h:138
PerigeeMultiLTS::PerigeeMultiLTS
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
Definition: PerigeeMultiLTS.cc:9
PerigeeLinearizedTrackState::predictedState
const TrajectoryStateClosestToPoint & predictedState() const
Definition: PerigeeLinearizedTrackState.h:212
VertexException
Common base class.
Definition: VertexException.h:12
PerigeeMultiLTS
Definition: PerigeeMultiLTS.h:14
PerigeeMultiLTS::momentumJacobian
const AlgebraicMatrixNM & momentumJacobian() const override
Definition: PerigeeMultiLTS.cc:52
reco::TransientTrack::charge
TrackCharge charge() const
Definition: TransientTrack.h:102
PerigeeMultiLTS::theCharge
TrackCharge theCharge
Definition: PerigeeMultiLTS.h:144
PerigeeMultiLTS::RefCountedLinearizedTrackState
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
Definition: PerigeeMultiLTS.h:16
PerigeeMultiLTS::constantTerm
const AlgebraicVectorN & constantTerm() const override
Definition: PerigeeMultiLTS.cc:34
relativeConstraints.error
error
Definition: relativeConstraints.py:53
LinearizedTrackStateFactory::linearizedTrackState
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
Definition: LinearizedTrackStateFactory.cc:9
PerigeeRefittedTrackState
Definition: PerigeeRefittedTrackState.h:18
PerigeeConversions::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
Definition: PerigeeConversions.cc:97
PerigeeMultiLTS::charge
TrackCharge charge() const override
Definition: PerigeeMultiLTS.h:95
TrajectoryStateOnSurface::weight
double weight() const
Definition: TrajectoryStateOnSurface.h:80
trackingPlots.other
other
Definition: trackingPlots.py:1460
PerigeeMultiLTS::theTSOS
const TrajectoryStateOnSurface theTSOS
Definition: PerigeeMultiLTS.h:140
PerigeeMultiLTS::theLinPoint
GlobalPoint theLinPoint
Definition: PerigeeMultiLTS.h:137
PerigeeMultiLTS::theLTSfactory
LinearizedTrackStateFactory theLTSfactory
Definition: PerigeeMultiLTS.h:143
TrajectoryStateOnSurface::components
Components const & components() const
Definition: TrajectoryStateOnSurface.h:85
PerigeeMultiLTS::positionJacobian
const AlgebraicMatrixN3 & positionJacobian() const override
Definition: PerigeeMultiLTS.cc:43
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
reco::TransientTrack::field
const MagneticField * field() const
Definition: TransientTrack.h:110
PerigeeMultiLTS::ltComp
std::vector< RefCountedLinearizedTrackState > ltComp
Definition: PerigeeMultiLTS.h:141
LinearizedTrackState< 5 >::AlgebraicVectorN
ROOT::Math::SVector< double, N > AlgebraicVectorN
Definition: LinearizedTrackState.h:38
PerigeeMultiLTS::track
reco::TransientTrack track() const override
Definition: PerigeeMultiLTS.h:35
PerigeeMultiLTS::collapsedStateAvailable
bool collapsedStateAvailable
Definition: PerigeeMultiLTS.h:145
PerigeeMultiLTS::collapsedStateLT
RefCountedLinearizedTrackState collapsedStateLT
Definition: PerigeeMultiLTS.h:142
PerigeeLinearizedTrackState
Definition: PerigeeLinearizedTrackState.h:33
PerigeeMultiLTS::prepareCollapsedState
void prepareCollapsedState() const
Definition: PerigeeMultiLTS.cc:24