10#include <klm/dbobjects/eklm/EKLMGeometry.h>
13#include <framework/logging/Logger.h>
65EKLMGeometry::Point::Point()
97 if (&geometry ==
this)
99 m_LengthX = geometry.getLengthX();
100 m_LengthY = geometry.getLengthY();
101 m_NPoints = geometry.getNPoints();
102 if (m_Points !=
nullptr)
105 m_Points =
new Point[m_NPoints];
106 for (i = 0; i < m_NPoints; i++)
107 m_Points[i] = *geometry.getPoint(i);
115 if (m_Points !=
nullptr)
122 B2FATAL(
"Number of points must be nonnegative.");
124 if (m_Points !=
nullptr)
127 m_Points =
new Point[m_NPoints];
135 if (i < 0 || i >= m_NPoints)
136 B2FATAL(
"Number of point must be from 0 to " << m_NPoints - 1 <<
".");
142 if (i < 0 || i >= m_NPoints)
143 B2FATAL(
"Number of point must be from 0 to " << m_NPoints - 1 <<
".");
155 m_DetailACenter.setX(x);
156 m_DetailACenter.setY(y);
161 m_DetailBCenter.setX(x);
162 m_DetailBCenter.setY(y);
167 m_DetailCCenter.setX(x);
168 m_DetailCCenter.setY(y);
193 m_EndcapStructureGeometry(*geometry.getEndcapStructureGeometry()),
194 m_SectionPosition(*geometry.getSectionPosition()),
195 m_LayerPosition(*geometry.getLayerPosition()),
196 m_SectorPosition(*geometry.getSectorPosition()),
197 m_SectorSupportPosition(*geometry.getSectorSupportPosition()),
198 m_SectorSupportGeometry(*geometry.getSectorSupportGeometry()),
199 m_PlanePosition(*geometry.getPlanePosition()),
200 m_PlasticSheetGeometry(*geometry.getPlasticSheetGeometry()),
201 m_SegmentSupportGeometry(*geometry.getSegmentSupportGeometry()),
202 m_StripGeometry(*geometry.getStripGeometry()),
203 m_ShieldGeometry(*geometry.getShieldGeometry())
224 *geometry.getSegmentSupportPosition(i + 1, j + 1);
245 if (&geometry ==
this)
278 *geometry.getSegmentSupportPosition(i + 1, j + 1);
304 const char* sectionName[2] = {
"backward",
"forward"};
307 B2FATAL(
"Number of detector layers in the " << sectionName[section - 1] <<
308 " section must be from 0 to the number of layers ( " <<
315 const char* sectionName[2] = {
"backward",
"forward"};
317 B2FATAL(
"Number of layer must be less from 1 to the number of "
318 "detector layers in the " << sectionName[section - 1] <<
" section ("
325 B2FATAL(
"Number of segment support element must be from 1 to " <<
332 B2FATAL(
"Number of strip in a segment must be from 1 to " <<
int getMaximalDetectorLayerNumber(int section) const
Get maximal detector layer number.
bool checkPlane(int plane, bool fatalError=true) const
Check if plane number is correct (fatal error if not).
bool checkStrip(int strip, bool fatalError=true) const
Check if strip number is correct (fatal error if not).
static constexpr int getNStripsSegment()
Get number of strips in a segment.
bool checkSection(int section, bool fatalError=true) const
Check if section number is correct.
static constexpr int getMaximalSegmentNumber()
Get maximal segment number.
Position information for the elements of detector.
ElementPosition()
Constructor.
EndcapStructureGeometry()
Constructor.
~EndcapStructureGeometry()
Destructor.
PlasticSheetGeometry()
Constructor.
SectorSupportGeometry()
Constructor.
SegmentSupportGeometry()
Constructor.
Segment support position.
SegmentSupportPosition()
Constructor.
Shield layer detail geometry data.
void setPoint(int i, const Point &point)
Set point.
ShieldDetailGeometry()
Constructor.
double m_LengthX
X length.
~ShieldDetailGeometry()
Destructor.
const Point * getPoint(int i) const
Get point.
double m_LengthY
Y length.
ShieldDetailGeometry & operator=(const ShieldDetailGeometry &geometry)
Operator =.
void setNPoints(int nPoints)
Set number of points.
int m_NPoints
Number of points.
void setDetailACenter(double x, double y)
Set detail A center.
void setDetailCCenter(double x, double y)
Set detail C center.
ShieldGeometry()
Constructor.
void setDetailBCenter(double x, double y)
Set detail B center.
StripGeometry()
Constructor.
Class to store EKLM geometry data in the database.
int m_NSegments
Number of segments in one plane.
EKLMGeometry()
Constructor.
ShieldGeometry m_ShieldGeometry
Shield layer details geometry data.
int m_NLayers
Number of layers in one section.
const SegmentSupportPosition * getSegmentSupportPosition(int plane, int support) const
Get position data for segment support structure.
SectorSupportGeometry m_SectorSupportGeometry
Sector support geometry data.
void checkDetectorLayer(int section, int layer) const
Check if detector layer number is correct (fatal error if not).
const ElementPosition * getStripPosition(int strip) const
Get position data for strips.
ElementPosition m_SectionPosition
Position data for sections.
int m_NPlanes
Number of planes in one sector.
ElementPosition m_SectorSupportPosition
Position data for sector support structure.
int getNDetectorLayers(int section) const
Get number of detector layers.
void checkSegmentSupport(int support) const
Check if segment support number is correct (fatal error if not).
double m_SolenoidZ
Solenoid center Z coordinate.
ElementPosition m_PlanePosition
Position data for planes.
ElementPosition m_LayerPosition
Position data for layers.
int m_NStrips
Number of strips in one plane.
double m_LayerShiftZ
Z distance between two layers.
int m_NSectors
Number of sectors in one layer.
const EKLMElementNumbers * m_ElementNumbers
Element numbers.
int * m_NDetectorLayers
Number of detector layers.
int m_NSections
Number of sections.
~EKLMGeometry()
Destructor.
PlasticSheetGeometry m_PlasticSheetGeometry
Plastic sheet geometry data.
ElementPosition m_SectorPosition
Position data for sectors.
SegmentSupportPosition * m_SegmentSupportPosition
Position data for segment support structure.
ElementPosition * m_StripPosition
Position data for strips.
StripGeometry m_StripGeometry
Strip geometry data.
EndcapStructureGeometry m_EndcapStructureGeometry
Section structure geometry data.
EKLMGeometry & operator=(const EKLMGeometry &geometry)
Operator =.
SegmentSupportGeometry m_SegmentSupportGeometry
Segment support geometry data.
void checkStripSegment(int strip) const
Check if number of strip in a segment is correct (fatal error if not).
void checkDetectorLayerNumber(int section, int layer) const
Check if number of detector layers is correct (fatal error if not).
int m_NSegmentSupportElementsSector
Number of segment support elements in one sector.
Abstract base class for different kinds of events.