Belle II Software development
ARICHBtestGeometryPar.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#include <framework/logging/Logger.h>
10
11#include <arich/geometry/ARICHBtestGeometryPar.h>
12
13#include <Math/RotationY.h>
14
15using namespace std;
16
17namespace Belle2 {
24
26 {
29 }
31 }
32
34 m_mwpc(new ARICHTracking),
35 m_trackingShift(ROOT::Math::XYZVector()),
36 m_rotationCenter(ROOT::Math::XYZVector()),
37 m_frameRotation(ROOT::Math::Rotation3D()),
38 m_averageAgel(0),
39 m_nPads(0),
40 m_init(0),
41 m_simple(0)
42 {
43 clear();
44 }
45
46
48 m_trackingShift(arichPar.m_trackingShift),
49 m_rotationCenter(arichPar.m_rotationCenter),
50 m_frameRotation(arichPar.m_frameRotation),
51 m_hapdmap(arichPar.m_hapdmap),
52 m_hapdeid(arichPar.m_hapdeid)
53 {
55 m_nPads = arichPar.m_nPads;
56 m_init = arichPar.m_init;
57 m_simple = arichPar.m_simple;
58 m_mwpc = new ARICHTracking();
59 *m_mwpc = *arichPar.m_mwpc;
61 }
62
64 {
65 }
66
67
69 {
70 m_mwpc = m;
71 }
72
73
75 {
76 return m_mwpc;
77 }
78
79 std::pair<double, double> ARICHBtestGeometryPar::GetHapdChannelPosition(int id)
80 {
81 return m_hapdmap[id];
82 }
83
85 {
86 return m_hapdeid[id];
87 }
88
90 {
91 m_hapdmap.push_back(std::make_pair(x, y));
92 return m_hapdmap.size();
93 }
94
96 {
97 m_hapdeid.push_back(std::make_pair(x, y));
98 return m_hapdeid.size();
99 }
100
101 void ARICHBtestGeometryPar::setTrackingShift(const ROOT::Math::XYZVector& v)
102 {
103 m_trackingShift = v;
104 B2INFO("ARICHBtestGeometryPar::setTrackingShift=" << m_trackingShift.X() << "," << m_trackingShift.Y() << "," <<
105 m_trackingShift.Z());
106
107 }
108
109
111 {
112 return m_trackingShift;
113 }
114
115 void ARICHBtestGeometryPar::setRotationCenter(const ROOT::Math::XYZVector& v)
116 {
118 B2INFO("ARICHBtestGeometryPar::setRotationCenter=" << m_rotationCenter.X() << "," << m_rotationCenter.Y() << "," <<
119 m_rotationCenter.Z());
120
121 }
122
124 {
125 return m_rotationCenter;
126 }
127
129 {
130 m_frameRotation = ROOT::Math::Rotation3D() * ROOT::Math::RotationY(v);
131 B2INFO("ARICHBtestGeometryPar::setFrameRotation=" << v);
132
133 }
134
136 {
137 return m_frameRotation;
138 }
139
141 {
142 m_averageAgel = v;
143 }
144
146 {
147 return m_averageAgel;
148 }
149
150
151
153 {
154 m_init = false;
155 m_simple = false;
156 m_trackingShift = ROOT::Math::XYZVector();
157 m_frameRotation = ROOT::Math::Rotation3D();
158 m_rotationCenter = ROOT::Math::XYZVector();
159 }
160
161 void ARICHBtestGeometryPar::setOffset(const ROOT::Math::XYZVector& v)
162 {
163 m_offset = v;
164 B2INFO("ARICHBtestGeometryPar::setOffset=" << m_offset.X() << "," << m_offset.Y() << "," << m_offset.Z());
165
166 }
167
168 ROOT::Math::XYZVector ARICHBtestGeometryPar::getOffset()
169 {
170 return m_offset;
171 }
172
173
175 {
176
177 }
178
180} // namespace Belle2
The Class for ARICH Beamtest Geometry Parameters.
ROOT::Math::XYZVector m_trackingShift
Tracking shift.
ROOT::Math::XYZVector m_rotationCenter
rotation center of the Aerogel RICH frame
ROOT::Math::Rotation3D m_frameRotation
rotation matrix of the Aerogel RICH frame
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
std::vector< std::pair< int, int > > m_hapdeid
mapping of the electronic channel to the HAPD module nr and the channel number
bool m_simple
True if parametrization initialized with simple geometry (beamtest)
bool m_init
True if parametrization is already initialized.
int m_nPads
Number of detector module pads.
std::vector< std::pair< double, double > > m_hapdmap
the position of the HAPD channels
ROOT::Math::XYZVector m_offset
Global offset.
bool m_averageAgel
flag for the reconstruction by using the average aerogel refractive index
Beamtest ARICH Geometry Tracking Class.
void setOffset(const ROOT::Math::XYZVector &)
Set of the setup global offset.
int AddHapdElectronicMapPair(int, int)
Set the mapping of the electronic channel to the HAPD module nr and the channel number.
void setRotationCenter(const ROOT::Math::XYZVector &)
Set the rotation center of the Aerogel RICH frame.
std::pair< double, double > GetHapdChannelPosition(int)
Get the position of the HAPD channel.
ROOT::Math::XYZVector getRotationCenter()
Get the rotation center of the Aerogel RICH frame.
void setTrackingShift(const ROOT::Math::XYZVector &)
Set the tracking shift.
ROOT::Math::Rotation3D getFrameRotation()
Get the rotation matrix of the Aerogel RICH frame.
std::pair< int, int > GetHapdElectronicMap(int)
Get the mapping of the electronic channel to the HAPD module nr and the channel number.
bool getAverageAgel()
Get the flag for the reconstruction by using the average aerogel refractive index.
void setFrameRotation(double)
Set the rotation angle of the Aerogel RICH frame.
void setMwpc(ARICHTracking *m_mwpc)
Set the pointer of the tracking MWPCs.
static ARICHBtestGeometryPar * Instance()
Static method to get a reference to the ARICHBtestGeometryPar instance.
void Print(void) const
Print some debug information.
static ARICHBtestGeometryPar * p_B4ARICHBtestGeometryParDB
Pointer that saves the instance of this class.
virtual ~ARICHBtestGeometryPar()
Destructor.
void setAverageAgel(bool)
Set the flag for the reconstruction by using the average aerogel refractive index.
ROOT::Math::XYZVector getTrackingShift()
Get the tracking shift.
int AddHapdChannelPositionPair(double, double)
Set the position of the HAPD channel.
ARICHTracking * getMwpc()
Get the pointer of the tracking MWPCs.
ROOT::Math::XYZVector getOffset()
Get the setup global offset.
Abstract base class for different kinds of events.
STL namespace.