9#include <top/dbobjects/TOPGeometry.h>
10#include <framework/logging/Logger.h>
25 B2ERROR(
"TOPGeometry::appendModule: module already appended."
26 <<
LogVar(
"ID", module.getModuleID()));
36 if (module.getModuleID() == moduleID)
return true;
45 if (module.getModuleID() == moduleID)
return module;
47 B2FATAL(
"TOPGeometry::getModule: invalid module, ID = " << moduleID);
52 std::map<unsigned, TOPNominalTTS>::const_iterator it =
m_tts.find(type);
70 double tmp = module.getRadius() + module.getBarThickness() / 2
71 - module.getPrism().getExitThickness();
83 double x = module.getBarWidth() / 2;
84 double y = module.getRadius() + module.getBarThickness() / 2;
85 double tmp =
sqrt(x * x + y * y);
97 R += module.getRadius();
108 double tmp = module.getBackwardZ() - module.getPrism().getFullLength();
109 if (tmp < z) z = tmp;
120 double tmp = module.getForwardZ();
121 if (tmp > z) z = tmp;
130 if (!module.isConsistent())
return false;
145 cout <<
"Geometry parameters of TOP counter:" << endl;
146 cout <<
"===================================" << endl;
147 cout <<
" name: " <<
m_name << endl;
148 cout <<
" number of modules: " <<
m_modules.size() << endl << endl;
161 cout <<
"Photo-detection efficiency tuning factors" << endl;
162 cout <<
"-----------------------------------------" << endl;
164 cout <<
" Not available" << endl;
167 cout <<
" PMT type: " << x.first <<
" factor = " << x.second << endl;
173 for (
const auto& tts :
m_tts) {
174 tts.second.print(
"TTS distribution");
std::string m_name
geometry object name
Geometry parameters of a module (optical components + positioning)
std::map< unsigned, float > m_tuneFactorsPDE
PDE tuning factors of PMT types.
TOPGeoFrontEnd m_frontEnd
geometry parameters of front-end electronics
TOPGeoQBB m_QBB
geometry parameters of quartz bar box
TOPNominalQE m_nominalQE
nominal quantum efficiency of PMT
TOPNominalTTS m_nominalTTS
nominal time transition spread of PMT
unsigned m_numBoardStacks
number of boardstacks per module
TOPNominalTDC m_nominalTDC
nominal time-to-digit conversion parameters
TOPWavelengthFilter m_wavelengthFilter
transmittance of wavelength filter
std::vector< TOPGeoModule > m_modules
geometry parameters of modules
std::map< unsigned, TOPNominalTTS > m_tts
TTS of PMT types.
Nominal time transition spread of PMT.
Class to store variables with their name which were sent to the logging service.
double sqrt(double a)
sqrt for double
bool isConsistent() const override
Check for consistency of data members.
void print(const std::string &title="Nominal quantum efficiency") const override
Print the content of the class.
void appendModule(const TOPGeoModule &module)
Appends module (if its ID differs from already appended modules)
virtual void print(const std::string &title="QBB geometry parameters") const override
Print the content of the class.
void print(const std::string &title="TOP geometry parameters") const override
Print the content of the class.
double getForwardZ() const
Returns forward z of the volume devoted to TOP counter.
bool isModuleIDValid(int moduleID) const
Checks if module exists in m_modules.
const TOPGeoModule & getModule(int moduleID) const
Returns module.
double getOuterRadius() const
Returns outer radius of the volume devoted to TOP counter.
void print(const std::string &title="Nominal time-to-digit conversion parameters") const override
Print the content of the class.
void print(const std::string &title="Wavelength filter bulk transmittance") const override
Print the content of the class.
double getInnerRadius() const
Returns inner radius of the volume devoted to TOP counter.
const TOPNominalTTS & getTTS(unsigned type) const
Returns time transition spread of a given PMT type.
double getRadius() const
Returns average radius of modules.
void print(const std::string &title="Nominal TTS distribution") const override
Print the content of the class.
double getBackwardZ() const
Returns backward z of the volume devoted to TOP counter.
double getPDETuningFactor(unsigned type) const
Returns photon detection efficiency tuning factor of a given PMT type.
virtual void print(const std::string &title="Front-end geometry parameters") const override
Print the content of the class.
Abstract base class for different kinds of events.