Belle II Software development
KLMAlignmentData.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9/* Own header. */
10#include <klm/dbobjects/KLMAlignmentData.h>
11
12/* Basf2 headers. */
13#include <framework/logging/Logger.h>
14
15using namespace Belle2;
16
18 m_DeltaU(0),
19 m_DeltaV(0),
20 m_DeltaW(0),
21 m_DeltaAlpha(0),
22 m_DeltaBeta(0),
23 m_DeltaGamma(0)
24{
25}
26
28 float deltaU, float deltaV, float deltaW,
29 float deltaAlpha, float deltaBeta, float deltaGamma) :
30 m_DeltaU(deltaU),
31 m_DeltaV(deltaV),
32 m_DeltaW(deltaW),
33 m_DeltaAlpha(deltaAlpha),
34 m_DeltaBeta(deltaBeta),
35 m_DeltaGamma(deltaGamma)
36{
37}
38
40{
41}
42
44{
45 switch (number) {
46 case c_DeltaU:
47 return getDeltaU();
48 case c_DeltaV:
49 return getDeltaV();
50 case c_DeltaW:
51 return getDeltaW();
52 case c_DeltaAlpha:
53 return getDeltaAlpha();
54 case c_DeltaBeta:
55 return getDeltaBeta();
56 case c_DeltaGamma:
57 return getDeltaGamma();
58 }
59 B2FATAL("Attempt to get KLM alignment parameter with incorrect number " <<
60 number);
61}
62
64{
65 switch (number) {
66 case c_DeltaU:
67 setDeltaU(value);
68 return;
69 case c_DeltaV:
70 setDeltaV(value);
71 return;
72 case c_DeltaW:
73 setDeltaW(value);
74 return;
75 case c_DeltaAlpha:
76 setDeltaAlpha(value);
77 return;
78 case c_DeltaBeta:
79 setDeltaBeta(value);
80 return;
81 case c_DeltaGamma:
82 setDeltaGamma(value);
83 return;
84 }
85 B2FATAL("Attempt to set KLM alignment parameter with incorrect number " <<
86 number);
87}
float getDeltaU() const
Get shift in U.
void setDeltaAlpha(float deltaAlpha)
Set rotation in alpha.
float getDeltaV() const
Get shift in V.
ParameterNumbers
Alignment parameter numbers.
@ c_DeltaAlpha
Rotation in alpha.
@ c_DeltaBeta
Rotation in beta.
@ c_DeltaU
Shift in U (EKLM: local X).
@ c_DeltaGamma
Rotation in gamma (EKLM: rotation in local plane).
@ c_DeltaV
Shift in V (EKLM: local Y).
void setDeltaGamma(float deltaGamma)
Set rotation in alpha.
void setParameter(enum ParameterNumbers number, float value)
Set parameter by number.
void setDeltaU(float deltaU)
Set shift in U.
void setDeltaV(float deltaV)
Set shift in V.
float getDeltaW() const
Get shift in W.
float getParameter(enum ParameterNumbers number) const
Get parameter by number.
float getDeltaGamma() const
Get rotation in alpha.
void setDeltaW(float deltaW)
Set shift in W.
float getDeltaAlpha() const
Get rotation in alpha.
float getDeltaBeta() const
Get rotation in alpha.
void setDeltaBeta(float deltaBeta)
Set rotation in alpha.
Abstract base class for different kinds of events.