CMS 3D CMS Logo

List of all members | Static Public Member Functions
LayerCrossingSide Class Reference

#include <LayerCrossingSide.h>

Static Public Member Functions

static int barrelSide (const TrajectoryStateOnSurface &startingState, const Propagator &prop)
 returns 0 if barrel layer crossed from inside, 1 if from outside More...
 
static int endcapSide (const TrajectoryStateOnSurface &startingState, const Propagator &prop)
 

Detailed Description

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 15 of file LayerCrossingSide.h.

Member Function Documentation

◆ barrelSide()

static int LayerCrossingSide::barrelSide ( const TrajectoryStateOnSurface startingState,
const Propagator prop 
)
inlinestatic

returns 0 if barrel layer crossed from inside, 1 if from outside

Definition at line 18 of file LayerCrossingSide.h.

18  {
19  auto pos = startingState.globalPosition();
20  auto dir = startingState.globalMomentum();
21  bool outwards = (pos.x() * dir.x() + pos.y() * dir.y()) > 0;
22 
23  auto inout = outwards ? alongMomentum : oppositeToMomentum;
24 
25  return (prop.propagationDirection() == inout ? 0 : 1);
26  }

References alongMomentum, DeadROC_duringRun::dir, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), oppositeToMomentum, and Propagator::propagationDirection().

Referenced by TBLayer::groupedCompatibleDetsV(), TIBRing::groupedCompatibleDetsV(), TOBRod::groupedCompatibleDetsV(), Phase2OTBarrelRod::groupedCompatibleDetsV(), and TIBRing::searchNeighbors().

◆ endcapSide()

static int LayerCrossingSide::endcapSide ( const TrajectoryStateOnSurface startingState,
const Propagator prop 
)
inlinestatic
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
pos
Definition: PixelAliasList.h:18
oppositeToMomentum
Definition: PropagationDirection.h:4
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:139
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
alongMomentum
Definition: PropagationDirection.h:4
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23