CMS 3D CMS Logo

Public Types | Public Member Functions | Private Types

reco::GhostTrackState Class Reference

#include <GhostTrackState.h>

Inheritance diagram for reco::GhostTrackState:
ProxyBase< T, Cloner >

List of all members.

Public Types

typedef
BasicGhostTrackState::CovarianceMatrix 
CovarianceMatrix
typedef
BasicGhostTrackState::Vertex 
Vertex

Public Member Functions

double axisDistance (const GlobalPoint &point, const GlobalVector &dir) const
double axisDistance (const GhostTrackPrediction &pred) const
CovarianceMatrix cartesianCovariance () const
GlobalError cartesianError () const
double flightDistance (const GlobalPoint &point, const GlobalVector &dir) const
 GhostTrackState (const VertexState &state)
 GhostTrackState (const GlobalPoint &pos, const CovarianceMatrix &cov)
 GhostTrackState (const TransientTrack &track)
 GhostTrackState (const GlobalPoint &pos, const GlobalError &error)
GlobalPoint globalPosition () const
bool isTrack () const
bool isValid () const
bool isVertex () const
double lambda () const
double lambdaError (const GhostTrackPrediction &pred, const GlobalError &pvError=GlobalError()) const
bool linearize (const GhostTrackPrediction &pred, bool initial=false, double lambda=0.)
bool linearize (const GhostTrackPrediction &pred, double lambda)
void reset ()
void setWeight (double weight)
const TransientTracktrack () const
const TrajectoryStateOnSurfacetsos () const
Vertex vertexStateOnGhostTrack (const GhostTrackPrediction &pred, bool withMeasurementError=true) const
Vertex vertexStateOnMeasurement (const GhostTrackPrediction &pred, bool withGhostTrackError=true) const
double weight () const

Private Types

typedef BasicGhostTrackState::Proxy Base

Detailed Description

Definition at line 21 of file GhostTrackState.h.


Member Typedef Documentation

Definition at line 22 of file GhostTrackState.h.

Definition at line 25 of file GhostTrackState.h.

Definition at line 26 of file GhostTrackState.h.


Constructor & Destructor Documentation

GhostTrackState::GhostTrackState ( const TransientTrack track)

Definition at line 35 of file GhostTrackState.cc.

                                                            :
        Base(new TrackGhostTrackState(track))
{
}
GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const CovarianceMatrix cov 
)

Definition at line 40 of file GhostTrackState.cc.

                                                              :
        Base(new VertexGhostTrackState(pos, cov))
{
}
GhostTrackState::GhostTrackState ( const GlobalPoint pos,
const GlobalError error 
)

Definition at line 46 of file GhostTrackState.cc.

                                                           :
        Base(new VertexGhostTrackState(pos, error.matrix_new()))
{
}
GhostTrackState::GhostTrackState ( const VertexState state)

Definition at line 52 of file GhostTrackState.cc.

                                                         :
        Base(new VertexGhostTrackState(state.position(),
                                       state.error().matrix_new()))
{
}

Member Function Documentation

double GhostTrackState::axisDistance ( const GlobalPoint point,
const GlobalVector dir 
) const

Definition at line 94 of file GhostTrackState.cc.

References globalPosition(), and mag().

Referenced by axisDistance().

{
        return (globalPosition() - point).cross(dir.unit()).mag();
}
double GhostTrackState::axisDistance ( const GhostTrackPrediction pred) const
CovarianceMatrix reco::GhostTrackState::cartesianCovariance ( ) const [inline]

Definition at line 38 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

{ return data().cartesianCovariance(); }
GlobalError reco::GhostTrackState::cartesianError ( ) const [inline]

Definition at line 37 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by vertexAtState().

{ return data().cartesianError(); }
double GhostTrackState::flightDistance ( const GlobalPoint point,
const GlobalVector dir 
) const

Definition at line 88 of file GhostTrackState.cc.

