CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

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

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

19  {
20  auto pos = startingState.globalPosition();
21  auto dir = startingState.globalMomentum();
22  bool outwards = (pos.x()*dir.x() + pos.y()*dir.y()) > 0;
23 
24  auto inout = outwards ? alongMomentum : oppositeToMomentum;
25 
26  return (prop.propagationDirection() == inout ? 0 : 1);
27 
28  }
GlobalPoint globalPosition() const
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
GlobalVector globalMomentum() const
dbl *** dir
Definition: mlp_gen.cc:35
static int LayerCrossingSide::endcapSide ( const TrajectoryStateOnSurface startingState,
const Propagator prop 
)
inlinestatic

returns 0 if endcap layer crossed from inside, ie from the side of the interation region, 1 if from outside

Definition at line 33 of file LayerCrossingSide.h.

References alongMomentum, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), oppositeToMomentum, Propagator::propagationDirection(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by PixelForwardLayer::groupedCompatibleDetsV(), PixelForwardLayerPhase1::groupedCompatibleDetsV(), TECLayer::groupedCompatibleDetsV(), CompositeTECWedge::groupedCompatibleDetsV(), TIDRing::groupedCompatibleDetsV(), Phase2OTEndcapRing::groupedCompatibleDetsV(), PixelBlade::groupedCompatibleDetsV(), CompositeTECPetal::groupedCompatibleDetsV(), PixelForwardLayer::searchNeighbors(), and PixelForwardLayerPhase1::searchNeighbors().

33  {
34  auto zpos = startingState.globalPosition().z();
35  bool outwards = (startingState.globalMomentum().z() * zpos) > 0;
36 
37  auto inout = outwards ? alongMomentum : oppositeToMomentum;
38 
39  return (prop.propagationDirection() == inout ? 0 : 1);
40 
41  }
GlobalPoint globalPosition() const
virtual PropagationDirection propagationDirection() const final
Definition: Propagator.h:151
T z() const
Definition: PV3DBase.h:64
GlobalVector globalMomentum() const