Belle II Software development
ARICHBtestGeometryPar.h
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#ifndef ARICHBTESTGEOMETRYPAR_H
10#define ARICHBTESTGEOMETRYPAR_H
11
12#include <utility>
13#include <vector>
14#include <framework/gearbox/GearDir.h>
15#include <Math/Vector3D.h>
16#include <Math/Rotation3D.h>
17
18namespace Belle2 {
24
27 public:
30 atdc(0)
31 {
32 for (int i = 0; i < 4; i++) tdc[i] = 0;
33 for (int i = 0; i < 2; i++) {
34 slp[i] = 0;
35 offset[i] = 0;
36 cutll[i] = 0;
37 cutul[i] = 0;
38 diff[i] = 0;
39 sum[i] = 0;
40 status[i] = 0;
41 }
42 for (int i = 0; i < 3; i++) {
43 pos[i] = 0;
44 reco[i] = 0;
45 }
46 };
50 int tdc[4];
52 int atdc;
54 float slp[2];
56 float offset[2];
58 int cutll[2];
60 int cutul[2];
62 float pos[3];
63
65 int diff[2];
67 int sum[2];
69 int status[2];
71 double reco[3];
73 void Print()
74 {
75 printf("----------------------------------------------------------------\n");
76 for (int i = 0; i < 4; i++) printf("tdc%d= %d\t", i, tdc[i]);
77 printf("\n");
78 for (int i = 0; i < 1; i++) printf("atdc%d= %d\t", i, atdc);
79 printf("\n");
80 for (int i = 0; i < 2; i++) printf("slp%d= %3.3f\t", i, slp[i]);
81 printf("\n");
82 for (int i = 0; i < 2; i++) printf("off%d= %3.3f\t", i, offset[i]);
83 printf("\n");
84 for (int i = 0; i < 2; i++) printf("cutll%d= %d\t", i, cutll[i]);
85 printf("\n");
86 for (int i = 0; i < 2; i++) printf("cutul%d= %d\t", i, cutul[i]);
87 printf("\n");
88 for (int i = 0; i < 3; i++) printf("pos%d= %3.3f\t", i, pos[i]);
89 printf("\n");
90 };
91 };
92
94
100
101 public:
102
105
108
110 virtual ~ARICHBtestGeometryPar();
111
114
116
121 void Initialize(const GearDir& content);
123 void Initialize(const GearDir& modulecontent, const GearDir& mirrorcontent);
124
125
127 void clear(void);
128
130 void Print(void) const;
131
133 void read(const GearDir& content);
134
135
137 void setTrackingShift(const ROOT::Math::XYZVector&);
139 ROOT::Math::XYZVector getTrackingShift();
141 void setRotationCenter(const ROOT::Math::XYZVector&);
143 ROOT::Math::XYZVector getRotationCenter();
144
146 void setFrameRotation(double);
148 ROOT::Math::Rotation3D getFrameRotation();
150 void setAverageAgel(bool);
152 bool getAverageAgel();
158 std::pair<double, double> GetHapdChannelPosition(int);
160 std::pair<int, int> GetHapdElectronicMap(int);
162 int AddHapdChannelPositionPair(double, double);
164 int AddHapdElectronicMapPair(int, int);
166 void setOffset(const ROOT::Math::XYZVector&);
168 ROOT::Math::XYZVector getOffset();
169
170
171 private:
175 ROOT::Math::XYZVector m_offset;
177 ROOT::Math::XYZVector m_trackingShift;
179 ROOT::Math::XYZVector m_rotationCenter;
181 ROOT::Math::Rotation3D m_frameRotation;
185 std::vector < std::pair<double, double> > m_hapdmap;
187 std::vector < std::pair<int, int> > m_hapdeid;
188
191 bool m_init;
192 bool m_simple;
198 // vectors holding information on HAPDs and chips and pads positions.
199
200
201 };
202
203 //-----------------------------------------------------------------------------
204
206} // end of namespace Belle2
207
208#endif
209
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.
ARICHBtestGeometryPar & operator=(const ARICHBtestGeometryPar &)=delete
Operator = (disabled)
void Initialize(const GearDir &content)
calculates detector parameters needed for geometry build and reconstruction.
std::vector< std::pair< int, int > > m_hapdeid
mapping of the electronic channel to the HAPD module nr and the channel number
void read(const GearDir &content)
gets geometry parameters from gearbox.
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.
void Initialize(const GearDir &modulecontent, const GearDir &mirrorcontent)
calculates detector parameters needed for geometry build and reconstruction.
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.
~ARICHTracking()
Default destructor.
ARICHTracking()
Default Constructor.
float slp[2]
Calibration constants of the MWPC ( ) - slopes for x an y direction.
int diff[2]
TDC difference.
int cutll[2]
Cuts on the tdc sums - lower levels.
float pos[3]
MWPC chamber position.
int tdc[4]
TDC of the 4 cathode signals.
void Print()
Debug printouts.
int status[2]
Status of the position determination.
int atdc
TDC of the anode signal.
float offset[2]
Calibration constants of the MWPC - offsets for x an y direction.
int cutul[2]
Cuts on the tdc sums - upper levels.
double reco[3]
Reconstructed position of the hit.
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
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.