References globalPosition().

{
        return (globalPosition() - point).dot(dir.unit());
}
GlobalPoint reco::GhostTrackState::globalPosition ( ) const [inline]

Definition at line 36 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by axisDistance(), flightDistance(), and vertexAtState().

{ return data().globalPosition(); }
bool GhostTrackState::isTrack ( ) const

Definition at line 58 of file GhostTrackState.cc.

References ProxyBase< T, Cloner >::data().

{
        return dynamic_cast<const TrackGhostTrackState*>(&data()) != 0;
}
bool reco::GhostTrackState::isValid ( void  ) const [inline]
bool GhostTrackState::isVertex ( ) const

Definition at line 63 of file GhostTrackState.cc.

References ProxyBase< T, Cloner >::data().

{
        return dynamic_cast<const VertexGhostTrackState*>(&data()) != 0;
}
double reco::GhostTrackState::lambda ( ) const [inline]

Definition at line 40 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by reco::PositiveSideGhostTrackFitter::fit(), linearize(), and vertexAtState().

{ return data().lambda(); }
double GhostTrackState::lambdaError ( const GhostTrackPrediction pred,
const GlobalError pvError = GlobalError() 
) const

Definition at line 105 of file GhostTrackState.cc.

References conv, reco::GhostTrackPrediction::direction(), isValid(), GlobalErrorBase< T, ErrorWeightType >::matrix_new(), reco::GhostTrackPrediction::rho2(), mathSSE::sqrt(), and vertexStateOnGhostTrack().

{
        if (!isValid())
                return -1.;

        return std::sqrt(
                ROOT::Math::Similarity(
                        conv(pred.direction()),
                        (vertexStateOnGhostTrack(pred).second.matrix_new() +
                         pvError.matrix_new()))
                / pred.rho2());
}
bool reco::GhostTrackState::linearize ( const GhostTrackPrediction pred,
double  lambda 
) [inline]

Definition at line 51 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::unsharedData().

        { return unsharedData().linearize(pred, lambda); }
bool reco::GhostTrackState::linearize ( const GhostTrackPrediction pred,
bool  initial = false,
double  lambda = 0. 
) [inline]
void reco::GhostTrackState::reset ( void  ) [inline]

Definition at line 47 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::unsharedData().

{ unsharedData().reset(); }
void reco::GhostTrackState::setWeight ( double  weight) [inline]
const TransientTrack & GhostTrackState::track ( void  ) const

Definition at line 78 of file GhostTrackState.cc.

References ProxyBase< T, Cloner >::data(), getTrack(), and reco::TrackGhostTrackState::track().

Referenced by vertexAtState().

{
        return getTrack(&data())->track();
}
const TrajectoryStateOnSurface & GhostTrackState::tsos ( ) const

Definition at line 83 of file GhostTrackState.cc.

References ProxyBase< T, Cloner >::data(), getTrack(), and reco::TrackGhostTrackState::tsos().

{
        return getTrack(&data())->tsos();
}
Vertex reco::GhostTrackState::vertexStateOnGhostTrack ( const GhostTrackPrediction pred,
bool  withMeasurementError = true 
) const [inline]

Definition at line 60 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by lambdaError().

        { return data().vertexStateOnGhostTrack(pred, withMeasurementError); }
Vertex reco::GhostTrackState::vertexStateOnMeasurement ( const GhostTrackPrediction pred,
bool  withGhostTrackError = true 
) const [inline]

Definition at line 64 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

        { return data().vertexStateOnMeasurement(pred, withGhostTrackError); }
double reco::GhostTrackState::weight ( void  ) const [inline]

Definition at line 68 of file GhostTrackState.h.

References ProxyBase< T, Cloner >::data().

Referenced by reco::PositiveSideGhostTrackFitter::fit(), and reco::KalmanGhostTrackUpdater::update().

{ return data().weight(); }