Belle II Software  release-05-01-25
GeoPXDCreator.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 GEOPXDCREATOR_H
13 #define GEOPXDCREATOR_H
14 
15 #include <vector>
16 #include <vxd/geometry/GeoVXDCreator.h>
17 #include <pxd/dbobjects/PXDGeometryPar.h>
18 
19 
20 namespace Belle2 {
26  namespace PXD {
27 
28  class SensorInfo;
29 
31  class GeoPXDCreator : public VXD::GeoVXDCreator {
32  private:
34  PXDGeometryPar createConfiguration(const GearDir& param);
35 
37  void createGeometry(const PXDGeometryPar& parameters, G4LogicalVolume& topVolume, geometry::GeometryTypes type);
38  public:
40  GeoPXDCreator(): VXD::GeoVXDCreator("PXD") {};
41 
43  virtual ~GeoPXDCreator();
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 
79 
86 
93 
98  virtual VXD::SensorInfoBase* createSensorInfo(const VXDGeoSensorPar& sensor) override;
99 
104  PXDSensorInfoPar* readSensorInfo(const GearDir& sensor);
105 
113  VxdID sensorID, const VXDGeoSensor& sensor, const VXDGeoSensorPlacement& placement) override;
114 
120  void readHalfShellSupport(const GearDir& support, PXDGeometryPar& pxdGeometryPar);
121 
122  private:
123 
125  std::vector<SensorInfo*> m_SensorInfo;
126 
127  }; // class GeoPXDCreator
128  } // namespace PXD
130 } //namespace Belle2
131 
132 #endif /* GEOPXDCREATOR_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::PXD::GeoPXDCreator::readHalfShellSupport
void readHalfShellSupport(const GearDir &support, PXDGeometryPar &pxdGeometryPar)
Create support structure for VXD Half Shell, that means everything thagt does not depend on layer or ...
Definition: GeoPXDCreator.cc:298
Belle2::VXDGeoSensorPlacement
Struct holding the information where a sensor should be placed inside the ladder.
Definition: GeoVXDComponents.h:154
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::PXD::GeoPXDCreator::createPayloads
virtual void createPayloads(const GearDir &content, const IntervalOfValidity &iov) override
Create the configuration objects and save them in the Database.
Definition: GeoPXDCreator.h:64
Belle2::PXD::GeoPXDCreator::createLayerSupport
virtual VXD::GeoVXDAssembly createLayerSupport()
Create support structure for a PXD Layer.
Definition: GeoPXDCreator.cc:559
Belle2::VXDGeoSensorPar
The Class for VXD Sensor payload.
Definition: VXDGeoSensorPar.h:39
Belle2::PXD::GeoPXDCreator::createConfiguration
PXDGeometryPar createConfiguration(const GearDir &param)
Create a parameter object from the Gearbox XML parameters.
Definition: GeoPXDCreator.cc:135
Belle2::VXD::SensitiveDetectorBase
Base class for Sensitive Detector implementation of PXD and SVD.
Definition: SensitiveDetectorBase.h:47
Belle2::VXD::SensorInfoBase
Base class to provide Sensor Information for PXD and SVD.
Definition: SensorInfoBase.h:40
Belle2::PXD::GeoPXDCreator::m_SensorInfo
std::vector< SensorInfo * > m_SensorInfo
Vector of points to SensorInfo objects.
Definition: GeoPXDCreator.h:134
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::PXD::GeoPXDCreator::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: GeoPXDCreator.h:56
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::PXD::GeoPXDCreator::~GeoPXDCreator
virtual ~GeoPXDCreator()
The destructor of the GeoPXDCreator class.
Definition: GeoPXDCreator.cc:54
Belle2::DBObjPtr
Class for accessing objects in the database.
Definition: DBObjPtr.h:31
Belle2::PXDGeometryPar
The Class for VXD geometry.
Definition: PXDGeometryPar.h:35
Belle2::PXD::GeoPXDCreator::createLadderSupport
virtual VXD::GeoVXDAssembly createLadderSupport()
Create support structure for a PXD Ladder.
Definition: GeoPXDCreator.cc:561
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
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::PXD::GeoPXDCreator::createGeometry
void createGeometry(const PXDGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
Definition: GeoPXDCreator.cc:346
Belle2::PXD::GeoPXDCreator::GeoPXDCreator
GeoPXDCreator()
Constructor of the GeoPXDCreator class.
Definition: GeoPXDCreator.h:49
Belle2::PXD::GeoPXDCreator::createSensitiveDetector
virtual VXD::SensitiveDetectorBase * createSensitiveDetector(VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement) override
Return a SensitiveDetector implementation for a given sensor.
Definition: GeoPXDCreator.cc:549
Belle2::VXDGeoSensor
Struct holding all parameters for a completeVXD Sensor.
Definition: GeoVXDComponents.h:112
Belle2::PXDSensorInfoPar
The Class for VXD geometry.
Definition: PXDSensorInfoPar.h:32
Belle2::PXD::GeoPXDCreator::createSensorInfo
virtual VXD::SensorInfoBase * createSensorInfo(const VXDGeoSensorPar &sensor) override
Read the sensor definitions from the database.
Definition: GeoPXDCreator.cc:60
Belle2::geometry::GeometryTypes
GeometryTypes
Flag indiciating the type of geometry to be used.
Definition: GeometryManager.h:39
Belle2::PXD::GeoPXDCreator::createFromDB
virtual void createFromDB(const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
Create the geometry from the Database.
Definition: GeoPXDCreator.h:72
Belle2::PXD::GeoPXDCreator::readSensorInfo
PXDSensorInfoPar * readSensorInfo(const GearDir &sensor)
Read the sensor definitions from the gearbox.
Definition: GeoPXDCreator.cc:99
Belle2::PXD::GeoPXDCreator::createHalfShellSupport
virtual VXD::GeoVXDAssembly createHalfShellSupport(const PXDGeometryPar &parameters)
Create support structure for PXD Half Shell, that means everything thagt does not depend on layer or ...
Definition: GeoPXDCreator.cc:563