9#include <pxd/geometry/GeoPXDCreator.h>
10#include <vxd/geometry/GeoCache.h>
11#include <pxd/geometry/SensorInfo.h>
12#include <pxd/simulation/SensitiveDetector.h>
14#include <simulation/background/BkgSensitiveDetector.h>
16#include <geometry/Materials.h>
17#include <geometry/CreatorFactory.h>
18#include <geometry/utilities.h>
19#include <framework/gearbox/GearDir.h>
20#include <framework/gearbox/Unit.h>
21#include <framework/logging/Logger.h>
24#include <boost/format.hpp>
26#include <G4LogicalVolume.hh>
27#include <G4PVPlacement.hh>
32#include <G4Polycone.hh>
33#include <G4SubtractionSolid.hh>
44 using namespace geometry;
72 info->setDEPFETParams(
87 info->setIntegrationWindow(
100 sensor.getLength(
"width"),
101 sensor.getLength(
"length"),
102 sensor.getLength(
"height"),
103 sensor.getInt(
"pixelsU"),
104 sensor.getInt(
"pixelsV[1]"),
105 sensor.getLength(
"splitLength", 0),
106 sensor.getInt(
"pixelsV[2]", 0)
109 info->setDEPFETParams(
110 sensor.getDouble(
"BulkDoping"),
111 sensor.getWithUnit(
"BackVoltage"),
112 sensor.getWithUnit(
"TopVoltage"),
113 sensor.getLength(
"SourceBorderSmallPixel"),
114 sensor.getLength(
"ClearBorderSmallPixel"),
115 sensor.getLength(
"DrainBorderSmallPixel"),
116 sensor.getLength(
"SourceBorderLargePixel"),
117 sensor.getLength(
"ClearBorderLargePixel"),
118 sensor.getLength(
"DrainBorderLargePixel"),
119 sensor.getLength(
"GateDepth"),
120 sensor.getBool(
"DoublePixel"),
121 sensor.getDouble(
"ChargeThreshold"),
122 sensor.getDouble(
"NoiseFraction")
124 info->setIntegrationWindow(
125 sensor.getTime(
"IntegrationStart"),
126 sensor.getTime(
"IntegrationEnd")
141 VXDGlobalPar globals((
float)content.getDouble(
"ElectronTolerance", 100),
142 (
float)content.getDouble(
"MinimumElectrons", 10),
143 content.getLength(
"ActiveStepSize", 0.005),
144 content.getBool(
"ActiveChips",
false),
145 content.getBool(
"SeeNeutrons",
false),
146 content.getBool(
"OnlyPrimaryTrueHits",
false),
147 content.getBool(
"OnlyActiveMaterial",
false),
148 (
float)content.getLength(
"DistanceTolerance", 0.005),
149 content.getString(
"DefaultMaterial",
"Air")
154 GearDir envelopeParams(content,
"Envelope/");
156 envelopeParams.
getString(
"Material",
"Air"),
158 envelopeParams.
getAngle(
"minPhi", 0),
159 envelopeParams.
getAngle(
"maxPhi", 2 * M_PI),
160 (envelopeParams.
getNodes(
"InnerPoints/point").size() > 0)
163 for (
const GearDir& point : envelopeParams.
getNodes(
"InnerPoints/point")) {
164 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
167 for (
const GearDir& point : envelopeParams.
getNodes(
"OuterPoints/point")) {
168 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
174 string pathAlign = (boost::format(
"Align[@component='%1%']/") %
m_prefix).str();
177 B2WARNING(
"Could not find alignment parameters for component " <<
m_prefix);
178 return pxdGeometryPar;
189 GearDir components(content,
"Components/");
190 for (
const GearDir& paramsSensor : components.getNodes(
"Sensor")) {
191 string sensorTypeID = paramsSensor.getString(
"@type");
194 paramsSensor.getString(
"Color",
""),
195 paramsSensor.getLength(
"width"),
196 paramsSensor.getLength(
"width2", 0),
197 paramsSensor.getLength(
"length"),
198 paramsSensor.getLength(
"height"),
199 paramsSensor.getAngle(
"angle", 0),
200 paramsSensor.getBool(
"@slanted",
false)
203 paramsSensor.getString(
"Material"),
204 paramsSensor.getString(
"Active/Color",
"#f00"),
205 paramsSensor.getLength(
"Active/width"),
206 paramsSensor.getLength(
"Active/width2", 0),
207 paramsSensor.getLength(
"Active/length"),
208 paramsSensor.getLength(
"Active/height")
211 paramsSensor.getLength(
"Active/u"),
212 paramsSensor.getLength(
"Active/v"),
213 paramsSensor.getString(
"Active/w",
"center"),
214 paramsSensor.getLength(
"Active/woffset", 0)
218 sensor.setSensorInfo(pxdInfo);
225 GearDir support(content,
"Support/");
228 for (
const GearDir& shell : content.getNodes(
"HalfShell")) {
230 string shellName =
m_prefix +
"." + shell.getString(
"@name");
231 string pathShell = (boost::format(
"Align[@component='%1%']/") % shellName).str();
234 B2WARNING(
"Could not find alignment parameters for component " << shellName);
235 return pxdGeometryPar;
245 VXDHalfShellPar halfShell(shell.getString(
"@name"), shell.getAngle(
"shellAngle", 0));
247 for (
const GearDir& layer : shell.getNodes(
"Layer")) {
248 int layerID = layer.getInt(
"@id");
250 readLadder(layerID, components, pxdGeometryPar);
253 for (
const GearDir& ladder : layer.getNodes(
"Ladder")) {
254 int ladderID = ladder.getInt(
"@id");
255 double phi = ladder.getAngle(
"phi", 0);
257 halfShell.
addLadder(layerID, ladderID, phi);
264 GearDir radiationDir(content,
"RadiationSensors");
268 radiationDir.
getBool(
"insideEnvelope"),
278 position.getLength(
"radius"),
279 position.getAngle(
"theta")
283 for (
GearDir& sensor : position.getNodes(
"phi")) {
285 diamonds.
addSensor(sensor.getInt(
"@id"), sensor.getAngle());
292 return pxdGeometryPar;
299 endflange.getString(
"@name"),
300 endflange.getString(
"Material",
"Air"),
301 endflange.getAngle(
"minPhi", 0),
302 endflange.getAngle(
"maxPhi", 2 * M_PI),
303 (endflange.getNodes(
"Cutout").size() > 0),
304 endflange.getLength(
"Cutout/width1", 0.),
305 endflange.getLength(
"Cutout/width2", 0.),
306 endflange.getLength(
"Cutout/height", 0.),
307 endflange.getLength(
"Cutout/depth", 0.)
310 for (
const GearDir& plane : endflange.getNodes(
"Plane")) {
312 plane.getLength(
"posZ"),
313 plane.getLength(
"innerRadius"),
314 plane.getLength(
"outerRadius")
316 endflangePar.
getPlanes().push_back(planePar);
348 m_activeChips = parameters.getGlobalParams().getActiveChips();
349 m_seeNeutrons = parameters.getGlobalParams().getSeeNeutrons();
358 if (!material) B2FATAL(
"Default Material of VXD, '" <<
m_defaultMaterial <<
"', could not be found");
362 G4LogicalVolume* envelope(0);
363 G4VPhysicalVolume* physEnvelope{
nullptr};
364 if (!parameters.getEnvelope().getExists()) {
365 B2INFO(
"Could not find definition for " +
m_prefix +
" Envelope, placing directly in top volume");
366 envelope = &topVolume;
368 double minZ(0), maxZ(0);
370 parameters.getEnvelope().getInnerPoints(),
371 parameters.getEnvelope().getOuterPoints(),
372 parameters.getEnvelope().getMinPhi(),
373 parameters.getEnvelope().getMaxPhi(),
376 envelope =
new G4LogicalVolume(envelopeCone, material,
m_prefix +
".Envelope");
379 &topVolume,
false, 1);
382 G4Region* aRegion =
new G4Region(
"PXDEnvelope");
383 envelope->SetRegion(aRegion);
384 aRegion->AddRootLogicalVolume(envelope);
388 for (
const pair<const string, VXDGeoSensorPar>& typeAndSensor : parameters.getSensorMap()) {
389 const string& sensorTypeID = typeAndSensor.first;
416 vector<VXDGeoPlacement> subcomponents;
418 subcomponents.reserve(components.size());
419 std::transform(components.begin(), components.end(), std::back_inserter(subcomponents),
420 [](
auto const & component) {
421 return VXDGeoPlacement(component.getName(),
422 component.getU() / Unit::mm,
423 component.getV() / Unit::mm,
425 component.getWOffset() / Unit::mm
428 sensor.setComponents(subcomponents);
433 for (
const string& name : parameters.getComponentInsertOder()) {
439 B2WARNING(
"Component " << name <<
" already created from previous subcomponents, should not be here");
451 double angle = paramsComponent.
getAngle();
454 if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
455 B2DEBUG(100,
"One dimension empty, using auto resize for component");
457 G4VSolid* solid =
createTrapezoidal(
m_prefix +
"." + name, c.getWidth(), c.getWidth2(), c.getLength(), c.getHeight(), angle);
461 vector<VXDGeoPlacement> subComponents;
463 subComponents.reserve(paramsSubComponents.size());
464 std::transform(paramsSubComponents.begin(), paramsSubComponents.end(), std::back_inserter(subComponents),
465 [](
auto const & paramsSubComponent) {
466 return VXDGeoPlacement(paramsSubComponent.getName(),
467 paramsSubComponent.getU() / Unit::mm,
468 paramsSubComponent.getV() / Unit::mm,
469 paramsSubComponent.getW(),
470 paramsSubComponent.getWOffset() / Unit::mm
474 if (
m_activeChips && parameters.getSensitiveChipID(name) >= 0) {
475 int chipID = parameters.getSensitiveChipID(name);
476 B2DEBUG(50,
"Creating BkgSensitiveDetector for component " << name <<
" with chipID " << chipID);
478 c.getVolume()->SetSensitiveDetector(sensitive);
490 string shellName = shell.getName();
498 double shellAngle = shell.getShellAngle();
502 for (
const std::pair<
const int, std::vector<std::pair<int, double>> >& layer : shell.getLayers()) {
503 int layerID = layer.first;
504 const std::vector<std::pair<int, double>>& Ladders = layer.second;
515 for (
const std::pair<int, double>& ladder : Ladders) {
516 int ladderID = ladder.first;
517 double phi = ladder.second;
519 G4Transform3D ladderPlacement =
placeLadder(ladderID, phi, envelope, shellAlignment, parameters);
531 G4PVPlacement topPlacement(
nullptr, G4ThreeVector(0, 0, 0), &topVolume,
532 "temp_Top",
nullptr,
false, 1,
false);
539 if (parameters.getRadiationSensors().getSubDetector() ==
"") {
540 B2DEBUG(10,
"Apparently no radiation sensors defined, skipping");
542 createDiamonds(parameters.getRadiationSensors(), topVolume, *envelope);
551 sensorInfo->
setID(sensorID);
565 if (!parameters.getBuildSupport())
return supportAssembly;
569 const std::vector<VXDPolyConePar> Endflanges = parameters.getEndflanges();
572 double minZ(0), maxZ(0);
573 string name = endflange.getName();
576 double minPhi = endflange.getMinPhi();
577 double dPhi = endflange.getMaxPhi() - minPhi;
578 int nPlanes = endflange.getPlanes().size();
580 B2ERROR(
"Polycone needs at least two planes");
581 return supportAssembly;
583 std::vector<double> z(nPlanes, 0);
584 std::vector<double> rMin(nPlanes, 0);
585 std::vector<double> rMax(nPlanes, 0);
587 minZ = numeric_limits<double>::infinity();
588 maxZ = -numeric_limits<double>::infinity();
590 const std::vector<VXDPolyConePlanePar> Planes = endflange.getPlanes();
592 z[index] = plane.getPosZ() /
Unit::mm;
593 minZ = min(minZ, z[index]);
594 maxZ = max(maxZ, z[index]);
595 rMin[index] = plane.getInnerRadius() /
Unit::mm;
596 rMax[index] = plane.getOuterRadius() /
Unit::mm;
600 G4VSolid* supportCone =
new G4Polycone(name, minPhi, dPhi, nPlanes, z.data(), rMin.data(), rMax.data());
613 int nCutouts = parameters.getNCutOuts();
614 double sizeX = parameters.getCutOutWidth() /
Unit::mm / 2.;
615 double sizeY = parameters.getCutOutHeight() /
Unit::mm / 2.;
616 double sizeZ = (maxZ - minZ) / 2.;
617 G4ThreeVector origin(
618 parameters.getCutOutShift() /
Unit::mm,
619 parameters.getCutOutRPhi() /
Unit::mm,
623 double phi0 = parameters.getCutOutStartPhi();
624 double dphi = parameters.getCutOutDeltaPhi();
625 for (
int i = 0; i < nCutouts; ++i) {
626 G4Box* box =
new G4Box(
"Cutout", sizeX, sizeY, sizeZ);
627 G4Transform3D placement = G4RotateZ3D(phi0 + i * dphi) * G4Translate3D(origin);
628 G4VSolid* supportConeOld = supportCone;
629 supportCone =
new G4SubtractionSolid(
"PXD Support endflange", supportConeOld, box, placement);
633 string materialName = endflange.getMaterial();
635 if (!material) B2FATAL(
"Material '" << materialName <<
"', required by PXD component " << name <<
", could not be found");
637 G4LogicalVolume* volume =
new G4LogicalVolume(supportCone, material, name);
639 supportAssembly.
add(volume);
646 int nTubes = parameters.getNTubes();
647 double minZ = parameters.getTubesMinZ() /
Unit::mm;
648 double maxZ = parameters.getTubesMaxZ() /
Unit::mm;
649 double minR = parameters.getTubesMinR() /
Unit::mm;
650 double maxR = parameters.getTubesMaxR() /
Unit::mm;
651 double sizeZ = (maxZ - minZ) / 2.;
652 double shiftX = parameters.getTubesRPhi() /
Unit::mm;
654 double shiftZ = minZ + sizeZ;
655 double phi0 = parameters.getTubesStartPhi();
656 double dphi = parameters.getTubesDeltaPhi();
657 string material = parameters.getTubesMaterial();
659 G4Tubs* tube =
new G4Tubs(
"CarbonTube", minR, maxR, sizeZ, 0, 2 * M_PI);
662 for (
int i = 0; i < nTubes; ++i) {
663 G4Transform3D placement = G4RotateZ3D(phi0 + i * dphi) * G4Translate3D(shiftX, shiftY, shiftZ);
664 supportAssembly.
add(tubeVol, placement);
668 return supportAssembly;
The Class for BeamBackground Sensitive Detector.
GearDir is the basic class used for accessing the parameter store.
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
The Class for VXD geometry.
void setNTubes(int nTubes)
set number of tubes
void setTubesRPhi(double rphi)
set tubes tubes RPhi
void setTubesMaxR(double maxR)
set tubes maxR
const std::vector< VXDPolyConePar > & getEndflanges() const
get Endflanges
void setNCutOuts(int nCutouts)
set number of cutouts
void setCutOutShift(double shift)
set shift of cutouts
std::vector< PXDSensorInfoPar * > & getSensorInfos()
get sensorInfos
void setCutOutWidth(double width)
set width of cutouts
void setTubesMinZ(double minZ)
set tubes minZ
void setCutOutHeight(double height)
set height of cutouts
void setCutOutDeltaPhi(double delta)
set deltaphi of cutouts
void setTubesDeltaPhi(double delta)
set tubes tubes DeltaPhi
void setTubesMaxZ(double maxZ)
set tubes maxZ
void setTubesMinR(double minR)
set tubes minR
void setCutOutStartPhi(double start)
set start phi of cutouts
void setCutOutRPhi(double rphi)
set rphi of cutouts
void setTubesStartPhi(double start)
set tubes tubes StartPhi
void setTubesMaterial(const std::string &material)
set tubes tubes material
The Class for VXD geometry.
double getTopVoltage() const
Return the voltage at the top of the sensor.
double getClearBorderSmallPitch() const
Return the distance along u between the clear side of a small pixel and the start of the internal gat...
double getChargeThreshold() const
Get the charge threshold in ADU for the sensor.
double getGateDepth() const
Return the gate depth for the sensor.
double getDrainBorderLargePitch() const
Return the distance along v between the drain side of a large pixel and the start of the internal gat...
double getClearBorderLargePitch() const
Return the distance along u between the clear side of a large pixel and the start of the internal gat...
double getNoiseFraction() const
Get the noise fraction for the sensor.
double getBulkDoping() const
Return the bulk doping of the Silicon sensor.
bool getDoublePixel() const
Return true if the Sensor is a double pixel structure: every other pixel is mirrored along v.
double getSourceBorderSmallPitch() const
Return the distance along v between the source side of a small pixel and the start of the internal ga...
double getSourceBorderLargePitch() const
Return the distance along v between the source side of a large pixel and the start of the internal ga...
double getIntegrationEnd() const
Return the end of the integration window, the timeframe the PXD is sensitive.
double getBackVoltage() const
Return the voltage at the backside of the sensor.
double getIntegrationStart() const
Return the start of the integration window, the timeframe the PXD is sensitive.
double getDrainBorderSmallPitch() const
Return the distance along v between the drain side of a small pixel and the start of the internal gat...
virtual VXD::GeoVXDAssembly createLayerSupport()
Create support structure for a PXD Layer.
void createGeometry(const PXDGeometryPar ¶meters, 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.
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 ¶m)
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 VXD::GeoVXDAssembly createLadderSupport()
Create support structure for a PXD Ladder.
virtual VXD::GeoVXDAssembly createHalfShellSupport(const PXDGeometryPar ¶meters)
Create support structure for PXD Half Shell, that means everything that does not depend on layer or s...
virtual VXD::SensorInfoBase * createSensorInfo(const VXDGeoSensorPar &sensor) override
Read the sensor definitions from the database.
Specific implementation of SensorInfo for PXD Sensors which provides additional pixel specific inform...
void flipVSegmentation()
Flip the Pitch segmentation along v.
void setID(VxdID id)
Change the SensorID, useful to copy the SensorInfo from one sensor and use it for another.
static const double mm
[millimeters]
static const double um
[micrometers]
The Class for VXD Alignment payload.
The Class for VXD Envelope parameters.
The Class for VXD geometry component.
double getWidth() const
get the width of the component
double getHeight() const
get the height of the component
const std::vector< VXDGeoPlacementPar > & getSubComponents() const
get sub components
const std::string & getColor() const
get the name of the color for the component
double getAngle() const
get the angle of the component
double getWidth2() const
get the forward width of the component, 0 for rectangular
const std::string & getMaterial() const
get the name of the Material for the component
double getLength() const
get the length of the component
Class holding all parameters for an VXD geometry component.
The Class for VXD placement payload.
double getU() const
get local u coordinate where to place the component
double getV() const
get local v coordinate where to place the component
const std::string & getW() const
get local w position where to place the component
double getWOffset() const
get offset to local w position where to place the component
Class holding all parameters to place a VXD geometry subcomponent.
The Class for VXD Radiation Sensor parameters.
void addPosition(const VXDGeoRadiationSensorsPositionPar &position)
add radiation sensor position
The Class for VXD Radiation Sensor Position parameters.
void addSensor(int id, double phi)
add sensor with individual id
The Class for VXD Sensor payload.
const VXDGeoPlacementPar & getActivePlacement() const
get the placement description for the active area
const std::vector< VXDGeoPlacementPar > & getComponents() const
get the list of sub components
const VXDGeoComponentPar & getActiveArea() const
get the component description for the active area
bool getSlanted() const
return wether or not the sensor is slanted (usually only the first sensor in layers 4-6)
Struct holding the information where a sensor should be placed inside the ladder.
bool getFlipV() const
check whether or not the sensor should be flipped around the V coordinate
Struct holding all parameters for a completeVXD Sensor.
const std::vector< VXDHalfShellPar > & getHalfShells() const
get half-shell
void setGlobalParams(const VXDGlobalPar &globals)
set global parameters
void setRadiationSensors(const VXDGeoRadiationSensorsPar &diamonds)
set radiation sensor parameters
const std::map< std::string, VXDGeoSensorPar > & getSensorMap() const
get sensor map
void setEnvelope(const VXDEnvelopePar &envelope)
set envelope parameters
const VXDGlobalPar & getGlobalParams() const
get global parameters
void setPrefix(const std::string &prefix)
set prefix
std::map< std::string, VXDAlignmentPar > & getAlignmentMap()
get alignmant map
The Class for VXD global paramter payload.
bool getActiveChips() const
Get whether chips are sensitive
The Class for VXD half shell payload.
void addLadder(int layerID, int ladderID, double phi)
add ladder
The Class for VXD PolyCone, possibly with coutouts.
std::vector< VXDPolyConePlanePar > & getPlanes(void)
Get planes.
The Class for VXD Polycone Plane.
const std::list< std::pair< double, double > > & getInnerPoints() const
get inner XZ points
const std::list< std::pair< double, double > > & getOuterPoints() const
get outer XZ points
double getWidth() const
Return the (backward) width of the sensor.
int getUCells() const
Return number of pixel/strips in u direction.
double getThickness() const
Return the thickness of the sensor.
int getVCells2() const
Return number of pixel/strips in v direction for second segment.
double getSplitLength() const
Return the splitLength of the sensor.
int getVCells1() const
Return number of pixel/strips in v direction for first segment.
double getLength() const
Return the length of the sensor.
void findVolumes(G4VPhysicalVolume *envelope)
Search a given Geometry for Sensors.
static GeoCache & getInstance()
Return a reference to the singleton instance.
void addHalfShellPlacement(VxdID halfShell, const G4Transform3D &placement)
Remember how half-shell is placed into world volume.
Class to group some Geant4 volumes and place them all at once with a given transformation matrix.
void place(G4LogicalVolume *mother, const G4Transform3D &transform)
Place all the volumes already added to the assembly in the given mother.
void add(G4LogicalVolume *volume, const G4Transform3D &transform=G4Transform3D())
Add a volume to the assembly.
std::map< std::string, VXDGeoSensor > m_sensorMap
Map containing Information about all defined sensor types.
float m_minimumElectrons
minimum number of electrons to be deposited by a particle to be saved
G4VSolid * createTrapezoidal(const std::string &name, double width, double width2, double length, double &height, double angle=0)
Create a trapezoidal solid.
virtual void readLadderComponents(int layerID, int ladderID, GearDir content, VXDGeometryPar &vxdGeometryPar)
Read parameters for ladder components and their alignment corresponding to the given ladder id.
void createDiamonds(const VXDGeoRadiationSensorsPar ¶ms, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume)
Create diamond radiation sensors.
std::vector< Simulation::SensitiveDetectorBase * > m_sensitive
List to all created sensitive detector instances.
std::string m_prefix
Prefix to prepend to all volume names.
bool m_onlyActiveMaterial
If this is true, only active Materials will be placed for tracking studies.
double m_activeStepSize
Stepsize to be used inside active volumes.
float m_distanceTolerance
tolerance for Geant4 steps to be merged to a single step
virtual void readLadder(int layer, GearDir components, VXDGeometryPar &geoparameters)
Read parameters for a ladder in layer with given ID from gearbox and layer store them in payload.
std::map< std::string, Belle2::VxdID > m_halfShellVxdIDs
Used for translation of half-shell name into a VxdID to consitently handle it in hierarchy.
bool m_onlyPrimaryTrueHits
If true only create TrueHits from primary particles and ignore secondaries.
float m_electronTolerance
tolerance for the energy deposition in electrons to be merged in a single step
G4Transform3D getAlignment(const VXDAlignmentPar ¶ms)
Get Alignment from paylead object.
GeoVXDAssembly createSubComponents(const std::string &name, VXDGeoComponent &component, std::vector< VXDGeoPlacement > placements, bool originCenter=true, bool allowOutside=false)
Place a list of subcomponents into an component.
std::map< std::string, VXDGeoComponent > m_componentCache
Cache of all previously created components.
G4Transform3D placeLadder(int ladderID, double phi, G4LogicalVolume *volume, const G4Transform3D &placement, const VXDGeometryPar ¶meters)
Place ladder corresponding to the given ladder id into volume setLayer has to be called first to set ...
virtual void setCurrentLayer(int layer, const VXDGeometryPar ¶meters)
Read parameters for given layer and store in m_ladder.
std::vector< VXDGeoPlacementPar > getSubComponents(const GearDir &path)
Return vector of VXDGeoPlacements with all the components defined inside a given path.
bool m_seeNeutrons
Make sensitive detectors also see neutrons.
std::string m_defaultMaterial
Name of the Material to be used for Air.
bool m_activeChips
Make also chips sensitive.
std::string m_currentHalfShell
Current half-shell being processed (need to know ladder parent for hierarchy)
Base class for Sensitive Detector implementation of PXD and SVD.
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.
double getAngle(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard angle unit.
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
std::vector< GearDir > getNodes(const std::string &path="") const
Get vector of GearDirs which point to all the nodes the given path evaluates to.
bool getBool(const std::string &path="") const noexcept(false)
Get the parameter path as a bool.
int getInt(const std::string &path="") const noexcept(false)
Get the parameter path as a int.
static G4Material * get(const std::string &name)
Find given material.
VXD::SensitiveDetector< PXDSimHit, PXDTrueHit > SensitiveDetector
The PXD Sensitive Detector class.
geometry::CreatorFactory< GeoPXDCreator > GeoPXDFactory("PXDCreator")
Register the creator.
G4Polycone * createRotationSolid(const std::string &name, const GearDir ¶ms, double &minZ, double &maxZ)
Create a solid by roating two polylines around the Z-Axis.
void setVisibility(G4LogicalVolume &volume, bool visible)
Helper function to quickly set the visibility of a given volume.
void setColor(G4LogicalVolume &volume, const std::string &color)
Set the color of a logical volume.
GeometryTypes
Flag indiciating the type of geometry to be used.
Abstract base class for different kinds of events.
Very simple class to provide an easy way to register creators with the CreatorManager.