#include <VolumeMaterialEffectsUpdator.h>
Public Types | |
typedef VolumeMaterialEffectsEstimate | Estimate |
typedef std::vector< const VolumeMaterialEffectsEstimate * > | EstimateContainer |
Public Member Functions | |
TrajectoryStateOnSurface | updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const Estimate &estimate) const |
TrajectoryStateOnSurface | updateState (const TrajectoryStateOnSurface &TSoS, const PropagationDirection propDir, const EstimateContainer &estimates) const |
VolumeMaterialEffectsUpdator () |
Computes an updated TrajectoryStateOnSurface after applying estimated material effects.
Definition at line 16 of file VolumeMaterialEffectsUpdator.h.
Definition at line 19 of file VolumeMaterialEffectsUpdator.h.
typedef std::vector<const VolumeMaterialEffectsEstimate*> VolumeMaterialEffectsUpdator::EstimateContainer |
Definition at line 20 of file VolumeMaterialEffectsUpdator.h.
VolumeMaterialEffectsUpdator::VolumeMaterialEffectsUpdator | ( | ) | [inline] |
Definition at line 23 of file VolumeMaterialEffectsUpdator.h.
{}
TrajectoryStateOnSurface VolumeMaterialEffectsUpdator::updateState | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir, | ||
const Estimate & | estimate | ||
) | const |
Updates TrajectoryStateOnSurface with material effects (momentum and covariance matrix are potentially affected.
Definition at line 12 of file VolumeMaterialEffectsUpdator.cc.
{ return updateState(tsos,propDir,EstimateContainer(1,&estimate)); }
TrajectoryStateOnSurface VolumeMaterialEffectsUpdator::updateState | ( | const TrajectoryStateOnSurface & | TSoS, |
const PropagationDirection | propDir, | ||
const EstimateContainer & | estimates | ||
) | const |
Updates TrajectoryStateOnSurface with several material effects (momentum and covariance matrix are potentially affected.
Definition at line 20 of file VolumeMaterialEffectsUpdator.cc.
References alongMomentum, anyDirection, TrajectoryStateOnSurface::charge(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalParameters(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), i, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localParameters(), GlobalTrajectoryParameters::magneticField(), TrajectoryStateOnSurface::magneticField(), LocalTrajectoryError::matrix(), TrajectoryStateOnSurface::surface(), TrajectoryStateOnSurface::surfaceSide(), and LocalTrajectoryParameters::updateP().
{ // Sanity check on propagation direction if ( propDir==anyDirection ) return TrajectoryStateOnSurface(); // // Update momentum. In case of failure: return invalid state // double dpSum(0.); for ( EstimateContainer::const_iterator i=estimates.begin(); i!=estimates.end(); ++i ) { double dp = (**i).deltaP(); if ( propDir==alongMomentum ) dpSum += dp; else dpSum -= dp; } LocalTrajectoryParameters lp = tsos.localParameters(); if ( !lp.updateP(dpSum) ) return TrajectoryStateOnSurface(); // // Update covariance matrix? // if ( tsos.hasError() ) { // AlgebraicSymMatrix55 eloc(tsos.localError().matrix()); AlgebraicSymMatrix55 matCov; for ( EstimateContainer::const_iterator i=estimates.begin(); i!=estimates.end(); ++i ) { matCov += (**i).deltaLocalError(); } // // transform to local system of trackfor the time being: brute force // could / should try to construct the matrix in curvilinear // // Plane consistent with material effects estimate (perp. to track at ref. pos.) ReferenceCountingPointer<BoundPlane> perpPlane(PerpendicularBoundPlaneBuilder()(tsos.globalPosition(), tsos.globalMomentum())); // Parameters need to construct Jacobian (ref. point and ref. direction) LocalTrajectoryParameters perpPars(LocalPoint(0.,0.,0.), LocalVector(0.,0.,1.), tsos.charge()); // Jacobian to go from perpendicular plane to curvilinear JacobianLocalToCurvilinear jacLocToCurv(*perpPlane,perpPars,*tsos.magneticField()); // Jacobian to go from curvilinear to local frame of the reference tsos JacobianCurvilinearToLocal jacCurvToLoc(tsos.surface(),tsos.localParameters(), *tsos.magneticField()); // Combined Jacobian AlgebraicMatrix55 jac(jacLocToCurv.jacobian()*jacCurvToLoc.jacobian()); // Add transformed material effects error matrix to the one from the TSOS AlgebraicSymMatrix55 eloc(tsos.localError().matrix()); eloc += ROOT::Math::Similarity(jac,matCov); return TrajectoryStateOnSurface(lp,LocalTrajectoryError(eloc),tsos.surface(), &(tsos.globalParameters().magneticField()), tsos.surfaceSide()); } else { return TrajectoryStateOnSurface(lp,tsos.surface(), &(tsos.globalParameters().magneticField()), tsos.surfaceSide()); } }