Belle II Software  release-05-01-25
GeoVXDRadiationSensors.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2014 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #ifndef VXD_GEOMETRY_GEOVXDRADIATONSENSORS_H
13 #define VXD_GEOMETRY_GEOVXDRADIATONSENSORS_H
14 
15 #include <simulation/kernel/SensitiveDetectorBase.h>
16 #include <vector>
17 #include <string>
18 #include <G4LogicalVolume.hh>
19 #include <framework/gearbox/GearDir.h>
20 
21 namespace Belle2 {
29  public:
33  explicit GeoVXDRadiationSensors(const std::string& subdetector): m_subdetector(subdetector) {}
36  {
37  for (auto sensitive : m_sensitive) delete sensitive;
38  }
39 
49  void create(const GearDir& content, G4LogicalVolume& topVolume, G4LogicalVolume& envelopeVolume);
50 
51  private:
53  std::string m_subdetector;
55  std::vector<Simulation::SensitiveDetectorBase*> m_sensitive;
56  };
57 
59 } //Belle2 namespace
60 #endif // VXD_GEOMETRY_GEOVXDRADIATONSENSORS_H
Belle2::GeoVXDRadiationSensors::~GeoVXDRadiationSensors
~GeoVXDRadiationSensors()
delete sensitive detector implementations
Definition: GeoVXDRadiationSensors.h:35
Belle2::GeoVXDRadiationSensors::create
void create(const GearDir &content, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume)
create the Sensor geometry and assign the sensitive detector implementation.
Definition: GeoVXDRadiationSensors.cc:33
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::GeoVXDRadiationSensors::m_subdetector
std::string m_subdetector
one of "PXD" or "SVD"
Definition: GeoVXDRadiationSensors.h:53
Belle2::GeoVXDRadiationSensors::GeoVXDRadiationSensors
GeoVXDRadiationSensors(const std::string &subdetector)
construct the creator with the correct subdetector type
Definition: GeoVXDRadiationSensors.h:33
Belle2::GeoVXDRadiationSensors::m_sensitive
std::vector< Simulation::SensitiveDetectorBase * > m_sensitive
List to all created sensitive detector instances.
Definition: GeoVXDRadiationSensors.h:55
Belle2::GeoVXDRadiationSensors
class to create the diamond radiation sensor geometry if defined
Definition: GeoVXDRadiationSensors.h:28