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
 
virtual void checkParameters (AlgebraicVector5 &parameters) const
 
virtual std::vector< ReferenceCountingPointer< LinearizedTrackState< 5 > > > components () const
 
virtual const AlgebraicVectorNconstantTerm () const
 
virtual RefCountedRefittedTrackState createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const
 
bool hasError () const
 
const GlobalPointlinearizationPoint () const
 
virtual const AlgebraicMatrixNMmomentumJacobian () const
 
bool operator== (LinearizedTrackState< 5 > &other) const
 
virtual const AlgebraicVectorNparametersFromExpansion () const
 
virtual const AlgebraicMatrixN3positionJacobian () const
 
const TrajectoryStateClosestToPointpredictedState () const
 
AlgebraicSymMatrixNN predictedStateError () const
 
AlgebraicSymMatrixMM predictedStateMomentumError () const
 
virtual AlgebraicVectorM predictedStateMomentumParameters () const
 
AlgebraicVectorN predictedStateParameters () const
 
AlgebraicSymMatrixNN predictedStateWeight (int &error) const
 
virtual AlgebraicVector5 refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const
 
const TrajectoryStateOnSurface state () const
 
virtual RefCountedLinearizedTrackState stateWithNewLinearizationPoint (const GlobalPoint &newLP) const
 
virtual reco::TransientTrack track () const
 
virtual double weightInMixture () const
 
- 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
 
virtual ~LinearizedTrackState ()
 

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
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const
GlobalPoint theLinPoint
LinearizedTrackStateFactory theLTSfactory
Components const & components() const
std::vector< RefCountedLinearizedTrackState > ltComp

Member Function Documentation

TrackCharge PerigeeMultiLTS::charge ( void  ) const
inlinevirtual
void PerigeeMultiLTS::checkParameters ( AlgebraicVector5 parameters) const
inlinevirtual

Definition at line 171 of file PerigeeMultiLTS.cc.

References M_PI, and metProducer_cfi::parameters.

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
virtual std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > PerigeeMultiLTS::components ( ) const
inlinevirtual

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
virtual

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
virtual

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
ReferenceCountingPointer< RefittedTrackState< N > > RefCountedRefittedTrackState
TrackCharge charge() const
bool PerigeeMultiLTS::hasError ( void  ) const
virtual

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
inlinevirtual

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
virtual

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

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 == 0) {
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.
virtual reco::TransientTrack track() const
const AlgebraicVector5 & PerigeeMultiLTS::parametersFromExpansion ( ) const
virtual

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
virtual

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
virtual

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 }
void prepareCollapsedState() const
RefCountedLinearizedTrackState collapsedStateLT
AlgebraicSymMatrixNN predictedStateError() const
AlgebraicSymMatrix33 PerigeeMultiLTS::predictedStateMomentumError ( ) const
virtual

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
virtual

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
virtual

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
virtual

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
RefCountedLinearizedTrackState linearizedTrackState(const GlobalPoint &linP, const reco::TransientTrack &track) const
GlobalPoint theLinPoint
LinearizedTrackStateFactory theLTSfactory
RefCountedLinearizedTrackState collapsedStateLT
AlgebraicVector5 PerigeeMultiLTS::refittedParamFromEquation ( const RefCountedRefittedTrackState theRefittedState) const
virtual

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 }
virtual const AlgebraicVectorN & constantTerm() const
ROOT::Math::SVector< double, N > AlgebraicVectorN
virtual const AlgebraicMatrixNM & momentumJacobian() const
virtual const AlgebraicMatrixN3 & positionJacobian() const
ROOT::Math::SVector< double, 3 > AlgebraicVector3
#define M_PI
const TrajectoryStateOnSurface PerigeeMultiLTS::state ( ) const
inline
PerigeeMultiLTS::RefCountedLinearizedTrackState PerigeeMultiLTS::stateWithNewLinearizationPoint ( const GlobalPoint newLP) const
virtual

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
virtual reco::TransientTrack track() const
PerigeeMultiLTS(const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
ReferenceCountingPointer< LinearizedTrackState< 5 > > RefCountedLinearizedTrackState
virtual reco::TransientTrack PerigeeMultiLTS::track ( ) const
inlinevirtual

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
virtual double PerigeeMultiLTS::weightInMixture ( ) const
inlinevirtual

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