Belle II Software  release-05-01-25
ARICHBtestGeometryPar.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj, Rok Pestotnik *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef ARICHBTESTGEOMETRYPAR_H
12 #define ARICHBTESTGEOMETRYPAR_H
13 
14 #include <utility>
15 #include <vector>
16 #include <framework/gearbox/GearDir.h>
17 #include "TRotation.h"
18 #include "TVector3.h"
19 
20 namespace Belle2 {
25 
28  class ARICHTracking {
29  public:
31  ARICHTracking():
32  atdc(0)
33  {
34  for (int i = 0; i < 4; i++) tdc[i] = 0;
35  for (int i = 0; i < 2; i++) {
36  slp[i] = 0;
37  offset[i] = 0;
38  cutll[i] = 0;
39  cutul[i] = 0;
40  diff[i] = 0;
41  sum[i] = 0;
42  status[i] = 0;
43  }
44  for (int i = 0; i < 3; i++) {
45  pos[i] = 0;
46  reco[i] = 0;
47  }
48  };
50  ~ARICHTracking() {};
52  int tdc[4];
54  int atdc;
56  float slp[2];
58  float offset[2];
60  int cutll[2];
62  int cutul[2];
64  float pos[3];
65 
67  int diff[2];
69  int sum[2];
71  int status[2];
73  double reco[3];
75  void Print()
76  {
77  printf("----------------------------------------------------------------\n");
78  for (int i = 0; i < 4; i++) printf("tdc%d= %d\t", i, tdc[i]);
79  printf("\n");
80  for (int i = 0; i < 1; i++) printf("atdc%d= %d\t", i, atdc);
81  printf("\n");
82  for (int i = 0; i < 2; i++) printf("slp%d= %3.3f\t", i, slp[i]);
83  printf("\n");
84  for (int i = 0; i < 2; i++) printf("off%d= %3.3f\t", i, offset[i]);
85  printf("\n");
86  for (int i = 0; i < 2; i++) printf("cutll%d= %d\t", i, cutll[i]);
87  printf("\n");
88  for (int i = 0; i < 2; i++) printf("cutul%d= %d\t", i, cutul[i]);
89  printf("\n");
90  for (int i = 0; i < 3; i++) printf("pos%d= %3.3f\t", i, pos[i]);
91  printf("\n");
92  };
93  };
94 
96 
101  class ARICHBtestGeometryPar {
102 
103  public:
104 
107 
110 
112  virtual ~ARICHBtestGeometryPar();
113 
115 
120  void Initialize(const GearDir& content);
122  void Initialize(const GearDir& modulecontent, const GearDir& mirrorcontent);
123 
124 
126  void clear(void);
127 
129  void Print(void) const;
130 
132  void read(const GearDir& content);
133 
134 
136  void setTrackingShift(const TVector3&);
138  TVector3 getTrackingShift();
140  void setRotationCenter(const TVector3&);
142  TVector3 getRotationCenter();
143 
145  void setFrameRotation(double);
147  TRotation getFrameRotation();
149  void setAverageAgel(bool);
151  bool getAverageAgel();
157  std::pair<double, double> GetHapdChannelPosition(int);
159  std::pair<int, int> GetHapdElectronicMap(int);
161  int AddHapdChannelPositionPair(double , double);
163  int AddHapdElectronicMapPair(int, int);
165  void setOffset(const TVector3&);
167  TVector3 getOffset();
168 
169 
170  private:
174  TVector3 m_offset;
176  TVector3 m_trackingShift;
178  TVector3 m_rotationCenter;
180  TRotation m_frameRotation;
184  std::vector < std::pair<double, double> > m_hapdmap;
186  std::vector < std::pair<int, int> > m_hapdeid;
187 
188  int m_nPads;
190  bool m_init;
191  bool m_simple;
197  // vectors holding information on HAPDs and chips and pads positions.
198 
199 
200  };
201 
202  //-----------------------------------------------------------------------------
203 
205 } // end of namespace Belle2
206 
207 #endif
208 
Belle2::ARICHTracking::cutll
int cutll[2]
Cuts on the tdc sums - lower levels.
Definition: ARICHBtestGeometryPar.h:68
Belle2::ARICHBtestGeometryPar::AddHapdElectronicMapPair
int AddHapdElectronicMapPair(int, int)
Set the mapping of the electronic channel to the HAPD module nr and the channel number.
Definition: ARICHBtestGeometryPar.cc:100
Belle2::ARICHTracking::offset
float offset[2]
Calibration constants of the MWPC - offsets for x an y direction.
Definition: ARICHBtestGeometryPar.h:66
Belle2::ARICHTracking::diff
int diff[2]
TDC difference.
Definition: ARICHBtestGeometryPar.h:75
Belle2::ARICHBtestGeometryPar::setRotationCenter
void setRotationCenter(const TVector3 &)
Set the rotation center of the Aerogel RICH frame.
Definition: ARICHBtestGeometryPar.cc:120
Belle2::ARICHBtestGeometryPar::m_trackingShift
TVector3 m_trackingShift
Tracking shift.
Definition: ARICHBtestGeometryPar.h:184
Belle2::ARICHBtestGeometryPar::m_frameRotation
TRotation m_frameRotation
rotation matrix of the Aerogel RICH frame
Definition: ARICHBtestGeometryPar.h:188
Belle2::ARICHBtestGeometryPar::m_averageAgel
bool m_averageAgel
flag for the reconstruction by using the average aerogel refractive index
Definition: ARICHBtestGeometryPar.h:190
Belle2::ARICHTracking::slp
float slp[2]
Calibration constants of the MWPC (\delta x= slope \delta t + offset) - slopes for x an y direction.
Definition: ARICHBtestGeometryPar.h:64
Belle2::ARICHBtestGeometryPar::getFrameRotation
TRotation getFrameRotation()
Get the rotation matrix of the Aerogel RICH frame.
Definition: ARICHBtestGeometryPar.cc:141
Belle2::ARICHBtestGeometryPar::AddHapdChannelPositionPair
int AddHapdChannelPositionPair(double, double)
Set the position of the HAPD channel.
Definition: ARICHBtestGeometryPar.cc:94
Belle2::ARICHTracking::ARICHTracking
ARICHTracking()
Default Constructor.
Definition: ARICHBtestGeometryPar.h:39
Belle2::ARICHTracking::Print
void Print()
Debug printouts.
Definition: ARICHBtestGeometryPar.h:83
Belle2::ARICHBtestGeometryPar::ARICHBtestGeometryPar
ARICHBtestGeometryPar()
Constructor.
Definition: ARICHBtestGeometryPar.cc:37
Belle2::ARICHBtestGeometryPar::clear
void clear(void)
Clears.
Definition: ARICHBtestGeometryPar.cc:158
Belle2::ARICHBtestGeometryPar::setFrameRotation
void setFrameRotation(double)
Set the rotation angle of the Aerogel RICH frame.
Definition: ARICHBtestGeometryPar.cc:133
Belle2::ARICHTracking::status
int status[2]
Status of the position determination.
Definition: ARICHBtestGeometryPar.h:79
Belle2::ARICHBtestGeometryPar::~ARICHBtestGeometryPar
virtual ~ARICHBtestGeometryPar()
Destructor.
Definition: ARICHBtestGeometryPar.cc:68
Belle2::ARICHBtestGeometryPar::GetHapdChannelPosition
std::pair< double, double > GetHapdChannelPosition(int)
Get the position of the HAPD channel.
Definition: ARICHBtestGeometryPar.cc:84
Belle2::ARICHTracking::~ARICHTracking
~ARICHTracking()
Default destructor.
Definition: ARICHBtestGeometryPar.h:58
Belle2::ARICHBtestGeometryPar::read
void read(const GearDir &content)
gets geometry parameters from gearbox.
Belle2::ARICHTracking::tdc
int tdc[4]
TDC of the 4 cathode signals.
Definition: ARICHBtestGeometryPar.h:58
Belle2::ARICHTracking::reco
double reco[3]
Reconstructed position of the hit.
Definition: ARICHBtestGeometryPar.h:81
Belle2::ARICHTracking::atdc
int atdc
TDC of the anode signal.
Definition: ARICHBtestGeometryPar.h:62
Belle2::ARICHBtestGeometryPar::setAverageAgel
void setAverageAgel(bool)
Set the flag for the reconstruction by using the average aerogel refractive index.
Definition: ARICHBtestGeometryPar.cc:146
Belle2::ARICHBtestGeometryPar::getMwpc
ARICHTracking * getMwpc()
Get the pointer of the tracking MWPCs.
Definition: ARICHBtestGeometryPar.cc:79
Belle2::ARICHBtestGeometryPar::getOffset
TVector3 getOffset()
Get the setup global offset.
Definition: ARICHBtestGeometryPar.cc:174
Belle2::ARICHBtestGeometryPar::setOffset
void setOffset(const TVector3 &)
Set of the setup global offset.
Definition: ARICHBtestGeometryPar.cc:167
Belle2::ARICHBtestGeometryPar::getAverageAgel
bool getAverageAgel()
Get the flag for the reconstruction by using the average aerogel refractive index.
Definition: ARICHBtestGeometryPar.cc:151
Belle2::ARICHBtestGeometryPar::m_init
bool m_init
True if parametrization is already initialized.
Definition: ARICHBtestGeometryPar.h:198
Belle2::ARICHTracking::pos
float pos[3]
MWPC chamber position.
Definition: ARICHBtestGeometryPar.h:72
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHBtestGeometryPar::Instance
static ARICHBtestGeometryPar * Instance()
Static method to get a reference to the ARICHBtestGeometryPar instance.
Definition: ARICHBtestGeometryPar.cc:29
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
Belle2::ARICHBtestGeometryPar::Initialize
void Initialize(const GearDir &content)
calculates detector parameters needed for geometry build and reconstruction.
Belle2::ARICHBtestGeometryPar::p_B4ARICHBtestGeometryParDB
static ARICHBtestGeometryPar * p_B4ARICHBtestGeometryParDB
Pointer that saves the instance of this class.
Definition: ARICHBtestGeometryPar.h:203
Belle2::ARICHBtestGeometryPar::getRotationCenter
TVector3 getRotationCenter()
Get the rotation center of the Aerogel RICH frame.
Definition: ARICHBtestGeometryPar.cc:128
Belle2::ARICHBtestGeometryPar::getTrackingShift
TVector3 getTrackingShift()
Get the tracking shift.
Definition: ARICHBtestGeometryPar.cc:115
Belle2::ARICHBtestGeometryPar::m_offset
TVector3 m_offset
Global offset.
Definition: ARICHBtestGeometryPar.h:182
Belle2::ARICHBtestGeometryPar::GetHapdElectronicMap
std::pair< int, int > GetHapdElectronicMap(int)
Get the mapping of the electronic channel to the HAPD module nr and the channel number.
Definition: ARICHBtestGeometryPar.cc:89
Belle2::ARICHBtestGeometryPar::setMwpc
void setMwpc(ARICHTracking *m_mwpc)
Set the pointer of the tracking MWPCs.
Definition: ARICHBtestGeometryPar.cc:73
Belle2::ARICHTracking::sum
int sum[2]
TDC sum.
Definition: ARICHBtestGeometryPar.h:77
Belle2::ARICHBtestGeometryPar::m_hapdeid
std::vector< std::pair< int, int > > m_hapdeid
mapping of the electronic channel to the HAPD module nr and the channel number
Definition: ARICHBtestGeometryPar.h:194
Belle2::ARICHTracking
Beamtest ARICH Geometry Tracking Class.
Definition: ARICHBtestGeometryPar.h:36
Belle2::ARICHBtestGeometryPar::m_rotationCenter
TVector3 m_rotationCenter
rotation center of the Aerogel RICH frame
Definition: ARICHBtestGeometryPar.h:186
Belle2::ARICHBtestGeometryPar::m_hapdmap
std::vector< std::pair< double, double > > m_hapdmap
the position of the HAPD channels
Definition: ARICHBtestGeometryPar.h:192
Belle2::ARICHBtestGeometryPar::m_simple
bool m_simple
True if parametrization initialized with simple geometry (beamtest)
Definition: ARICHBtestGeometryPar.h:199
Belle2::ARICHBtestGeometryPar::m_nPads
int m_nPads
Number of detector module pads.
Definition: ARICHBtestGeometryPar.h:196
Belle2::ARICHTracking::cutul
int cutul[2]
Cuts on the tdc sums - upper levels.
Definition: ARICHBtestGeometryPar.h:70
Belle2::ARICHBtestGeometryPar::setTrackingShift
void setTrackingShift(const TVector3 &)
Set the tracking shift.
Definition: ARICHBtestGeometryPar.cc:106
Belle2::ARICHBtestGeometryPar::Print
void Print(void) const
Print some debug information.
Definition: ARICHBtestGeometryPar.cc:180
Belle2::ARICHBtestGeometryPar
The Class for ARICH Beamtest Geometry Parameters.
Definition: ARICHBtestGeometryPar.h:109
Belle2::ARICHBtestGeometryPar::m_mwpc
ARICHTracking * m_mwpc
Pointer to the tracking chambers.
Definition: ARICHBtestGeometryPar.h:180