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.

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

Referenced by stateWithNewLinearizationPoint().

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 }
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
reco::TransientTrack theTrack
const TrajectoryStateOnSurface theTSOS
TrackCharge theCharge
Components const & components() const
GlobalPoint theLinPoint
LinearizedTrackStateFactory theLTSfactory
TrackCharge charge() const
reco::TransientTrack track() const override
std::vector< RefCountedLinearizedTrackState > ltComp

Member Function Documentation

◆ charge()

TrackCharge PerigeeMultiLTS::charge ( void  ) const
inlineoverridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 95 of file PerigeeMultiLTS.h.

References theCharge.

Referenced by createRefittedTrackState().

95 { return theCharge; }
TrackCharge theCharge

◆ checkParameters()

void PerigeeMultiLTS::checkParameters ( AlgebraicVector5 parameters) const
inlineoverride

Definition at line 150 of file PerigeeMultiLTS.cc.

References M_PI.

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

References ltComp.

122 { return ltComp; }
std::vector< RefCountedLinearizedTrackState > 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.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation().

34  {
37  return collapsedStateLT->constantTerm();
38 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

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

129  {
131  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
132  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
133 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
reco::TransientTrack theTrack
const MagneticField * field() const
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
TrackCharge charge() const override

◆ hasError()

bool PerigeeMultiLTS::hasError ( void  ) const
overridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 77 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

77  {
80  return collapsedStateLT->hasError();
81 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

References theLinPoint.

33 { return theLinPoint; }
GlobalPoint 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.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation().

52  {
55  return collapsedStateLT->momentumJacobian();
56 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

◆ operator==()

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

Definition at line 113 of file PerigeeMultiLTS.cc.

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

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 }
reco::TransientTrack theTrack
Common base class.
reco::TransientTrack track() const override

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

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

60  {
63  return collapsedStateLT->parametersFromExpansion();
64 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation().

43  {
46  return collapsedStateLT->positionJacobian();
47 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

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

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

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

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

101  {
104  return collapsedStateLT->predictedStateError();
105 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

107  {
110  return collapsedStateLT->predictedStateMomentumError();
111 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

89  {
92  return collapsedStateLT->predictedStateMomentumParameters();
93 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

83  {
86  return collapsedStateLT->predictedStateParameters();
87 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

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

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

95  {
98  return collapsedStateLT->predictedStateWeight(error);
99 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT

◆ prepareCollapsedState()

void PerigeeMultiLTS::prepareCollapsedState ( ) const
private

Linearize the collapsed track state.

Definition at line 24 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, LinearizedTrackStateFactory::linearizedTrackState(), theLinPoint, theLTSfactory, theTrack, and theTSOS.

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

24  {
27  }
29 }
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
reco::TransientTrack theTrack
const TrajectoryStateOnSurface theTSOS
GlobalPoint theLinPoint
LinearizedTrackStateFactory theLTSfactory
RefCountedLinearizedTrackState collapsedStateLT

◆ refittedParamFromEquation()

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

Definition at line 135 of file PerigeeMultiLTS.cc.

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

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

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

References theTSOS.

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

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

122  {
124 }
const TrajectoryStateOnSurface theTSOS
reco::TransientTrack track() const override
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState

◆ track()

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

Implements LinearizedTrackState< 5 >.

Definition at line 35 of file PerigeeMultiLTS.h.

References theTrack.

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

35 { return theTrack; }
reco::TransientTrack theTrack

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

References theTSOS, and TrajectoryStateOnSurface::weight().

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

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