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>
46 using namespace geometry;
72 info->setSensorParams(
99 const double unit_pFcm = 1;
104 sensor.getLength(
"width"),
105 sensor.getLength(
"length"),
106 sensor.getLength(
"height"),
107 sensor.getInt(
"stripsU"),
108 sensor.getInt(
"stripsV"),
109 sensor.getLength(
"width2", 0)
112 info->setSensorParams(
113 sensor.getWithUnit(
"stripEdgeU"),
114 sensor.getWithUnit(
"stripEdgeV"),
115 sensor.getWithUnit(
"DepletionVoltage"),
116 sensor.getWithUnit(
"BiasVoltage"),
117 sensor.getDouble(
"BackplaneCapacitanceU") * unit_pFcm,
118 sensor.getDouble(
"InterstripCapacitanceU") * unit_pFcm,
119 sensor.getDouble(
"CouplingCapacitanceU") * unit_pFcm,
120 sensor.getDouble(
"BackplaneCapacitanceV") * unit_pFcm,
121 sensor.getDouble(
"InterstripCapacitanceV") * unit_pFcm,
122 sensor.getDouble(
"CouplingCapacitanceV") * unit_pFcm,
123 sensor.getWithUnit(
"ADUEquivalentU"),
124 sensor.getWithUnit(
"ADUEquivalentV"),
125 sensor.getWithUnit(
"ElectronicNoiseU"),
126 sensor.getWithUnit(
"ElectronicNoiseV"),
127 sensor.getWithUnit(
"ADUEquivalentSbwU", 0),
128 sensor.getWithUnit(
"ADUEquivalentSbwV", 0),
129 sensor.getWithUnit(
"ElectronicNoiseSbwU", 0),
130 sensor.getWithUnit(
"ElectronicNoiseSbwV", 0)
140 sensorInfo->
setID(sensorID);
153 VXDGlobalPar globals((
float)content.getDouble(
"ElectronTolerance", 100),
154 (
float)content.getDouble(
"MinimumElectrons", 10),
155 content.getLength(
"ActiveStepSize", 0.005),
156 content.getBool(
"ActiveChips",
false),
157 content.getBool(
"SeeNeutrons",
false),
158 content.getBool(
"OnlyPrimaryTrueHits",
false),
159 content.getBool(
"OnlyActiveMaterial",
false),
160 (
float)content.getLength(
"DistanceTolerance", 0.005),
161 content.getString(
"DefaultMaterial",
"Air")
166 GearDir envelopeParams(content,
"Envelope/");
168 envelopeParams.
getString(
"Material",
"Air"),
170 envelopeParams.
getAngle(
"minPhi", 0),
171 envelopeParams.
getAngle(
"maxPhi", 2 * M_PI),
172 (envelopeParams.
getNodes(
"InnerPoints/point").size() > 0)
175 for (
const GearDir& point : envelopeParams.
getNodes(
"InnerPoints/point")) {
176 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
179 for (
const GearDir& point : envelopeParams.
getNodes(
"OuterPoints/point")) {
180 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
186 string pathAlign = (boost::format(
"Align[@component='%1%']/") %
m_prefix).str();
189 B2WARNING(
"Could not find alignment parameters for component " <<
m_prefix);
190 return svdGeometryPar;
201 GearDir components(content,
"Components/");
202 for (
const GearDir& paramsSensor : components.getNodes(
"Sensor")) {
203 string sensorTypeID = paramsSensor.getString(
"@type");
206 paramsSensor.getString(
"Color",
""),
207 paramsSensor.getLength(
"width"),
208 paramsSensor.getLength(
"width2", 0),
209 paramsSensor.getLength(
"length"),
210 paramsSensor.getLength(
"height"),
211 paramsSensor.getAngle(
"angle", 0),
212 paramsSensor.getBool(
"@slanted",
false)
215 paramsSensor.getString(
"Material"),
216 paramsSensor.getString(
"Active/Color",
"#f00"),
217 paramsSensor.getLength(
"Active/width"),
218 paramsSensor.getLength(
"Active/width2", 0),
219 paramsSensor.getLength(
"Active/length"),
220 paramsSensor.getLength(
"Active/height")
223 paramsSensor.getLength(
"Active/u"),
224 paramsSensor.getLength(
"Active/v"),
225 paramsSensor.getString(
"Active/w",
"center"),
226 paramsSensor.getLength(
"Active/woffset", 0)
230 sensor.setSensorInfo(svdInfo);
237 GearDir support(content,
"Support/");
240 for (
const GearDir& shell : content.getNodes(
"HalfShell")) {
242 string shellName =
m_prefix +
"." + shell.getString(
"@name");
243 string pathShell = (boost::format(
"Align[@component='%1%']/") % shellName).str();
246 B2WARNING(
"Could not find alignment parameters for component " << shellName);
247 return svdGeometryPar;
257 VXDHalfShellPar halfShell(shell.getString(
"@name"), shell.getAngle(
"shellAngle", 0));
259 for (
const GearDir& layer : shell.getNodes(
"Layer")) {
260 int layerID = layer.getInt(
"@id");
262 readLadder(layerID, components, svdGeometryPar);
267 for (
const GearDir& ladder : layer.getNodes(
"Ladder")) {
268 int ladderID = ladder.getInt(
"@id");
269 double phi = ladder.getAngle(
"phi", 0);
271 halfShell.
addLadder(layerID, ladderID, phi);
278 GearDir radiationDir(content,
"RadiationSensors");
282 radiationDir.
getBool(
"insideEnvelope"),
292 position.getLength(
"radius"),
293 position.getAngle(
"theta")
297 for (
GearDir& sensor : position.getNodes(
"phi")) {
299 diamonds.
addSensor(sensor.getInt(
"@id"), sensor.getAngle());
305 return svdGeometryPar;
312 m_activeChips = parameters.getGlobalParams().getActiveChips();
313 m_seeNeutrons = parameters.getGlobalParams().getSeeNeutrons();
322 if (!material) B2FATAL(
"Default Material of VXD, '" <<
m_defaultMaterial <<
"', could not be found");
326 G4LogicalVolume* envelope(0);
327 G4VPhysicalVolume* physEnvelope{
nullptr};
328 if (!parameters.getEnvelope().getExists()) {
329 B2INFO(
"Could not find definition for " +
m_prefix +
" Envelope, placing directly in top volume");
330 envelope = &topVolume;
332 double minZ(0), maxZ(0);
334 parameters.getEnvelope().getInnerPoints(),
335 parameters.getEnvelope().getOuterPoints(),
336 parameters.getEnvelope().getMinPhi(),
337 parameters.getEnvelope().getMaxPhi(),
340 envelope =
new G4LogicalVolume(envelopeCone, material,
m_prefix +
".Envelope");
343 &topVolume,
false, 1);
346 G4Region* aRegion =
new G4Region(
"SVDEnvelope");
347 envelope->SetRegion(aRegion);
348 aRegion->AddRootLogicalVolume(envelope);
352 for (
const pair<const string, VXDGeoSensorPar>& typeAndSensor : parameters.getSensorMap()) {
353 const string& sensorTypeID = typeAndSensor.first;
380 vector<VXDGeoPlacement> subcomponents;
390 sensor.setComponents(subcomponents);
395 for (
const string& name : parameters.getComponentInsertOder()) {
401 B2WARNING(
"Component " << name <<
" already created from previous subcomponents, should not be here");
413 double angle = paramsComponent.
getAngle();
416 if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
417 B2DEBUG(100,
"One dimension empty, using auto resize for component");
419 G4VSolid* solid =
createTrapezoidal(
m_prefix +
"." + name, c.getWidth(), c.getWidth2(), c.getLength(), c.getHeight(), angle);
423 vector<VXDGeoPlacement> subComponents;
426 paramsSubComponent.getName(),
427 paramsSubComponent.getU() /
Unit::mm,
428 paramsSubComponent.getV() /
Unit::mm,
429 paramsSubComponent.getW(),
430 paramsSubComponent.getWOffset() /
Unit::mm
436 if (
m_activeChips && parameters.getSensitiveChipID(name) >= 0) {
437 int chipID = parameters.getSensitiveChipID(name);
438 B2DEBUG(50,
"Creating BkgSensitiveDetector for component " << name <<
" with chipID " << chipID);
440 c.getVolume()->SetSensitiveDetector(sensitive);
452 string shellName = shell.getName();
460 double shellAngle = shell.getShellAngle();
464 for (
const std::pair<
const int, std::vector<std::pair<int, double>> >& layer : shell.getLayers()) {
465 int layerID = layer.first;
466 const std::vector<std::pair<int, double>>& Ladders = layer.second;
477 for (
const std::pair<int, double>& ladder : Ladders) {
478 int ladderID = ladder.first;
479 double phi = ladder.second;
481 G4Transform3D ladderPlacement =
placeLadder(ladderID, phi, envelope, shellAlignment, parameters);
493 G4PVPlacement topPlacement(
nullptr, G4ThreeVector(0, 0, 0), &topVolume,
494 "temp_Top",
nullptr,
false, 1,
false);
501 if (parameters.getRadiationSensors().getSubDetector() ==
"") {
502 B2DEBUG(10,
"Apparently no radiation sensors defined, skipping");
504 createDiamonds(parameters.getRadiationSensors(), topVolume, *envelope);
511 if (!support)
return;
513 for (
const GearDir& params : support.
getNodes(
"HalfShell/RotationSolid")) {
516 params.getString(
"Material",
"Air"),
517 params.getString(
"Color",
""),
518 params.getAngle(
"minPhi", 0),
519 params.getAngle(
"maxPhi", 2 * M_PI),
520 (params.getNodes(
"InnerPoints/point").size() > 0)
523 for (
const GearDir& point : params.getNodes(
"InnerPoints/point")) {
524 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
527 for (
const GearDir& point : params.getNodes(
"OuterPoints/point")) {
528 pair<double, double> ZXPoint(point.getLength(
"z"), point.getLength(
"x"));
538 if (!support)
return;
541 GearDir endrings(support, (boost::format(
"Endrings/Layer[@id='%1%']") % layer).str());
546 support.
getLength(
"Endrings/baseThickness")
552 endring.getLength(
"z"),
553 endring.getLength(
"baseRadius"),
554 endring.getLength(
"innerRadius"),
555 endring.getLength(
"outerRadius"),
556 endring.getLength(
"horizontalBar"),
557 endring.getLength(
"verticalBar")
559 svdGeometryPar.
getEndrings()[layer].getTypes().push_back(endringPar);
564 GearDir pipes(support, (boost::format(
"CoolingPipes/Layer[@id='%1%']") % layer).str());
567 support.
getLength(
"CoolingPipes/outerDiameter"),
568 support.
getLength(
"CoolingPipes/wallThickness"),
583 if (!support)
return;
586 GearDir params(support, (boost::format(
"SupportRibs/Layer[@id='%1%']") % layer).str());
590 support.
getLength(
"SupportRibs/inner/width"),
591 support.
getLength(
"SupportRibs/outer/width"),
592 support.
getLength(
"SupportRibs/inner/tabLength"),
593 support.
getString(
"SupportRibs/outer/Material"),
594 support.
getString(
"SupportRibs/inner/Material"),
595 support.
getString(
"SupportRibs/outer/Color"),
596 support.
getString(
"SupportRibs/inner/Color"),
597 support.
getString(
"SupportRibs/endmount/Material")
601 if (params.exists(
"spacing")) svdGeometryPar.
getSupportRibs()[layer].setSpacing(params.getLength(
"spacing"));
602 if (params.exists(
"height")) svdGeometryPar.
getSupportRibs()[layer].setHeight(params.getLength(
"height"));
604 for (
const GearDir& box : params.getNodes(
"box")) {
608 box.getLength(
"length")
610 svdGeometryPar.
getSupportRibs()[layer].getBoxes().push_back(boxPar);
613 for (
const GearDir& tab : params.getNodes(
"tab")) {
618 svdGeometryPar.
getSupportRibs()[layer].getTabs().push_back(tabPar);
621 for (
const GearDir& endmount : params.getNodes(
"Endmount")) {
623 endmount.getLength(
"height"),
624 endmount.getLength(
"width"),
625 endmount.getLength(
"length"),
626 endmount.getLength(
"z"),
627 endmount.getLength(
"r")
629 svdGeometryPar.
getSupportRibs()[layer].getEndmounts().push_back(mountPar);
640 double minZ(0), maxZ(0);
642 const std::vector<VXDRotationSolidPar>& RotationSolids = parameters.getRotationSolids();
646 string name = component.getName();
647 string material = component.getMaterial();
650 component.getInnerPoints(),
651 component.getOuterPoints(),
652 component.getMinPhi(),
653 component.getMaxPhi(),
657 G4LogicalVolume* volume =
new G4LogicalVolume(
660 supportAssembly.
add(volume);
662 return supportAssembly;
672 if (parameters.getEndringsExist(layer)) {
681 const std::vector<SVDEndringsTypePar>& Endrings = support.
getTypes();
683 double z = endring.getZ() /
Unit::mm;
684 double baseRadius = endring.getBaseRadius() /
Unit::mm;
685 double innerRadius = endring.getInnerRadius() /
Unit::mm;
686 double outerRadius = endring.getOuterRadius() /
Unit::mm;
687 double horiBarWidth = endring.getHorizontalBarWidth() /
Unit::mm / 2.0;
688 double vertBarWidth = endring.getVerticalBarWidth() /
Unit::mm / 2.0;
690 double angle = asin(gapWidth / innerRadius);
691 G4VSolid* endringSolid =
new G4Tubs(
"OuterEndring", innerRadius, outerRadius, length, -M_PI / 2 + angle, M_PI - 2 * angle);
692 angle = asin(gapWidth / baseRadius);
693 G4VSolid* endringBase =
new G4Tubs(
"InnerEndring", baseRadius, baseRadius + baseThickness, length, -M_PI / 2 + angle,
695 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, endringBase);
698 double height = (innerRadius - baseRadius) / 2.0;
699 double x = vertBarWidth + gapWidth;
700 G4Box* verticalBar =
new G4Box(
"VerticalBar", vertBarWidth, height, length);
701 G4Box* horizontalBar =
new G4Box(
"HorizontalBar", height, horiBarWidth, length);
702 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, verticalBar, G4Translate3D(x, baseRadius + height, 0));
703 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, verticalBar, G4Translate3D(x, -(baseRadius + height), 0));
704 endringSolid =
new G4UnionSolid(
"Endring", endringSolid, horizontalBar, G4Translate3D((baseRadius + height), 0, 0));
707 G4LogicalVolume* endringVolume =
new G4LogicalVolume(
709 (boost::format(
"%1%.Layer%2%.%3%") %
m_prefix % layer % endring.getName()).str());
710 supportAssembly.
add(endringVolume, G4TranslateZ3D(z));
715 if (parameters.getCoolingPipesExist(layer)) {
727 double zlength = (zend - zstart) / 2.0;
732 G4Tubs* pipeSolid =
new G4Tubs(
"CoolingPipe", innerRadius, outerRadius, zlength, 0, 2 * M_PI);
733 G4LogicalVolume* pipeVolume =
new G4LogicalVolume(
735 (boost::format(
"%1%.Layer%2%.CoolingPipe") %
m_prefix % layer).str());
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);
787 supportAssembly.
add(bendVolume, placement);
792 return supportAssembly;
801 if (!parameters.getSupportRibsExist(layer))
return supportAssembly;
812 G4Transform3D placement;
816 const std::vector<SVDSupportBoxPar>& Boxes = support.
getBoxes();
818 double theta = box.getTheta();
819 double zpos = box.getZ() /
Unit::mm;
820 double rpos = box.getR() /
Unit::mm;
821 double length = box.getLength() /
Unit::mm / 2.0;
822 G4Box* innerBox =
new G4Box(
"innerBox", height, innerWidth, length);
823 G4Box* outerBox =
new G4Box(
"outerBox", height, outerWidth, length);
827 placement = G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
829 G4Transform3D relative = placement.inverse() * G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
830 inner =
new G4UnionSolid(
"innerBox", inner, innerBox, relative);
831 outer =
new G4UnionSolid(
"outerBox", outer, outerBox, relative);
836 const std::vector<SVDSupportTabPar>& Tabs = support.
getTabs();
838 double theta = tab.getTheta();
839 double zpos = tab.getZ() /
Unit::mm;
840 double rpos = tab.getR() /
Unit::mm;
841 G4Box* innerBox =
new G4Box(
"innerBox", height, innerWidth, tabLength);
844 placement = G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
846 G4Transform3D relative = placement.inverse() * G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
847 inner =
new G4UnionSolid(
"innerBox", inner, innerBox, relative);
852 const std::vector<SVDEndmountPar>& Endmounts = support.
getEndmounts();
854 double endMountHeight = endmount.getHeight() /
Unit::mm / 2.0;
855 double endMountWidth = endmount.getWidth() /
Unit::mm / 2.0;
856 double endMountLength = endmount.getLength() /
Unit::mm / 2.0;
857 double zpos = endmount.getZ() /
Unit::mm;
858 double rpos = endmount.getR() /
Unit::mm;
859 G4VSolid* endmountBox =
new G4Box(
"endmountBox", endMountHeight, endMountWidth, endMountLength);
861 endmountBox =
new G4SubtractionSolid(
"endmountBox", endmountBox, outer, G4TranslateY3D(-spacing)*placement * G4Translate3D(-rpos, 0,
863 endmountBox =
new G4SubtractionSolid(
"endmountBox", endmountBox, outer, G4TranslateY3D(spacing)*placement * G4Translate3D(-rpos, 0,
866 G4LogicalVolume* endmountVolume =
new G4LogicalVolume(
868 (boost::format(
"%1%.Layer%2%.%3%Endmount") %
m_prefix % layer % endmount.getName()).str());
869 supportAssembly.
add(endmountVolume, G4Translate3D(rpos, 0, zpos));
874 outer =
new G4SubtractionSolid(
"outerBox", outer, inner);
875 G4LogicalVolume* outerVolume =
new G4LogicalVolume(
877 (boost::format(
"%1%.Layer%2%.SupportRib") %
m_prefix % layer).str());
878 G4LogicalVolume* innerVolume =
new G4LogicalVolume(
880 (boost::format(
"%1%.Layer%2%.SupportRib.Airex") %
m_prefix % layer).str());
883 supportAssembly.
add(innerVolume, G4TranslateY3D(-spacing)*placement);
884 supportAssembly.
add(innerVolume, G4TranslateY3D(spacing)*placement);
885 supportAssembly.
add(outerVolume, G4TranslateY3D(-spacing)*placement);
886 supportAssembly.
add(outerVolume, G4TranslateY3D(spacing)*placement);
890 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.