CMS 3D CMS Logo

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

MultiTrajectoryStateTransform Class Reference

#include <MultiTrajectoryStateTransform.h>

List of all members.

Public Member Functions

TrajectoryStateOnSurface extrapolatedState (const TrajectoryStateOnSurface tsos, const GlobalPoint &point) const
bool innerMomentumFromMode (const reco::GsfTrack &tk, GlobalVector &momentum) const
TrajectoryStateOnSurface innerStateOnSurface (const reco::GsfTrack &tk, const TrackingGeometry &geom, const MagneticField *field) const
TrajectoryStateOnSurface innerStateOnSurface (const reco::GsfTrack &tk) const
 MultiTrajectoryStateTransform ()
 MultiTrajectoryStateTransform (const TrackingGeometry *geom, const MagneticField *field)
bool outerMomentumFromMode (const reco::GsfTrack &tk, GlobalVector &momentum) const
TrajectoryStateOnSurface outerStateOnSurface (const reco::GsfTrack &tk, const TrackingGeometry &geom, const MagneticField *field) const
TrajectoryStateOnSurface outerStateOnSurface (const reco::GsfTrack &tk) const
 ~MultiTrajectoryStateTransform ()

Private Types

enum  { dimension = reco::GsfTrackExtra::dimension }
typedef
reco::GsfTrackExtra::LocalCovarianceMatrix 
CovarianceMatrix
typedef
reco::GsfTrackExtra::LocalParameterVector 
ParameterVector

Private Member Functions

bool checkExtrapolator () const
bool checkGeometry () const
TrajectoryStateOnSurface stateOnSurface (const std::vector< double > &weights, const std::vector< ParameterVector > &parameters, const std::vector< CovarianceMatrix > &covariances, const double &pzSign, const Surface &surface, const MagneticField *field) const

Private Attributes

TransverseImpactPointExtrapolatorextrapolator_
const MagneticFieldfield_
const TrackingGeometrygeometry_

Detailed Description

Definition at line 18 of file MultiTrajectoryStateTransform.h.


Member Typedef Documentation

Definition at line 21 of file MultiTrajectoryStateTransform.h.

Definition at line 20 of file MultiTrajectoryStateTransform.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
dimension 

Definition at line 22 of file MultiTrajectoryStateTransform.h.


Constructor & Destructor Documentation

MultiTrajectoryStateTransform::MultiTrajectoryStateTransform ( ) [inline]

Default constructor (deprecated) -> ES components have to be passed explicitely

Definition at line 27 of file MultiTrajectoryStateTransform.h.

                                   :
  geometry_(0), field_(0), extrapolator_(0) {}
MultiTrajectoryStateTransform::MultiTrajectoryStateTransform ( const TrackingGeometry geom,
const MagneticField field 
) [inline]

Constructor from geometry and magnetic field

Definition at line 30 of file MultiTrajectoryStateTransform.h.

                                                                                           :
  geometry_(geom), field_(field), extrapolator_(0) {}
MultiTrajectoryStateTransform::~MultiTrajectoryStateTransform ( )

Destructor

Definition at line 17 of file MultiTrajectoryStateTransform.cc.

References extrapolator_.

{delete extrapolator_;}

Member Function Documentation

bool MultiTrajectoryStateTransform::checkExtrapolator ( ) const [private]

On-demand creation of a TransverseImpactPointExtrapolator

Definition at line 127 of file MultiTrajectoryStateTransform.cc.

References AnalyticalPropagator_cfi::AnalyticalPropagator, anyDirection, extrapolator_, and field_.

Referenced by extrapolatedState().

{
  if ( extrapolator_ )  return true;

  if ( field_==0 ) {
    edm::LogError("MultiTrajectoryStateTransform") << "Missing magnetic field";
    return false;
  }

  GsfPropagatorAdapter gsfPropagator(AnalyticalPropagator(field_,anyDirection));
  extrapolator_ = new TransverseImpactPointExtrapolator(gsfPropagator);
  return true;
}
bool MultiTrajectoryStateTransform::checkGeometry ( ) const [private]

Verification of the presence of geometry and field

Definition at line 111 of file MultiTrajectoryStateTransform.cc.

References field_, and geometry_.

Referenced by innerStateOnSurface(), and outerStateOnSurface().

{
  if ( geometry_ && field_ )  return true;

  edm::LogError("MultiTrajectoryStateTransform") << "Missing ES components";
  return false;
}
TrajectoryStateOnSurface MultiTrajectoryStateTransform::extrapolatedState ( const TrajectoryStateOnSurface  tsos,
const GlobalPoint point 
) const
bool MultiTrajectoryStateTransform::innerMomentumFromMode ( const reco::GsfTrack tk,
GlobalVector momentum 
) const

