TrackPropagation
RungeKutta
src
CartesianStateAdaptor.h
Go to the documentation of this file.
1
#ifndef CartesianStateAdaptor_H
2
#define CartesianStateAdaptor_H
3
#include "
FWCore/Utilities/interface/Visibility.h
"
4
5
#include "
RKSmallVector.h
"
6
#include "
DataFormats/GeometryVector/interface/Basic3DVector.h
"
7
8
class
dso_internal
CartesianStateAdaptor
{
9
public
:
10
typedef
float
Scalar
;
11
typedef
Basic3DVector<Scalar>
Vector3D
;
12
13
CartesianStateAdaptor
(
const
RKSmallVector<double, 6>
& rk) : pos_(rk[0], rk[1], rk[2]), mom_(rk[3], rk[4], rk[5]) {}
14
15
const
Vector3D
&
position
()
const
{
return
pos_; }
16
const
Vector3D
&
momentum
()
const
{
return
mom_; }
17
18
static
Vector3D
position
(
const
RKSmallVector<double, 6>
& rk) {
return
Vector3D
(rk[0], rk[1], rk[2]); }
19
20
static
Vector3D
momentum
(
const
RKSmallVector<double, 6>
& rk) {
return
Vector3D
(rk[3], rk[4], rk[5]); }
21
22
static
RKSmallVector<double, 6>
rkstate
(
const
Vector3D
&
pos
,
const
Vector3D
& mom) {
23
RKSmallVector<double, 6>
res
;
24
res
[0] =
pos
.x();
25
res
[1] =
pos
.y();
26
res
[2] =
pos
.z();
27
res
[3] = mom.
x
();
28
res
[4] = mom.
y
();
29
res
[5] = mom.
z
();
30
return
res
;
31
}
32
33
private
:
34
Vector3D
pos_
;
35
Vector3D
mom_
;
36
};
37
38
#endif
Visibility.h
pos
Definition:
PixelAliasList.h:18
Basic3DVector.h
CartesianStateAdaptor::position
static Vector3D position(const RKSmallVector< double, 6 > &rk)
Definition:
CartesianStateAdaptor.h:18
Basic3DVector::y
T y() const
Cartesian y coordinate.
Definition:
extBasic3DVector.h:97
RKSmallVector
ROOT::Math::SVector< T, N > RKSmallVector
Definition:
RKSmallVector.h:13
CartesianStateAdaptor::Scalar
float Scalar
Definition:
CartesianStateAdaptor.h:10
CartesianStateAdaptor::position
const Vector3D & position() const
Definition:
CartesianStateAdaptor.h:15
CartesianStateAdaptor::rkstate
static RKSmallVector< double, 6 > rkstate(const Vector3D &pos, const Vector3D &mom)
Definition:
CartesianStateAdaptor.h:22
dso_internal
#define dso_internal
Definition:
Visibility.h:13
res
Definition:
Electron.h:6
CartesianStateAdaptor::CartesianStateAdaptor
CartesianStateAdaptor(const RKSmallVector< double, 6 > &rk)
Definition:
CartesianStateAdaptor.h:13
CartesianStateAdaptor
Definition:
CartesianStateAdaptor.h:8
CartesianStateAdaptor::momentum
const Vector3D & momentum() const
Definition:
CartesianStateAdaptor.h:16
Basic3DVector::x
T x() const
Cartesian x coordinate.
Definition:
extBasic3DVector.h:94
CartesianStateAdaptor::momentum
static Vector3D momentum(const RKSmallVector< double, 6 > &rk)
Definition:
CartesianStateAdaptor.h:20
RKSmallVector.h
CartesianStateAdaptor::Vector3D
Basic3DVector< Scalar > Vector3D
Definition:
CartesianStateAdaptor.h:11
Basic3DVector::z
T z() const
Cartesian z coordinate.
Definition:
extBasic3DVector.h:100
CartesianStateAdaptor::mom_
Vector3D mom_
Definition:
CartesianStateAdaptor.h:35
Basic3DVector< Scalar >
CartesianStateAdaptor::pos_
Vector3D pos_
Definition:
CartesianStateAdaptor.h:34
Generated for CMSSW Reference Manual by
1.8.16