#include <MultiTrajectoryStateTransform.h>
Definition at line 18 of file MultiTrajectoryStateTransform.h.
typedef reco::GsfTrackExtra::LocalCovarianceMatrix MultiTrajectoryStateTransform::CovarianceMatrix [private] |
Definition at line 21 of file MultiTrajectoryStateTransform.h.
typedef reco::GsfTrackExtra::LocalParameterVector MultiTrajectoryStateTransform::ParameterVector [private] |
Definition at line 20 of file MultiTrajectoryStateTransform.h.
anonymous enum [private] |
Definition at line 22 of file MultiTrajectoryStateTransform.h.
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_;}
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 |
Extrapolation to a point using the TransverseImpactPointExtrapolator
Definition at line 120 of file MultiTrajectoryStateTransform.cc.
References checkExtrapolator(), TransverseImpactPointExtrapolator::extrapolate(), and extrapolator_.
Referenced by GsfElectronAlgo::ElectronData::calculateTSOS(), GsfElectronAlgo::ElectronData::getEleBasicCluster(), and EgammaHLTPixelMatchElectronAlgo::process().
{ return checkExtrapolator() ? extrapolator_->extrapolate(tsos,point) : TrajectoryStateOnSurface(); }
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().
{ return MultiTrajectoryStateMode().momentumFromModeCartesian(outerStateOnSurface(tk),momentum); }
TrajectoryStateOnSurface MultiTrajectoryStateTransform::innerStateOnSurface | ( | const reco::GsfTrack & | tk | ) | const |
TrajectoryStateOnSurface from the innermost state of a reco::GsfTrack
Definition at line 26 of file MultiTrajectoryStateTransform.cc.
References checkGeometry(), field_, and geometry_.
Referenced by PFTrackTransformer::addPointsAndBrems(), GsfElectronAlgo::ElectronData::calculateTSOS(), GsfConstraintAtVertex::constrainAtPoint(), reco::GsfTransientTrack::innermostMeasurementState(), EgammaHLTPixelMatchElectronAlgo::process(), and PFElecTkProducer::resolveGsfTracks().
{ return checkGeometry() ? innerStateOnSurface(tk,*geometry_,field_) : TrajectoryStateOnSurface(); }
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().
{ return MultiTrajectoryStateMode().momentumFromModeCartesian(outerStateOnSurface(tk),momentum); }
TrajectoryStateOnSurface MultiTrajectoryStateTransform::outerStateOnSurface | ( | const reco::GsfTrack & | tk | ) | const |
TrajectoryStateOnSurface from the outermost state of a reco::GsfTrack
Definition at line 20 of file MultiTrajectoryStateTransform.cc.
References checkGeometry(), field_, and geometry_.
Referenced by PFTrackTransformer::addPointsAndBrems(), GsfElectronAlgo::ElectronData::calculateTSOS(), GsfElectronAlgo::ElectronData::getEleBasicCluster(), innerMomentumFromMode(), outerMomentumFromMode(), and reco::GsfTransientTrack::outermostMeasurementState().
{ return checkGeometry() ? outerStateOnSurface(tk,*geometry_,field_) : TrajectoryStateOnSurface(); }
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)); }
TransverseImpactPointExtrapolator* MultiTrajectoryStateTransform::extrapolator_ [mutable, private] |
Definition at line 77 of file MultiTrajectoryStateTransform.h.
Referenced by checkExtrapolator(), extrapolatedState(), and ~MultiTrajectoryStateTransform().
const MagneticField* MultiTrajectoryStateTransform::field_ [private] |
Definition at line 76 of file MultiTrajectoryStateTransform.h.
Referenced by checkExtrapolator(), checkGeometry(), innerStateOnSurface(), and outerStateOnSurface().
const TrackingGeometry* MultiTrajectoryStateTransform::geometry_ [private] |
Definition at line 75 of file MultiTrajectoryStateTransform.h.
Referenced by checkGeometry(), innerStateOnSurface(), and outerStateOnSurface().