Belle II Software development
GeoPXDCreator.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
9#pragma once
10
11#include <vector>
12#include <vxd/geometry/GeoVXDCreator.h>
13#include <pxd/dbobjects/PXDGeometryPar.h>
14
15
16namespace Belle2 {
22 namespace PXD {
23
24 class SensorInfo;
25
28 private:
31
33 void createGeometry(const PXDGeometryPar& parameters, G4LogicalVolume& topVolume, geometry::GeometryTypes type);
34 public:
36 GeoPXDCreator(): VXD::GeoVXDCreator("PXD") {};
37
39 virtual ~GeoPXDCreator();
40
43 virtual void create(const GearDir& content, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
44 {
45 PXDGeometryPar config = createConfiguration(content);
46 createGeometry(config, topVolume, type);
47 }
48
51 virtual void createPayloads(const GearDir& content, const IntervalOfValidity& iov) override
52 {
54 PXDGeometryPar config = createConfiguration(content);
55 importObj.construct(config);
56 importObj.import(iov);
57 }
58
60 virtual void createFromDB(const std::string& name, G4LogicalVolume& topVolume, geometry::GeometryTypes type) override
61 {
63 if (!dbObj) {
64 // Check that we found the object and if not report the problem
65 B2FATAL("No configuration for " << name << " found.");
66 }
67 createGeometry(*dbObj, topVolume, type);
68 }
69
74
79
86
91 virtual VXD::SensorInfoBase* createSensorInfo(const VXDGeoSensorPar& sensor) override;
92
98
106 VxdID sensorID, const VXDGeoSensor& sensor, const VXDGeoSensorPlacement& placement) override;
107
114 void readHalfShellSupport(const GearDir& support, PXDGeometryPar& pxdGeometryPar);
115
116 private:
117
119 std::vector<SensorInfo*> m_SensorInfo;
120
121 }; // class GeoPXDCreator
122 } // namespace PXD
124} //namespace Belle2
bool import(const IntervalOfValidity &iov)
Import the object to database.
Definition: DBImportBase.cc:36
Class for importing a single object to the database.
void construct(Args &&... params)
Construct an object of type T in this DBImportObjPtr using the provided constructor arguments.
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
A class that describes the interval of experiments/runs for which an object in the database is valid.
The Class for VXD geometry.
The Class for VXD geometry.
The creator for the PXD geometry of the Belle II detector.
Definition: GeoPXDCreator.h:27
virtual VXD::GeoVXDAssembly createLayerSupport()
Create support structure for a PXD Layer.
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Create the configuration objects and save them in the Database.
Definition: GeoPXDCreator.h:51
void createGeometry(const PXDGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
virtual VXD::SensitiveDetectorBase * createSensitiveDetector(VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement) override
Return a SensitiveDetector implementation for a given sensor.
std::vector< SensorInfo * > m_SensorInfo
Vector of points to SensorInfo objects.
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: GeoPXDCreator.h:43
void readHalfShellSupport(const GearDir &support, PXDGeometryPar &pxdGeometryPar)
Create support structure for VXD Half Shell, that means everything that does not depend on layer or s...
PXDGeometryPar createConfiguration(const GearDir &param)
Create a parameter object from the Gearbox XML parameters.
PXDSensorInfoPar * readSensorInfo(const GearDir &sensor)
Read the sensor definitions from the gearbox.
virtual ~GeoPXDCreator()
The destructor of the GeoPXDCreator class.
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Create the geometry from the Database.
Definition: GeoPXDCreator.h:60
virtual VXD::GeoVXDAssembly createLadderSupport()
Create support structure for a PXD Ladder.
virtual VXD::GeoVXDAssembly createHalfShellSupport(const PXDGeometryPar &parameters)
Create support structure for PXD Half Shell, that means everything that does not depend on layer or s...
GeoPXDCreator()
Constructor of the GeoPXDCreator class.
Definition: GeoPXDCreator.h:36
virtual VXD::SensorInfoBase * createSensorInfo(const VXDGeoSensorPar &sensor) override
Read the sensor definitions from the database.
The Class for VXD Sensor payload.
Struct holding the information where a sensor should be placed inside the ladder.
Struct holding all parameters for a completeVXD Sensor.
Class to group some Geant4 volumes and place them all at once with a given transformation matrix.
The creator for the VXD geometry of the Belle II detector.
Definition: GeoVXDCreator.h:48
GeoVXDCreator(const std::string &prefix)
Constructor of the GeoVXDCreator class.
Base class for Sensitive Detector implementation of PXD and SVD.
Base class to provide Sensor Information for PXD and SVD.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
GeometryTypes
Flag indiciating the type of geometry to be used.
Abstract base class for different kinds of events.