Belle II Software  release-05-02-19
GeoSVDCreator.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Christian Oswald, Zbynek Drasal, *
7  * Martin Ritter, Jozef Koval, Benjamin Schwenker *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #ifndef GEOSVDCREATOR_H
13 #define GEOSVDCREATOR_H
14 
15 #include <vector>
16 #include <vxd/geometry/GeoVXDCreator.h>
17 #include <svd/dbobjects/SVDGeometryPar.h>
18 
19 
20 namespace Belle2 {
26  namespace SVD {
27 
28  class SensorInfo;
29 
31  class GeoSVDCreator : public VXD::GeoVXDCreator {
32  private:
34  SVDGeometryPar createConfiguration(const GearDir& param);
35 
37  void createGeometry(const SVDGeometryPar& parameters, G4LogicalVolume& topVolume, geometry::GeometryTypes type);
38  public:
40  GeoSVDCreator(): VXD::GeoVXDCreator("SVD") {};
41 
43  virtual ~GeoSVDCreator();
44 
47  virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
48  {
50  createGeometry(config, topVolume, type);
51  }
52 
55  virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov) override
56  {
58  importObj.construct(createConfiguration(content));
59  importObj.import(iov);
60  }
61 
63  virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
64  {
66  if (!dbObj) {
67  // Check that we found the object and if not report the problem
68  B2FATAL("No configuration for " << name << " found.");
69  }
70  createGeometry(*dbObj, topVolume, type);
71  }
72 
78  virtual VXD::GeoVXDAssembly createLayerSupport(int, const SVDGeometryPar& parameters);
79 
85  virtual VXD::GeoVXDAssembly createLadderSupport(int, const SVDGeometryPar& parameters);
86 
93 
98  virtual VXD::SensorInfoBase* createSensorInfo(const VXDGeoSensorPar& sensor) override;
99 
104  SVDSensorInfoPar* readSensorInfo(const GearDir& sensor);
105 
113  VxdID sensorID, const VXDGeoSensor& sensor, const VXDGeoSensorPlacement& placement) override;
114 
120  void readHalfShellSupport(const GearDir& support, SVDGeometryPar& svdGeometryPar);
121 
127  void readLayerSupport(int layer, const GearDir& support, SVDGeometryPar& svdGeometryPar);
128 
134  void readLadderSupport(int layer, const GearDir& support, SVDGeometryPar& svdGeometryPar);
135 
136  private:
137 
139  std::vector<SensorInfo*> m_SensorInfo;
140 
141  }; // class GeoSVDCreator
142  } // namespace SVD
144 } //namespace Belle2
145 
146 #endif /* GEOSVDCREATOR_H */
Belle2::IntervalOfValidity
A class that describes the interval of experiments/runs for which an object in the database is valid.
Definition: IntervalOfValidity.h:35
Belle2::VXDGeoSensorPlacement
Struct holding the information where a sensor should be placed inside the ladder.
Definition: GeoVXDComponents.h:154
Belle2::SVD::GeoSVDCreator::GeoSVDCreator
GeoSVDCreator()
Constructor of the GeoSVDCreator class.
Definition: GeoSVDCreator.h:49
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVD::GeoSVDCreator::readHalfShellSupport
void readHalfShellSupport(const GearDir &support, SVDGeometryPar &svdGeometryPar)
Create support structure for SVD Half Shell, that means everything thagt does not depend on layer or ...
Definition: GeoSVDCreator.cc:512
Belle2::SVDGeometryPar
The Class for VXD geometry.
Definition: SVDGeometryPar.h:39
Belle2::VXDGeoSensorPar
The Class for VXD Sensor payload.
Definition: VXDGeoSensorPar.h:39
Belle2::VXD::SensitiveDetectorBase
Base class for Sensitive Detector implementation of PXD and SVD.
Definition: SensitiveDetectorBase.h:47
Belle2::SVD::GeoSVDCreator::createPayloads
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Create the configuration objects and save them in the Database.
Definition: GeoSVDCreator.h:64
Belle2::SVD::GeoSVDCreator::createLadderSupport
virtual VXD::GeoVXDAssembly createLadderSupport(int, const SVDGeometryPar &parameters)
Create support structure for a SVD Ladder.
Definition: GeoSVDCreator.cc:800
Belle2::VXD::SensorInfoBase
Base class to provide Sensor Information for PXD and SVD.
Definition: SensorInfoBase.h:40
Belle2::DBImportObjPtr::construct
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
Definition: DBImportObjPtr.h:57
Belle2::DBImportBase::import
bool import(const IntervalOfValidity &iov)
Import the object to database.
Definition: DBImportBase.cc:38
Belle2::SVD::GeoSVDCreator::createSensorInfo
virtual VXD::SensorInfoBase * createSensorInfo(const VXDGeoSensorPar &sensor) override
Read the sensor definitions from the database.
Definition: GeoSVDCreator.cc:62
Belle2::VXD::GeoVXDAssembly
Class to group some Geant4 volumes and place them all at once with a given transformation matrix.
Definition: GeoVXDAssembly.h:31
Belle2::VXD::GeoVXDCreator::GeoVXDCreator
GeoVXDCreator(const std::string &prefix)
Constructor of the GeoVXDCreator class.
Definition: GeoVXDCreator.cc:56
Belle2::SVD::GeoSVDCreator::createHalfShellSupport
virtual VXD::GeoVXDAssembly createHalfShellSupport(const SVDGeometryPar &parameters)
Create support structure for SVD Half Shell, that means everything thagt does not depend on layer or ...
Definition: GeoSVDCreator.cc:638
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::SVD::GeoSVDCreator::createGeometry
void createGeometry(const SVDGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
Definition: GeoSVDCreator.cc:311
Belle2::SVD::GeoSVDCreator::createConfiguration
SVDGeometryPar createConfiguration(const GearDir &param)
Create a parameter object from the Gearbox XML parameters.
Definition: GeoSVDCreator.cc:148
Belle2::SVD::GeoSVDCreator::readLayerSupport
void readLayerSupport(int layer, const GearDir &support, SVDGeometryPar &svdGeometryPar)
Create support structure for a SVD Layer.
Definition: GeoSVDCreator.cc:539
Belle2::SVD::GeoSVDCreator::readSensorInfo
SVDSensorInfoPar * readSensorInfo(const GearDir &sensor)
Read the sensor definitions from gearbox.
Definition: GeoSVDCreator.cc:99
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVD::GeoSVDCreator::createFromDB
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Create the geometry from the Database.
Definition: GeoSVDCreator.h:72
Belle2::SVD::GeoSVDCreator::createSensitiveDetector
virtual VXD::SensitiveDetectorBase * createSensitiveDetector(VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement) override
Return a SensitiveDetector implementation for a given sensor.
Definition: GeoSVDCreator.cc:139
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
Belle2::DBImportObjPtr
Class for importing a single object to the database.
Definition: DBImportObjPtr.h:33
Belle2::SVD::GeoSVDCreator::readLadderSupport
void readLadderSupport(int layer, const GearDir &support, SVDGeometryPar &svdGeometryPar)
Create support structure for a SVD Ladder.
Definition: GeoSVDCreator.cc:584
Belle2::VXDGeoSensor
Struct holding all parameters for a completeVXD Sensor.
Definition: GeoVXDComponents.h:112
Belle2::SVD::GeoSVDCreator::create
virtual void create(const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
The old create member: create the configuration object(s) on the fly and call the geometry creation r...
Definition: GeoSVDCreator.h:56
Belle2::SVD::GeoSVDCreator::~GeoSVDCreator
virtual ~GeoSVDCreator()
The destructor of the GeoSVDCreator class.
Definition: GeoSVDCreator.cc:56
Belle2::geometry::GeometryTypes
GeometryTypes
Flag indiciating the type of geometry to be used.
Definition: GeometryManager.h:39
Belle2::SVD::GeoSVDCreator::m_SensorInfo
std::vector< SensorInfo * > m_SensorInfo
Vector of pointers to SensorInfo objects.
Definition: GeoSVDCreator.h:148
Belle2::SVD::GeoSVDCreator::createLayerSupport
virtual VXD::GeoVXDAssembly createLayerSupport(int, const SVDGeometryPar &parameters)
Create support structure for a SVD Layer.
Definition: GeoSVDCreator.cc:670
Belle2::SVDSensorInfoPar
The Class for VXD geometry.
Definition: SVDSensorInfoPar.h:33