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
int
barrelSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop)
const
{
20
GlobalPoint
pos
= startingState.
globalPosition
();
21
GlobalVector
radial(pos.
x
(), pos.
y
(), 0);
22
if
(startingState.
globalMomentum
().
dot
( radial) > 0) {
// momentum points outwards
23
return
(prop.
propagationDirection
() ==
alongMomentum
? 0 : 1);
24
}
25
else
{
// momentum points inwards
26
return
(prop.
propagationDirection
() ==
oppositeToMomentum
? 0 : 1);
27
}
28
}
29
33
int
endcapSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop)
const
{
34
float
zpos = startingState.
globalPosition
().
z
();
35
if
(startingState.
globalMomentum
().
z
() * zpos > 0) {
// momentum points outwards
36
return
(prop.
propagationDirection
() ==
alongMomentum
? 0 : 1);
37
}
38
else
{
// momentum points inwards
39
return
(prop.
propagationDirection
() ==
oppositeToMomentum
? 0 : 1);
40
}
41
}
42
43
};
44
45
#pragma GCC visibility pop
46
#endif
Propagator::propagationDirection
virtual PropagationDirection propagationDirection() const
Definition:
Propagator.h:143
pos
Definition:
Histograms.cc:19
Vector3DBase
Definition:
Vector3DBase.h:9
LayerCrossingSide
Definition:
LayerCrossingSide.h:15
alongMomentum
Definition:
PropagationDirection.h:4
PV3DBase::y
T y() const
Definition:
PV3DBase.h:62
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition:
TrajectoryStateOnSurface.h:143
Vector3DBase::dot
PreciseFloatType< T, U >::Type dot(const Vector3DBase< U, FrameTag > &v) const
Definition:
Vector3DBase.h:107
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:15
LayerCrossingSide::endcapSide
int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
Definition:
LayerCrossingSide.h:33
PV3DBase::z
T z() const
Definition:
PV3DBase.h:63
Propagator
Definition:
Propagator.h:38
Propagator.h
LayerCrossingSide::barrelSide
int barrelSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
returns 0 if barrel layer crossed from inside, 1 if from outside
Definition:
LayerCrossingSide.h:19
Point3DBase< float, GlobalTag >
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition:
TrajectoryStateOnSurface.h:146
PV3DBase::x
T x() const
Definition:
PV3DBase.h:61
oppositeToMomentum
Definition:
PropagationDirection.h:4
Generated for CMSSW Reference Manual by
1.8.5