Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
RecoTracker
TkDetLayers
interface
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
class
LayerCrossingSide
{
15
public
:
16
18
int
barrelSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop)
const
{
19
GlobalPoint
pos
= startingState.
globalPosition
();
20
GlobalVector
radial(pos.
x
(), pos.
y
(), 0);
21
if
(startingState.
globalMomentum
().
dot
( radial) > 0) {
// momentum points outwards
22
return
(prop.
propagationDirection
() ==
alongMomentum
? 0 : 1);
23
}
24
else
{
// momentum points inwards
25
return
(prop.
propagationDirection
() ==
oppositeToMomentum
? 0 : 1);
26
}
27
}
28
32
int
endcapSide
(
const
TrajectoryStateOnSurface
& startingState,
const
Propagator
& prop)
const
{
33
float
zpos = startingState.
globalPosition
().
z
();
34
if
(startingState.
globalMomentum
().
z
() * zpos > 0) {
// momentum points outwards
35
return
(prop.
propagationDirection
() ==
alongMomentum
? 0 : 1);
36
}
37
else
{
// momentum points inwards
38
return
(prop.
propagationDirection
() ==
oppositeToMomentum
? 0 : 1);
39
}
40
}
41
42
};
43
44
#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:14
alongMomentum
Definition:
PropagationDirection.h:4
PV3DBase::y
T y() const
Definition:
PV3DBase.h:57
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition:
TrajectoryStateOnSurface.h:128
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:32
PV3DBase::z
T z() const
Definition:
PV3DBase.h:58
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:18
Point3DBase< float, GlobalTag >
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition:
TrajectoryStateOnSurface.h:131
PV3DBase::x
T x() const
Definition:
PV3DBase.h:56
oppositeToMomentum
Definition:
PropagationDirection.h:4
Generated for CMSSW Reference Manual by
1.8.5