9#include <top/dbobjects/TOPGeoModule.h>
10#include <framework/gearbox/Unit.h>
11#include <framework/logging/Logger.h>
14#include <Math/RotationZ.h>
18using namespace ROOT::Math;
35 if (
this != &module) {
36 TOPGeoBase::operator=(module);
39 m_phi = module.getPhi();
42 m_bar1 = module.getBarSegment1();
43 m_bar2 = module.getBarSegment2();
44 m_mirror = module.getMirrorSegment();
66 RotationZ Rz(
m_phi - M_PI / 2);
73 const std::string& material)
86 B2ERROR(
"TOPGeoModule::setBrokenGlue: invalid glue ID."
87 <<
LogVar(
"glue ID", glueID));
164 cout <<
"Slot " <<
getModuleID() <<
" geometry parameters:" << endl;
165 cout <<
"---------------------------" << endl;
166 cout <<
" name: " <<
m_name << endl;
176 m_bar2.
print(
"Bar segment 2 (backward) geometry parameters");
178 m_bar1.
print(
"Bar segment 1 (forward) geometry parameters");
virtual void setGlueDelamination(double fraction, double angle, const std::string &material)
Sets glue to be broken (delaminated)
Base class for geometry parameters.
std::string m_name
geometry object name
Geometry parameters of a module (optical components + positioning)
ROOT::Math::Transform3D * m_transformNominal
do not write out
unsigned getModuleCNumber() const
Returns module construction number (0 = ideal module)
TOPGeoPMTArrayDisplacement m_arrayDisplacement
PMT array displacement.
float m_backwardZ
z position of prism-bar joint in Belle II frame
double getPhi() const
Returns module azimuthal angle in Belle II frame.
float m_phi
azimuthal angle in Belle II frame
double getZc() const
Returns z of bar center (w/o prism) in Belle II frame.
float m_radius
radius of bar central plane in Belle II frame
ROOT::Math::Transform3D * m_transform
cache for transformation from internal (= nominal & displaced) to Belle II frame
int getModuleID() const
Returns module ID.
TOPGeoPMTArray m_pmtArray
geometry parameters of PMT array
TOPGeoMirrorSegment m_mirror
mirror segment
double getRadius() const
Returns radius of the bar central plane in Belle II frame.
TOPGeoBarSegment m_bar2
bar segment 2 (backward bar)
TOPGeoModuleDisplacement m_moduleDisplacement
module displacement
TOPGeoModule()
Default constructor.
unsigned m_moduleCNumber
module construction number, 0 = ideal module
double getBackwardZ() const
Returns the z position of prism-bar joint in Belle II frame.
TOPGeoBarSegment m_bar1
bar segment 1 (forward bar)
double getX() const
Returns translation in x.
double getX(unsigned col) const
Returns x coordinate of column center.
double getDx() const
Returns spacing in x (column width)
void setPeelOffRegions(double size, double offset, double thickness, const std::string &material)
Sets parameters of the peel-off cookie volumes.
static const double deg
degree to radians
Class to store variables with their name which were sent to the logging service.
ROOT::Math::XYZPoint pointToLocal(const ROOT::Math::XYZPoint &point) const
Transforms 3D point from Belle II to module internal (= nominal & displaced) frame.
bool isConsistent() const override
Check for consistency of data members.
void print(const std::string &title="Module geometry parameters") const override
Print the content of the class.
static double s_unit
conversion unit for length
virtual void print(const std::string &title="Bar segment geometry parameters") const override
Print the content of the class.
ROOT::Math::XYZPoint pointGlobalToNominal(const ROOT::Math::XYZPoint &point) const
Transforms 3D point from Belle II to module nominal frame.
~TOPGeoModule()
Destructor.
ROOT::Math::XYZPoint pointNominalToGlobal(const ROOT::Math::XYZPoint &point) const
Transforms 3D point from module nominal frame to Belle II frame.
ROOT::Math::Transform3D getTransformation() const
Returns transformation from local to nominal frame.
void setTransformation() const
Sets transformation cache.
void print(const std::string &title="PMT array geometry parameters") const override
Print the content of the class.
void print(const std::string &title="Module displacement parameters") const override
Print the content of the class.
void setPeelOffRegions(double thickness, const std::string &material)
Sets parameters of the peel-off cookie volumes.
ROOT::Math::XYZPoint pointToGlobal(const ROOT::Math::XYZPoint &point) const
Transforms 3D point from module internal (= nominal & displaced) frame to Belle II frame.
void print(const std::string &title="PMT array displacement parameters") const override
Print the content of the class.
ROOT::Math::XYZVector momentumGlobalToNominal(const ROOT::Math::XYZVector &momentum) const
Transforms momentum vector from Belle II to module nominal frame.
ROOT::Math::XYZVector momentumToLocal(const ROOT::Math::XYZVector &momentum) const
Transforms momentum vector from Belle II to module internal (= nominal & displaced) frame.
void print(const std::string &title="Prism geometry parameters") const override
Print the content of the class.
static std::string s_unitName
conversion unit name
void print(const std::string &title="Mirror segment geometry parameters") const override
Print the content of the class.
void setBrokenGlue(int glueID, double fraction, double angle, const std::string &material)
Sets glue to be broken (delaminated)
ROOT::Math::XYZVector momentumNominalToGlobal(const ROOT::Math::XYZVector &momentum) const
Transforms momentum vector from module nominal frame to Belle II frame.
TOPGeoModule & operator=(const TOPGeoModule &module)
Assignment operator.
ROOT::Math::XYZVector momentumToGlobal(const ROOT::Math::XYZVector &momentum) const
Transforms momentum vector from module internal (= nominal & displaced) frame to Belle II frame.
Abstract base class for different kinds of events.