Belle II Software  release-05-01-25
GeoSVDCreator.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Andreas Moll, Zbynek Drasal, Christian Oswald, *
7  * Martin Ritter, Hyacinth Stypula, Benjamin Schwenker *
8  * *
9  * This software is provided "as is" without any warranty. *
10  **************************************************************************/
11 
12 #include <svd/geometry/GeoSVDCreator.h>
13 #include <vxd/geometry/GeoCache.h>
14 #include <svd/geometry/SensorInfo.h>
15 #include <svd/simulation/SensitiveDetector.h>
16 
17 #include <simulation/background/BkgSensitiveDetector.h>
18 
19 #include <geometry/Materials.h>
20 #include <geometry/CreatorFactory.h>
21 #include <geometry/utilities.h>
22 #include <framework/gearbox/GearDir.h>
23 #include <framework/gearbox/Unit.h>
24 #include <framework/logging/Logger.h>
25 
26 #include <cmath>
27 #include <boost/format.hpp>
28 
29 #include <G4LogicalVolume.hh>
30 #include <G4PVPlacement.hh>
31 
32 //Shapes
33 #include <G4Box.hh>
34 #include <G4Tubs.hh>
35 #include <G4Torus.hh>
36 #include <G4Polycone.hh>
37 #include <G4UnionSolid.hh>
38 #include <G4SubtractionSolid.hh>
39 #include <G4Region.hh>
40 
41 using namespace std;
42 using namespace boost;
43 
44 namespace Belle2 {
49  using namespace geometry;
51  namespace SVD {
52 
54  geometry::CreatorFactory<GeoSVDCreator> GeoSVDFactory("SVDCreator");
55 
56  GeoSVDCreator::~GeoSVDCreator()
57  {
58  for (SensorInfo* sensorInfo : m_SensorInfo) delete sensorInfo;
59  m_SensorInfo.clear();
60  }
61 
62  VXD::SensorInfoBase* GeoSVDCreator::createSensorInfo(const VXDGeoSensorPar& sensor)
63  {
64  const SVDSensorInfoPar& infoPar = dynamic_cast<const SVDSensorInfoPar&>(*sensor.getSensorInfo());
65 
66  SensorInfo* info = new SensorInfo(
67  VxdID(0, 0, 0),
68  infoPar.getWidth(),
69  infoPar.getLength(),
70  infoPar.getThickness(),
71  infoPar.getUCells(),
72  infoPar.getVCells(),
73  infoPar.getWidth2()
74  );
75  info->setSensorParams(
76  infoPar.getStripEdgeU(),
77  infoPar.getStripEdgeV(),
78  infoPar.getDepletionVoltage(),
79  infoPar.getBiasVoltage(),
80  infoPar.getBackplaneCapacitanceU(),
81  infoPar.getInterstripCapacitanceU(),
82  infoPar.getCouplingCapacitanceU(),
83  infoPar.getBackplaneCapacitanceV(),
84  infoPar.getInterstripCapacitanceV(),
85  infoPar.getCouplingCapacitanceV(),
86  infoPar.getAduEquivalentU(),
87  infoPar.getAduEquivalentV(),
88  infoPar.getElectronicNoiseU(),
89  infoPar.getElectronicNoiseV(),
90  infoPar.getAduEquivalentSbwU(),
91  infoPar.getAduEquivalentSbwV(),
92  infoPar.getElectronicNoiseSbwU(),
93  infoPar.getElectronicNoiseSbwV()
94  );
95  m_SensorInfo.push_back(info);
96  return info;
97  }
98 
99  SVDSensorInfoPar* GeoSVDCreator::readSensorInfo(const GearDir& sensor)
100  {
101 
102  const double unit_pFcm = 1;
103  // This was 1000 * Unit::fC / Unit::V / Unit::cm; // pF/cm.
104  // We only use ratios of capacities, and this gives nicer numbers.
106  VxdID(0, 0, 0),
107  sensor.getLength("width"),
108  sensor.getLength("length"),
109  sensor.getLength("height"),
110  sensor.getInt("stripsU"),
111  sensor.getInt("stripsV"),
112  sensor.getLength("width2", 0)
113  );
114 
115  info->setSensorParams(
116  sensor.getWithUnit("stripEdgeU"),
117  sensor.getWithUnit("stripEdgeV"),
118  sensor.getWithUnit("DepletionVoltage"),
119  sensor.getWithUnit("BiasVoltage"),
120  sensor.getDouble("BackplaneCapacitanceU") * unit_pFcm,
121  sensor.getDouble("InterstripCapacitanceU") * unit_pFcm,
122  sensor.getDouble("CouplingCapacitanceU") * unit_pFcm,
123  sensor.getDouble("BackplaneCapacitanceV") * unit_pFcm,
124  sensor.getDouble("InterstripCapacitanceV") * unit_pFcm,
125  sensor.getDouble("CouplingCapacitanceV") * unit_pFcm,
126  sensor.getWithUnit("ADUEquivalentU"),
127  sensor.getWithUnit("ADUEquivalentV"),
128  sensor.getWithUnit("ElectronicNoiseU"),
129  sensor.getWithUnit("ElectronicNoiseV"),
130  sensor.getWithUnit("ADUEquivalentSbwU", 0),
131  sensor.getWithUnit("ADUEquivalentSbwV", 0),
132  sensor.getWithUnit("ElectronicNoiseSbwU", 0),
133  sensor.getWithUnit("ElectronicNoiseSbwV", 0)
134  );
135 
136  return info;
137  }
138 
139  VXD::SensitiveDetectorBase* GeoSVDCreator::createSensitiveDetector(
140  VxdID sensorID, const VXDGeoSensor& sensor, const VXDGeoSensorPlacement&)
141  {
142  SensorInfo* sensorInfo = new SensorInfo(dynamic_cast<const SensorInfo&>(*sensor.getSensorInfo()));
143  sensorInfo->setID(sensorID);
144  SensitiveDetector* sensitive = new SensitiveDetector(sensorInfo);
145  return sensitive;
146  }
147 
148  SVDGeometryPar GeoSVDCreator::createConfiguration(const GearDir& content)
149  {
150  SVDGeometryPar svdGeometryPar;
151 
152  //Read prefix ('SVD' or 'PXD')
153  svdGeometryPar.setPrefix(m_prefix);
154 
155  //Read some global parameters
156  VXDGlobalPar globals((float)content.getDouble("ElectronTolerance", 100),
157  (float)content.getDouble("MinimumElectrons", 10),
158  content.getLength("ActiveStepSize", 0.005),
159  content.getBool("ActiveChips", false),
160  content.getBool("SeeNeutrons", false),
161  content.getBool("OnlyPrimaryTrueHits", false),
162  content.getBool("OnlyActiveMaterial", false),
163  (float)content.getLength("DistanceTolerance", 0.005),
164  content.getString("DefaultMaterial", "Air")
165  );
166  svdGeometryPar.setGlobalParams(globals);
167 
168  //Read envelope parameters
169  GearDir envelopeParams(content, "Envelope/");
170  VXDEnvelopePar envelope(envelopeParams.getString("Name", ""),
171  envelopeParams.getString("Material", "Air"),
172  envelopeParams.getString("Color", ""),
173  envelopeParams.getAngle("minPhi", 0),
174  envelopeParams.getAngle("maxPhi", 2 * M_PI),
175  (envelopeParams.getNodes("InnerPoints/point").size() > 0)
176  );
177 
178  for (const GearDir point : envelopeParams.getNodes("InnerPoints/point")) {
179  pair<double, double> ZXPoint(point.getLength("z"), point.getLength("x"));
180  envelope.getInnerPoints().push_back(ZXPoint);
181  }
182  for (const GearDir point : envelopeParams.getNodes("OuterPoints/point")) {
183  pair<double, double> ZXPoint(point.getLength("z"), point.getLength("x"));
184  envelope.getOuterPoints().push_back(ZXPoint);
185  }
186  svdGeometryPar.setEnvelope(envelope);
187 
188  // Read alignment for detector m_prefix ('PXD' or 'SVD')
189  string pathAlign = (boost::format("Align[@component='%1%']/") % m_prefix).str();
190  GearDir paramsAlign(GearDir(content, "Alignment/"), pathAlign);
191  if (!paramsAlign) {
192  B2WARNING("Could not find alignment parameters for component " << m_prefix);
193  return svdGeometryPar;
194  }
195  svdGeometryPar.getAlignmentMap()[m_prefix] = VXDAlignmentPar(paramsAlign.getLength("du"),
196  paramsAlign.getLength("dv"),
197  paramsAlign.getLength("dw"),
198  paramsAlign.getAngle("alpha"),
199  paramsAlign.getAngle("beta"),
200  paramsAlign.getAngle("gamma")
201  );
202 
203  //Read the definition of all sensor types
204  GearDir components(content, "Components/");
205  for (const GearDir& paramsSensor : components.getNodes("Sensor")) {
206  string sensorTypeID = paramsSensor.getString("@type");
207 
208  VXDGeoSensorPar sensor(paramsSensor.getString("Material"),
209  paramsSensor.getString("Color", ""),
210  paramsSensor.getLength("width"),
211  paramsSensor.getLength("width2", 0),
212  paramsSensor.getLength("length"),
213  paramsSensor.getLength("height"),
214  paramsSensor.getAngle("angle", 0),
215  paramsSensor.getBool("@slanted", false)
216  );
217  sensor.setActive(VXDGeoComponentPar(
218  paramsSensor.getString("Material"),
219  paramsSensor.getString("Active/Color", "#f00"),
220  paramsSensor.getLength("Active/width"),
221  paramsSensor.getLength("Active/width2", 0),
222  paramsSensor.getLength("Active/length"),
223  paramsSensor.getLength("Active/height")
225  "Active",
226  paramsSensor.getLength("Active/u"),
227  paramsSensor.getLength("Active/v"),
228  paramsSensor.getString("Active/w", "center"),
229  paramsSensor.getLength("Active/woffset", 0)
230  ));
231 
232  SVDSensorInfoPar* svdInfo = readSensorInfo(GearDir(paramsSensor, "Active"));
233  sensor.setSensorInfo(svdInfo);
234  sensor.setComponents(getSubComponents(paramsSensor));
235  svdGeometryPar.getSensorMap()[sensorTypeID] = sensor;
236  svdGeometryPar.getSensorInfos().push_back(svdInfo);
237  }
238 
239  //Build all ladders including Sensors
240  GearDir support(content, "Support/");
241  readHalfShellSupport(support, svdGeometryPar);
242 
243  for (const GearDir& shell : content.getNodes("HalfShell")) {
244 
245  string shellName = m_prefix + "." + shell.getString("@name");
246  string pathShell = (boost::format("Align[@component='%1%']/") % shellName).str();
247  GearDir paramsShell(GearDir(content, "Alignment/"), pathShell);
248  if (!paramsShell) {
249  B2WARNING("Could not find alignment parameters for component " << shellName);
250  return svdGeometryPar;
251  }
252  svdGeometryPar.getAlignmentMap()[shellName] = VXDAlignmentPar(paramsShell.getLength("du"),
253  paramsShell.getLength("dv"),
254  paramsShell.getLength("dw"),
255  paramsShell.getAngle("alpha"),
256  paramsShell.getAngle("beta"),
257  paramsShell.getAngle("gamma")
258  );
259 
260  VXDHalfShellPar halfShell(shell.getString("@name") , shell.getAngle("shellAngle", 0));
261 
262  for (const GearDir& layer : shell.getNodes("Layer")) {
263  int layerID = layer.getInt("@id");
264 
265  readLadder(layerID, components, svdGeometryPar);
266  readLayerSupport(layerID, support, svdGeometryPar);
267  readLadderSupport(layerID, support, svdGeometryPar);
268 
269  //Loop over defined ladders
270  for (const GearDir& ladder : layer.getNodes("Ladder")) {
271  int ladderID = ladder.getInt("@id");
272  double phi = ladder.getAngle("phi", 0);
273  readLadderComponents(layerID, ladderID, content, svdGeometryPar);
274  halfShell.addLadder(layerID, ladderID, phi);
275  }
276  }
277  svdGeometryPar.getHalfShells().push_back(halfShell);
278  }
279 
280  //Create diamond radiation sensors if defined and in background mode
281  GearDir radiationDir(content, "RadiationSensors");
282  if (svdGeometryPar.getGlobalParams().getActiveChips() && radiationDir) {
283  VXDGeoRadiationSensorsPar radiationSensors(
284  m_prefix,
285  radiationDir.getBool("insideEnvelope"),
286  radiationDir.getLength("width"),
287  radiationDir.getLength("length"),
288  radiationDir.getLength("height"),
289  radiationDir.getString("material")
290  );
291 
292  //Add radiation sensor positions
293  for (GearDir& position : radiationDir.getNodes("position")) {
294  VXDGeoRadiationSensorsPositionPar diamonds(position.getLength("z"),
295  position.getLength("radius"),
296  position.getAngle("theta")
297  );
298 
299  //Loop over all phi positions
300  for (GearDir& sensor : position.getNodes("phi")) {
301  //Add sensor with angle and id
302  diamonds.addSensor(sensor.getInt("@id"), sensor.getAngle());
303  }
304  radiationSensors.addPosition(diamonds);
305  }
306  svdGeometryPar.setRadiationSensors(radiationSensors);
307  }
308  return svdGeometryPar;
309  }
310 
311  void GeoSVDCreator::createGeometry(const SVDGeometryPar& parameters, G4LogicalVolume& topVolume, geometry::GeometryTypes)
312  {
313 
314  m_activeStepSize = parameters.getGlobalParams().getActiveStepSize() / Unit::mm;
315  m_activeChips = parameters.getGlobalParams().getActiveChips();
316  m_seeNeutrons = parameters.getGlobalParams().getSeeNeutrons();
317  m_onlyPrimaryTrueHits = parameters.getGlobalParams().getOnlyPrimaryTrueHits();
318  m_distanceTolerance = parameters.getGlobalParams().getDistanceTolerance();
319  m_electronTolerance = parameters.getGlobalParams().getElectronTolerance();
320  m_minimumElectrons = parameters.getGlobalParams().getMinimumElectrons();
321  m_onlyActiveMaterial = parameters.getGlobalParams().getOnlyActiveMaterial();
322  m_defaultMaterial = parameters.getGlobalParams().getDefaultMaterial();
323 
324  G4Material* material = Materials::get(m_defaultMaterial);
325  if (!material) B2FATAL("Default Material of VXD, '" << m_defaultMaterial << "', could not be found");
326 
327 
328  //Build envelope
329  G4LogicalVolume* envelope(0);
330  G4VPhysicalVolume* physEnvelope{nullptr};
331  if (!parameters.getEnvelope().getExists()) {
332  B2INFO("Could not find definition for " + m_prefix + " Envelope, placing directly in top volume");
333  envelope = &topVolume;
334  } else {
335  double minZ(0), maxZ(0);
336  G4Polycone* envelopeCone = geometry::createRotationSolid("Envelope",
337  parameters.getEnvelope().getInnerPoints(),
338  parameters.getEnvelope().getOuterPoints(),
339  parameters.getEnvelope().getMinPhi(),
340  parameters.getEnvelope().getMaxPhi(),
341  minZ, maxZ
342  );
343  envelope = new G4LogicalVolume(envelopeCone, material, m_prefix + ".Envelope");
344  setVisibility(*envelope, false);
345  physEnvelope = new G4PVPlacement(getAlignment(parameters.getAlignment(m_prefix)), envelope, m_prefix + ".Envelope",
346  &topVolume, false, 1);
347 
348  // Set up region for production cuts
349  G4Region* aRegion = new G4Region("SVDEnvelope");
350  envelope->SetRegion(aRegion);
351  aRegion->AddRootLogicalVolume(envelope);
352  }
353 
354  //Read the definition of all sensor types
355  for (const pair<const string, VXDGeoSensorPar>& typeAndSensor : parameters.getSensorMap()) {
356  const string& sensorTypeID = typeAndSensor.first;
357  const VXDGeoSensorPar& paramsSensor = typeAndSensor.second;
358  VXDGeoSensor sensor(
359  paramsSensor.getMaterial(),
360  paramsSensor.getColor(),
361  paramsSensor.getWidth() / Unit::mm,
362  paramsSensor.getWidth2() / Unit::mm,
363  paramsSensor.getLength() / Unit::mm,
364  paramsSensor.getHeight() / Unit::mm,
365  paramsSensor.getSlanted()
366  );
367  sensor.setActive(VXDGeoComponent(
368  paramsSensor.getMaterial(),
369  paramsSensor.getActiveArea().getColor(),
370  paramsSensor.getActiveArea().getWidth() / Unit::mm,
371  paramsSensor.getActiveArea().getWidth2() / Unit::mm,
372  paramsSensor.getActiveArea().getLength() / Unit::mm,
373  paramsSensor.getActiveArea().getHeight() / Unit::mm
374  ), VXDGeoPlacement(
375  "Active",
376  paramsSensor.getActivePlacement().getU() / Unit::mm,
377  paramsSensor.getActivePlacement().getV() / Unit::mm,
378  paramsSensor.getActivePlacement().getW(),
379  paramsSensor.getActivePlacement().getWOffset() / Unit::mm
380  ));
381  sensor.setSensorInfo(createSensorInfo(paramsSensor));
382 
383  vector<VXDGeoPlacement> subcomponents;
384  for (const VXDGeoPlacementPar& component : paramsSensor.getComponents()) {
385  subcomponents.push_back(VXDGeoPlacement(
386  component.getName(),
387  component.getU() / Unit::mm,
388  component.getV() / Unit::mm,
389  component.getW(),
390  component.getWOffset() / Unit::mm
391  ));
392  }
393  sensor.setComponents(subcomponents);
394  m_sensorMap[sensorTypeID] = sensor;
395  }
396 
397  //Read the component cache from DB
398  for (const string& name : parameters.getComponentInsertOder()) {
399  if (m_componentCache.find(name) != m_componentCache.end()) {
400  // already created due to being a sub component of a previous
401  // component. Seems fishy since the information of this component
402  // is in the db at least twice so we could run into
403  // inconsistencies.
404  B2WARNING("Component " << name << " already created from previous subcomponents, should not be here");
405  continue;
406  }
407  const VXDGeoComponentPar& paramsComponent = parameters.getComponent(name);
408  VXDGeoComponent c(
409  paramsComponent.getMaterial(),
410  paramsComponent.getColor(),
411  paramsComponent.getWidth() / Unit::mm,
412  paramsComponent.getWidth2() / Unit::mm,
413  paramsComponent.getLength() / Unit::mm,
414  paramsComponent.getHeight() / Unit::mm
415  );
416  double angle = paramsComponent.getAngle();
417 
418 
419  if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
420  B2DEBUG(100, "One dimension empty, using auto resize for component");
421  } else {
422  G4VSolid* solid = createTrapezoidal(m_prefix + "." + name, c.getWidth(), c.getWidth2(), c.getLength(), c.getHeight(), angle);
423  c.setVolume(new G4LogicalVolume(solid, Materials::get(c.getMaterial()), m_prefix + "." + name));
424  }
425 
426  vector<VXDGeoPlacement> subComponents;
427  for (const VXDGeoPlacementPar& paramsSubComponent : paramsComponent.getSubComponents()) {
428  subComponents.push_back(VXDGeoPlacement(
429  paramsSubComponent.getName(),
430  paramsSubComponent.getU() / Unit::mm,
431  paramsSubComponent.getV() / Unit::mm,
432  paramsSubComponent.getW(),
433  paramsSubComponent.getWOffset() / Unit::mm
434  ));
435 
436  }
437 
438  createSubComponents(m_prefix + "." + name, c, subComponents);
439  if (m_activeChips && parameters.getSensitiveChipID(name) >= 0) {
440  int chipID = parameters.getSensitiveChipID(name);
441  B2DEBUG(50, "Creating BkgSensitiveDetector for component " << name << " with chipID " << chipID);
442  BkgSensitiveDetector* sensitive = new BkgSensitiveDetector(m_prefix.c_str(), chipID);
443  c.getVolume()->SetSensitiveDetector(sensitive);
444  m_sensitive.push_back(sensitive);
445  }
446 
447  m_componentCache[name] = c;
448  }
449 
450  //Build all ladders including Sensors
451  VXD::GeoVXDAssembly shellSupport = createHalfShellSupport(parameters);
452 
453  //const std::vector<VXDHalfShellPar>& HalfShells = parameters.getHalfShells();
454  for (const VXDHalfShellPar& shell : parameters.getHalfShells()) {
455  string shellName = shell.getName();
456  m_currentHalfShell = m_prefix + "." + shellName;
457  G4Transform3D shellAlignment = getAlignment(parameters.getAlignment(m_currentHalfShell));
458 
459  // Remember shell coordinate system (into which ladders are inserted)
460  VXD::GeoCache::getInstance().addHalfShellPlacement(m_halfShellVxdIDs[m_currentHalfShell], shellAlignment);
461 
462  //Place shell support
463  double shellAngle = shell.getShellAngle();
464  if (!m_onlyActiveMaterial) shellSupport.place(envelope, shellAlignment * G4RotateZ3D(shellAngle));
465 
466  //const std::map< int, std::vector<std::pair<int, double>> >& Layers = shell.getLayers();
467  for (const std::pair<const int, std::vector<std::pair<int, double>> >& layer : shell.getLayers()) {
468  int layerID = layer.first;
469  const std::vector<std::pair<int, double>>& Ladders = layer.second;
470 
471 
472  setCurrentLayer(layerID, parameters);
473 
474  //Place Layer support
475  VXD::GeoVXDAssembly layerSupport = createLayerSupport(layerID, parameters);
476  if (!m_onlyActiveMaterial) layerSupport.place(envelope, shellAlignment * G4RotateZ3D(shellAngle));
477  VXD::GeoVXDAssembly ladderSupport = createLadderSupport(layerID, parameters);
478 
479  //Loop over defined ladders
480  for (const std::pair<int, double>& ladder : Ladders) {
481  int ladderID = ladder.first;
482  double phi = ladder.second;
483 
484  G4Transform3D ladderPlacement = placeLadder(ladderID, phi, envelope, shellAlignment, parameters);
485  if (!m_onlyActiveMaterial) ladderSupport.place(envelope, ladderPlacement);
486  }
487 
488  }
489  }
490 
491  //Now build cache with all transformations
492  if (physEnvelope) {
493  VXD::GeoCache::getInstance().findVolumes(physEnvelope);
494  } else {
495  //create a temporary placement of the top volume.
496  G4PVPlacement topPlacement(nullptr, G4ThreeVector(0, 0, 0), &topVolume,
497  "temp_Top", nullptr, false, 1, false);
498  //and search for all VXD sensitive sensors within
499  VXD::GeoCache::getInstance().findVolumes(&topPlacement);
500  }
501 
502  //Create diamond radiation sensors if defined and in background mode
503  if (m_activeChips) {
504  if (parameters.getRadiationSensors().getSubDetector() == "") {
505  B2DEBUG(10, "Apparently no radiation sensors defined, skipping");
506  } else {
507  createDiamonds(parameters.getRadiationSensors(), topVolume, *envelope);
508  }
509  }
510  }
511 
512  void GeoSVDCreator::readHalfShellSupport(const GearDir& support, SVDGeometryPar& svdGeometryPar)
513  {
514  if (!support) return;
515 
516  for (const GearDir& params : support.getNodes("HalfShell/RotationSolid")) {
517 
518  VXDRotationSolidPar rotationSolidPar(params.getString("Name", ""),
519  params.getString("Material", "Air"),
520  params.getString("Color", ""),
521  params.getAngle("minPhi", 0),
522  params.getAngle("maxPhi", 2 * M_PI),
523  (params.getNodes("InnerPoints/point").size() > 0)
524  );
525 
526  for (const GearDir point : params.getNodes("InnerPoints/point")) {
527  pair<double, double> ZXPoint(point.getLength("z"), point.getLength("x"));
528  rotationSolidPar.getInnerPoints().push_back(ZXPoint);
529  }
530  for (const GearDir point : params.getNodes("OuterPoints/point")) {
531  pair<double, double> ZXPoint(point.getLength("z"), point.getLength("x"));
532  rotationSolidPar.getOuterPoints().push_back(ZXPoint);
533  }
534  svdGeometryPar.getRotationSolids().push_back(rotationSolidPar);
535  }
536  return;
537  }
538 
539  void GeoSVDCreator::readLayerSupport(int layer, const GearDir& support, SVDGeometryPar& svdGeometryPar)
540  {
541  if (!support) return;
542 
543  //Check if there are any endrings defined for this layer. If not we don't create any
544  GearDir endrings(support, (boost::format("Endrings/Layer[@id='%1%']") % layer).str());
545  if (endrings) {
546  svdGeometryPar.getEndrings()[layer] = SVDEndringsPar(support.getString("Endrings/Material"),
547  support.getLength("Endrings/length"),
548  support.getLength("Endrings/gapWidth"),
549  support.getLength("Endrings/baseThickness")
550  );
551 
552  //Create the endrings
553  for (const GearDir& endring : endrings.getNodes("Endring")) {
554  SVDEndringsTypePar endringPar(endring.getString("@name"),
555  endring.getLength("z"),
556  endring.getLength("baseRadius"),
557  endring.getLength("innerRadius"),
558  endring.getLength("outerRadius"),
559  endring.getLength("horizontalBar"),
560  endring.getLength("verticalBar")
561  );
562  svdGeometryPar.getEndrings()[layer].getTypes().push_back(endringPar);
563  }
564  }
565 
566  // Now let's add the cooling pipes to the Support
567  GearDir pipes(support, (boost::format("CoolingPipes/Layer[@id='%1%']") % layer).str());
568  if (pipes) {
569  svdGeometryPar.getCoolingPipes()[layer] = SVDCoolingPipesPar(support.getString("CoolingPipes/Material"),
570  support.getLength("CoolingPipes/outerDiameter"),
571  support.getLength("CoolingPipes/wallThickness"),
572  pipes.getInt("nPipes"),
573  pipes.getAngle("startPhi"),
574  pipes.getAngle("deltaPhi"),
575  pipes.getLength("radius"),
576  pipes.getLength("zstart"),
577  pipes.getLength("zend")
578  );
579  if (pipes.exists("deltaL")) svdGeometryPar.getCoolingPipes()[layer].setDeltaL(pipes.getLength("deltaL"));
580  }
581  return;
582  }
583 
584  void GeoSVDCreator::readLadderSupport(int layer, const GearDir& support, SVDGeometryPar& svdGeometryPar)
585  {
586  if (!support) return;
587 
588  // Check if there are any support ribs defined for this layer. If not return empty assembly
589  GearDir params(support, (boost::format("SupportRibs/Layer[@id='%1%']") % layer).str());
590  if (params) {
591  svdGeometryPar.getSupportRibs()[layer] = SVDSupportRibsPar(support.getLength("SupportRibs/spacing"),
592  support.getLength("SupportRibs/height"),
593  support.getLength("SupportRibs/inner/width"),
594  support.getLength("SupportRibs/outer/width"),
595  support.getLength("SupportRibs/inner/tabLength"),
596  support.getString("SupportRibs/outer/Material"),
597  support.getString("SupportRibs/inner/Material"),
598  support.getString("SupportRibs/outer/Color"),
599  support.getString("SupportRibs/inner/Color"),
600  support.getString("SupportRibs/endmount/Material")
601  );
602 
603  // Get values for the layer if available
604  if (params.exists("spacing")) svdGeometryPar.getSupportRibs()[layer].setSpacing(params.getLength("spacing"));
605  if (params.exists("height")) svdGeometryPar.getSupportRibs()[layer].setHeight(params.getLength("height"));
606 
607  for (const GearDir& box : params.getNodes("box")) {
608  SVDSupportBoxPar boxPar(box.getAngle("theta"),
609  box.getLength("z"),
610  box.getLength("r"),
611  box.getLength("length")
612  );
613  svdGeometryPar.getSupportRibs()[layer].getBoxes().push_back(boxPar);
614  }
615 
616  for (const GearDir& tab : params.getNodes("tab")) {
617  SVDSupportTabPar tabPar(tab.getAngle("theta"),
618  tab.getLength("z"),
619  tab.getLength("r")
620  );
621  svdGeometryPar.getSupportRibs()[layer].getTabs().push_back(tabPar);
622  }
623 
624  for (const GearDir& endmount : params.getNodes("Endmount")) {
625  SVDEndmountPar mountPar(endmount.getString("@name"),
626  endmount.getLength("height"),
627  endmount.getLength("width"),
628  endmount.getLength("length"),
629  endmount.getLength("z"),
630  endmount.getLength("r")
631  );
632  svdGeometryPar.getSupportRibs()[layer].getEndmounts().push_back(mountPar);
633  }
634  }
635  return;
636  }
637 
638  VXD::GeoVXDAssembly GeoSVDCreator::createHalfShellSupport(const SVDGeometryPar& parameters)
639  {
640  VXD::GeoVXDAssembly supportAssembly;
641 
642  //Half shell support is easy as we just add all the defined RotationSolids
643  double minZ(0), maxZ(0);
644 
645  const std::vector<VXDRotationSolidPar>& RotationSolids = parameters.getRotationSolids();
646 
647  for (const VXDRotationSolidPar& component : RotationSolids) {
648 
649  string name = component.getName();
650  string material = component.getMaterial();
651 
652  G4Polycone* solid = geometry::createRotationSolid(name,
653  component.getInnerPoints(),
654  component.getOuterPoints(),
655  component.getMinPhi(),
656  component.getMaxPhi(),
657  minZ, maxZ
658  );
659 
660  G4LogicalVolume* volume = new G4LogicalVolume(
661  solid, geometry::Materials::get(material), m_prefix + ". " + name);
662  geometry::setColor(*volume, component.getColor());
663  supportAssembly.add(volume);
664  }
665  return supportAssembly;
666  }
667 
668 
669 
670  VXD::GeoVXDAssembly GeoSVDCreator::createLayerSupport(int layer, const SVDGeometryPar& parameters)
671  {
672  VXD::GeoVXDAssembly supportAssembly;
673 
674  //Check if there are any endrings defined for this layer. If not we don't create any
675  if (parameters.getEndringsExist(layer)) {
676  const SVDEndringsPar& support = parameters.getEndrings(layer);
677 
678  string material = support.getMaterial();
679  double length = support.getLength() / Unit::mm / 2.0;
680  double gapWidth = support.getGapWidth() / Unit::mm;
681  double baseThickness = support.getBaseThickness() / Unit::mm / 2.0;
682 
683  //Create the endrings
684  const std::vector<SVDEndringsTypePar>& Endrings = support.getTypes();
685  for (const SVDEndringsTypePar& endring : Endrings) {
686  double z = endring.getZ() / Unit::mm;
687  double baseRadius = endring.getBaseRadius() / Unit::mm;
688  double innerRadius = endring.getInnerRadius() / Unit::mm;
689  double outerRadius = endring.getOuterRadius() / Unit::mm;
690  double horiBarWidth = endring.getHorizontalBarWidth() / Unit::mm / 2.0;
691  double vertBarWidth = endring.getVerticalBarWidth() / Unit::mm / 2.0;
692 
693  double angle = asin(gapWidth / innerRadius);
694  G4VSolid* endringSolid = new G4Tubs("OuterEndring", innerRadius, outerRadius, length, -M_PI / 2 + angle, M_PI - 2 * angle);
695  angle = asin(gapWidth / baseRadius);
696  G4VSolid* endringBase = new G4Tubs("InnerEndring", baseRadius, baseRadius + baseThickness, length, -M_PI / 2 + angle,
697  M_PI - 2 * angle);
698  endringSolid = new G4UnionSolid("Endring", endringSolid, endringBase);
699 
700  //Now we need the bars which connect the two rings
701  double height = (innerRadius - baseRadius) / 2.0;
702  double x = vertBarWidth + gapWidth;
703  G4Box* verticalBar = new G4Box("VerticalBar", vertBarWidth, height, length);
704  G4Box* horizontalBar = new G4Box("HorizontalBar", height, horiBarWidth, length);
705  endringSolid = new G4UnionSolid("Endring", endringSolid, verticalBar, G4Translate3D(x, baseRadius + height, 0));
706  endringSolid = new G4UnionSolid("Endring", endringSolid, verticalBar, G4Translate3D(x, -(baseRadius + height), 0));
707  endringSolid = new G4UnionSolid("Endring", endringSolid, horizontalBar, G4Translate3D((baseRadius + height), 0, 0));
708 
709  //Finally create the volume and add it to the assembly at the correct z position
710  G4LogicalVolume* endringVolume = new G4LogicalVolume(
711  endringSolid, geometry::Materials::get(material),
712  (boost::format("%1%.Layer%2%.%3%") % m_prefix % layer % endring.getName()).str());
713  supportAssembly.add(endringVolume, G4TranslateZ3D(z));
714  }
715  }
716 
717  //Check if there are any coling pipes defined for this layer. If not we don't create any
718  if (parameters.getCoolingPipesExist(layer)) {
719  const SVDCoolingPipesPar& pipes = parameters.getCoolingPipes(layer);
720 
721  string material = pipes.getMaterial();
722  double outerRadius = pipes.getOuterDiameter() / Unit::mm / 2.0;
723  double innerRadius = outerRadius - pipes.getWallThickness() / Unit::mm;
724  int nPipes = pipes.getNPipes();
725  double startPhi = pipes.getStartPhi();
726  double deltaPhi = pipes.getDeltaPhi();
727  double radius = pipes.getRadius() / Unit::mm;
728  double zstart = pipes.getZStart() / Unit::mm;
729  double zend = pipes.getZEnd() / Unit::mm;
730  double zlength = (zend - zstart) / 2.0;
731 
732 
733  // There are two parts: the straight pipes and the bendings. So we only need two different volumes
734  // which we place multiple times
735  G4Tubs* pipeSolid = new G4Tubs("CoolingPipe", innerRadius, outerRadius, zlength, 0, 2 * M_PI);
736  G4LogicalVolume* pipeVolume = new G4LogicalVolume(
737  pipeSolid, geometry::Materials::get(material),
738  (boost::format("%1%.Layer%2%.CoolingPipe") % m_prefix % layer).str());
739  geometry::setColor(*pipeVolume, "#ccc");
740 
741  G4Torus* bendSolid = new G4Torus("CoolingBend", innerRadius, outerRadius, sin(deltaPhi / 2.0)*radius, -M_PI / 2, M_PI);
742  G4LogicalVolume* bendVolume = new G4LogicalVolume(
743  bendSolid, geometry::Materials::get(material),
744  (boost::format("%1%.Layer%2%.CoolingBend") % m_prefix % layer).str());
745 
746  // Last pipe may be closer, thus we need additional bending
747  if (pipes.getDeltaL() > 0) {
748  double deltaL = pipes.getDeltaL() / Unit::mm;
749  G4Torus* bendSolidLast = new G4Torus("CoolingBendLast", innerRadius, outerRadius, sin(deltaPhi / 2.0) * radius - deltaL / 2.0,
750  -M_PI / 2, M_PI);
751  G4LogicalVolume* bendVolumeLast = new G4LogicalVolume(bendSolidLast, geometry::Materials::get(material),
752  (boost::format("%1%.Layer%2%.CoolingBendLast") % m_prefix % layer).str());
753  --nPipes;
754 
755  // Place the last straight pipe
756  G4Transform3D placement_pipe = G4RotateZ3D(startPhi + (nPipes - 0.5) * deltaPhi) * G4Translate3D(cos(deltaPhi / 2.0) * radius,
757  sin(deltaPhi / 2.0) * radius - deltaL, zstart + zlength);
758  supportAssembly.add(pipeVolume, placement_pipe);
759 
760  // Place forward or backward bend
761  double zpos = nPipes % 2 > 0 ? zend : zstart;
762  // Calculate transformation
763  G4Transform3D placement = G4RotateZ3D(startPhi + (nPipes - 0.5) * deltaPhi) * G4Translate3D(cos(deltaPhi / 2.0) * radius,
764  -deltaL / 2.0, zpos) * G4RotateY3D(M_PI / 2);
765  // If we are at the forward side we rotate the bend by 180 degree
766  if (nPipes % 2 > 0) {
767  placement = placement * G4RotateZ3D(M_PI);
768  }
769  // And place the bend
770  supportAssembly.add(bendVolumeLast, placement);
771  }
772 
773  for (int i = 0; i < nPipes; ++i) {
774  // Place the straight pipes
775  G4Transform3D placement_pipe = G4RotateZ3D(startPhi + i * deltaPhi) * G4Translate3D(radius, 0, zstart + zlength);
776  supportAssembly.add(pipeVolume, placement_pipe);
777 
778  // This was the easy part, now lets add the connection between the pipes. We only need n-1 bendings
779  if (i > 0) {
780  // Place forward or backward bend
781  double zpos = i % 2 > 0 ? zend : zstart;
782  // Calculate transformation
783  G4Transform3D placement = G4RotateZ3D(startPhi + (i - 0.5) * deltaPhi) * G4Translate3D(cos(deltaPhi / 2.0) * radius, 0,
784  zpos) * G4RotateY3D(M_PI / 2);
785  // If we are at the forward side we rotate the bend by 180 degree
786  if (i % 2 > 0) {
787  placement = placement * G4RotateZ3D(M_PI);
788  }
789  // And place the bend
790  supportAssembly.add(bendVolume, placement);
791  }
792  }
793  }
794 
795  return supportAssembly;
796  }
797 
798 
799 
800  VXD::GeoVXDAssembly GeoSVDCreator::createLadderSupport(int layer, const SVDGeometryPar& parameters)
801  {
802  VXD::GeoVXDAssembly supportAssembly;
803 
804  if (!parameters.getSupportRibsExist(layer)) return supportAssembly;
805  const SVDSupportRibsPar& support = parameters.getSupportRibs(layer);
806 
807  // Get the common values for all layers
808  double spacing = support.getSpacing() / Unit::mm / 2.0;
809  double height = support.getHeight() / Unit::mm / 2.0;
810  double innerWidth = support.getInnerWidth() / Unit::mm / 2.0;
811  double outerWidth = support.getOuterWidth() / Unit::mm / 2.0;
812  double tabLength = support.getTabLength() / Unit::mm / 2.0;
813  G4VSolid* inner(0);
814  G4VSolid* outer(0);
815  G4Transform3D placement;
816 
817 
818  // Now lets create the ribs by adding all boxes to form one union solid
819  const std::vector<SVDSupportBoxPar>& Boxes = support.getBoxes();
820  for (const SVDSupportBoxPar& box : Boxes) {
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);
827  if (!inner) {
828  inner = innerBox;
829  outer = outerBox;
830  placement = G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
831  } else {
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);
835  }
836  }
837 
838  // Now lets add the tabs
839  const std::vector<SVDSupportTabPar>& Tabs = support.getTabs();
840  for (const SVDSupportTabPar& tab : Tabs) {
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);
845  if (!inner) {
846  inner = innerBox;
847  placement = G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
848  } else {
849  G4Transform3D relative = placement.inverse() * G4Translate3D(rpos, 0, zpos) * G4RotateY3D(theta);
850  inner = new G4UnionSolid("innerBox", inner, innerBox, relative);
851  }
852  }
853 
854  // Now lets create forward and backward endmounts for the ribs
855  const std::vector<SVDEndmountPar>& Endmounts = support.getEndmounts();
856  for (const SVDEndmountPar& endmount : Endmounts) {
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);
863  if (outer) { // holes for the ribs
864  endmountBox = new G4SubtractionSolid("endmountBox", endmountBox, outer, G4TranslateY3D(-spacing)*placement * G4Translate3D(-rpos, 0,
865  -zpos));
866  endmountBox = new G4SubtractionSolid("endmountBox", endmountBox, outer, G4TranslateY3D(spacing)*placement * G4Translate3D(-rpos, 0,
867  -zpos));
868  }
869  G4LogicalVolume* endmountVolume = new G4LogicalVolume(
870  endmountBox, geometry::Materials::get(support.getEndmountMaterial()),
871  (boost::format("%1%.Layer%2%.%3%Endmount") % m_prefix % layer % endmount.getName()).str());
872  supportAssembly.add(endmountVolume, G4Translate3D(rpos, 0, zpos));
873  }
874 
875  // If there has been at least one Box, create the volumes and add them to the assembly
876  if (inner) {
877  outer = new G4SubtractionSolid("outerBox", outer, inner);
878  G4LogicalVolume* outerVolume = new G4LogicalVolume(
879  outer, geometry::Materials::get(support.getOuterMaterial()),
880  (boost::format("%1%.Layer%2%.SupportRib") % m_prefix % layer).str());
881  G4LogicalVolume* innerVolume = new G4LogicalVolume(
882  inner, geometry::Materials::get(support.getInnerMaterial()),
883  (boost::format("%1%.Layer%2%.SupportRib.Airex") % m_prefix % layer).str());
884  geometry::setColor(*outerVolume, support.getOuterColor());
885  geometry::setColor(*innerVolume, support.getInnerColor());
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);
890  }
891 
892  // Done, return the finished assembly
893  return supportAssembly;
894  }
895 
896 
897 
898  }
900 }
Belle2::SVDSensorInfoPar::getStripEdgeV
double getStripEdgeV() const
Return the distance between end of strip and edge of active area.
Definition: SVDSensorInfoPar.h:121
Belle2::VXDGeometryPar::setRadiationSensors
void setRadiationSensors(const VXDGeoRadiationSensorsPar &diamonds)
set radiation sensor parameters
Definition: VXDGeometryPar.h:66
Belle2::SVDSensorInfoPar::getBackplaneCapacitanceU
double getBackplaneCapacitanceU() const
Return the backplane capacitance/cm for U-side strips.
Definition: SVDSensorInfoPar.h:127
Belle2::VXDGeoSensorPlacement
Struct holding the information where a sensor should be placed inside the ladder.
Definition: GeoVXDComponents.h:154
Belle2::SVDSensorInfoPar::getBackplaneCapacitanceV
double getBackplaneCapacitanceV() const
Return the backplane capacitance/cm for V-side strips.
Definition: SVDSensorInfoPar.h:133
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVDEndringsPar::getBaseThickness
double getBaseThickness() const
get base thickness
Definition: SVDEndringsPar.h:101
Belle2::VXDAlignmentPar
The Class for VXD Alignment payload.
Definition: VXDAlignmentPar.h:33
Belle2::VXDRotationSolidPar::getOuterPoints
const std::list< std::pair< double, double > > & getOuterPoints() const
get outer XZ points
Definition: VXDRotationSolidPar.h:64
Belle2::SVDSensorInfoPar::getDepletionVoltage
double getDepletionVoltage() const
Return the depletion voltage of the sensor.
Definition: SVDSensorInfoPar.h:123
Belle2::SVDEndringsPar::getGapWidth
double getGapWidth() const
get gap width
Definition: SVDEndringsPar.h:99
Belle2::VXDRotationSolidPar::getInnerPoints
const std::list< std::pair< double, double > > & getInnerPoints() const
get inner XZ points
Definition: VXDRotationSolidPar.h:62
Belle2::gearbox::Interface::getAngle
double getAngle(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard angle unit.
Definition: Interface.h:301
Belle2::VXDGeoPlacement
Class holding all parameters to place a VXD geometry subcomponent.
Definition: GeoVXDComponents.h:28
Belle2::SVDCoolingPipesPar::getMaterial
const std::string & getMaterial() const
get material
Definition: SVDCoolingPipesPar.h:52
Belle2::VXDGeoRadiationSensorsPar::addPosition
void addPosition(const VXDGeoRadiationSensorsPositionPar &position)
add radiation sensor position
Definition: VXDGeoRadiationSensorsPar.h:113
Belle2::VXDGeoSensorPar::getSlanted
bool getSlanted() const
return wether or not the sensor is slanted (usually only the first sensor in layers 4-6)
Definition: VXDGeoSensorPar.h:68
Belle2::gearbox::Interface::getInt
int getInt(const std::string &path="") const noexcept(false)
Get the parameter path as a int.
Definition: Interface.cc:70
Belle2::SVDSensorInfoPar::getElectronicNoiseU
double getElectronicNoiseU() const
Return electronic noise in e- for u strips.
Definition: SVDSensorInfoPar.h:143
Belle2::SVDGeometryPar
The Class for VXD geometry.
Definition: SVDGeometryPar.h:39
Belle2::VXDSensorInfoBasePar::getWidth
double getWidth() const
Return the (backward) width of the sensor.
Definition: VXDSensorInfoBasePar.h:87
Belle2::VXDGeoSensorPar
The Class for VXD Sensor payload.
Definition: VXDGeoSensorPar.h:39
Belle2::SVDSupportRibsPar::getInnerWidth
double getInnerWidth() const
get inner width
Definition: SVDSupportRibsPar.h:173
Belle2::SVDSupportRibsPar::getEndmounts
const std::vector< SVDEndmountPar > & getEndmounts() const
get endmounts
Definition: SVDSupportRibsPar.h:193
Belle2::VXDGeometryPar::getSensorMap
const std::map< std::string, VXDGeoSensorPar > & getSensorMap() const
get sensor map
Definition: VXDGeometryPar.h:84
Belle2::VXDGeoComponentPar::getSubComponents
const std::vector< VXDGeoPlacementPar > & getSubComponents() const
get sub components
Definition: VXDGeoComponentPar.h:79
Belle2::VXDGeoPlacementPar
The Class for VXD placement payload.
Definition: VXDGeoPlacementPar.h:36
Belle2::SVDSensorInfoPar::getAduEquivalentSbwV
double getAduEquivalentSbwV() const
Return ADU equivalent for V strips in Sbw barrel sensor.
Definition: SVDSensorInfoPar.h:149
Belle2::VXD::SensitiveDetectorBase
Base class for Sensitive Detector implementation of PXD and SVD.
Definition: SensitiveDetectorBase.h:47
Belle2::VXDGeoPlacementPar::getW
const std::string & getW() const
get local w position where to place the component
Definition: VXDGeoPlacementPar.h:57
Belle2::VXDSensorInfoBasePar::getLength
double getLength() const
Return the length of the sensor.
Definition: VXDSensorInfoBasePar.h:89
Belle2::VXDGeometryPar::getGlobalParams
const VXDGlobalPar & getGlobalParams() const
get global parameters
Definition: VXDGeometryPar.h:56
Belle2::SVDSupportRibsPar::getBoxes
const std::vector< SVDSupportBoxPar > & getBoxes() const
get boxes
Definition: SVDSupportRibsPar.h:191
Belle2::VXD::SensorInfoBase
Base class to provide Sensor Information for PXD and SVD.
Definition: SensorInfoBase.h:40
Belle2::SVDSensorInfoPar::getInterstripCapacitanceV
double getInterstripCapacitanceV() const
Return the interstrip capacitance/cm for V-side strips.
Definition: SVDSensorInfoPar.h:135
Belle2::BkgSensitiveDetector
The Class for BeamBackground Sensitive Detector.
Definition: BkgSensitiveDetector.h:34
Belle2::SVD::SensorInfo
Specific implementation of SensorInfo for SVD Sensors which provides additional sensor specific infor...
Definition: SensorInfo.h:35
Belle2::VXDGeometryPar::setEnvelope
void setEnvelope(const VXDEnvelopePar &envelope)
set envelope parameters
Definition: VXDGeometryPar.h:62
Belle2::VXDGeometryPar::getHalfShells
const std::vector< VXDHalfShellPar > & getHalfShells() const
get half-shell
Definition: VXDGeometryPar.h:72
Belle2::SVDSensorInfoPar::getElectronicNoiseV
double getElectronicNoiseV() const
Return electronic noise in e- for v strips.
Definition: SVDSensorInfoPar.h:145
Belle2::VXDGeoSensorPar::getActiveArea
const VXDGeoComponentPar & getActiveArea() const
get the component description for the active area
Definition: VXDGeoSensorPar.h:56
Belle2::SVDCoolingPipesPar::getRadius
double getRadius() const
get radius
Definition: SVDCoolingPipesPar.h:64
Belle2::VXDGlobalPar::getActiveChips
bool getActiveChips() const
Get whether chips are sensitive
Definition: VXDGlobalPar.h:58
Belle2::VXDRotationSolidPar
The Class for VXD Envelope parameters.
Definition: VXDRotationSolidPar.h:36
Belle2::gearbox::Interface::exists
bool exists(const std::string &path="") const
Check if a given parameter path exists.
Definition: Interface.h:56
Belle2::VXDGeoComponentPar::getLength
double getLength() const
get the length of the component
Definition: VXDGeoComponentPar.h:65
Belle2::VXD::GeoVXDAssembly
Class to group some Geant4 volumes and place them all at once with a given transformation matrix.
Definition: GeoVXDAssembly.h:31
Belle2::VXDGeoRadiationSensorsPar
The Class for VXD Radiation Sensor parameters.
Definition: VXDGeoRadiationSensorsPar.h:77
Belle2::SVDCoolingPipesPar::getWallThickness
double getWallThickness() const
get wall thickness
Definition: SVDCoolingPipesPar.h:56
Belle2::SVDSupportRibsPar::getTabs
const std::vector< SVDSupportTabPar > & getTabs() const
get tabs
Definition: SVDSupportRibsPar.h:189
Belle2::SVDSensorInfoPar::getCouplingCapacitanceV
double getCouplingCapacitanceV() const
Return the coupling capacitance/cm for V-side strips.
Definition: SVDSensorInfoPar.h:137
Belle2::SVDSensorInfoPar::getCouplingCapacitanceU
double getCouplingCapacitanceU() const
Return the coupling capacitance/cm for U-side strips.
Definition: SVDSensorInfoPar.h:131
Belle2::VXDGeoComponentPar::getColor
const std::string & getColor() const
get the name of the color for the component
Definition: VXDGeoComponentPar.h:53
Belle2::SVDEndringsTypePar
The Class for SVD Endring Type.
Definition: SVDEndringsPar.h:35
Belle2::VXDHalfShellPar::addLadder
void addLadder(int layerID, int ladderID, double phi)
add ladder
Definition: VXDHalfShellPar.h:47
Belle2::SVDCoolingPipesPar::getDeltaL
double getDeltaL() const
get deltal
Definition: SVDCoolingPipesPar.h:70
Belle2::SVDSensorInfoPar::getInterstripCapacitanceU
double getInterstripCapacitanceU() const
Return the interstrip capacitance/cm for U-side strips.
Definition: SVDSensorInfoPar.h:129
Belle2::SVDCoolingPipesPar::getNPipes
int getNPipes() const
get nPipes
Definition: SVDCoolingPipesPar.h:58
Belle2::SVDEndringsPar
The Class for SVD Endring.
Definition: SVDEndringsPar.h:82
Belle2::SVDSensorInfoPar::getBiasVoltage
double getBiasVoltage() const
Return the bias voltage on the sensor.
Definition: SVDSensorInfoPar.h:125
Belle2::SVDSupportRibsPar::getInnerMaterial
const std::string & getInnerMaterial() const
get the name of inner material
Definition: SVDSupportRibsPar.h:181
Belle2::VXDGeoComponentPar::getMaterial
const std::string & getMaterial() const
get the name of the Material for the component
Definition: VXDGeoComponentPar.h:49
Belle2::VXDGeoPlacementPar::getU
double getU() const
get local u coordinate where to place the component
Definition: VXDGeoPlacementPar.h:49
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDGeoComponentPar::getWidth
double getWidth() const
get the width of the component
Definition: VXDGeoComponentPar.h:57
Belle2::geometry::setVisibility
void setVisibility(G4LogicalVolume &volume, bool visible)
Helper function to quickly set the visibility of a given volume.
Definition: utilities.cc:115
Belle2::SVDSensorInfoPar::getElectronicNoiseSbwU
double getElectronicNoiseSbwU() const
Return electronic noise in e- for u strips in bw barrel sensors.
Definition: SVDSensorInfoPar.h:151
Belle2::VXDGeoSensorPar::getActivePlacement
const VXDGeoPlacementPar & getActivePlacement() const
get the placement description for the active area
Definition: VXDGeoSensorPar.h:58
Belle2::SVDSupportRibsPar::getOuterMaterial
const std::string & getOuterMaterial() const
get the name of outer material
Definition: SVDSupportRibsPar.h:179
Belle2::SVDGeometryPar::getCoolingPipes
const std::map< int, SVDCoolingPipesPar > & getCoolingPipes() const
get cooling pipes
Definition: SVDGeometryPar.h:58
Belle2::SVDCoolingPipesPar::getZEnd
double getZEnd() const
get zend
Definition: SVDCoolingPipesPar.h:68
Belle2::GearDir
GearDir is the basic class used for accessing the parameter store.
Definition: GearDir.h:41
Belle2::SVDSupportTabPar
The Class for SVD Support Rib Tab.
Definition: SVDSupportRibsPar.h:71
Belle2::SVDCoolingPipesPar::getStartPhi
double getStartPhi() const
get start phi
Definition: SVDCoolingPipesPar.h:60
Belle2::SVDSensorInfoPar::getAduEquivalentU
double getAduEquivalentU() const
Return ADU equivalent for U strips.
Definition: SVDSensorInfoPar.h:139
Belle2::VXDGeometryPar::setGlobalParams
void setGlobalParams(const VXDGlobalPar &globals)
set global parameters
Definition: VXDGeometryPar.h:58
Belle2::SVDCoolingPipesPar
The Class for SVD Cooling Pipes.
Definition: SVDCoolingPipesPar.h:35
Belle2::SVDSupportRibsPar::getEndmountMaterial
const std::string & getEndmountMaterial() const
get the name of endmount material
Definition: SVDSupportRibsPar.h:187
Belle2::SVDEndringsPar::getLength
double getLength() const
get length
Definition: SVDEndringsPar.h:97
Belle2::VXDGeoComponentPar::getWidth2
double getWidth2() const
get the forward width of the component, 0 for rectangular
Definition: VXDGeoComponentPar.h:61
Belle2::VXDGeometryPar::setPrefix
void setPrefix(const std::string &prefix)
set prefix
Definition: VXDGeometryPar.h:54
Belle2::SVDCoolingPipesPar::getZStart
double getZStart() const
get zstart
Definition: SVDCoolingPipesPar.h:66
Belle2::VXD::GeoVXDAssembly::add
void add(G4LogicalVolume *volume, const G4Transform3D &transform=G4Transform3D())
Add a volume to the assembly.
Definition: GeoVXDAssembly.h:46
Belle2::VXDGeoSensorPar::getComponents
const std::vector< VXDGeoPlacementPar > & getComponents() const
get the list of sub components
Definition: VXDGeoSensorPar.h:62
Belle2::VXDGlobalPar
The Class for VXD global paramter payload.
Definition: VXDGlobalPar.h:34
Belle2::VXDGeoComponentPar::getHeight
double getHeight() const
get the height of the component
Definition: VXDGeoComponentPar.h:69
Belle2::SVDSupportRibsPar::getSpacing
double getSpacing() const
get spacing
Definition: SVDSupportRibsPar.h:165
Belle2::SVDSupportRibsPar::getInnerColor
const std::string & getInnerColor() const
get the name of inner color
Definition: SVDSupportRibsPar.h:183
Belle2::VXDSensorInfoBasePar::getUCells
int getUCells() const
Return number of pixel/strips in u direction.
Definition: VXDSensorInfoBasePar.h:95
Belle2::VXDGeoRadiationSensorsPositionPar::addSensor
void addSensor(int id, double phi)
add sensor with individual id
Definition: VXDGeoRadiationSensorsPar.h:58
Belle2::SVDEndringsPar::getMaterial
const std::string & getMaterial() const
get material
Definition: SVDEndringsPar.h:95
Belle2::gearbox::Interface::getLength
double getLength(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
Definition: Interface.h:261
Belle2::VXDGeoPlacementPar::getV
double getV() const
get local v coordinate where to place the component
Definition: VXDGeoPlacementPar.h:53
Belle2::VXDSensorInfoBasePar::getVCells
int getVCells() const
Return number of pixel/strips in v direction.
Definition: VXDSensorInfoBasePar.h:97
Belle2::GearDir::getString
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
Definition: GearDir.h:79
Belle2::VXDGeoSensor
Struct holding all parameters for a completeVXD Sensor.
Definition: GeoVXDComponents.h:112
Belle2::VXDGeoComponentPar
The Class for VXD geometry component.
Definition: VXDGeoComponentPar.h:36
Belle2::SVDGeometryPar::getRotationSolids
const std::vector< VXDRotationSolidPar > & getRotationSolids() const
get SVD halfshell Rotation Solids
Definition: SVDGeometryPar.h:46
Belle2::SVDSensorInfoPar::getElectronicNoiseSbwV
double getElectronicNoiseSbwV() const
Return electronic noise in e- for v strips in bw barrel sensors.
Definition: SVDSensorInfoPar.h:153
Belle2::SVDSupportRibsPar::getHeight
double getHeight() const
get height
Definition: SVDSupportRibsPar.h:169
Belle2::SVDSensorInfoPar::getAduEquivalentSbwU
double getAduEquivalentSbwU() const
Return ADU equivalent for U strips in Sbw barrel sensor.
Definition: SVDSensorInfoPar.h:147
Belle2::SVDSupportRibsPar
The Class for SVD Support Ribs (one layer)
Definition: SVDSupportRibsPar.h:146
Belle2::SVDSupportBoxPar
The Class for SVD Support Box.
Definition: SVDSupportRibsPar.h:36
Belle2::VXD::SensitiveDetector
Sensitive Detector implementation of PXD and SVD.
Definition: SensitiveDetector.h:67
Belle2::SVD::SensorInfo::setID
void setID(VxdID id)
Change the SensorID.
Definition: SensorInfo.h:95
Belle2::SVDSensorInfoPar::getAduEquivalentV
double getAduEquivalentV() const
Return ADU equivalent for V strips.
Definition: SVDSensorInfoPar.h:141
Belle2::SVDGeometryPar::getEndrings
const std::map< int, SVDEndringsPar > & getEndrings() const
get endrings
Definition: SVDGeometryPar.h:52
Belle2::VXDGeoComponentPar::getAngle
double getAngle() const
get the angle of the component
Definition: VXDGeoComponentPar.h:75
Belle2::SVDGeometryPar::getSensorInfos
std::vector< SVDSensorInfoPar * > & getSensorInfos()
get sensorInfos
Definition: SVDGeometryPar.h:88
Belle2::VXD::GeoVXDAssembly::place
void place(G4LogicalVolume *mother, const G4Transform3D &transform)
Place all the volumes already added to the assembly in the given mother.
Definition: GeoVXDAssembly.cc:32
Belle2::VXDSensorInfoBasePar::getWidth2
double getWidth2() const
Return forward width for a slanted sensor.
Definition: VXDSensorInfoBasePar.h:85
Belle2::SVDCoolingPipesPar::getDeltaPhi
double getDeltaPhi() const
get delta phi
Definition: SVDCoolingPipesPar.h:62
Belle2::gearbox::Interface::getBool
bool getBool(const std::string &path="") const noexcept(false)
Get the parameter path as a bool.
Definition: Interface.cc:90
Belle2::VXDHalfShellPar
The Class for VXD half shell payload.
Definition: VXDHalfShellPar.h:37
Belle2::SVDSensorInfoPar::getStripEdgeU
double getStripEdgeU() const
Return the distance between end of strip and edge of active area.
Definition: SVDSensorInfoPar.h:119
Belle2::SVDSupportRibsPar::getOuterWidth
double getOuterWidth() const
get outer width
Definition: SVDSupportRibsPar.h:175
Belle2::gearbox::Interface::getNodes
std::vector< GearDir > getNodes(const std::string &path="") const
Get vector of GearDirs which point to all the nodes the given path evaluates to.
Definition: Interface.cc:31
Belle2::VXDGeoComponent
Class holding all parameters for an VXD geometry component.
Definition: GeoVXDComponents.h:65
Belle2::SVDCoolingPipesPar::getOuterDiameter
double getOuterDiameter() const
get outer diameter
Definition: SVDCoolingPipesPar.h:54
Belle2::SVD::GeoSVDFactory
geometry::CreatorFactory< GeoSVDCreator > GeoSVDFactory("SVDCreator")
Register the creator.
Belle2::geometry::GeometryTypes
GeometryTypes
Flag indiciating the type of geometry to be used.
Definition: GeometryManager.h:39
Belle2::VXDGeoPlacementPar::getWOffset
double getWOffset() const
get offset to local w position where to place the component
Definition: VXDGeoPlacementPar.h:61
Belle2::SVDSupportRibsPar::getTabLength
double getTabLength() const
get tabLength
Definition: SVDSupportRibsPar.h:177
Belle2::VXDEnvelopePar
The Class for VXD Envelope parameters.
Definition: VXDEnvelopePar.h:31
Belle2::SVDEndmountPar
The Class for SVD Support Rib Endmounts.
Definition: SVDSupportRibsPar.h:103
Belle2::VXDGeoRadiationSensorsPositionPar
The Class for VXD Radiation Sensor Position parameters.
Definition: VXDGeoRadiationSensorsPar.h:36
Belle2::SVDSupportRibsPar::getOuterColor
const std::string & getOuterColor() const
get the name of outer color
Definition: SVDSupportRibsPar.h:185
Belle2::VXDSensorInfoBasePar::getThickness
double getThickness() const
Return the thickness of the sensor.
Definition: VXDSensorInfoBasePar.h:93
Belle2::VXDGeometryPar::getAlignmentMap
std::map< std::string, VXDAlignmentPar > & getAlignmentMap()
get alignmant map
Definition: VXDGeometryPar.h:68
Belle2::SVDGeometryPar::getSupportRibs
const std::map< int, SVDSupportRibsPar > & getSupportRibs() const
get support ribs
Definition: SVDGeometryPar.h:64
Belle2::SVDEndringsPar::getTypes
const std::vector< SVDEndringsTypePar > & getTypes() const
get types (forward/backward)
Definition: SVDEndringsPar.h:103
Belle2::SVDSensorInfoPar
The Class for VXD geometry.
Definition: SVDSensorInfoPar.h:33