9#include <vxd/geometry/GeoVXDRadiationSensors.h>
10#include <geometry/Materials.h>
12#include <CLHEP/Units/SystemOfUnits.h>
14#include <G4PVPlacement.hh>
15#include <simulation/background/BkgSensitiveDetector.h>
26 G4LogicalVolume* top = &topVolume;
27 if (content.getBool(
"insideEnvelope")) {
28 top = &envelopeVolume;
32 const double width = content.getLength(
"width");
33 const double length = content.getLength(
"length");
34 const double height = content.getLength(
"height");
39 for (
GearDir& position : content.getNodes(
"position")) {
41 const double r = position.getLength(
"radius");
42 const double z = position.getLength(
"z");
43 const double theta = position.getAngle(
"theta");
45 for (
GearDir& sensor : position.getNodes(
"phi")) {
47 const double phi = sensor.getAngle();
48 const int id = sensor.getInt(
"@id");
50 const std::string name =
m_subdetector +
".DiamondSensor." + std::to_string(
id);
52 if (not shape) shape =
new G4Box(
"radiationSensorDiamond", width / 2 * CLHEP::cm, length / 2 * CLHEP::cm, height / 2 * CLHEP::cm);
53 G4LogicalVolume* volume =
new G4LogicalVolume(shape, material, name);
56 volume->SetSensitiveDetector(sensitive);
58 G4Transform3D transform = G4RotateZ3D(phi - M_PI / 2) * G4Translate3D(0, r * CLHEP::cm,
59 z * CLHEP::cm) * G4RotateX3D(-M_PI / 2 - theta);
60 new G4PVPlacement(transform, volume, name, top,
false, 1);
The Class for BeamBackground Sensitive Detector.
GearDir is the basic class used for accessing the parameter store.
std::string m_subdetector
one of "PXD" or "SVD"
static G4Material * get(const std::string &name)
Find given material.
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.