#include <PerigeeMultiLTS.h>
Multi-state version of PerigeeLinearizedTrackState
Definition at line 14 of file PerigeeMultiLTS.h.
typedef ReferenceCountingPointer<LinearizedTrackState<5> > PerigeeMultiLTS::RefCountedLinearizedTrackState |
Definition at line 19 of file PerigeeMultiLTS.h.
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.
linP | The linearization point |
track | The RecTrack |
tsos | The 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 )); } }
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] |
Implements LinearizedTrackState< 5 >.
Definition at line 87 of file PerigeeMultiLTS.cc.
References collapsedStateAvailable, collapsedStateLT, and prepareCollapsedState().
{ if (!collapsedStateAvailable) prepareCollapsedState(); return collapsedStateLT->hasError(); }
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().
{ if (!collapsedStateAvailable) prepareCollapsedState(); const PerigeeLinearizedTrackState* otherP = dynamic_cast<const PerigeeLinearizedTrackState*>(collapsedStateLT.get()); return otherP->predictedState(); }
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().
{ if (!collapsedStateAvailable) prepareCollapsedState(); return collapsedStateLT-> predictedStateError(); }
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] |
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().
{ if (!collapsedStateAvailable) { collapsedStateLT = theLTSfactory.linearizedTrackState(theLinPoint, theTrack, theTSOS); } collapsedStateAvailable = true; }
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.
{ return RefCountedLinearizedTrackState( new PerigeeMultiLTS(newLP, track(), theTSOS)); }
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().
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.
bool PerigeeMultiLTS::collapsedStateAvailable [mutable, private] |
Definition at line 156 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 153 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 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().
Definition at line 154 of file PerigeeMultiLTS.h.
Referenced by PerigeeMultiLTS(), and prepareCollapsedState().
Definition at line 148 of file PerigeeMultiLTS.h.
Referenced by createRefittedTrackState(), operator==(), PerigeeMultiLTS(), prepareCollapsedState(), and track().
const TrajectoryStateOnSurface PerigeeMultiLTS::theTSOS [private] |
Definition at line 151 of file PerigeeMultiLTS.h.
Referenced by PerigeeMultiLTS(), prepareCollapsedState(), state(), and weightInMixture().