Belle II Software  release-08-01-10
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 "TRotation.h"
16 #include "TVector3.h"
17 
18 namespace Belle2 {
24 
26  class ARICHTracking {
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 TVector3&);
139  TVector3 getTrackingShift();
141  void setRotationCenter(const TVector3&);
143  TVector3 getRotationCenter();
144 
146  void setFrameRotation(double);
148  TRotation 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 TVector3&);
168  TVector3 getOffset();
169 
170 
171  private:
175  TVector3 m_offset;
177  TVector3 m_trackingShift;
181  TRotation m_frameRotation;
185  std::vector < std::pair<double, double> > m_hapdmap;
187  std::vector < std::pair<int, int> > m_hapdeid;
188 
189  int m_nPads;
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.
ARICHBtestGeometryPar & operator=(const ARICHBtestGeometryPar &)=delete
Operator = (disabled)
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
TVector3 m_rotationCenter
rotation center of the Aerogel RICH frame
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)
TRotation m_frameRotation
rotation matrix of the Aerogel RICH frame
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.
TVector3 m_trackingShift
Tracking shift.
std::vector< std::pair< double, double > > m_hapdmap
the position of the HAPD channels
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 (\delta x= slope \delta t + offset) - 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 setRotationCenter(const TVector3 &)
Set the rotation center of the Aerogel RICH frame.
TVector3 getRotationCenter()
Get the rotation center of the Aerogel RICH frame.
int AddHapdElectronicMapPair(int, int)
Set the mapping of the electronic channel to the HAPD module nr and the channel number.
TVector3 getOffset()
Get the setup global offset.
std::pair< double, double > GetHapdChannelPosition(int)
Get the position of the HAPD channel.
std::pair< int, int > GetHapdElectronicMap(int)
Get the mapping of the electronic channel to the HAPD module nr and the channel number.
void setTrackingShift(const TVector3 &)
Set the tracking shift.
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.
TRotation getFrameRotation()
Get the rotation matrix of the Aerogel RICH frame.
static ARICHBtestGeometryPar * p_B4ARICHBtestGeometryParDB
Pointer that saves the instance of this class.
virtual ~ARICHBtestGeometryPar()
Destructor.
void setOffset(const TVector3 &)
Set of the setup global offset.
void setAverageAgel(bool)
Set the flag for the reconstruction by using the average aerogel refractive index.
int AddHapdChannelPositionPair(double, double)
Set the position of the HAPD channel.
ARICHTracking * getMwpc()
Get the pointer of the tracking MWPCs.
TVector3 getTrackingShift()
Get the tracking shift.
Abstract base class for different kinds of events.