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)
77 m_mirror.setGlueDelamination(fraction, angle, material);
80 m_bar1.setGlueDelamination(fraction, angle, material);
83 m_bar2.setGlueDelamination(fraction, angle, material);
86 B2ERROR(
"TOPGeoModule::setBrokenGlue: invalid glue ID."
87 <<
LogVar(
"glue ID", glueID));
97 m_prism.setPeelOffRegions(size, offset, thickness, material);
153 if (!
m_bar1.isConsistent())
return false;
154 if (!
m_bar2.isConsistent())
return false;
155 if (!
m_mirror.isConsistent())
return false;
156 if (!
m_prism.isConsistent())
return false;
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");
const std::string & getName() const
Returns object name.
std::string m_name
geometry object name
TOPGeoBase()
Default constructor.
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)
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
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.
void setTransformation() const
Sets transformation cache.
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.
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.
static std::string s_unitName
conversion unit name
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.