Belle II Software  release-08-01-10
GeometryData Class Reference

EKLM geometry data. More...

#include <GeometryData.h>

Inheritance diagram for GeometryData:
Collaboration diagram for GeometryData:

Public Types

enum  DataSource {
  c_Gearbox ,
  c_Database
}
 Geometry data source. More...
 

Public Member Functions

void saveToDatabase (const IntervalOfValidity &iov) const
 Save geometry data to database.
 
double getStripLength (int strip) const
 Get strip length. More...
 
double getMaximalStripLength () const
 Get maximal strip length.
 
int getNStripsDifferentLength () const
 Get number of strips with different lengths.
 
int getStripLengthIndex (int positionIndex) const
 Get index in length-based array. More...
 
int getStripPositionIndex (int lengthIndex) const
 Get index in position-based array. More...
 
bool hitInEKLM (double z) const
 Check if z coordinate may be in EKLM. More...
 
void getSectionTransform (HepGeom::Transform3D *t, int n) const
 Get section transformation. More...
 
void getLayerTransform (HepGeom::Transform3D *t, int n) const
 Get layer transformation. More...
 
void getSectorTransform (HepGeom::Transform3D *t, int n) const
 Get sector transformation. More...
 
void getPlaneTransform (HepGeom::Transform3D *t, int n) const
 Get plane transformation. More...
 
void getStripTransform (HepGeom::Transform3D *t, int n) const
 Get strip transformation. More...
 
void getSheetTransform (HepGeom::Transform3D *t, int n) const
 Get plastic sheet element transformation. More...
 
bool beamBackgroundStudy () const
 Whether to perform beam-background study.
 
int getNSections () const
 Get number of sections.
 
int getNLayers () const
 Get number of layers.
 
int getNDetectorLayers (int section) const
 Get number of detector layers. More...
 
int getNSectors () const
 Get number of sectors.
 
int getNPlanes () const
 Get number of planes.
 
int getNSegments () const
 Get number of segments.
 
int getNSegmentSupportElementsSector () const
 Get number of segment support elements *in one sector).
 
int getNStrips () const
 Get number of strips.
 
void checkDetectorLayerNumber (int section, int layer) const
 Check if number of detector layers is correct (fatal error if not). More...
 
void checkDetectorLayer (int section, int layer) const
 Check if detector layer number is correct (fatal error if not). More...
 
void checkSegmentSupport (int support) const
 Check if segment support number is correct (fatal error if not). More...
 
void checkStripSegment (int strip) const
 Check if number of strip in a segment is correct (fatal error if not). More...
 
double getSolenoidZ () const
 Get solenoid center Z coordinate.
 
const EndcapStructureGeometrygetEndcapStructureGeometry () const
 Get endcap structure geometry data.
 
const ElementPositiongetSectionPosition () const
 Get position data for sections.
 
const ElementPositiongetLayerPosition () const
 Get position data for layers.
 
double getLayerShiftZ () const
 Get Z distance between two layers.
 
const ElementPositiongetSectorPosition () const
 Get position data for sectors.
 
const ElementPositiongetSectorSupportPosition () const
 Get position data for sector support structure.
 
const SectorSupportGeometrygetSectorSupportGeometry () const
 Get sector support geometry data.
 
const ElementPositiongetPlanePosition () const
 Get position data for planes.
 
const PlasticSheetGeometrygetPlasticSheetGeometry () const
 Get plastic sheet geometry data.
 
const SegmentSupportGeometrygetSegmentSupportGeometry () const
 Get segment support geometry data.
 
const SegmentSupportPositiongetSegmentSupportPosition (int plane, int support) const
 Get position data for segment support structure. More...
 
const StripGeometrygetStripGeometry () const
 Get strip geometry data.
 
const ElementPositiongetStripPosition (int strip) const
 Get position data for strips. More...
 
const ShieldGeometrygetShieldGeometry () const
 Get shield layer details geometry data.
 

Static Public Member Functions

static const GeometryDataInstance (enum DataSource dataSource=c_Database, const GearDir *gearDir=nullptr)
 Instantiation. More...
 

Protected Member Functions

 ClassDef (Belle2::EKLMGeometry, 6)
 Class version.
 

Protected Attributes

const EKLMElementNumbersm_ElementNumbers
 Element numbers.
 
bool m_BeamBackgroundStudy = false
 ROOT streamer. More...
 
int m_NSections
 Number of sections.
 
int m_NLayers
 Number of layers in one section.
 
int * m_NDetectorLayers
 Number of detector layers.
 
int m_NSectors
 Number of sectors in one layer.
 
int m_NPlanes
 Number of planes in one sector.
 
int m_NSegments
 Number of segments in one plane.
 
int m_NSegmentSupportElementsSector
 Number of segment support elements in one sector.
 
int m_NStrips
 Number of strips in one plane.
 
double m_SolenoidZ
 Solenoid center Z coordinate.
 
EndcapStructureGeometry m_EndcapStructureGeometry
 Section structure geometry data.
 
