Belle II Software  release-05-01-25
VXDGeometryPar.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Benjamin Schwenker *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 #pragma once
11 
12 
13 #include <TObject.h>
14 #include <string>
15 #include <map>
16 #include <vector>
17 
18 #include <vxd/dbobjects/VXDGlobalPar.h>
19 #include <vxd/dbobjects/VXDAlignmentPar.h>
20 #include <vxd/dbobjects/VXDEnvelopePar.h>
21 #include <vxd/dbobjects/VXDHalfShellPar.h>
22 
23 #include <vxd/dbobjects/VXDGeoComponentPar.h>
24 #include <vxd/dbobjects/VXDGeoSensorPar.h>
25 #include <vxd/dbobjects/VXDGeoLadderPar.h>
26 #include <vxd/dbobjects/VXDGeoRadiationSensorsPar.h>
27 
28 namespace Belle2 {
38  class VXDGeometryPar: public TObject {
39  public:
41  VXDGeometryPar() {}
42 
44  std::string getPrefix() const {return m_prefix;}
46  void setPrefix(const std::string& prefix) { m_prefix = prefix;}
48  const VXDGlobalPar& getGlobalParams() const {return m_globals;}
50  void setGlobalParams(const VXDGlobalPar& globals) { m_globals = globals;}
52  const VXDEnvelopePar& getEnvelope() const {return m_envelope;}
54  void setEnvelope(const VXDEnvelopePar& envelope) {m_envelope = envelope;}
60  std::map<std::string, VXDAlignmentPar>& getAlignmentMap() {return m_alignment;}
62  VXDAlignmentPar getAlignment(std::string name) const;
64  const std::vector<VXDHalfShellPar>& getHalfShells() const {return m_halfShells;}
66  std::vector<VXDHalfShellPar>& getHalfShells() {return m_halfShells;}
68  std::map<int, VXDGeoLadderPar>& getLadderMap() { return m_ladders; }
70  const VXDGeoLadderPar& getLadder(int layerID) const;
72  const VXDGeoSensorPar& getSensor(std::string sensorTypeID) const;
74  const VXDGeoComponentPar& getComponent(std::string name) const;
76  const std::map<std::string, VXDGeoSensorPar>& getSensorMap() const {return m_sensorMap;}
78  std::map<std::string, VXDGeoSensorPar>& getSensorMap() {return m_sensorMap;}
80  const std::map<std::string, VXDGeoComponentPar>& getComponentMap() const {return m_componentCache; }
82  std::map<std::string, VXDGeoComponentPar>& getComponentMap() {return m_componentCache; }
84  int getSensitiveChipID(std::string name) const;
86  std::map<std::string, int>& getSensitiveChipIdMap() {return m_sensitiveIDCache;}
88  const std::vector<std::string>& getComponentInsertOder() const {return m_componentInsertOrder;}
90  std::vector<std::string>& getComponentInsertOder() {return m_componentInsertOrder;}
91 
92  private:
93 
95  std::string m_prefix {""};
97  VXDGlobalPar m_globals;
99  std::map<std::string, VXDAlignmentPar> m_alignment;
101  VXDEnvelopePar m_envelope;
103  std::vector<VXDHalfShellPar> m_halfShells;
105  std::map<std::string, VXDGeoComponentPar> m_componentCache;
107  std::vector<std::string> m_componentInsertOrder;
109  std::map<std::string, VXDGeoSensorPar> m_sensorMap;
113  std::map<int, VXDGeoLadderPar> m_ladders;
115  std::map<std::string, int> m_sensitiveIDCache;
116 
118  };
120 } // end of namespace Belle2
121 
Belle2::VXDGeometryPar::setRadiationSensors
void setRadiationSensors(const VXDGeoRadiationSensorsPar &diamonds)
set radiation sensor parameters
Definition: VXDGeometryPar.h:66
Belle2::VXDGeometryPar
The Class for VXD geometry.
Definition: VXDGeometryPar.h:46
Belle2::VXDGeometryPar::m_componentCache
std::map< std::string, VXDGeoComponentPar > m_componentCache
Cache of all previously created components.
Definition: VXDGeometryPar.h:113
Belle2::VXDAlignmentPar
The Class for VXD Alignment payload.
Definition: VXDAlignmentPar.h:33
Belle2::VXDGeometryPar::VXDGeometryPar
VXDGeometryPar()
Default constructor.
Definition: VXDGeometryPar.h:49
Belle2::VXDGeometryPar::m_ladders
std::map< int, VXDGeoLadderPar > m_ladders
Parameters of the detector ladders.
Definition: VXDGeometryPar.h:121
Belle2::VXDGeometryPar::getRadiationSensors
const VXDGeoRadiationSensorsPar & getRadiationSensors() const
get radiation sensor parameters
Definition: VXDGeometryPar.h:64
Belle2::VXDGeometryPar::m_componentInsertOrder
std::vector< std::string > m_componentInsertOrder
Vector remembering the order of insertions into component cache.
Definition: VXDGeometryPar.h:115
Belle2::VXDGeoLadderPar
The Class for VXD Ladder payload.
Definition: VXDGeoLadderPar.h:39
Belle2::VXDGeometryPar::getComponentMap
const std::map< std::string, VXDGeoComponentPar > & getComponentMap() const
get component maps
Definition: VXDGeometryPar.h:88
Belle2::VXDGeoSensorPar
The Class for VXD Sensor payload.
Definition: VXDGeoSensorPar.h:39
Belle2::VXDGeometryPar::getSensorMap
const std::map< std::string, VXDGeoSensorPar > & getSensorMap() const
get sensor map
Definition: VXDGeometryPar.h:84
Belle2::VXDGeometryPar::getEnvelope
const VXDEnvelopePar & getEnvelope() const
get envelope parameters
Definition: VXDGeometryPar.h:60
Belle2::VXDGeometryPar::getGlobalParams
const VXDGlobalPar & getGlobalParams() const
get global parameters
Definition: VXDGeometryPar.h:56
Belle2::VXDGeometryPar::setEnvelope
void setEnvelope(const VXDEnvelopePar &envelope)
set envelope parameters
Definition: VXDGeometryPar.h:62
Belle2::VXDGeometryPar::getHalfShells
const std::vector< VXDHalfShellPar > & getHalfShells() const
get half-shell
Definition: VXDGeometryPar.h:72
Belle2::VXDGeometryPar::m_sensorMap
std::map< std::string, VXDGeoSensorPar > m_sensorMap
Map containing Information about all defined sensor types.
Definition: VXDGeometryPar.h:117
Belle2::VXDGeoRadiationSensorsPar
The Class for VXD Radiation Sensor parameters.
Definition: VXDGeoRadiationSensorsPar.h:77
Belle2::VXDGeometryPar::m_globals
VXDGlobalPar m_globals
Container for a few general parameters.
Definition: VXDGeometryPar.h:105
Belle2::VXDGeometryPar::m_radiationsensors
VXDGeoRadiationSensorsPar m_radiationsensors
Diamond radiation sensors.
Definition: VXDGeometryPar.h:119
Belle2::VXDGeometryPar::getSensitiveChipIdMap
std::map< std::string, int > & getSensitiveChipIdMap()
get sensitive chip id map
Definition: VXDGeometryPar.h:94
Belle2::VXDGeometryPar::getLadder
const VXDGeoLadderPar & getLadder(int layerID) const
get ladder for given layer
Definition: VXDGeometryPar.cc:53
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDGeometryPar::getLadderMap
std::map< int, VXDGeoLadderPar > & getLadderMap()
get ladder map
Definition: VXDGeometryPar.h:76
Belle2::VXDGeometryPar::ClassDef
ClassDef(VXDGeometryPar, 5)
ClassDef, must be the last term before the closing {}.
Belle2::VXDGeometryPar::getComponentInsertOder
const std::vector< std::string > & getComponentInsertOder() const
get component insert order
Definition: VXDGeometryPar.h:96
Belle2::VXDGeometryPar::setGlobalParams
void setGlobalParams(const VXDGlobalPar &globals)
set global parameters
Definition: VXDGeometryPar.h:58
Belle2::VXDGeometryPar::getSensitiveChipID
int getSensitiveChipID(std::string name) const
get Bkg sensitive chip Id
Definition: VXDGeometryPar.cc:31
Belle2::VXDGeometryPar::setPrefix
void setPrefix(const std::string &prefix)
set prefix
Definition: VXDGeometryPar.h:54
Belle2::VXDGeometryPar::m_sensitiveIDCache
std::map< std::string, int > m_sensitiveIDCache
Cache of all Bkg sensitive chip Ids.
Definition: VXDGeometryPar.h:123
Belle2::VXDGlobalPar
The Class for VXD global paramter payload.
Definition: VXDGlobalPar.h:34
Belle2::VXDGeometryPar::getPrefix
std::string getPrefix() const
get prefix
Definition: VXDGeometryPar.h:52
Belle2::VXDGeoComponentPar
The Class for VXD geometry component.
Definition: VXDGeoComponentPar.h:36
Belle2::VXDGeometryPar::m_prefix
std::string m_prefix
Prefix to prepend to all volume names.
Definition: VXDGeometryPar.h:103
Belle2::VXDGeometryPar::getComponent
const VXDGeoComponentPar & getComponent(std::string name) const
get component
Definition: VXDGeometryPar.cc:19
Belle2::VXDGeometryPar::m_alignment
std::map< std::string, VXDAlignmentPar > m_alignment
Alignment parameters for all components.
Definition: VXDGeometryPar.h:107
Belle2::VXDGeometryPar::getAlignment
VXDAlignmentPar getAlignment(std::string name) const
get alignment parameters for component name
Definition: VXDGeometryPar.cc:64
Belle2::VXDGeometryPar::getSensor
const VXDGeoSensorPar & getSensor(std::string sensorTypeID) const
get sensor type
Definition: VXDGeometryPar.cc:43
Belle2::VXDGeometryPar::m_halfShells
std::vector< VXDHalfShellPar > m_halfShells
Cache for half shells
Definition: VXDGeometryPar.h:111
Belle2::VXDEnvelopePar
The Class for VXD Envelope parameters.
Definition: VXDEnvelopePar.h:31
Belle2::VXDGeometryPar::m_envelope
VXDEnvelopePar m_envelope
Envelope parameters.
Definition: VXDGeometryPar.h:109
Belle2::VXDGeometryPar::getAlignmentMap
std::map< std::string, VXDAlignmentPar > & getAlignmentMap()
get alignmant map
Definition: VXDGeometryPar.h:68