#include <LayerCrossingSide.h>
Public Member Functions | |
int | barrelSide (const TrajectoryStateOnSurface &startingState, const Propagator &prop) const |
returns 0 if barrel layer crossed from inside, 1 if from outside | |
int | endcapSide (const TrajectoryStateOnSurface &startingState, const Propagator &prop) const |
Helper class to determine if a TrajectoryStateOnSurface would cross a layer from the inside, or from the outside, if propagated with a propagator with a defined direction. No propagations performed, the result is very fast but not correct in case of a looping track that first goes outwards, then inwards, before crossing a layer.
Definition at line 14 of file LayerCrossingSide.h.
int LayerCrossingSide::barrelSide | ( | const TrajectoryStateOnSurface & | startingState, |
const Propagator & | prop | ||
) | const [inline] |
returns 0 if barrel layer crossed from inside, 1 if from outside
Definition at line 18 of file LayerCrossingSide.h.
References alongMomentum, Vector3DBase< T, FrameTag >::dot(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), oppositeToMomentum, pos, Propagator::propagationDirection(), PV3DBase< T, PVType, FrameType >::x(), and PV3DBase< T, PVType, FrameType >::y().
Referenced by TIBLayer::groupedCompatibleDetsV(), TOBRod::groupedCompatibleDetsV(), TOBLayer::groupedCompatibleDetsV(), GeometricSearchDet::groupedCompatibleDetsV(), and PixelBarrelLayer::groupedCompatibleDetsV().
{ GlobalPoint pos = startingState.globalPosition(); GlobalVector radial(pos.x(), pos.y(), 0); if (startingState.globalMomentum().dot( radial) > 0) { // momentum points outwards return (prop.propagationDirection() == alongMomentum ? 0 : 1); } else { // momentum points inwards return (prop.propagationDirection() == oppositeToMomentum ? 0 : 1); } }
int LayerCrossingSide::endcapSide | ( | const TrajectoryStateOnSurface & | startingState, |
const Propagator & | prop | ||
) | const [inline] |
returns 0 if endcap layer crossed from inside, ie from the side of the interation region, 1 if from outside
Definition at line 32 of file LayerCrossingSide.h.
References alongMomentum, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), oppositeToMomentum, Propagator::propagationDirection(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by TIDRing::groupedCompatibleDetsV(), PixelForwardLayer::groupedCompatibleDetsV(), TECLayer::groupedCompatibleDetsV(), PixelBlade::groupedCompatibleDetsV(), CompositeTECPetal::groupedCompatibleDetsV(), and CompositeTECWedge::groupedCompatibleDetsV().
{ float zpos = startingState.globalPosition().z(); if (startingState.globalMomentum().z() * zpos > 0) { // momentum points outwards return (prop.propagationDirection() == alongMomentum ? 0 : 1); } else { // momentum points inwards return (prop.propagationDirection() == oppositeToMomentum ? 0 : 1); } }