#include <AnalyticalTrajectoryExtrapolatorToLine.h>
Public Member Functions | |
AnalyticalTrajectoryExtrapolatorToLine (const MagneticField *field) | |
constructor with default geometrical propagator | |
AnalyticalTrajectoryExtrapolatorToLine (const Propagator &) | |
constructor with alternative propagator | |
TrajectoryStateOnSurface | extrapolate (const FreeTrajectoryState &fts, const Line &L) const |
extrapolation from FreeTrajectoryState | |
TrajectoryStateOnSurface | extrapolate (const TrajectoryStateOnSurface tsos, const Line &L) const |
extrapolation from TrajectoryStateOnSurface | |
Private Member Functions | |
TrajectoryStateOnSurface | extrapolateFullState (const TrajectoryStateOnSurface tsos, const Line &line) const |
extrapolation of (multi) TSOS | |
TrajectoryStateOnSurface | extrapolateSingleState (const FreeTrajectoryState &fts, const Line &line) const |
extrapolation of (single) FTS | |
bool | propagateWithHelix (const IterativeHelixExtrapolatorToLine &extrapolator, const Line &line, GlobalPoint &x, GlobalVector &p, double &s) const |
the actual propagation to a new point & momentum vector | |
Private Attributes | |
DeepCopyPointerByClone < Propagator > | thePropagator |
Extrapolate to the closest approach w.r.t. a line. This class is faster than the TrajectoryExtrapolatorToLine. The helix model is explicitely used in the determination of the target surface. This target surface is centered on the point of closest approach on the line. The axes of the local coordinate system (x_loc, y_loc, z_loc) are z_loc // trajectory direction at point of closest approach; x_loc normal to trajectory and along impact vector (line->helix); y_loc forms a right-handed system with the other axes.
Definition at line 26 of file AnalyticalTrajectoryExtrapolatorToLine.h.
AnalyticalTrajectoryExtrapolatorToLine::AnalyticalTrajectoryExtrapolatorToLine | ( | const MagneticField * | field | ) |
constructor with default geometrical propagator
Definition at line 15 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
: thePropagator(new AnalyticalPropagator(field, anyDirection)) {}
AnalyticalTrajectoryExtrapolatorToLine::AnalyticalTrajectoryExtrapolatorToLine | ( | const Propagator & | propagator | ) |
constructor with alternative propagator
Definition at line 19 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
References anyDirection.
: thePropagator(propagator.clone()) { thePropagator->setPropagationDirection(anyDirection); }
TrajectoryStateOnSurface AnalyticalTrajectoryExtrapolatorToLine::extrapolate | ( | const FreeTrajectoryState & | fts, |
const Line & | L | ||
) | const |
extrapolation from FreeTrajectoryState
Definition at line 25 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
References extrapolateSingleState().
Referenced by IPTools::closestApproachToJet(), SignedDecayLength3D::closestApproachToJet(), and SignedImpactParameter3D::closestApproachToJet().
{ return extrapolateSingleState(fts,line); }
TrajectoryStateOnSurface AnalyticalTrajectoryExtrapolatorToLine::extrapolate | ( | const TrajectoryStateOnSurface | tsos, |
const Line & | L | ||
) | const |
extrapolation from TrajectoryStateOnSurface
Definition at line 32 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
References extrapolateFullState(), and TrajectoryStateOnSurface::isValid().
{ if ( tsos.isValid() ) return extrapolateFullState(tsos,line); else return tsos; }
TrajectoryStateOnSurface AnalyticalTrajectoryExtrapolatorToLine::extrapolateFullState | ( | const TrajectoryStateOnSurface | tsos, |
const Line & | line | ||
) | const [private] |
extrapolation of (multi) TSOS
Definition at line 40 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
References TrajectoryStateOnSurface::components(), extrapolateSingleState(), TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::isValid(), geometryCSVtoXML::line, TrajectoryStateOnSurface::surface(), and thePropagator.
Referenced by extrapolate().
{ // // first determine IP plane using propagation with (single) FTS // could be optimised (will propagate errors even if duplicated below) // TrajectoryStateOnSurface singleState = extrapolateSingleState(*tsos.freeTrajectoryState(),line); if ( !singleState.isValid() || tsos.components().size()==1 ) return singleState; // // propagate multiTsos to plane found above // return thePropagator->propagate(tsos,singleState.surface()); }
TrajectoryStateOnSurface AnalyticalTrajectoryExtrapolatorToLine::extrapolateSingleState | ( | const FreeTrajectoryState & | fts, |
const Line & | line | ||
) | const [private] |
extrapolation of (single) FTS
Definition at line 57 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
References anyDirection, FreeTrajectoryState::charge(), Line::closerPointToLine(), FreeTrajectoryState::curvilinearError(), FreeTrajectoryState::hasError(), AnalyticalCurvilinearJacobian::jacobian(), PV3DBase< T, PVType, FrameType >::mag(), CurvilinearTrajectoryError::matrix(), FreeTrajectoryState::momentum(), L1TEmulatorMonitor_cff::p, FreeTrajectoryState::parameters(), PlaneBuilder::plane(), FreeTrajectoryState::position(), GlobalTrajectoryParameters::position(), propagateWithHelix(), rho, asciidump::s, thePropagator, FreeTrajectoryState::transverseCurvature(), and x.
Referenced by extrapolate(), and extrapolateFullState().
{ // static TimingReport::Item& timer = detailedDetTimer("AnalyticalTrajectoryExtrapolatorToLine"); // TimeMe t(timer,false); // // initialisation of position, momentum and transverse curvature // GlobalPoint x(fts.position()); GlobalVector p(fts.momentum()); double rho = fts.transverseCurvature(); // // Straight line approximation? |rho|<1.e-10 equivalent to ~ 1um // difference in transversal position at 10m. // double s(0); if( fabs(rho)<1.e-10 ) { Line tangent(x,p); GlobalPoint xold(x); x = tangent.closerPointToLine(line); GlobalVector dx(x-xold); float sign = p.dot(x-xold); s = sign>0 ? dx.mag() : -dx.mag(); } // // Helix case // else { HelixLineExtrapolation::PositionType helixPos(x); HelixLineExtrapolation::DirectionType helixDir(p); IterativeHelixExtrapolatorToLine extrapolator(helixPos,helixDir,rho,anyDirection); if ( !propagateWithHelix(extrapolator,line,x,p,s) ) return TrajectoryStateOnSurface(); } // // Define target surface: origin on line, x_local from line // to helix at closest approach, z_local along the helix // and y_local to complete right-handed system // GlobalPoint origin(line.closerPointToLine(Line(x,p))); GlobalVector zLocal(p.unit()); GlobalVector yLocal(zLocal.cross(x-origin).unit()); GlobalVector xLocal(yLocal.cross(zLocal)); Surface::RotationType rot(xLocal,yLocal,zLocal); PlaneBuilder::ReturnType surface = PlaneBuilder().plane(origin,rot); // // Compute propagated state // GlobalTrajectoryParameters gtp(x,p,fts.charge(), thePropagator->magneticField()); if (fts.hasError()) { // // compute jacobian // AnalyticalCurvilinearJacobian analyticalJacobian(fts.parameters(), gtp.position(), gtp.momentum(), s); const AlgebraicMatrix55 &jacobian = analyticalJacobian.jacobian(); CurvilinearTrajectoryError cte( ROOT::Math::Similarity (jacobian, fts.curvilinearError().matrix()) ); return TrajectoryStateOnSurface(gtp,cte,*surface); } else { // // return state without errors // return TrajectoryStateOnSurface(gtp,*surface); } }
bool AnalyticalTrajectoryExtrapolatorToLine::propagateWithHelix | ( | const IterativeHelixExtrapolatorToLine & | extrapolator, |
const Line & | line, | ||
GlobalPoint & | x, | ||
GlobalVector & | p, | ||
double & | s | ||
) | const [private] |
the actual propagation to a new point & momentum vector
Definition at line 123 of file AnalyticalTrajectoryExtrapolatorToLine.cc.
References IterativeHelixExtrapolatorToLine::direction(), PV3DBase< T, PVType, FrameType >::mag(), Basic3DVector< T >::mag(), IterativeHelixExtrapolatorToLine::pathLength(), and IterativeHelixExtrapolatorToLine::position().
Referenced by extrapolateSingleState().
{ // // save absolute value of momentum // double pmag(p.mag()); // // get path length to solution // std::pair<bool,double> propResult = extrapolator.pathLength(line); if ( !propResult.first ) return false; s = propResult.second; // // get point and (normalised) direction from path length // HelixLineExtrapolation::PositionType xGen = extrapolator.position(s); HelixLineExtrapolation::DirectionType pGen = extrapolator.direction(s); // // Fix normalisation and convert back to GlobalPoint / GlobalVector // x = GlobalPoint(xGen); pGen *= pmag/pGen.mag(); p = GlobalVector(pGen); // return true; }
Definition at line 56 of file AnalyticalTrajectoryExtrapolatorToLine.h.
Referenced by extrapolateFullState(), and extrapolateSingleState().