Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
:
18
static
int
barrelSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop) {
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
}
27
31
static
int
endcapSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop) {
32
auto
zpos = startingState.
globalPosition
().
z
();
33
bool
outwards = (startingState.
globalMomentum
().
z
() * zpos) > 0;
34
35
auto
inout = outwards ?
alongMomentum
:
oppositeToMomentum
;
36
37
return
(prop.
propagationDirection
() == inout ? 0 : 1);
38
}
39
};
40
41
#pragma GCC visibility pop
42
#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:18
LayerCrossingSide
Definition:
LayerCrossingSide.h:15
alongMomentum
Definition:
PropagationDirection.h:4
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition:
TrajectoryStateOnSurface.h:65
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const final
Definition:
Propagator.h:139
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
DeadROC_duringRun.dir
string dir
Definition:
DeadROC_duringRun.py:23
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
LayerCrossingSide::endcapSide
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
Definition:
LayerCrossingSide.h:31
Propagator
Definition:
Propagator.h:44
Propagator.h
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition:
TrajectoryStateOnSurface.h:66
oppositeToMomentum
Definition:
PropagationDirection.h:4
Generated for CMSSW Reference Manual by
1.8.5