ElementPosition m_SectionPosition
 Position data for sections.
 
ElementPosition m_LayerPosition
 Position data for layers.
 
double m_LayerShiftZ
 Z distance between two layers.
 
ElementPosition m_SectorPosition
 Position data for sectors.
 
ElementPosition m_SectorSupportPosition
 Position data for sector support structure.
 
SectorSupportGeometry m_SectorSupportGeometry
 Sector support geometry data.
 
ElementPosition m_PlanePosition
 Position data for planes.
 
PlasticSheetGeometry m_PlasticSheetGeometry
 Plastic sheet geometry data.
 
SegmentSupportGeometry m_SegmentSupportGeometry
 Segment support geometry data.
 
SegmentSupportPositionm_SegmentSupportPosition
 Position data for segment support structure.
 
StripGeometry m_StripGeometry
 Strip geometry data.
 
ElementPositionm_StripPosition
 Position data for strips.
 
ShieldGeometry m_ShieldGeometry
 Shield layer details geometry data.
 

Private Member Functions

 GeometryData (enum DataSource dataSource, const GearDir *gearDir)
 Constructor. More...
 
 ~GeometryData ()
 Destructor.
 
void readEndcapStructureGeometry (const GearDir &gd)
 Read section structure geometry data. More...
 
void initializeFromGearbox (const GearDir *gearDir)
 Initialize from Gearbox (XML). More...
 
void initializeFromDatabase ()
 Initialize from database.
 
void calculateSectorSupportGeometry ()
 Calculate sector support geometry data.
 
void fillStripIndexArrays ()
 Fill strip index arrays.
 
void readXMLDataStrips (const GearDir &gd)
 Read strip parameters from XML database.
 
void calculateShieldGeometry ()
 Calculate shield geometry data.
 

Private Attributes

EKLMGeometrym_Geometry
 Copy of data in this class used to write it to database.
 
int m_nStripDifferent
 Number of strips with different lengths in one plane.
 
int * m_StripAllToLen
 Number of strip in length-based array.
 
int * m_StripLenToAll
 Number of strip in position-based array.
 
double m_MinZForward
 Minimal z coordinate of the forward section.
 
double m_MaxZBackward
 Maximal z coordinate of the backward section.
 

Detailed Description

EKLM geometry data.

All data and function results are in CLHEP units unless noted otherwise.

Definition at line 38 of file GeometryData.h.

Member Enumeration Documentation

◆ DataSource

enum DataSource

Geometry data source.

Enumerator
c_Gearbox 

Gearbox (XML).

c_Database 

Database.

Definition at line 43 of file GeometryData.h.

43  {
44 
46  c_Gearbox,
47 
49  c_Database,
50 
51  };
@ c_Gearbox
Gearbox (XML).
Definition: GeometryData.h:46

Constructor & Destructor Documentation

◆ GeometryData()

GeometryData ( enum DataSource  dataSource,
const GearDir gearDir 
)
explicitprivate

Constructor.

Parameters
[in]dataSourceData source.
[in]gearDirXML data directory.

Definition at line 605 of file GeometryData.cc.

607 {
608  m_Geometry = nullptr;
609  switch (dataSource) {
610  case c_Gearbox:
611  initializeFromGearbox(gearDir);
612  break;
613  case c_Database:
615  break;
616  }
624 }
double getZ() const
Get Z coordinate.
Definition: EKLMGeometry.h:197
double getLength() const
Get length.
Definition: EKLMGeometry.h:146
ElementPosition m_SectionPosition
Position data for sections.
double m_SolenoidZ
Solenoid center Z coordinate.
void fillStripIndexArrays()
Fill strip index arrays.
void calculateSectorSupportGeometry()
Calculate sector support geometry data.
void initializeFromGearbox(const GearDir *gearDir)
Initialize from Gearbox (XML).
void calculateShieldGeometry()
Calculate shield geometry data.
double m_MaxZBackward
Maximal z coordinate of the backward section.
Definition: GeometryData.h:242
EKLMGeometry * m_Geometry
Copy of data in this class used to write it to database.
Definition: GeometryData.h:227
double m_MinZForward
Minimal z coordinate of the forward section.
Definition: GeometryData.h:239
void initializeFromDatabase()
Initialize from database.

Member Function Documentation

◆ checkDetectorLayer()

void checkDetectorLayer ( int  section,
int  layer 
) const
inherited

Check if detector layer number is correct (fatal error if not).

Section number must be checked separately.

Parameters
[in]sectionSection number.
[in]layerLayer number.

Definition at line 312 of file EKLMGeometry.cc.

◆ checkDetectorLayerNumber()

void checkDetectorLayerNumber ( int  section,
int  layer 
) const
inherited

Check if number of detector layers is correct (fatal error if not).

Section number must be checked separately.

Parameters
[in]sectionSection number.
[in]layerLayer number.

Definition at line 301 of file EKLMGeometry.cc.

