Belle II Software  release-05-02-19
TOPCalModuleAlignment.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2016 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Umberto Tamponi (tamponi@to.infn.it), Marko Staric *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <TObject.h>
13 
14 namespace Belle2 {
26  class TOPCalModuleAlignment: public TObject {
27  public:
28 
32  enum EStatus {
33  c_Default = 0,
35  c_Unusable = 2
36  };
37 
43 
50  void setAlpha(int moduleID, double alpha, double errAlpha);
51 
58  void setBeta(int moduleID, double beta, double errBeta);
59 
66  void setGamma(int moduleID, double gamma, double errGamma);
67 
74  void setX(int moduleID, double x, double errX);
75 
82  void setY(int moduleID, double y, double errY);
83 
90  void setZ(int moduleID, double z, double errZ);
91 
96  void setCalibrated(int moduleID);
97 
102  void setUnusable(int moduleID);
103 
109  double getAlpha(int moduleID) const;
110 
116  double getBeta(int moduleID) const;
117 
123  double getGamma(int moduleID) const;
124 
130  double getX(int moduleID) const;
131 
137  double getY(int moduleID) const;
138 
144  double getZ(int moduleID) const;
145 
151  double getAlphaErr(int moduleID) const;
152 
158  double getBetaErr(int moduleID) const;
159 
165  double getGammaErr(int moduleID) const;
166 
172  double getXErr(int moduleID) const;
173 
179  double getYErr(int moduleID) const;
180 
186  double getZErr(int moduleID) const;
187 
193  bool isCalibrated(int moduleID) const;
194 
200  bool isDefault(int moduleID) const;
201 
207  bool isUnusable(int moduleID) const;
208 
212  bool areAllCalibrated() const;
213 
219  bool areAllPrecise(double spatialPrecision, double angularPrecision) const;
220 
221  private:
222 
226  enum {c_numModules = 16,
227  };
228 
229  float m_alpha[c_numModules] = {0};
230  float m_beta[c_numModules] = {0};
231  float m_gamma[c_numModules] = {0};
232  float m_x[c_numModules] = {0};
233  float m_y[c_numModules] = {0};
234  float m_z[c_numModules] = {0};
236  float m_errAlpha[c_numModules] = {0};
237  float m_errBeta[c_numModules] = {0};
238  float m_errGamma[c_numModules] = {0};
239  float m_errX[c_numModules] = {0};
240  float m_errY[c_numModules] = {0};
241  float m_errZ[c_numModules] = {0};
247  };
248 
250 } // end namespace Belle2
251 
Belle2::TOPCalModuleAlignment::setX
void setX(int moduleID, double x, double errX)
Sets the displacement x on a single module.
Definition: TOPCalModuleAlignment.cc:55
Belle2::TOPCalModuleAlignment::setAlpha
void setAlpha(int moduleID, double alpha, double errAlpha)
Sets the angle alpha on a single module.
Definition: TOPCalModuleAlignment.cc:22
Belle2::TOPCalModuleAlignment::c_Unusable
@ c_Unusable
bad calibrated value
Definition: TOPCalModuleAlignment.h:43
Belle2::TOPCalModuleAlignment::getYErr
double getYErr(int moduleID) const
Returns the error on y on a single module.
Definition: TOPCalModuleAlignment.cc:208
Belle2::TOPCalModuleAlignment::areAllPrecise
bool areAllPrecise(double spatialPrecision, double angularPrecision) const
Returns true if calibration precision for all modules is within specified values.
Definition: TOPCalModuleAlignment.cc:257
Belle2::TOPCalModuleAlignment::getX
double getX(int moduleID) const
Returns the shift x on a single module.
Definition: TOPCalModuleAlignment.cc:138
Belle2::TOPCalModuleAlignment::m_errY
float m_errY[c_numModules]
error on the y displacement
Definition: TOPCalModuleAlignment.h:248
Belle2::TOPCalModuleAlignment::isCalibrated
bool isCalibrated(int moduleID) const
Returns calibration status.
Definition: TOPCalModuleAlignment.cc:228
Belle2::TOPCalModuleAlignment::getBetaErr
double getBetaErr(int moduleID) const
Returns the error on beta on a single module.
Definition: TOPCalModuleAlignment.cc:178
Belle2::TOPCalModuleAlignment::getXErr
double getXErr(int moduleID) const
Returns the error on x on a single module.
Definition: TOPCalModuleAlignment.cc:198
Belle2::TOPCalModuleAlignment::m_beta
float m_beta[c_numModules]
rotation angle around the y axis
Definition: TOPCalModuleAlignment.h:238
Belle2::TOPCalModuleAlignment::m_errGamma
float m_errGamma[c_numModules]
error on gamma
Definition: TOPCalModuleAlignment.h:246
Belle2::TOPCalModuleAlignment::TOPCalModuleAlignment
TOPCalModuleAlignment()
Default constructor All the calibrations constants and the related errors are set to zero.
Definition: TOPCalModuleAlignment.h:50
Belle2::TOPCalModuleAlignment::m_errAlpha
float m_errAlpha[c_numModules]
error on alpha
Definition: TOPCalModuleAlignment.h:244
Belle2::TOPCalModuleAlignment::getZErr
double getZErr(int moduleID) const
Returns the error on z on a single module.
Definition: TOPCalModuleAlignment.cc:218
Belle2::TOPCalModuleAlignment::c_Calibrated
@ c_Calibrated
good calibrated value
Definition: TOPCalModuleAlignment.h:42
Belle2::TOPCalModuleAlignment::EStatus
EStatus
Calibration status of a constant.
Definition: TOPCalModuleAlignment.h:40
Belle2::TOPCalModuleAlignment::getAlphaErr
double getAlphaErr(int moduleID) const
Returns the error on alpha on a single module.
Definition: TOPCalModuleAlignment.cc:168
Belle2::TOPCalModuleAlignment::c_Default
@ c_Default
uncalibrated default value
Definition: TOPCalModuleAlignment.h:41
Belle2::TOPCalModuleAlignment::m_errBeta
float m_errBeta[c_numModules]
error on beta
Definition: TOPCalModuleAlignment.h:245
Belle2::TOPCalModuleAlignment::c_numModules
@ c_numModules
number of modules
Definition: TOPCalModuleAlignment.h:234
Belle2::TOPCalModuleAlignment::m_z
float m_z[c_numModules]
displacement along the z axis
Definition: TOPCalModuleAlignment.h:242
Belle2::TOPCalModuleAlignment::getBeta
double getBeta(int moduleID) const
Gets the angle beta on a single module.
Definition: TOPCalModuleAlignment.cc:118
Belle2::TOPCalModuleAlignment::getZ
double getZ(int moduleID) const
Returns the shift z on a single module.
Definition: TOPCalModuleAlignment.cc:158
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::TOPCalModuleAlignment::setGamma
void setGamma(int moduleID, double gamma, double errGamma)
Sets the angle gamma on a single module.
Definition: TOPCalModuleAlignment.cc:44
Belle2::TOPCalModuleAlignment::m_gamma
float m_gamma[c_numModules]
rotation angle around the z axis
Definition: TOPCalModuleAlignment.h:239
Belle2::TOPCalModuleAlignment::getGamma
double getGamma(int moduleID) const
Gets the angle gamma on a single module.
Definition: TOPCalModuleAlignment.cc:128
Belle2::TOPCalModuleAlignment::m_status
EStatus m_status[c_numModules]
calibration status
Definition: TOPCalModuleAlignment.h:251
Belle2::TOPCalModuleAlignment::m_x
float m_x[c_numModules]
displacement along the x axis
Definition: TOPCalModuleAlignment.h:240
Belle2::TOPCalModuleAlignment::getY
double getY(int moduleID) const
Returns the shift y on a single module.
Definition: TOPCalModuleAlignment.cc:148
Belle2::TOPCalModuleAlignment::setBeta
void setBeta(int moduleID, double beta, double errBeta)
Sets the angle beta on a single module.
Definition: TOPCalModuleAlignment.cc:33
Belle2::TOPCalModuleAlignment::setUnusable
void setUnusable(int moduleID)
Switches calibration status to unusable to flag badly calibrated constant.
Definition: TOPCalModuleAlignment.cc:98
Belle2::TOPCalModuleAlignment::m_alpha
float m_alpha[c_numModules]
rotation angle around the x axis
Definition: TOPCalModuleAlignment.h:237
Belle2::TOPCalModuleAlignment::m_errX
float m_errX[c_numModules]
error on the x displacement
Definition: TOPCalModuleAlignment.h:247
Belle2::TOPCalModuleAlignment::getGammaErr
double getGammaErr(int moduleID) const
Returns the error on gamma on a single module.
Definition: TOPCalModuleAlignment.cc:188
Belle2::TOPCalModuleAlignment::m_y
float m_y[c_numModules]
displacement along the y axis
Definition: TOPCalModuleAlignment.h:241
Belle2::TOPCalModuleAlignment::getAlpha
double getAlpha(int moduleID) const
Gets the angle alpha on a single module.
Definition: TOPCalModuleAlignment.cc:108
Belle2::TOPCalModuleAlignment::ClassDef
ClassDef(TOPCalModuleAlignment, 3)
ClassDef.
Belle2::TOPCalModuleAlignment::isDefault
bool isDefault(int moduleID) const
Returns calibration status.
Definition: TOPCalModuleAlignment.cc:235
Belle2::TOPCalModuleAlignment::isUnusable
bool isUnusable(int moduleID) const
Returns calibration status.
Definition: TOPCalModuleAlignment.cc:242
Belle2::TOPCalModuleAlignment::setCalibrated
void setCalibrated(int moduleID)
Switches calibration status to calibrated.
Definition: TOPCalModuleAlignment.cc:88
Belle2::TOPCalModuleAlignment::setY
void setY(int moduleID, double y, double errY)
Sets the displacement y on a single module.
Definition: TOPCalModuleAlignment.cc:66
Belle2::TOPCalModuleAlignment::areAllCalibrated
bool areAllCalibrated() const
Returns true if all modules are calibrated.
Definition: TOPCalModuleAlignment.cc:249
Belle2::TOPCalModuleAlignment::setZ
void setZ(int moduleID, double z, double errZ)
Sets the displacement z on a single module.
Definition: TOPCalModuleAlignment.cc:77
Belle2::TOPCalModuleAlignment::m_errZ
float m_errZ[c_numModules]
error on the z displacement
Definition: TOPCalModuleAlignment.h:249
Belle2::TOPCalModuleAlignment
Alignment constants constants for all 16 modules.
Definition: TOPCalModuleAlignment.h:34