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 bool isValid () const
 
virtual bool operator== (LinearizedTrackState< N > &other) 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

Definition at line 19 of file PerigeeMultiLTS.h.

Constructor & Destructor Documentation

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 11 of file PerigeeMultiLTS.cc.

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

Referenced by components(), and stateWithNewLinearizationPoint().

13  : theLinPoint(linP), theTrack(track), theTSOS(tsos),
15 {
16  //Extract the TSOS components:
17 
18  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
19  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
20  ltComp.reserve(tsosComp.size());
21  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin();
22  it != tsosComp.end(); it++) {
23  // cout <<(*it).globalPosition()<<endl;
25  }
26 
27 }
reco::TransientTrack theTrack
const TrajectoryStateOnSurface theTSOS
TrackCharge theCharge
TrackCharge charge() const
GlobalPoint theLinPoint
LinearizedTrackStateFactory theLTSfactory
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
Components const & components() const
std::vector< RefCountedLinearizedTrackState > ltComp

Member Function Documentation

TrackCharge PerigeeMultiLTS::charge ( void  ) const
inlineoverridevirtual
void PerigeeMultiLTS::checkParameters ( AlgebraicVector5 parameters) const
inlineoverride

Definition at line 171 of file PerigeeMultiLTS.cc.

References M_PI.

Referenced by charge().

172 {
173  if (parameters(2) > M_PI) parameters(2)-= 2*M_PI;
174  if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
175 }
#define M_PI
std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > PerigeeMultiLTS::components ( ) const
inlineoverridevirtual

Vector of individual components in the mixture.

Implements LinearizedTrackState< 5 >.

Definition at line 129 of file PerigeeMultiLTS.h.

References ltComp, PerigeeMultiLTS(), prepareCollapsedState(), and track().

130  {return ltComp;}
std::vector< RefCountedLinearizedTrackState > ltComp
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 42 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation(), and state().