◆ checkSegmentSupport()

void checkSegmentSupport ( int  support) const
inherited

Check if segment support number is correct (fatal error if not).

Parameters
[in]supportSegment support element number.

Definition at line 322 of file EKLMGeometry.cc.

◆ checkStripSegment()

void checkStripSegment ( int  strip) const
inherited

Check if number of strip in a segment is correct (fatal error if not).

Parameters
[in]stripStrip number.

Definition at line 329 of file EKLMGeometry.cc.

◆ getLayerTransform()

void getLayerTransform ( HepGeom::Transform3D *  t,
int  n 
) const

Get layer transformation.

Parameters
[out]tTransformation.
[in]nNumber of layer.

Numbers start from 0.

Definition at line 662 of file GeometryData.cc.

◆ getNDetectorLayers()

int getNDetectorLayers ( int  section) const
inherited

Get number of detector layers.

Parameters
[in]sectionSection number (1 - backward, 2 - forward).

Definition at line 293 of file EKLMGeometry.cc.

◆ getPlaneTransform()

void getPlaneTransform ( HepGeom::Transform3D *  t,
int  n 
) const

Get plane transformation.

Parameters
[out]tTransformation.
[in]nNumber of plane.

Numbers start from 0.

Definition at line 690 of file GeometryData.cc.

◆ getSectionTransform()

void getSectionTransform ( HepGeom::Transform3D *  t,
int  n 
) const

Get section transformation.

Parameters
[out]tTransformation.
[in]nNumber of section.

Numbers start from 0.

Definition at line 650 of file GeometryData.cc.

◆ getSectorTransform()

void getSectorTransform ( HepGeom::Transform3D *  t,
int  n 
) const

Get sector transformation.

Parameters
[out]tTransformation.
[in]nNumber of sector.

Numbers start from 0.

Definition at line 670 of file GeometryData.cc.

◆ getSegmentSupportPosition()

const EKLMGeometry::SegmentSupportPosition * getSegmentSupportPosition ( int  plane,
int  support 
) const
inherited

Get position data for segment support structure.

Parameters
[in]planePlane number.
[in]supportSegment support element number.

Definition at line 339 of file EKLMGeometry.cc.

◆ getSheetTransform()

void getSheetTransform ( HepGeom::Transform3D *  t,
int  n 
) const

Get plastic sheet element transformation.

Parameters
[out]tTransformation.
[in]nNumber of list.

Numbers start from 0. This function is intended for construction of the list solids, so the transformation does not include z shift.

Definition at line 710 of file GeometryData.cc.

◆ getStripLength()

double getStripLength ( int  strip) const
inline

Get strip length.

Parameters
[in]stripStrip number.

Definition at line 71 of file GeometryData.h.

◆ getStripLengthIndex()

int getStripLengthIndex ( int  positionIndex) const
inline

Get index in length-based array.

Parameters
[in]positionIndexindex in position-based array.

Definition at line 97 of file GeometryData.h.

◆ getStripPosition()

const EKLMGeometry::ElementPosition * getStripPosition ( int  strip) const
inherited

Get position data for strips.

Parameters
[in]stripStrip number.

Definition at line 348 of file EKLMGeometry.cc.

◆ getStripPositionIndex()

int getStripPositionIndex ( int  lengthIndex) const
inline

Get index in position-based array.

Parameters
[in]lengthIndexindex in length-based array.

Definition at line 106 of file GeometryData.h.

◆ getStripTransform()

void getStripTransform ( HepGeom::Transform3D *  t,
int  n 
) const

Get strip transformation.

Parameters
[out]tTransformation.
[in]nNumber of strip.

Numbers start from 0.

Definition at line 703 of file GeometryData.cc.

◆ hitInEKLM()

bool hitInEKLM ( double  z) const

Check if z coordinate may be in EKLM.

Parameters
[in]zZ coordinate (cm).

Warning: this is not a complete check!

Definition at line 639 of file GeometryData.cc.

◆ initializeFromGearbox()

void initializeFromGearbox ( const GearDir gearDir)
private

Initialize from Gearbox (XML).

Parameters
[in]gearDirXML data directory.

Definition at line 477 of file GeometryData.cc.

◆ Instance()

const EKLM::GeometryData & Instance ( enum DataSource  dataSource = c_Database,
const GearDir gearDir = nullptr 
)
static

Instantiation.

Parameters
[in]dataSourceData source.
[in]gearDirXML data directory.

Definition at line 33 of file GeometryData.cc.

◆ readEndcapStructureGeometry()

void readEndcapStructureGeometry ( const GearDir gd)
private

Read section structure geometry data.

Parameters
[in]gdCurrent GearDir.

Definition at line 469 of file GeometryData.cc.

Member Data Documentation

◆ m_BeamBackgroundStudy

bool m_BeamBackgroundStudy = false
protectedinherited

ROOT streamer.

Whether to perform beam-background study.

Definition at line 1896 of file EKLMGeometry.h.


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