Main Page
Namespaces
Classes
Package Documentation
src
RecoTracker
TkDetLayers
src
LayerCrossingSide.h
Go to the documentation of this file.
1
#ifndef TkDetLayers_LayerCrossingSide_h
2
#define TkDetLayers_LayerCrossingSide_h
3
4
// temporary solution
5
#include "
TrackingTools/GeomPropagators/interface/Propagator.h
"
6
14
#pragma GCC visibility push(hidden)
15
class
LayerCrossingSide
{
16
public
:
17
19
static
int
barrelSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop) {
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
}
29
33
static
int
endcapSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop) {
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
}
42
43
};
44
45
#pragma GCC visibility pop
46
#endif
LayerCrossingSide::barrelSide
static int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
returns 0 if barrel layer crossed from inside, 1 if from outside
Definition:
LayerCrossingSide.h:19
LayerCrossingSide
Definition:
LayerCrossingSide.h:15
alongMomentum
Definition:
PropagationDirection.h:4
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition:
TrajectoryStateOnSurface.h:83
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:17
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition:
Propagator.h:151
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
LayerCrossingSide::endcapSide
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
Definition:
LayerCrossingSide.h:33
Propagator
Definition:
Propagator.h:43
Propagator.h
pos
Definition:
PixelAliasList.h:18
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition:
TrajectoryStateOnSurface.h:86
dir
dbl *** dir
Definition:
mlp_gen.cc:35
oppositeToMomentum
Definition:
PropagationDirection.h:4
Generated for CMSSW Reference Manual by
1.8.11