Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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:89
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:17
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const GCC11_FINAL
Definition:
Propagator.h:155
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:45
Propagator.h
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition:
TrajectoryStateOnSurface.h:92
dir
dbl *** dir
Definition:
mlp_gen.cc:35
oppositeToMomentum
Definition:
PropagationDirection.h:4
Generated for CMSSW Reference Manual by
1.8.5