Belle II Software development
VXDGeometryPar.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#pragma once
9
10
11#include <TObject.h>
12#include <string>
13#include <map>
14#include <vector>
15
16#include <vxd/dbobjects/VXDGlobalPar.h>
17#include <vxd/dbobjects/VXDAlignmentPar.h>
18#include <vxd/dbobjects/VXDEnvelopePar.h>
19#include <vxd/dbobjects/VXDHalfShellPar.h>
20
21#include <vxd/dbobjects/VXDGeoComponentPar.h>
22#include <vxd/dbobjects/VXDGeoSensorPar.h>
23#include <vxd/dbobjects/VXDGeoLadderPar.h>
24#include <vxd/dbobjects/VXDGeoRadiationSensorsPar.h>
25
26namespace Belle2 {
36 class VXDGeometryPar: public TObject {
37 public:
40
42 std::string getPrefix() const {return m_prefix;}
44 void setPrefix(const std::string& prefix) { m_prefix = prefix;}
46 const VXDGlobalPar& getGlobalParams() const {return m_globals;}
48 void setGlobalParams(const VXDGlobalPar& globals) { m_globals = globals;}
50 const VXDEnvelopePar& getEnvelope() const {return m_envelope;}
52 void setEnvelope(const VXDEnvelopePar& envelope) {m_envelope = envelope;}
58 std::map<std::string, VXDAlignmentPar>& getAlignmentMap() {return m_alignment;}
60 VXDAlignmentPar getAlignment(std::string name) const;
62 const std::vector<VXDHalfShellPar>& getHalfShells() const {return m_halfShells;}
64 std::vector<VXDHalfShellPar>& getHalfShells() {return m_halfShells;}
66 std::map<int, VXDGeoLadderPar>& getLadderMap() { return m_ladders; }
68 const VXDGeoLadderPar& getLadder(int layerID) const;
70 const VXDGeoSensorPar& getSensor(std::string sensorTypeID) const;
72 const VXDGeoComponentPar& getComponent(std::string name) const;
74 const std::map<std::string, VXDGeoSensorPar>& getSensorMap() const {return m_sensorMap;}
76 std::map<std::string, VXDGeoSensorPar>& getSensorMap() {return m_sensorMap;}
78 const std::map<std::string, VXDGeoComponentPar>& getComponentMap() const {return m_componentCache; }
80 std::map<std::string, VXDGeoComponentPar>& getComponentMap() {return m_componentCache; }
82 int getSensitiveChipID(std::string name) const;
84 std::map<std::string, int>& getSensitiveChipIdMap() {return m_sensitiveIDCache;}
86 const std::vector<std::string>& getComponentInsertOder() const {return m_componentInsertOrder;}
88 std::vector<std::string>& getComponentInsertOder() {return m_componentInsertOrder;}
89
90 private:
91
93 std::string m_prefix {""};
97 std::map<std::string, VXDAlignmentPar> m_alignment;
101 std::vector<VXDHalfShellPar> m_halfShells;
103 std::map<std::string, VXDGeoComponentPar> m_componentCache;
105 std::vector<std::string> m_componentInsertOrder;
107 std::map<std::string, VXDGeoSensorPar> m_sensorMap;
111 std::map<int, VXDGeoLadderPar> m_ladders;
113 std::map<std::string, int> m_sensitiveIDCache;
114
116 };
118} // end of namespace Belle2
119
The Class for VXD Alignment payload.
The Class for VXD Envelope parameters.
The Class for VXD geometry component.
The Class for VXD Ladder payload.
The Class for VXD Radiation Sensor parameters.
The Class for VXD Sensor payload.
The Class for VXD geometry.
VXDAlignmentPar getAlignment(std::string name) const
get alignment parameters for component name
std::map< int, VXDGeoLadderPar > m_ladders
Parameters of the detector ladders.
const std::vector< VXDHalfShellPar > & getHalfShells() const
get half-shell
VXDGlobalPar m_globals
Container for a few general parameters.
std::string m_prefix
Prefix to prepend to all volume names.
void setGlobalParams(const VXDGlobalPar &globals)
set global parameters
void setRadiationSensors(const VXDGeoRadiationSensorsPar &diamonds)
set radiation sensor parameters
VXDEnvelopePar m_envelope
Envelope parameters.
std::string getPrefix() const
get prefix
int getSensitiveChipID(std::string name) const
get Bkg sensitive chip Id
const std::map< std::string, VXDGeoComponentPar > & getComponentMap() const
get component maps
const std::map< std::string, VXDGeoSensorPar > & getSensorMap() const
get sensor map
std::map< std::string, VXDAlignmentPar > m_alignment
Alignment parameters for all components.
VXDGeometryPar()
Default constructor.
std::map< std::string, VXDGeoComponentPar > m_componentCache
Cache of all previously created components.
VXDGeoRadiationSensorsPar m_radiationsensors
Diamond radiation sensors.
std::map< std::string, int > m_sensitiveIDCache
Cache of all Bkg sensitive chip Ids.
std::vector< VXDHalfShellPar > m_halfShells
Cache for half shells
std::vector< std::string > & getComponentInsertOder()
get component insert order
void setEnvelope(const VXDEnvelopePar &envelope)
set envelope parameters
const VXDGlobalPar & getGlobalParams() const
get global parameters
const VXDEnvelopePar & getEnvelope() const
get envelope parameters
void setPrefix(const std::string &prefix)
set prefix
ClassDef(VXDGeometryPar, 5)
ClassDef, must be the last term before the closing {}.
std::map< std::string, VXDGeoSensorPar > m_sensorMap
Map containing Information about all defined sensor types.
const VXDGeoComponentPar & getComponent(std::string name) const
get component
std::vector< VXDHalfShellPar > & getHalfShells()
get half-shell
const VXDGeoSensorPar & getSensor(std::string sensorTypeID) const
get sensor type
const VXDGeoLadderPar & getLadder(int layerID) const
get ladder for given layer
std::vector< std::string > m_componentInsertOrder
Vector remembering the order of insertions into component cache.
std::map< std::string, VXDAlignmentPar > & getAlignmentMap()
get alignmant map
const VXDGeoRadiationSensorsPar & getRadiationSensors() const
get radiation sensor parameters
std::map< std::string, VXDGeoSensorPar > & getSensorMap()
get sensor map
const std::vector< std::string > & getComponentInsertOder() const
get component insert order
std::map< std::string, VXDGeoComponentPar > & getComponentMap()
get component maps
std::map< int, VXDGeoLadderPar > & getLadderMap()
get ladder map
std::map< std::string, int > & getSensitiveChipIdMap()
get sensitive chip id map
The Class for VXD global paramter payload.
Definition: VXDGlobalPar.h:24
Abstract base class for different kinds of events.