CMS 3D CMS Logo

PerigeeMultiLTS Class Reference

Multi-state version of PerigeeLinearizedTrackState. More...

#include <RecoVertex/GaussianSumVertexFit/interface/PerigeeMultiLTS.h>

Inheritance diagram for PerigeeMultiLTS:

LinearizedTrackState< 5 > ReferenceCounted

List of all members.

Public Types

typedef
ReferenceCountingPointer
< LinearizedTrackState< 5 > > 
RefCountedLinearizedTrackState

Public Member Functions

TrackCharge charge () const
virtual void checkParameters (AlgebraicVector5 &parameters) const
virtual std::vector
< ReferenceCountingPointer
< LinearizedTrackState< 5 > > > 
components () const
 Vector of individual components in the mixture.
virtual const AlgebraicVectorNconstantTerm () const
 Method returning the constant term of the Taylor expansion of the measurement equation for the collapsed track state.
virtual
RefCountedRefittedTrackState 
createRefittedTrackState (const GlobalPoint &vertexPosition, const AlgebraicVectorM &vectorParameters, const AlgebraicSymMatrixOO &covarianceMatrix) const
 Creates the correct refitted state according to the results of the track refit.
bool hasError () const
const GlobalPointlinearizationPoint () const
 The point at which the track state has been linearized.
virtual const AlgebraicMatrixNMmomentumJacobian () const
 Method returning the Momentum Jacobian from the Taylor expansion (Matrix B) for the collapsed track state.
bool operator== (LinearizedTrackState< 5 > &other) const
virtual const AlgebraicVectorNparametersFromExpansion () const
 Method returning the parameters of the Taylor expansion for the collapsed track state.
virtual const AlgebraicMatrixN3positionJacobian () const
 Method returning the Position Jacobian from the Taylor expansion (Matrix A) for the collapsed track state.
const
TrajectoryStateClosestToPoint
predictedState () const
 Method returning the track state at the point of closest approach to the linearization point, in the transverse plane (a.k.a.
AlgebraicSymMatrixNN predictedStateError () const
 Method returning the covariance matrix of the track state at the transverse impact point, for the collapsed track state.
AlgebraicSymMatrixMM predictedStateMomentumError () const
 Method returning the momentum covariance matrix of the track state at the transverse impact point, for the collapsed track state.
virtual AlgebraicVectorM predictedStateMomentumParameters () const
 Method returning the momentum part of the parameters of the track state at the linearization point, for the collapsed track state.
AlgebraicVectorN predictedStateParameters () const
 Method returning the parameters of the track state at the transverse impact point, for the collapsed track state.
AlgebraicSymMatrixNN predictedStateWeight () const
 Method returning the weight matrix of the track state at the transverse impact point, for the collapsed track state.
virtual AlgebraicVector5 refittedParamFromEquation (const RefCountedRefittedTrackState &theRefittedState) const
 Method returning the parameters of the Taylor expansion evaluated with the refitted state.
const TrajectoryStateOnSurface state () const
 Returns theoriginal (multi-state) TrajectoryStateOnSurface whith which this instance has been created with.
virtual
RefCountedLinearizedTrackState 
stateWithNewLinearizationPoint (const GlobalPoint &newLP) const
 Returns a new linearized state with respect to a new linearization point.
virtual reco::TransientTrack track () const
virtual double weightInMixture () const
 The weight of this state.

Private Member Functions

 PerigeeMultiLTS (const GlobalPoint &linP, const reco::TransientTrack &track, const TrajectoryStateOnSurface &tsos)
 Constructor with the linearization point and the track.
void prepareCollapsedState () const
 Linearize the collapsed track state.

Private Attributes

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

Friends

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


Detailed Description

Multi-state version of PerigeeLinearizedTrackState.

Definition at line 14 of file PerigeeMultiLTS.h.


Member Typedef Documentation

typedef ReferenceCountingPointer<LinearizedTrackState<5> > PerigeeMultiLTS::RefCountedLinearizedTrackState

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:
linP The linearization point
track The RecTrack
tsos The original (multi-state) TrajectoryStateOnSurface

Definition at line 11 of file PerigeeMultiLTS.cc.

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

Referenced by stateWithNewLinearizationPoint().

00013      : theLinPoint(linP), theTrack(track), theTSOS(tsos),
00014        theCharge(theTrack.charge()), collapsedStateAvailable(false)
00015 {
00016   //Extract the TSOS components:
00017 
00018   vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
00019   //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
00020   ltComp.reserve(tsosComp.size());
00021   for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin();
00022         it != tsosComp.end(); it++) {
00023   // cout <<(*it).globalPosition()<<endl;
00024     ltComp.push_back(theLTSfactory.linearizedTrackState(theLinPoint, theTrack, *it ));
00025   }
00026 
00027 }


