CMS 3D CMS Logo

Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends

PerigeeMultiLTS Class Reference

#include <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
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
TrajectoryStateClosestToPoint
predictedState () 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

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
< RefCountedLinearizedTrackState
ltComp
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.

     : theLinPoint(linP), theTrack(track), theTSOS(tsos),
       theCharge(theTrack.charge()), collapsedStateAvailable(false)
{
  //Extract the TSOS components:

  vector<TrajectoryStateOnSurface> tsosComp = theTSOS.components();
  //cout << "PerigeeMultiLTS components: "<<tsosComp.size()<<endl;
  ltComp.reserve(tsosComp.size());
  for (vector<TrajectoryStateOnSurface>::iterator it = tsosComp.begin();
        it != tsosComp.end(); it++) {
  // cout <<(*it).globalPosition()<<endl;
    ltComp.push_back(theLTSfactory.linearizedTrackState(theLinPoint, theTrack, *it ));
  }

}

Member Function Documentation

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

Implements LinearizedTrackState< 5 >.

Definition at line 100 of file PerigeeMultiLTS.h.

References theCharge.

Referenced by createRefittedTrackState().

{return theCharge;}
void PerigeeMultiLTS::checkParameters ( AlgebraicVector5 parameters) const [inline, virtual]

Definition at line 172 of file PerigeeMultiLTS.cc.

References M_PI, and Parameters::parameters.

{
  if (parameters(2) >  M_PI) parameters(2)-= 2*M_PI;
  if (parameters(2) < -M_PI) parameters(2)+= 2*M_PI;
}
virtual std::vector<ReferenceCountingPointer<LinearizedTrackState<5> > > PerigeeMultiLTS::components ( ) const [inline, virtual]

Vector of individual components in the mixture.

Implements LinearizedTrackState< 5 >.

Definition at line 129 of file PerigeeMultiLTS.h.

References ltComp.

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

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->constantTerm();
}
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().

{
  PerigeeConversions perigeeConversions;
  TrajectoryStateClosestToPoint refittedTSCP =
        perigeeConversions.trajectoryStateClosestToPoint(
          vectorParameters, vertexPosition, charge(), covarianceMatrix, theTrack.field());
  return RefCountedRefittedTrackState(new PerigeeRefittedTrackState(refittedTSCP, vectorParameters));
}
bool PerigeeMultiLTS::hasError ( void  ) const [virtual]
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.

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

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->momentumJacobian();
}
bool PerigeeMultiLTS::operator== ( LinearizedTrackState< 5 > &  other) const

Definition at line 123 of file PerigeeMultiLTS.cc.

References theTrack, and track().

{
  const PerigeeMultiLTS* otherP =
        dynamic_cast<const PerigeeMultiLTS*>(&other);
  if (otherP == 0) {
   throw VertexException("PerigeeMultiLTS: don't know how to compare myself to non-perigee track state");
  }
  return (otherP->track() == theTrack);
}
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().

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->parametersFromExpansion();
}
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().

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->positionJacobian();
}
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().

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

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

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->predictedStateMomentumError() ;
}
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().

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->predictedStateMomentumParameters();
}
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().

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->predictedStateParameters();
}
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().

{
  if (!collapsedStateAvailable) prepareCollapsedState();
  return collapsedStateLT->predictedStateWeight(error) ;
}
void PerigeeMultiLTS::prepareCollapsedState ( ) const [private]
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(), M_PI, momentumJacobian(), and positionJacobian().

{
  AlgebraicVector3 vertexPosition;
  vertexPosition(0) = theRefittedState->position().x();
  vertexPosition(1) = theRefittedState->position().y();
  vertexPosition(2) = theRefittedState->position().z();
  AlgebraicVectorN param = constantTerm() + 
                       positionJacobian() * vertexPosition +
                       momentumJacobian() * theRefittedState->momentumVector();
  if (param(2) >  M_PI) param(2)-= 2*M_PI;
  if (param(2) < -M_PI) param(2)+= 2*M_PI;

  return param;
}
const TrajectoryStateOnSurface PerigeeMultiLTS::state ( ) 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.

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

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

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

References theTSOS, and TrajectoryStateOnSurface::weight().

{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

Definition at line 152 of file PerigeeMultiLTS.h.

Referenced by components(), and PerigeeMultiLTS().

Definition at line 155 of file PerigeeMultiLTS.h.

Referenced by charge().

Definition at line 147 of file PerigeeMultiLTS.h.

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

Definition at line 154 of file PerigeeMultiLTS.h.

Referenced by PerigeeMultiLTS(), and prepareCollapsedState().

Definition at line 151 of file PerigeeMultiLTS.h.

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