Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
MagneticField
Engine
interface
MagneticField.h
Go to the documentation of this file.
1
#ifndef MagneticField_MagneticField_h
2
#define MagneticField_MagneticField_h
3
11
#include <atomic>
12
13
#include "
DataFormats/GeometryVector/interface/GlobalVector.h
"
14
#include "
DataFormats/GeometryVector/interface/GlobalPoint.h
"
15
#include "
FWCore/Utilities/interface/Visibility.h
"
16
#include "
FWCore/Utilities/interface/Likely.h
"
17
#include "
FWCore/Utilities/interface/thread_safety_macros.h
"
18
19
class
MagneticField
{
20
public
:
21
MagneticField
();
22
MagneticField
(
const
MagneticField
& orig);
23
virtual
~MagneticField
();
24
27
virtual
MagneticField
*
clone
()
const
{
return
nullptr
; }
28
30
virtual
GlobalVector
inTesla
(
const
GlobalPoint
&
gp
)
const
= 0;
31
33
GlobalVector
inKGauss
(
const
GlobalPoint
&
gp
)
const
{
return
inTesla
(
gp
) * 10.F; }
34
36
GlobalVector
inInverseGeV
(
const
GlobalPoint
&
gp
)
const
{
return
inTesla
(
gp
) * 2.99792458e-3
F
; }
37
39
// engine is defined.
40
virtual
bool
isDefined
(
const
GlobalPoint
&
/*gp*/
)
const
{
return
true
; }
41
44
virtual
GlobalVector
inTeslaUnchecked
(
const
GlobalPoint
&
gp
)
const
{
45
return
inTesla
(
gp
);
// default dummy implementation
46
}
47
49
int
nominalValue
()
const
{
50
if
(
kSet
==
nominalValueCompiuted
.load())
51
return
theNominalValue
;
52
return
computeNominalValue
();
53
}
54
55
private
:
56
//nominal field value
57
virtual
int
computeNominalValue
()
const
;
58
mutable
std::atomic<char>
nominalValueCompiuted
;
59
// CMS_THREAD_GUARD(nominalValueCompiuted) mutable int theNominalValue;
60
// PG temporary fix for clang 3.4 which is not parsing thread_guard correctly
61
CMS_THREAD_SAFE
mutable
int
theNominalValue
;
62
enum
FooStates
{
kUnset
,
kSetting
,
kSet
};
63
};
64
65
#endif
Vector3DBase
Definition:
Vector3DBase.h:8
Likely.h
Visibility.h
MagneticField::inTesla
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
MagneticField::isDefined
virtual bool isDefined(const GlobalPoint &) const
True if the point is within the region where the concrete field.
Definition:
MagneticField.h:40
MagneticField::computeNominalValue
virtual int computeNominalValue() const
Definition:
MagneticField.cc:19
MagneticField::theNominalValue
int theNominalValue
Definition:
MagneticField.h:61
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition:
blowfish.cc:163
MagneticField::MagneticField
MagneticField()
Definition:
MagneticField.cc:8
MagneticField::nominalValue
int nominalValue() const
The nominal field value for this map in kGauss.
Definition:
MagneticField.h:49
CMS_THREAD_SAFE
#define CMS_THREAD_SAFE
Definition:
thread_safety_macros.h:4
Point3DBase< float, GlobalTag >
MagneticField::inInverseGeV
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition:
MagneticField.h:36
MagneticField::clone
virtual MagneticField * clone() const
Definition:
MagneticField.h:27
runTauDisplay.gp
gp
Definition:
runTauDisplay.py:431
MagneticField::FooStates
FooStates
Definition:
MagneticField.h:62
thread_safety_macros.h
MagneticField::nominalValueCompiuted
std::atomic< char > nominalValueCompiuted
Definition:
MagneticField.h:58
MagneticField::~MagneticField
virtual ~MagneticField()
Definition:
MagneticField.cc:17
MagneticField::kUnset
Definition:
MagneticField.h:62
MagneticField::kSetting
Definition:
MagneticField.h:62
GlobalVector.h
MagneticField::inKGauss
GlobalVector inKGauss(const GlobalPoint &gp) const
Field value ad specified global point, in KGauss.
Definition:
MagneticField.h:33
MagneticField
Definition:
MagneticField.h:19
GlobalPoint.h
MagneticField::inTeslaUnchecked
virtual GlobalVector inTeslaUnchecked(const GlobalPoint &gp) const
Definition:
MagneticField.h:44
MagneticField::kSet
Definition:
MagneticField.h:62
Generated for CMSSW Reference Manual by
1.8.16