Member Function Documentation

TrackCharge PerigeeMultiLTS::charge ( void   )  const [inline, virtual]

Implements LinearizedTrackState< 5 >.

Definition at line 99 of file PerigeeMultiLTS.h.

References theCharge.

Referenced by createRefittedTrackState().

00099 {return theCharge;}

void PerigeeMultiLTS::checkParameters ( AlgebraicVector5 parameters  )  const [inline, virtual]

Definition at line 172 of file PerigeeMultiLTS.cc.

References python::trackProbabilityAnalysis_cff::parameters.

00173 {
00174   if (parameters(2) >  M_PI) parameters(2)-= 2*M_PI;
00175   if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
00176 }

virtual std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > PerigeeMultiLTS::components (  )  const [inline, virtual]

Vector of individual components in the mixture.

Implements LinearizedTrackState< 5 >.

Definition at line 128 of file PerigeeMultiLTS.h.

References ltComp.

00129                                       {return 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().

00043 {
00044   if (!collapsedStateAvailable) prepareCollapsedState();
00045   return collapsedStateLT->constantTerm();
00046 }

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.

Definition at line 143 of file PerigeeMultiLTS.cc.

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

00147 {
00148   PerigeeConversions perigeeConversions;
00149   TrajectoryStateClosestToPoint refittedTSCP =
00150         perigeeConversions.trajectoryStateClosestToPoint(
00151           vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
00152   return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP));
00153 }

bool PerigeeMultiLTS::hasError ( void   )  const [virtual]

Implements LinearizedTrackState< 5 >.

Definition at line 87 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

00088 {
00089   if (!collapsedStateAvailable) prepareCollapsedState();
00090   return collapsedStateLT->hasError();
00091 }

const GlobalPoint& PerigeeMultiLTS::linearizationPoint (  )  const [inline, virtual]

The point at which the track state has been linearized.

Implements LinearizedTrackState< 5 >.

Definition at line 38 of file PerigeeMultiLTS.h.

References theLinPoint.

00038 { return 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().

00061 {
00062   if (!collapsedStateAvailable) prepareCollapsedState();
00063   return collapsedStateLT->momentumJacobian();
00064 }

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

Definition at line 123 of file PerigeeMultiLTS.cc.

References theTrack, and track().

00124 {
00125   const PerigeeMultiLTS* otherP =
00126         dynamic_cast<const PerigeeMultiLTS*>(&other);
00127   if (otherP == 0) {
00128    throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
00129   }
00130   return (otherP->track() == theTrack);
00131 }

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().

00069 {
00070   if (!collapsedStateAvailable) prepareCollapsedState();
00071   return collapsedStateLT->parametersFromExpansion();
00072 }

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().

00052 {
00053   if (!collapsedStateAvailable) prepareCollapsedState();
00054   return collapsedStateLT->positionJacobian();
00055 }

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.

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

transverse impact point), for the collapsed track state

transverse impact point)

Definition at line 78 of file PerigeeMultiLTS.cc.

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

00079 {
00080   if (!collapsedStateAvailable) prepareCollapsedState();
00081   const PerigeeLinearizedTrackState* otherP =
00082         dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get());
00083   return otherP->predictedState();
00084 }

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().

00112 {
00113   if (!collapsedStateAvailable) prepareCollapsedState();
00114   return collapsedStateLT-> predictedStateError();
00115 }

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().

00118 {
00119   if (!collapsedStateAvailable) prepareCollapsedState();
00120   return collapsedStateLT->predictedStateMomentumError() ;
00121 }

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().

