Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
CondFormats
PPSObjects
src
LHCInterpolatedOpticalFunctionsSet.cc
Go to the documentation of this file.
1
// Original Author: Jan Kašpar
2
3
#include "
CondFormats/PPSObjects/interface/LHCInterpolatedOpticalFunctionsSet.h
"
4
5
//----------------------------------------------------------------------------------------------------
6
7
void
LHCInterpolatedOpticalFunctionsSet::initializeSplines
() {
8
const
unsigned
int
num_xi_vals =
m_xi_values
.size();
9
10
m_splines
.resize(
m_fcn_values
.size());
11
for
(
unsigned
int
i
= 0;
i
<
m_fcn_values
.size(); ++
i
)
12
m_splines
[
i
] = std::make_shared<TSpline3>(
""
,
m_xi_values
.data(),
m_fcn_values
[
i
].data(), num_xi_vals);
13
}
14
15
//----------------------------------------------------------------------------------------------------
16
17
void
LHCInterpolatedOpticalFunctionsSet::transport
(
const
LHCInterpolatedOpticalFunctionsSet::Kinematics
&
input
,
18
LHCInterpolatedOpticalFunctionsSet::Kinematics
&
output
,
19
bool
calculateAngles)
const
{
20
const
double
xi = input.
xi
;
21
22
output.
x
=
m_splines
[
exd
]->Eval(xi) +
m_splines
[
evx
]->Eval(xi) * input.
x
+
m_splines
[
eLx
]->Eval(xi) * input.
th_x
+
23
m_splines
[
e14
]->Eval(xi) * input.
th_y
;
24
25
output.
th_x
= (!calculateAngles) ? 0.
26
:
m_splines
[
expd
]->Eval(xi) +
m_splines
[
evpx
]->Eval(xi) * input.
x
+
27
m_splines
[
eLpx
]->Eval(xi) * input.
th_x
+
m_splines
[
e24
]->Eval(xi) * input.
th_y
;
28
29
output.
y
=
m_splines
[
eyd
]->Eval(xi) +
m_splines
[
evy
]->Eval(xi) * input.
y
+
m_splines
[
eLy
]->Eval(xi) * input.
th_y
+
30
m_splines
[
e32
]->Eval(xi) * input.
th_x
;
31
32
output.
th_y
= (!calculateAngles) ? 0.
33
:
m_splines
[
eypd
]->Eval(xi) +
m_splines
[
evpy
]->Eval(xi) * input.
y
+
34
m_splines
[
eLpy
]->Eval(xi) * input.
th_y
+
m_splines
[
e42
]->Eval(xi) * input.
th_x
;
35
36
output.
xi
= input.
xi
;
37
}
mps_fire.i
i
Definition:
mps_fire.py:428
LHCOpticalFunctionsSet::eyd
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::eypd
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::expd
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::e42
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::evy
Definition:
LHCOpticalFunctionsSet.h:16
LHCInterpolatedOpticalFunctionsSet::Kinematics::th_y
double th_y
Definition:
LHCInterpolatedOpticalFunctionsSet.h:32
LHCInterpolatedOpticalFunctionsSet::Kinematics::th_x
double th_x
Definition:
LHCInterpolatedOpticalFunctionsSet.h:30
LHCOpticalFunctionsSet::eLpy
Definition:
LHCOpticalFunctionsSet.h:16
input
static std::string const input
Definition:
EdmProvDump.cc:47
LHCInterpolatedOpticalFunctionsSet::m_splines
std::vector< std::shared_ptr< const TSpline3 > > m_splines
Definition:
LHCInterpolatedOpticalFunctionsSet.h:43
LHCOpticalFunctionsSet::eLx
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::m_xi_values
std::vector< double > m_xi_values
Definition:
LHCOpticalFunctionsSet.h:35
LHCInterpolatedOpticalFunctionsSet::initializeSplines
void initializeSplines()
builds splines from m_*_values fields
Definition:
LHCInterpolatedOpticalFunctionsSet.cc:7
LHCOpticalFunctionsSet::exd
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::evx
Definition:
LHCOpticalFunctionsSet.h:16
LHCInterpolatedOpticalFunctionsSet::Kinematics::xi
double xi
Definition:
LHCInterpolatedOpticalFunctionsSet.h:33
LHCInterpolatedOpticalFunctionsSet::Kinematics
proton kinematics description
Definition:
LHCInterpolatedOpticalFunctionsSet.h:28
LHCInterpolatedOpticalFunctionsSet::Kinematics::y
double y
Definition:
LHCInterpolatedOpticalFunctionsSet.h:31
LHCInterpolatedOpticalFunctionsSet.h
LHCInterpolatedOpticalFunctionsSet::transport
void transport(const Kinematics &input, Kinematics &output, bool calculateAngles=false) const
transports proton according to the splines
Definition:
LHCInterpolatedOpticalFunctionsSet.cc:17
convertSQLitetoXML_cfg.output
tuple output
Definition:
convertSQLitetoXML_cfg.py:72
LHCOpticalFunctionsSet::e32
Definition:
LHCOpticalFunctionsSet.h:16
LHCInterpolatedOpticalFunctionsSet::Kinematics::x
double x
Definition:
LHCInterpolatedOpticalFunctionsSet.h:29
LHCOpticalFunctionsSet::m_fcn_values
std::vector< std::vector< double > > m_fcn_values
length unit cm
Definition:
LHCOpticalFunctionsSet.h:36
LHCOpticalFunctionsSet::e24
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::eLy
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::e14
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::evpx
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::evpy
Definition:
LHCOpticalFunctionsSet.h:16
LHCOpticalFunctionsSet::eLpx
Definition:
LHCOpticalFunctionsSet.h:16
Generated for CMSSW Reference Manual by
1.8.5