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
15#include <boost/format.hpp>
16#include <boost/foreach.hpp>
17
18using namespace std;
19using namespace boost;
20
21namespace Belle2 {
28
30 {
33 }
35 }
36
38 m_mwpc(new ARICHTracking),
39 m_trackingShift(ROOT::Math::XYZVector()),
40 m_rotationCenter(ROOT::Math::XYZVector()),
41 m_frameRotation(ROOT::Math::Rotation3D()),
42 m_averageAgel(0),
43 m_nPads(0),
44 m_init(0),
45 m_simple(0)
46 {
47 clear();
48 }
49
50
52 m_trackingShift(arichPar.m_trackingShift),
53 m_rotationCenter(arichPar.m_rotationCenter),
54 m_frameRotation(arichPar.m_frameRotation),
55 m_hapdmap(arichPar.m_hapdmap),
56 m_hapdeid(arichPar.m_hapdeid)
57 {
59 m_nPads = arichPar.m_nPads;
60 m_init = arichPar.m_init;
61 m_simple = arichPar.m_simple;
62 m_mwpc = new ARICHTracking();
63 *m_mwpc = *arichPar.m_mwpc;
65 }
66
68 {
69 }
70
71
73 {
74 m_mwpc = m;
75 }
76
77
79 {
80 return m_mwpc;
81 }
82
83 std::pair<double, double> ARICHBtestGeometryPar::GetHapdChannelPosition(int id)
84 {
85 return m_hapdmap[id];
86 }
87
89 {
90 return m_hapdeid[id];
91 }
92
94 {
95 m_hapdmap.push_back(std::make_pair(x, y));
96 return m_hapdmap.size();
97 }
98
100 {
101 m_hapdeid.push_back(std::make_pair(x, y));
102 return m_hapdeid.size();
103 }
104
105 void ARICHBtestGeometryPar::setTrackingShift(const ROOT::Math::XYZVector& v)
106 {
107 m_trackingShift = v;
108 B2INFO("ARICHBtestGeometryPar::setTrackingShift=" << m_trackingShift.X() << "," << m_trackingShift.Y() << "," <<
109 m_trackingShift.Z());
110
111 }
112
113
115 {
116 return m_trackingShift;
117 }
118
119 void ARICHBtestGeometryPar::setRotationCenter(const ROOT::Math::XYZVector& v)
120 {
122 B2INFO("ARICHBtestGeometryPar::setRotationCenter=" << m_rotationCenter.X() << "," << m_rotationCenter.Y() << "," <<
123 m_rotationCenter.Z());
124
125 }
126
128 {
129 return m_rotationCenter;
130 }
131
133 {
134 m_frameRotation = ROOT::Math::Rotation3D() * ROOT::Math::RotationY(v);
135 B2INFO("ARICHBtestGeometryPar::setFrameRotation=" << v);
136
137 }
138
140 {
141 return m_frameRotation;
142 }
143
145 {
146 m_averageAgel = v;
147 }
148
150 {
151 return m_averageAgel;
152 }
153
154
155
157 {
158 m_init = false;
159 m_simple = false;
160 m_trackingShift = ROOT::Math::XYZVector();
161 m_frameRotation = ROOT::Math::Rotation3D();
162 m_rotationCenter = ROOT::Math::XYZVector();
163 }
164
165 void ARICHBtestGeometryPar::setOffset(const ROOT::Math::XYZVector& v)
166 {
167 m_offset = v;
168 B2INFO("ARICHBtestGeometryPar::setOffset=" << m_offset.X() << "," << m_offset.Y() << "," << m_offset.Z());
169
170 }
171
172 ROOT::Math::XYZVector ARICHBtestGeometryPar::getOffset()
173 {
174 return m_offset;
175 }
176
177
179 {
180
181 }
182
184} // 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.