00100 {
00101   if (!collapsedStateAvailable) prepareCollapsedState();
00102   return collapsedStateLT->predictedStateMomentumParameters();
00103 }

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().

00094 {
00095   if (!collapsedStateAvailable) prepareCollapsedState();
00096   return collapsedStateLT->predictedStateParameters();
00097 }

AlgebraicSymMatrix55 PerigeeMultiLTS::predictedStateWeight (  )  const [virtual]

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

Implements LinearizedTrackState< 5 >.

Definition at line 105 of file PerigeeMultiLTS.cc.

References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().

00106 {
00107   if (!collapsedStateAvailable) prepareCollapsedState();
00108   return collapsedStateLT->predictedStateWeight() ;
00109 }

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 constantTerm(), hasError(), momentumJacobian(), parametersFromExpansion(), positionJacobian(), predictedState(), predictedStateError(), predictedStateMomentumError(), predictedStateMomentumParameters(), predictedStateParameters(), and predictedStateWeight().

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

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

00157 {
00158   AlgebraicVector3 vertexPosition;
00159   vertexPosition(0) = theRefittedState->position().x();
00160   vertexPosition(1) = theRefittedState->position().y();
00161   vertexPosition(2) = theRefittedState->position().z();
00162   AlgebraicVectorN param = constantTerm() + 
00163                        positionJacobian() * vertexPosition +
00164                        momentumJacobian() * theRefittedState->momentumVector();
00165   if (param(2) >  M_PI) param(2)-= 2*M_PI;
00166   if (param(2) < -M_PI) param(2)+= 2*M_PI;
00167 
00168   return param;
00169 }

const TrajectoryStateOnSurface PerigeeMultiLTS::state ( void   )  const [inline]

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

Definition at line 46 of file PerigeeMultiLTS.h.

References theTSOS.

00046 { return theTSOS; }

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().

00137 {
00138   return RefCountedLinearizedTrackState(
00139                 new PerigeeMultiLTS(newLP, track(), theTSOS));
00140 }

virtual reco::TransientTrack PerigeeMultiLTS::track ( void   )  const [inline, virtual]

Implements LinearizedTrackState< 5 >.

Definition at line 40 of file PerigeeMultiLTS.h.

References theTrack.

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

00040 { return theTrack; }

virtual double PerigeeMultiLTS::weightInMixture (  )  const [inline, virtual]

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 122 of file PerigeeMultiLTS.h.

References theTSOS, and TrajectoryStateOnSurface::weight().

00122 {return theTSOS.weight();}


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 [mutable, private]

Definition at line 155 of file PerigeeMultiLTS.h.

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

RefCountedLinearizedTrackState PerigeeMultiLTS::collapsedStateLT [mutable, private]

Definition at line 152 of file PerigeeMultiLTS.h.

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

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

Definition at line 151 of file PerigeeMultiLTS.h.

Referenced by components(), and PerigeeMultiLTS().

TrackCharge PerigeeMultiLTS::theCharge [private]

Definition at line 154 of file PerigeeMultiLTS.h.

Referenced by charge().

GlobalPoint PerigeeMultiLTS::theLinPoint [private]

Definition at line 146 of file PerigeeMultiLTS.h.

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

LinearizedTrackStateFactory PerigeeMultiLTS::theLTSfactory [private]

Definition at line 153 of file PerigeeMultiLTS.h.

Referenced by PerigeeMultiLTS(), and prepareCollapsedState().

reco::TransientTrack PerigeeMultiLTS::theTrack [private]

Definition at line 147 of file PerigeeMultiLTS.h.

Referenced by createRefittedTrackState(), operator==(), PerigeeMultiLTS(), prepareCollapsedState(), and track().

const TrajectoryStateOnSurface PerigeeMultiLTS::theTSOS [private]

Definition at line 150 of file PerigeeMultiLTS.h.

Referenced by PerigeeMultiLTS(), prepareCollapsedState(), state(), stateWithNewLinearizationPoint(), and weightInMixture().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:29:37 2009 for CMSSW by  doxygen 1.5.4