43 {
45  return collapsedStateLT->constantTerm();
46 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
PerigeeMultiLTS::RefCountedRefittedTrackState PerigeeMultiLTS::createRefittedTrackState ( const GlobalPoint vertexPosition,
const AlgebraicVectorM vectorParameters,
const AlgebraicSymMatrixOO covarianceMatrix 
) const
overridevirtual

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

Implements LinearizedTrackState< 5 >.

Definition at line 143 of file PerigeeMultiLTS.cc.

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

Referenced by charge().

147 {
148  TrajectoryStateClosestToPoint refittedTSCP =
150  vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
151  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
152 }
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
reco::TransientTrack theTrack
const MagneticField * field() const
TrackCharge charge() const override
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
bool PerigeeMultiLTS::hasError ( void  ) const
overridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 87 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by charge().

88 {
90  return collapsedStateLT->hasError();
91 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
const GlobalPoint& PerigeeMultiLTS::linearizationPoint ( ) const
inlineoverridevirtual

The point at which the track state has been linearized

Implements LinearizedTrackState< 5 >.

Definition at line 38 of file PerigeeMultiLTS.h.

References theLinPoint.

38 { return theLinPoint; }
GlobalPoint theLinPoint
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 60 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation(), and state().

61 {
63  return collapsedStateLT->momentumJacobian();
64 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
bool PerigeeMultiLTS::operator== ( LinearizedTrackState< 5 > &  other) const
override

Definition at line 123 of file PerigeeMultiLTS.cc.

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

Referenced by charge().

124 {
125  const PerigeeMultiLTS* otherP =
126  dynamic_cast<const PerigeeMultiLTS*>(&other);
127  if (otherP == nullptr) {
128  throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
129  }
130  return (otherP->track() == theTrack);
131 }
reco::TransientTrack theTrack
Common base class.
reco::TransientTrack track() const override
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 68 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by state().

69 {
71  return collapsedStateLT->parametersFromExpansion();
72 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 51 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by refittedParamFromEquation(), and state().

52 {
54  return collapsedStateLT->positionJacobian();
55 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 78 of file PerigeeMultiLTS.cc.

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

Referenced by state().

79 {
81  const PerigeeLinearizedTrackState* otherP =
82  dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
83  return otherP->predictedState();
84 }
const TrajectoryStateClosestToPoint & predictedState() const
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 111 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by state().

112 {
115 }
AlgebraicSymMatrixNN predictedStateError() const override
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 117 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by state().

118 {
120  return collapsedStateLT->predictedStateMomentumError() ;
121 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 99 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by state().

100 {
102  return collapsedStateLT->predictedStateMomentumParameters();
103 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 93 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by state().

94 {
96  return collapsedStateLT->predictedStateParameters();
97 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
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 105 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

Referenced by state().

106 {
108  return collapsedStateLT->predictedStateWeight(error) ;
109 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
void PerigeeMultiLTS::prepareCollapsedState ( ) const
private

Linearize the collapsed track state.

Definition at line 30 of file PerigeeMultiLTS.cc.

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

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

31 {
34  }
36 }
reco::TransientTrack theTrack
const TrajectoryStateOnSurface theTSOS
GlobalPoint theLinPoint
LinearizedTrackStateFactory theLTSfactory
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const override
RefCountedLinearizedTrackState collapsedStateLT
AlgebraicVector5 PerigeeMultiLTS::refittedParamFromEquation ( const RefCountedRefittedTrackState theRefittedState) const
overridevirtual

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

Implements LinearizedTrackState< 5 >.

Definition at line 154 of file PerigeeMultiLTS.cc.

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

Referenced by charge().

156 {
157  AlgebraicVector3 vertexPosition;
158  vertexPosition(0) = theRefittedState->position().x();
159  vertexPosition(1) = theRefittedState->position().y();
160  vertexPosition(2) = theRefittedState->position().z();
161  AlgebraicVectorN param = constantTerm() +
162  positionJacobian() * vertexPosition +
163  momentumJacobian() * theRefittedState->momentumVector();
164  if (param(2) > M_PI) param(2)-= 2*M_PI;
165  if (param(2) < -M_PI) param(2)+= 2*M_PI;
166 
167  return param;
168 }
ROOT::Math::SVector< double, N > AlgebraicVectorN
const AlgebraicMatrixN3 & positionJacobian() const override
ROOT::Math::SVector< double, 3 > AlgebraicVector3
const AlgebraicMatrixNM & momentumJacobian() const override
#define M_PI
const AlgebraicVectorN & constantTerm() const override
const TrajectoryStateOnSurface PerigeeMultiLTS::state ( ) const
inline
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 136 of file PerigeeMultiLTS.cc.

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

Referenced by operator==().

137 {
139  new PerigeeMultiLTS(newLP, track(), theTSOS));
140 }
const TrajectoryStateOnSurface theTSOS
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
reco::TransientTrack track() const override
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
reco::TransientTrack PerigeeMultiLTS::track ( ) const
inlineoverridevirtual

Implements LinearizedTrackState< 5 >.

Definition at line 40 of file PerigeeMultiLTS.h.

References theTrack.

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

40 { return theTrack; }
reco::TransientTrack theTrack
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 123 of file PerigeeMultiLTS.h.

References theTSOS, and TrajectoryStateOnSurface::weight().

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

Friends And Related Function Documentation

friend class MultiPerigeeLTSFactory
friend

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

Definition at line 24 of file PerigeeMultiLTS.h.

Member Data Documentation

bool PerigeeMultiLTS::collapsedStateAvailable
mutableprivate
RefCountedLinearizedTrackState PerigeeMultiLTS::collapsedStateLT
mutableprivate
std::vector<RefCountedLinearizedTrackState> PerigeeMultiLTS::ltComp
private

Definition at line 152 of file PerigeeMultiLTS.h.

Referenced by components(), and PerigeeMultiLTS().

TrackCharge PerigeeMultiLTS::theCharge
private

Definition at line 155 of file PerigeeMultiLTS.h.

Referenced by charge().

GlobalPoint PerigeeMultiLTS::theLinPoint
private

Definition at line 147 of file PerigeeMultiLTS.h.

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

LinearizedTrackStateFactory PerigeeMultiLTS::theLTSfactory
private

Definition at line 154 of file PerigeeMultiLTS.h.

Referenced by PerigeeMultiLTS(), and prepareCollapsedState().

reco::TransientTrack PerigeeMultiLTS::theTrack
private
const TrajectoryStateOnSurface PerigeeMultiLTS::theTSOS
private