Belle II Software  release-08-01-10
GeoVXDRadiationSensors.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 #ifndef VXD_GEOMETRY_GEOVXDRADIATONSENSORS_H
11 #define VXD_GEOMETRY_GEOVXDRADIATONSENSORS_H
12 
13 #include <simulation/kernel/SensitiveDetectorBase.h>
14 #include <vector>
15 #include <string>
16 #include <G4LogicalVolume.hh>
17 #include <framework/gearbox/GearDir.h>
18 
19 namespace Belle2 {
27  public:
31  explicit GeoVXDRadiationSensors(const std::string& subdetector): m_subdetector(subdetector) {}
34  {
35  for (auto sensitive : m_sensitive) delete sensitive;
36  }
37 
47  void create(const GearDir& content, G4LogicalVolume& topVolume, G4LogicalVolume& envelopeVolume);
48 
49  private:
51  std::string m_subdetector;
53  std::vector<Simulation::SensitiveDetectorBase*> m_sensitive;
54  };
55 
57 } //Belle2 namespace
58 #endif // VXD_GEOMETRY_GEOVXDRADIATONSENSORS_H
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:31
class to create the diamond radiation sensor geometry if defined
GeoVXDRadiationSensors(const std::string &subdetector)
construct the creator with the correct subdetector type
std::vector< Simulation::SensitiveDetectorBase * > m_sensitive
List to all created sensitive detector instances.
~GeoVXDRadiationSensors()
delete sensitive detector implementations
std::string m_subdetector
one of "PXD" or "SVD"
void create(const GearDir &content, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume)
create the Sensor geometry and assign the sensitive detector implementation.
Abstract base class for different kinds of events.