TrackPropagation
RungeKutta
src
RKLocalFieldProvider.cc
Go to the documentation of this file.
1
#include "
RKLocalFieldProvider.h
"
2
#include "
MagneticField/Engine/interface/MagneticField.h
"
3
#include "
MagneticField/VolumeGeometry/interface/MagVolume.h
"
4
#include "
FWCore/Utilities/interface/Likely.h
"
5
6
RKLocalFieldProvider::RKLocalFieldProvider
(
const
MagVolume
& vol) : theVolume(vol), theFrame(vol), transform_(
false
) {}
7
8
RKLocalFieldProvider::RKLocalFieldProvider
(
const
MagVolume
& vol,
const
Frame&
frame
)
9
: theVolume(vol), theFrame(
frame
), transform_(
true
) {}
10
11
RKLocalFieldProvider::Vector
RKLocalFieldProvider::inTesla
(
const
LocalPoint
& lp)
const
{
12
if
13
UNLIKELY
(
transform_
) {
14
LocalPoint
vlp(
theVolume
.
toLocal
(
theFrame
.
toGlobal
(lp)));
15
return
theFrame
.
toLocal
(
theVolume
.
toGlobal
(
theVolume
.
fieldInTesla
(vlp))).
basicVector
();
16
}
17
return
theVolume
.
fieldInTesla
(lp).
basicVector
();
18
}
MagVolume.h
Likely.h
RKLocalFieldProvider::theVolume
const MagVolume & theVolume
Definition:
RKLocalFieldProvider.h:38
funct::false
false
Definition:
Factorize.h:34
RKLocalFieldProvider::inTesla
Vector inTesla(const LocalPoint &lp) const
the argument lp is in the local frame specified in the constructor
Definition:
RKLocalFieldProvider.cc:11
UNLIKELY
#define UNLIKELY(x)
Definition:
Likely.h:21
RKLocalFieldProvider.h
RKLocalFieldProvider::theFrame
const Frame & theFrame
Definition:
RKLocalFieldProvider.h:39
Point3DBase< float, LocalTag >
funct::true
true
Definition:
Factorize.h:173
RKLocalFieldProvider::RKLocalFieldProvider
RKLocalFieldProvider(const MagVolume &vol)
Local field access to the MagVolume field, in the MagVolume frame.
Definition:
RKLocalFieldProvider.cc:6
MagVolume
Definition:
MagVolume.h:13
RKLocalFieldProvider::transform_
bool transform_
Definition:
RKLocalFieldProvider.h:40
MagneticField.h
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition:
PV3DBase.h:53
GloballyPositioned::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Definition:
GloballyPositioned.h:98
amptDefault_cfi.frame
frame
Definition:
amptDefault_cfi.py:12
MagVolume::fieldInTesla
LocalVector fieldInTesla(const LocalPoint &lp) const
Definition:
MagVolume.cc:11
Basic3DVector
Definition:
extBasic3DVector.h:30
GloballyPositioned::toGlobal
GlobalPoint toGlobal(const LocalPoint &lp) const
Definition:
GloballyPositioned.h:66
Generated for CMSSW Reference Manual by
1.8.16