Belle II Software development
TOPGeoModuleDisplacement Class Reference

Displacement parameters of a TOP module. More...

#include <TOPGeoModuleDisplacement.h>

Inheritance diagram for TOPGeoModuleDisplacement:
TOPGeoBase

Public Member Functions

 TOPGeoModuleDisplacement ()
 Default constructor.
 
 TOPGeoModuleDisplacement (double x, double y, double z, double alpha, double beta, double gamma, const std::string &name="TOPModuleDisplacement")
 Full constructor.
 
double getX () const
 Returns translation in x.
 
double getY () const
 Returns translation in y.
 
double getZ () const
 Returns translation in z.
 
double getAlpha () const
 Returns rotation angle around x.
 
double getBeta () const
 Returns rotation angle around y.
 
double getGamma () const
 Returns rotation angle around z.
 
ROOT::Math::Transform3D getTransformation () const
 Returns transformation from local to nominal frame.
 
bool isConsistent () const override
 Check for consistency of data members.
 
void print (const std::string &title="Module displacement parameters") const override
 Print the content of the class.
 
void setName (const std::string &name)
 Sets object name.
 
const std::string & getName () const
 Returns object name.
 
virtual void printSurface (const GeoOpticalSurface &surface) const
 Print the content of optical surface.
 
double getReflectivity (const GeoOpticalSurface &surface, double energy) const
 Returns reflectivity of optical surface at given photon energy.
 

Protected Member Functions

void printUnderlined (const std::string &title) const
 Print the content of the class.
 
 ClassDef (TOPGeoBase, 1)
 ClassDef.
 

Protected Attributes

std::string m_name
 geometry object name
 

Static Protected Attributes

static double s_unit = Unit::cm
 conversion unit for length
 
static std::string s_unitName
 conversion unit name
 

Private Member Functions

 ClassDefOverride (TOPGeoModuleDisplacement, 1)
 ClassDef.
 

Private Attributes

float m_x = 0
 translation in x
 
float m_y = 0
 translation in y
 
float m_z = 0
 translation in z
 
float m_alpha = 0
 rotation angle around x
 
float m_beta = 0
 rotation angle around y
 
float m_gamma = 0
 rotation angle around z
 

Detailed Description

Displacement parameters of a TOP module.

To displace module: rotation first (around x, then y, then z), then translation (e.g. going from local to nominal frame)

Definition at line 25 of file TOPGeoModuleDisplacement.h.

Constructor & Destructor Documentation

◆ TOPGeoModuleDisplacement() [1/2]

Default constructor.

Definition at line 31 of file TOPGeoModuleDisplacement.h.

32 {}

◆ TOPGeoModuleDisplacement() [2/2]

TOPGeoModuleDisplacement ( double  x,
double  y,
double  z,
double  alpha,
double  beta,
double  gamma,
const std::string &  name = "TOPModuleDisplacement" 
)
inline

Full constructor.

Parameters
xtranslation in x
ytranslation in y
ztranslation in z
alpharotation angle around x
betarotation angle around y
gammarotation angle around z
nameobject name

Definition at line 44 of file TOPGeoModuleDisplacement.h.

46 :
47 TOPGeoBase(name),
48 m_x(x), m_y(y), m_z(z),
49 m_alpha(alpha), m_beta(beta), m_gamma(gamma)
50 {}
TOPGeoBase()
Default constructor.
Definition: TOPGeoBase.h:31
float m_beta
rotation angle around y
float m_alpha
rotation angle around x
float m_gamma
rotation angle around z

Member Function Documentation

◆ getAlpha()

double getAlpha ( ) const
inline

Returns rotation angle around x.

Returns
rotation angle

Definition at line 74 of file TOPGeoModuleDisplacement.h.

74{return m_alpha;}

◆ getBeta()

double getBeta ( ) const
inline

Returns rotation angle around y.

Returns
rotation angle

Definition at line 80 of file TOPGeoModuleDisplacement.h.

80{return m_beta;}

◆ getGamma()

double getGamma ( ) const
inline

Returns rotation angle around z.

Returns
rotation angle

Definition at line 86 of file TOPGeoModuleDisplacement.h.

86{return m_gamma;}

◆ getName()

const std::string & getName ( ) const
inlineinherited

Returns object name.

Returns
object name

Definition at line 51 of file TOPGeoBase.h.

51{return m_name;}
std::string m_name
geometry object name
Definition: TOPGeoBase.h:89

◆ getX()

double getX ( ) const
inline

Returns translation in x.

Returns
x coordinate

Definition at line 56 of file TOPGeoModuleDisplacement.h.

56{return m_x / s_unit;}
static double s_unit
conversion unit for length
Definition: TOPGeoBase.h:86

◆ getY()

double getY ( ) const
inline

Returns translation in y.

Returns
y coordinate

Definition at line 62 of file TOPGeoModuleDisplacement.h.

62{return m_y / s_unit;}

◆ getZ()

double getZ ( ) const
inline

Returns translation in z.

Returns
z coordinate

Definition at line 68 of file TOPGeoModuleDisplacement.h.

68{return m_z / s_unit;}

◆ isConsistent()

bool isConsistent ( ) const
inlineoverridevirtual

Check for consistency of data members.

Returns
true if values consistent (valid)

Reimplemented from TOPGeoBase.

Definition at line 99 of file TOPGeoModuleDisplacement.h.

99{return true;}

◆ setName()

void setName ( const std::string &  name)
inlineinherited

Sets object name.

Parameters
nameobject name

Definition at line 45 of file TOPGeoBase.h.

45{m_name = name;}

Member Data Documentation

◆ m_alpha

float m_alpha = 0
private

rotation angle around x

Definition at line 112 of file TOPGeoModuleDisplacement.h.

◆ m_beta

float m_beta = 0
private

rotation angle around y

Definition at line 113 of file TOPGeoModuleDisplacement.h.

◆ m_gamma

float m_gamma = 0
private

rotation angle around z

Definition at line 114 of file TOPGeoModuleDisplacement.h.

◆ m_name

std::string m_name
protectedinherited

geometry object name

Definition at line 89 of file TOPGeoBase.h.

◆ m_x

float m_x = 0
private

translation in x

Definition at line 109 of file TOPGeoModuleDisplacement.h.

◆ m_y

float m_y = 0
private

translation in y

Definition at line 110 of file TOPGeoModuleDisplacement.h.

◆ m_z

float m_z = 0
private

translation in z

Definition at line 111 of file TOPGeoModuleDisplacement.h.


The documentation for this class was generated from the following files: