9#include <svd/geometry/GeoSVDCreator.h>
10#include <vxd/geometry/GeoCache.h>
11#include <svd/geometry/SensorInfo.h>
12#include <svd/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>
33#include <G4Polycone.hh>
34#include <G4UnionSolid.hh>
35#include <G4SubtractionSolid.hh>
45 using namespace geometry;
71 info->setSensorParams(
98 const double unit_pFcm = 1;
103 sensor.getLength(
"width"),
104 sensor.getLength(
"length"),
105 sensor.getLength(
"height"),
106 sensor.getInt(
"stripsU"),
107 sensor.getInt(
"stripsV"),
108 sensor.getLength(
"width2", 0)
111 info->setSensorParams(
112 sensor.getWithUnit(
"stripEdgeU"),
113 sensor.getWithUnit(
"stripEdgeV"),
114 sensor.getWithUnit(
"DepletionVoltage"),
115 sensor.getWithUnit(
"BiasVoltage"),
116 sensor.getDouble(
"BackplaneCapacitanceU") * unit_pFcm,
117 sensor.getDouble(
"InterstripCapacitanceU") * unit_pFcm,
118 sensor.getDouble(
"CouplingCapacitanceU") * unit_pFcm,
119 sensor.getDouble(
"BackplaneCapacitanceV") * unit_pFcm,
120 sensor.getDouble(
"InterstripCapacitanceV") * unit_pFcm,
121 sensor.getDouble(
"CouplingCapacitanceV") * unit_pFcm,
122 sensor.getWithUnit(
"ADUEquivalentU"),
123 sensor.getWithUnit(
"ADUEquivalentV"),
124 sensor.getWithUnit(
"ElectronicNoiseU"),
125 sensor.getWithUnit(
"ElectronicNoiseV"),
126 sensor.getWithUnit(
"ADUEquivalentSbwU", 0),
127 sensor.getWithUnit(
"ADUEquivalentSbwV", 0),
128 sensor.getWithUnit(
"ElectronicNoiseSbwU", 0),
129 sensor.getWithUnit(
"ElectronicNoiseSbwV", 0)
139 sensorInfo->
setID(sensorID);
152 VXDGlobalPar globals((
float)content.getDouble(
"ElectronTolerance", 100),
153 (
float)content.getDouble(
"MinimumElectrons", 10),
154 content.getLength(
"ActiveStepSize", 0.005),
155 content.getBool(
"ActiveChips",
false),
156 content.getBool(
"SeeNeutrons",
false),
157 content.getBool(
"OnlyPrimaryTrueHits",
false),
158 content.getBool(
"OnlyActiveMaterial",
false),
159 (
float)content.getLength(
"DistanceTolerance", 0.005),
160 content.getString(
"DefaultMaterial",
"Air")
165 GearDir envelopeParams(content,
"Envelope/");
167 envelopeParams.
getString(
"Material",
"Air"),
169 envelopeParams.
getAngle(
"minPhi", 0),
170 envelopeParams.
getAngle(
"maxPhi", 2 * M_PI),
171 (envelopeParams.
getNodes(
"InnerPoints/point").size() > 0)
174 for (
const GearDir& point : envelopeParams.
getNodes(
"InnerPoints/point")) {
175 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
178 for (
const GearDir& point : envelopeParams.
getNodes(
"OuterPoints/point")) {
179 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
185 string pathAlign = (boost::format(
"Align[@component='%1%']/") %
m_prefix).str();
188 B2WARNING(
"Could not find alignment parameters for component " <<
m_prefix);
189 return svdGeometryPar;
200 GearDir components(content,
"Components/");
201 for (
const GearDir& paramsSensor : components.getNodes(
"Sensor")) {
202 string sensorTypeID = paramsSensor.getString(
"@type");
205 paramsSensor.getString(
"Color",
""),
206 paramsSensor.getLength(
"width"),
207 paramsSensor.getLength(
"width2", 0),
208 paramsSensor.getLength(
"length"),
209 paramsSensor.getLength(
"height"),
210 paramsSensor.getAngle(
"angle", 0),
211 paramsSensor.getBool(
"@slanted",
false)
214 paramsSensor.getString(
"Material"),
215 paramsSensor.getString(
"Active/Color",
"#f00"),
216 paramsSensor.getLength(
"Active/width"),
217 paramsSensor.getLength(
"Active/width2", 0),
218 paramsSensor.getLength(
"Active/length"),
219 paramsSensor.getLength(
"Active/height")
222 paramsSensor.getLength(
"Active/u"),
223 paramsSensor.getLength(
"Active/v"),
224 paramsSensor.getString(
"Active/w",
"center"),
225 paramsSensor.getLength(
"Active/woffset", 0)
229 sensor.setSensorInfo(svdInfo);
236 GearDir support(content,
"Support/");
239 for (
const GearDir& shell : content.getNodes(
"HalfShell")) {
241 string shellName =
m_prefix +
"." + shell.getString(
"@name");
242 string pathShell = (boost::format(
"Align[@component='%1%']/") % shellName).str();
245 B2WARNING(
"Could not find alignment parameters for component " << shellName);
246 return svdGeometryPar;
256 VXDHalfShellPar halfShell(shell.getString(
"@name"), shell.getAngle(
"shellAngle", 0));
258 for (
const GearDir& layer : shell.getNodes(
"Layer")) {
259 int layerID = layer.getInt(
"@id");
261 readLadder(layerID, components, svdGeometryPar);
266 for (
const GearDir& ladder : layer.getNodes(
"Ladder")) {
267 int ladderID = ladder.getInt(
"@id");
268 double phi = ladder.getAngle(
"phi", 0);
270 halfShell.
addLadder(layerID, ladderID, phi);
277 GearDir radiationDir(content,
"RadiationSensors");
281 radiationDir.
getBool(
"insideEnvelope"),
291 position.getLength(
"radius"),
292 position.getAngle(
"theta")
296 for (
GearDir& sensor : position.getNodes(
"phi")) {
298 diamonds.
addSensor(sensor.getInt(
"@id"), sensor.getAngle());
304 return svdGeometryPar;
311 m_activeChips = parameters.getGlobalParams().getActiveChips();
312 m_seeNeutrons = parameters.getGlobalParams().getSeeNeutrons();
321 if (!material) B2FATAL(
"Default Material of VXD, '" <<
m_defaultMaterial <<
"', could not be found");
325 G4LogicalVolume* envelope(0);
326 G4VPhysicalVolume* physEnvelope{
nullptr};
327 if (!parameters.getEnvelope().getExists()) {
328 B2INFO(
"Could not find definition for " +
m_prefix +
" Envelope, placing directly in top volume");
329 envelope = &topVolume;
331 double minZ(0), maxZ(0);
333 parameters.getEnvelope().getInnerPoints(),
334 parameters.getEnvelope().getOuterPoints(),
335 parameters.getEnvelope().getMinPhi(),
336 parameters.getEnvelope().getMaxPhi(),
339 envelope =
new G4LogicalVolume(envelopeCone, material,
m_prefix +
".Envelope");
342 &topVolume,
false, 1);
345 G4Region* aRegion =
new G4Region(
"SVDEnvelope");
346 envelope->SetRegion(aRegion);
347 aRegion->AddRootLogicalVolume(envelope);
351 for (
const pair<const string, VXDGeoSensorPar>& typeAndSensor : parameters.getSensorMap()) {
352 const string& sensorTypeID = typeAndSensor.first;
379 vector<VXDGeoPlacement> subcomponents;
389 sensor.setComponents(subcomponents);
394 for (
const string& name : parameters.getComponentInsertOder()) {
400 B2WARNING(
"Component " << name <<
" already created from previous subcomponents, should not be here");
412 double angle = paramsComponent.
getAngle();
415 if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
416 B2DEBUG(100,
"One dimension empty, using auto resize for component");
418 G4VSolid* solid =
createTrapezoidal(
m_prefix +
"." + name, c.getWidth(), c.getWidth2(), c.getLength(), c.getHeight(), angle);
422 vector<VXDGeoPlacement> subComponents;
425 paramsSubComponent.getName(),
426 paramsSubComponent.getU() /
Unit::mm,
427 paramsSubComponent.getV() /
Unit::mm,
428 paramsSubComponent.getW(),
429 paramsSubComponent.getWOffset() /
Unit::mm
435 if (
m_activeChips && parameters.getSensitiveChipID(name) >= 0) {
436 int chipID = parameters.getSensitiveChipID(name);
437 B2DEBUG(50,
"Creating BkgSensitiveDetector for component " << name <<
" with chipID " << chipID);
439 c.getVolume()->SetSensitiveDetector(sensitive);
451 string shellName = shell.getName();
459 double shellAngle = shell.getShellAngle();
463 for (
const std::pair<
const int, std::vector<std::pair<int, double>> >& layer : shell.getLayers()) {
464 int layerID = layer.first;
465 const std::vector<std::pair<int, double>>& Ladders = layer.second;
476 for (
const std::pair<int, double>& ladder : Ladders) {
477 int ladderID = ladder.first;
478 double phi = ladder.second;
480 G4Transform3D ladderPlacement =
placeLadder(ladderID, phi, envelope, shellAlignment, parameters);
492 G4PVPlacement topPlacement(
nullptr, G4ThreeVector(0, 0, 0), &topVolume,
493 "temp_Top",
nullptr,
false, 1,
false);
500 if (parameters.getRadiationSensors().getSubDetector() ==
"") {
501 B2DEBUG(10,
"Apparently no radiation sensors defined, skipping");
503 createDiamonds(parameters.getRadiationSensors(), topVolume, *envelope);
510 if (!support)
return;
512 for (
const GearDir& params : support.
getNodes(
"HalfShell/RotationSolid")) {
515 params.getString(
"Material",
"Air"),
516 params.getString(
"Color",
""),
517 params.getAngle(
"minPhi", 0),
518 params.getAngle(
"maxPhi", 2 * M_PI),
519 (params.getNodes(
"InnerPoints/point").size() > 0)
522 for (
const GearDir& point : params.getNodes(
"InnerPoints/point")) {
523 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
526 for (
const GearDir& point : params.getNodes(
"OuterPoints/point")) {
527 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
537 if (!support)
return;
540 GearDir endrings(support, (boost::format(
"Endrings/Layer[@id='%1%']") % layer).str());
545 support.
getLength(
"Endrings/baseThickness")
551 endring.getLength(
"z"),
552 endring.getLength(
"baseRadius"),
553 endring.getLength(
"innerRadius"),
554 endring.getLength(
"outerRadius"),
555 endring.getLength(
"horizontalBar"),
556 endring.getLength(
"verticalBar")
558 svdGeometryPar.
getEndrings()[layer].getTypes().push_back(endringPar);
563 GearDir pipes(support, (boost::format(
"CoolingPipes/Layer[@id='%1%']") % layer).str());
566 support.
getLength(
"CoolingPipes/outerDiameter"),
567 support.
getLength(
"CoolingPipes/wallThickness"),
582 if (!support)
return;
585 GearDir params(support, (boost::format(
"SupportRibs/Layer[@id='%1%']") % layer).str());
589 support.
getLength(
"SupportRibs/inner/width"),
590 support.
getLength(
"SupportRibs/outer/width"),
591 support.
getLength(
"SupportRibs/inner/tabLength"),
592 support.
getString(
"SupportRibs/outer/Material"),
593 support.
getString(
"SupportRibs/inner/Material"),
594 support.
getString(
"SupportRibs/outer/Color"),
595 support.
getString(
"SupportRibs/inner/Color"),
596 support.
getString(
"SupportRibs/endmount/Material")
600 if (params.exists(
"spacing")) svdGeometryPar.
getSupportRibs()[layer].setSpacing(params.getLength(
"spacing"));
601 if (params.exists(
"height")) svdGeometryPar.
getSupportRibs()[layer].setHeight(params.getLength(
"height"));
603 for (
const GearDir& box : params.getNodes(
"box")) {
607 box.getLength(
"length")
609 svdGeometryPar.
getSupportRibs()[layer].getBoxes().push_back(boxPar);
612 for (
const GearDir& tab : params.getNodes(
"tab")) {
617 svdGeometryPar.
getSupportRibs()[layer].getTabs().push_back(tabPar);
620 for (
const GearDir& endmount : params.getNodes(
"Endmount")) {
622 endmount.getLength(
"height"),
623 endmount.getLength(
"width"),
624 endmount.getLength(
"length"),
625 endmount.getLength(
"z"),
626 endmount.getLength(
"r")
628 svdGeometryPar.
getSupportRibs()[layer].getEndmounts().push_back(mountPar);
639 double minZ(0), maxZ(0);
641 const std::vector<VXDRotationSolidPar>& RotationSolids = parameters.getRotationSolids();
645 string name = component.getName();
646 string material = component.getMaterial();
649 component.getInnerPoints(),
650 component.getOuterPoints(),
651 component.getMinPhi(),
652 component.getMaxPhi(),
656 G4LogicalVolume* volume =
new G4LogicalVolume(
659 supportAssembly.
add(volume);
661 return supportAssembly;
671 if (parameters.getEndringsExist(layer)) {
680 const std::vector<SVDEndringsTypePar>& Endrings = support.
getTypes();
682 double z = endring.getZ() /
Unit::mm;
683 double baseRadius = endring.getBaseRadius() /
Unit::mm;
684 double innerRadius = endring.getInnerRadius() /
Unit::mm;
685 double outerRadius = endring.getOuterRadius() /
Unit::mm;
686 double horiBarWidth = endring.getHorizontalBarWidth() /
Unit::mm / 2.0;
687 double vertBarWidth = endring.getVerticalBarWidth() /
Unit::mm / 2.0;
689 double angle = asin(gapWidth / innerRadius);
690 G4VSolid* endringSolid =
new G4Tubs(
"OuterEndring", innerRadius, outerRadius, length, -M_PI / 2 + angle, M_PI - 2 * angle);
691 angle = asin(gapWidth / baseRadius);
692 G4VSolid* endringBase =
new G4Tubs(
"InnerEndring", baseRadius, baseRadius + baseThickness, length, -M_PI / 2 + angle,
694 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, endringBase);
697 double height = (innerRadius - baseRadius) / 2.0;
698 double x = vertBarWidth + gapWidth;
699 G4Box* verticalBar =
new G4Box(
"VerticalBar", vertBarWidth, height, length);
700 G4Box* horizontalBar =
new G4Box(
"HorizontalBar", height, horiBarWidth, length);
701 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, verticalBar, G4Translate3D(x, baseRadius + height, 0));
702 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, verticalBar, G4Translate3D(x, -(baseRadius + height), 0));
703 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, horizontalBar, G4Translate3D((baseRadius + height), 0, 0));
706 G4LogicalVolume* endringVolume =
new G4LogicalVolume(
708 (boost::format(
"%1%.Layer%2%.%3%") %
m_prefix % layer % endring.getName()).str());
709 supportAssembly.
add(endringVolume, G4TranslateZ3D(z));
714 if (parameters.getCoolingPipesExist(layer)) {
726 double zlength = (zend - zstart) / 2.0;
731 G4Tubs* pipeSolid =
new G4Tubs(
"CoolingPipe", innerRadius, outerRadius, zlength, 0, 2 * M_PI);
732 G4LogicalVolume* pipeVolume =
new G4LogicalVolume(
734 (boost::format(
"%1%.Layer%2%.CoolingPipe") %
m_prefix % layer).str());
737#ifndef __clang_analyzer__
738 G4Torus* bendSolid =
new G4Torus(
"CoolingBend", innerRadius, outerRadius, sin(deltaPhi / 2.0)*radius, -M_PI / 2, M_PI);
739 G4LogicalVolume* bendVolume =
new G4LogicalVolume(
741 (boost::format(
"%1%.Layer%2%.CoolingBend") %
m_prefix % layer).str());
746 G4Torus* bendSolidLast =
new G4Torus(
"CoolingBendLast", innerRadius, outerRadius, sin(deltaPhi / 2.0) * radius - deltaL / 2.0,
749 (boost::format(
"%1%.Layer%2%.CoolingBendLast") %
m_prefix % layer).str());
753 G4Transform3D placement_pipe = G4RotateZ3D(startPhi + (nPipes - 0.5) * deltaPhi) * G4Translate3D(cos(deltaPhi / 2.0) * radius,
754 sin(deltaPhi / 2.0) * radius - deltaL, zstart + zlength);
755 supportAssembly.
add(pipeVolume, placement_pipe);
758 double zpos = nPipes % 2 > 0 ? zend : zstart;
760 G4Transform3D placement = G4RotateZ3D(startPhi + (nPipes - 0.5) * deltaPhi) * G4Translate3D(cos(deltaPhi / 2.0) * radius,
761 -deltaL / 2.0, zpos) * G4RotateY3D(M_PI / 2);
763 if (nPipes % 2 > 0) {
764 placement = placement * G4RotateZ3D(M_PI);
767 supportAssembly.
add(bendVolumeLast, placement);
770 for (
int i = 0; i < nPipes; ++i) {
772 G4Transform3D placement_pipe = G4RotateZ3D(startPhi + i * deltaPhi) * G4Translate3D(radius, 0, zstart + zlength);
773 supportAssembly.
add(pipeVolume, placement_pipe);
778 double zpos = i % 2 > 0 ? zend : zstart;
780 G4Transform3D placement = G4RotateZ3D(startPhi + (i - 0.5) * deltaPhi) * G4Translate3D(cos(deltaPhi / 2.0) * radius, 0,
781 zpos) * G4RotateY3D(M_PI / 2);
784 placement = placement * G4RotateZ3D(M_PI);
786#ifndef __clang_analyzer__
788 supportAssembly.
add(bendVolume, placement);
795 return supportAssembly;
804 if (!parameters.getSupportRibsExist(layer))
return supportAssembly;
815 G4Transform3D placement;
819 const std::vector<SVDSupportBoxPar>& Boxes = support.
getBoxes();
821 double theta = box.getTheta();
822 double zpos = box.getZ() /
Unit::mm;
823 double rpos = box.getR() /
Unit::mm;
824 double length = box.getLength() /
Unit::mm / 2.0;
825 G4Box* innerBox =
new G4Box(
"innerBox", height, innerWidth, length);
826 G4Box* outerBox =
new G4Box(
"outerBox", height, outerWidth, length);
830 placement = G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
832 G4Transform3D relative = placement.inverse() * G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
833 inner =
new G4UnionSolid(
"innerBox", inner, innerBox, relative);
834 outer =
new G4UnionSolid(
"outerBox", outer, outerBox, relative);
839 const std::vector<SVDSupportTabPar>& Tabs = support.
getTabs();
841 double theta = tab.getTheta();
842 double zpos = tab.getZ() /
Unit::mm;
843 double rpos = tab.getR() /
Unit::mm;
844 G4Box* innerBox =
new G4Box(
"innerBox", height, innerWidth, tabLength);
847 placement = G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
849 G4Transform3D relative = placement.inverse() * G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
850 inner =
new G4UnionSolid(
"innerBox", inner, innerBox, relative);
855 const std::vector<SVDEndmountPar>& Endmounts = support.
getEndmounts();
857 double endMountHeight = endmount.getHeight() /
Unit::mm / 2.0;
858 double endMountWidth = endmount.getWidth() /
Unit::mm / 2.0;
859 double endMountLength = endmount.getLength() /
Unit::mm / 2.0;
860 double zpos = endmount.getZ() /
Unit::mm;
861 double rpos = endmount.getR() /
Unit::mm;
862 G4VSolid* endmountBox =
new G4Box(
"endmountBox", endMountHeight, endMountWidth, endMountLength);
864 endmountBox =
new G4SubtractionSolid(
"endmountBox", endmountBox, outer, G4TranslateY3D(-spacing)*placement * G4Translate3D(-rpos, 0,
866 endmountBox =
new G4SubtractionSolid(
"endmountBox", endmountBox, outer, G4TranslateY3D(spacing)*placement * G4Translate3D(-rpos, 0,
869 G4LogicalVolume* endmountVolume =
new G4LogicalVolume(
871 (boost::format(
"%1%.Layer%2%.%3%Endmount") %
m_prefix % layer % endmount.getName()).str());
872 supportAssembly.
add(endmountVolume, G4Translate3D(rpos, 0, zpos));
877 outer =
new G4SubtractionSolid(
"outerBox", outer, inner);
878 G4LogicalVolume* outerVolume =
new G4LogicalVolume(
880 (boost::format(
"%1%.Layer%2%.SupportRib") %
m_prefix % layer).str());
881 G4LogicalVolume* innerVolume =
new G4LogicalVolume(
883 (boost::format(
"%1%.Layer%2%.SupportRib.Airex") %
m_prefix % layer).str());
886 supportAssembly.
add(innerVolume, G4TranslateY3D(-spacing)*placement);
887 supportAssembly.
add(innerVolume, G4TranslateY3D(spacing)*placement);
888 supportAssembly.
add(outerVolume, G4TranslateY3D(-spacing)*placement);
889 supportAssembly.
add(outerVolume, G4TranslateY3D(spacing)*placement);
893 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 SVD Cooling Pipes.
double getStartPhi() const
get start phi
double getOuterDiameter() const
get outer diameter
double getDeltaPhi() const
get delta phi
int getNPipes() const
get nPipes
double getDeltaL() const
get deltal
double getZEnd() const
get zend
double getZStart() const
get zstart
const std::string & getMaterial() const
get material
double getWallThickness() const
get wall thickness
double getRadius() const
get radius
The Class for SVD Support Rib Endmounts.
The Class for SVD Endring.
double getGapWidth() const
get gap width
double getBaseThickness() const
get base thickness
const std::string & getMaterial() const
get material
const std::vector< SVDEndringsTypePar > & getTypes() const
get types (forward/backward)
double getLength() const
get length
The Class for SVD Endring Type.
The Class for VXD geometry.
const std::map< int, SVDSupportRibsPar > & getSupportRibs() const
get support ribs
const std::map< int, SVDCoolingPipesPar > & getCoolingPipes() const
get cooling pipes
std::vector< SVDSensorInfoPar * > & getSensorInfos()
get sensorInfos
const std::vector< VXDRotationSolidPar > & getRotationSolids() const
get SVD halfshell Rotation Solids
const std::map< int, SVDEndringsPar > & getEndrings() const
get endrings
The Class for VXD geometry.
double getBiasVoltage() const
Return the bias voltage on the sensor.
double getAduEquivalentSbwU() const
Return ADU equivalent for U strips in Sbw barrel sensor.
double getElectronicNoiseSbwU() const
Return electronic noise in e- for u strips in bw barrel sensors.
double getBackplaneCapacitanceV() const
Return the backplane capacitance/cm for V-side strips.
double getAduEquivalentU() const
Return ADU equivalent for U strips.
double getElectronicNoiseV() const
Return electronic noise in e- for v strips.
double getStripEdgeV() const
Return the distance between end of strip and edge of active area.
double getAduEquivalentSbwV() const
Return ADU equivalent for V strips in Sbw barrel sensor.
double getBackplaneCapacitanceU() const
Return the backplane capacitance/cm for U-side strips.
double getInterstripCapacitanceU() const
Return the interstrip capacitance/cm for U-side strips.
double getElectronicNoiseU() const
Return electronic noise in e- for u strips.
double getStripEdgeU() const
Return the distance between end of strip and edge of active area.
double getCouplingCapacitanceU() const
Return the coupling capacitance/cm for U-side strips.
double getCouplingCapacitanceV() const
Return the coupling capacitance/cm for V-side strips.
double getAduEquivalentV() const
Return ADU equivalent for V strips.
double getDepletionVoltage() const
Return the depletion voltage of the sensor.
double getInterstripCapacitanceV() const
Return the interstrip capacitance/cm for V-side strips.
double getElectronicNoiseSbwV() const
Return electronic noise in e- for v strips in bw barrel sensors.
The Class for SVD Support Box.
The Class for SVD Support Ribs (one layer)
double getHeight() const
get height
double getInnerWidth() const
get inner width
const std::string & getOuterMaterial() const
get the name of outer material
double getTabLength() const
get tabLength
double getOuterWidth() const
get outer width
const std::string & getOuterColor() const
get the name of outer color
const std::string & getInnerMaterial() const
get the name of inner material
double getSpacing() const
get spacing
const std::string & getInnerColor() const
get the name of inner color
const std::vector< SVDSupportTabPar > & getTabs() const
get tabs
const std::vector< SVDEndmountPar > & getEndmounts() const
get endmounts
const std::string & getEndmountMaterial() const
get the name of endmount material
const std::vector< SVDSupportBoxPar > & getBoxes() const
get boxes
The Class for SVD Support Rib Tab.
virtual VXD::SensitiveDetectorBase * createSensitiveDetector(VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement) override
Return a SensitiveDetector implementation for a given sensor.
void readLayerSupport(int layer, const GearDir &support, SVDGeometryPar &svdGeometryPar)
Create support structure for a SVD Layer.
void readLadderSupport(int layer, const GearDir &support, SVDGeometryPar &svdGeometryPar)
Create support structure for a SVD Ladder.
SVDGeometryPar createConfiguration(const GearDir ¶m)
Create a parameter object from the Gearbox XML parameters.
void readHalfShellSupport(const GearDir &support, SVDGeometryPar &svdGeometryPar)
Create support structure for SVD Half Shell, that means everything that does not depend on layer or s...
SVDSensorInfoPar * readSensorInfo(const GearDir &sensor)
Read the sensor definitions from gearbox.
std::vector< SensorInfo * > m_SensorInfo
Vector of pointers to SensorInfo objects.
virtual VXD::GeoVXDAssembly createLayerSupport(int, const SVDGeometryPar ¶meters)
Create support structure for a SVD Layer.
virtual ~GeoSVDCreator()
The destructor of the GeoSVDCreator class.
virtual VXD::GeoVXDAssembly createLadderSupport(int, const SVDGeometryPar ¶meters)
Create support structure for a SVD Ladder.
virtual VXD::GeoVXDAssembly createHalfShellSupport(const SVDGeometryPar ¶meters)
Create support structure for SVD Half Shell, that means everything that does not depend on layer or s...
void createGeometry(const SVDGeometryPar ¶meters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
Create the geometry from a parameter object.
virtual VXD::SensorInfoBase * createSensorInfo(const VXDGeoSensorPar &sensor) override
Read the sensor definitions from the database.
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
void setID(VxdID id)
Change the SensorID.
static const double mm
[millimeters]
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.
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 Envelope parameters.
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 getVCells() const
Return number of pixel/strips in v direction.
int getUCells() const
Return number of pixel/strips in u direction.
double getThickness() const
Return the thickness of the sensor.
double getWidth2() const
Return forward width for a slanted sensor.
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.
bool exists(const std::string &path="") const
Check if a given parameter path exists.
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< SVDSimHit, SVDTrueHit > SensitiveDetector
The SVD Sensitive Detector class.
geometry::CreatorFactory< GeoSVDCreator > GeoSVDFactory("SVDCreator")
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.