Momentum vector from mode corresponding to the innermost state. Returns true for success.

Definition at line 39 of file MultiTrajectoryStateTransform.cc.

References MultiTrajectoryStateMode::momentumFromModeCartesian(), and outerStateOnSurface().

TrajectoryStateOnSurface MultiTrajectoryStateTransform::innerStateOnSurface ( const reco::GsfTrack tk) const
TrajectoryStateOnSurface MultiTrajectoryStateTransform::innerStateOnSurface ( const reco::GsfTrack tk,
const TrackingGeometry geom,
const MagneticField field 
) const

TrajectoryStateOnSurface from the innermost state of a reco::GsfTrack passing geometry and magnetic field (deprecated: use field from constructor)

Definition at line 61 of file MultiTrajectoryStateTransform.cc.

References reco::Track::extra(), reco::GsfTrack::gsfExtra(), TrackingGeometry::idToDet(), stateOnSurface(), and GeomDet::surface().

{
  const Surface& surface = geom.idToDet( DetId( tk.extra()->innerDetId()))->surface();

  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
  return stateOnSurface(extra->innerStateWeights(),
                        extra->innerStateLocalParameters(),
                        extra->innerStateCovariances(),
                        extra->innerStateLocalPzSign(),
                        surface,field);
}
bool MultiTrajectoryStateTransform::outerMomentumFromMode ( const reco::GsfTrack tk,
GlobalVector momentum 
) const

Momentum vector from mode corresponding to the outermost state

Definition at line 32 of file MultiTrajectoryStateTransform.cc.

References MultiTrajectoryStateMode::momentumFromModeCartesian(), and outerStateOnSurface().

TrajectoryStateOnSurface MultiTrajectoryStateTransform::outerStateOnSurface ( const reco::GsfTrack tk) const
TrajectoryStateOnSurface MultiTrajectoryStateTransform::outerStateOnSurface ( const reco::GsfTrack tk,
const TrackingGeometry geom,
const MagneticField field 
) const

TrajectoryStateOnSurface from the outermost state of a reco::GsfTrack passing geometry and magnetic field (deprecated: use field from constructor)

Definition at line 46 of file MultiTrajectoryStateTransform.cc.

References reco::Track::extra(), reco::GsfTrack::gsfExtra(), TrackingGeometry::idToDet(), stateOnSurface(), and GeomDet::surface().

{
  const Surface& surface = geom.idToDet( DetId( tk.extra()->outerDetId()))->surface();

  const reco::GsfTrackExtraRef& extra(tk.gsfExtra());
  return stateOnSurface(extra->outerStateWeights(),
                        extra->outerStateLocalParameters(),
                        extra->outerStateCovariances(),
                        extra->outerStateLocalPzSign(),
                        surface,field);
}
TrajectoryStateOnSurface MultiTrajectoryStateTransform::stateOnSurface ( const std::vector< double > &  weights,
const std::vector< ParameterVector > &  parameters,
const std::vector< CovarianceMatrix > &  covariances,
const double &  pzSign,
const Surface surface,
const MagneticField field 
) const [private]

TSOS from a mixture in local parameters

Definition at line 76 of file MultiTrajectoryStateTransform.cc.

References makeMuonMisalignmentScenario::components, dimension, i, and asciidump::le.

Referenced by innerStateOnSurface(), and outerStateOnSurface().

{
  if ( weights.empty() )  return TrajectoryStateOnSurface();
  
  unsigned int nc(weights.size());
  AlgebraicVector5 pars;
  AlgebraicSymMatrix55 cov;
  
  std::vector<TrajectoryStateOnSurface> components;
  components.reserve(nc);
  
  // create components TSOSs
  for ( unsigned int i=0; i<nc; i++ ) {
    // convert parameter vector and covariance matrix
    for ( unsigned int j1=0; j1<dimension; j1++ ) {
      pars[j1] = parameters[i](j1);
      for ( unsigned int j2=0; j2<=j1; j2++ ) 
        cov(j1,j2) = covariances[i](j1,j2);          //FIXME: SMatrix copy constructor should handle this!!
    }
    // create local parameters & errors
    LocalTrajectoryParameters lp(pars,pzSign);
    LocalTrajectoryError le(cov);
    // create component
    components.push_back(TrajectoryStateOnSurface(lp,le,surface,field,weights[i]));
  }
  return 
    TrajectoryStateOnSurface(new BasicMultiTrajectoryState(components));
}

Member Data Documentation