Belle II Software development
GeoPXDCreator Class Reference

The creator for the PXD geometry of the Belle II detector. More...

#include <GeoPXDCreator.h>

Inheritance diagram for GeoPXDCreator:
GeoVXDCreator CreatorBase

Public Member Functions

 GeoPXDCreator ()
 Constructor of the GeoPXDCreator class.
 
virtual ~GeoPXDCreator ()
 The destructor of the GeoPXDCreator class.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 The old create member: create the configuration object(s) on the fly and call the geometry creation routine.
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov) override
 Create the configuration objects and save them in the Database.
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, geometry::GeometryTypes type) override
 Create the geometry from the Database.
 
virtual VXD::GeoVXDAssembly createLayerSupport ()
 Create support structure for a PXD Layer.
 
virtual VXD::GeoVXDAssembly createLadderSupport ()
 Create support structure for a PXD Ladder.
 
virtual VXD::GeoVXDAssembly createHalfShellSupport (const PXDGeometryPar &parameters)
 Create support structure for PXD Half Shell, that means everything that does not depend on layer or sensor alignment.
 
virtual VXD::SensorInfoBasecreateSensorInfo (const VXDGeoSensorPar &sensor) override
 Read the sensor definitions from the database.
 
PXDSensorInfoParreadSensorInfo (const GearDir &sensor)
 Read the sensor definitions from the gearbox.
 
virtual VXD::SensitiveDetectorBasecreateSensitiveDetector (VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement) override
 Return a SensitiveDetector implementation for a given sensor.
 
void readHalfShellSupport (const GearDir &support, PXDGeometryPar &pxdGeometryPar)
 Create support structure for VXD Half Shell, that means everything that does not depend on layer or sensor alignment.
 
virtual void setCurrentLayer (int layer, const VXDGeometryPar &parameters)
 Read parameters for given layer and store in m_ladder.
 
G4Transform3D placeLadder (int ladderID, double phi, G4LogicalVolume *volume, const G4Transform3D &placement, const VXDGeometryPar &parameters)
 Place ladder corresponding to the given ladder id into volume setLayer has to be called first to set the correct layer id.
 
G4Transform3D getPosition (const VXDGeoComponent &mother, const VXDGeoComponent &daughter, const VXDGeoPlacement &placement, bool originCenter)
 Return the position where a daughter component is to be placed.
 
G4Transform3D getAlignment (const VXDAlignmentPar &params)
 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.
 
G4VSolid * createTrapezoidal (const std::string &name, double width, double width2, double length, double &height, double angle=0)
 Create a trapezoidal solid.
 
void createDiamonds (const VXDGeoRadiationSensorsPar &params, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume)
 Create diamond radiation sensors.
 
std::vector< VXDGeoPlacementPargetSubComponents (const GearDir &path)
 Return vector of VXDGeoPlacements with all the components defined inside a given path.
 
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.
 
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 readComponent (const std::string &name, GearDir components, VXDGeometryPar &vxdGeometryPar)
 Read parameters for component name from Gearbox into geometry payload.
 
void readSubComponents (const std::vector< VXDGeoPlacementPar > &placements, const GearDir &componentsDir, VXDGeometryPar &vxdGeometryPar)
 Read parameters for all components in placement container from Gearbox into payload.
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 

Protected Attributes

std::string m_prefix
 Prefix to prepend to all volume names.
 
GearDir m_alignment
 GearDir pointing to the alignment parameters.
 
GearDir m_components
 GearDir pointing to the toplevel of the components.
 
std::map< std::string, VXDGeoComponentm_componentCache
 Cache of all previously created components.
 
std::map< std::string, VXDGeoSensorm_sensorMap
 Map containing Information about all defined sensor types.
 
VXDGeoLadder m_ladder
 Parameters of the currently active ladder.
 
std::vector< Simulation::SensitiveDetectorBase * > m_sensitive
 List to all created sensitive detector instances.
 
GeoVXDRadiationSensors m_radiationsensors
 Diamond radiation sensor "sub creator".
 
std::string m_defaultMaterial
 Name of the Material to be used for Air.
 
float m_distanceTolerance {(float)(5 * Unit::um)}
 tolerance for Geant4 steps to be merged to a single step
 
float m_electronTolerance {100}
 tolerance for the energy deposition in electrons to be merged in a single step
 
float m_minimumElectrons {10}
 minimum number of electrons to be deposited by a particle to be saved
 
double m_activeStepSize {5 * Unit::um}
 Stepsize to be used inside active volumes.
 
bool m_activeChips {false}
 Make also chips sensitive.
 
bool m_seeNeutrons {false}
 Make sensitive detectors also see neutrons.
 
bool m_onlyPrimaryTrueHits {false}
 If true only create TrueHits from primary particles and ignore secondaries.
 
bool m_onlyActiveMaterial {false}
 If this is true, only active Materials will be placed for tracking studies.
 
std::vector< G4UserLimits * > m_UserLimits
 Vector of G4UserLimit pointers.
 
std::string m_currentHalfShell {""}
 Current half-shell being processed (need to know ladder parent for hierarchy)
 
std::map< std::string, Belle2::VxdIDm_halfShellVxdIDs
 Used for translation of half-shell name into a VxdID to consistently handle it in hierarchy.
 

Private Member Functions

PXDGeometryPar createConfiguration (const GearDir &param)
 Create a parameter object from the Gearbox XML parameters.
 
void createGeometry (const PXDGeometryPar &parameters, G4LogicalVolume &topVolume, geometry::GeometryTypes type)
 Create the geometry from a parameter object.
 

Private Attributes

std::vector< SensorInfo * > m_SensorInfo
 Vector of points to SensorInfo objects.
 

Detailed Description

The creator for the PXD geometry of the Belle II detector.

Definition at line 27 of file GeoPXDCreator.h.

Constructor & Destructor Documentation

◆ GeoPXDCreator()

GeoPXDCreator ( )
inline

Constructor of the GeoPXDCreator class.

Definition at line 36 of file GeoPXDCreator.h.

36: VXD::GeoVXDCreator("PXD") {};

◆ ~GeoPXDCreator()

~GeoPXDCreator ( )
virtual

The destructor of the GeoPXDCreator class.

Definition at line 50 of file GeoPXDCreator.cc.

51 {
52 for (SensorInfo* sensorInfo : m_SensorInfo) delete sensorInfo;
53 m_SensorInfo.clear();
54 }

Member Function Documentation

◆ create()

virtual void create ( const GearDir & content,
G4LogicalVolume & topVolume,
geometry::GeometryTypes type )
inlineoverridevirtual

The old create member: create the configuration object(s) on the fly and call the geometry creation routine.

Implements CreatorBase.

Definition at line 43 of file GeoPXDCreator.h.

44 {
45 PXDGeometryPar config = createConfiguration(content);
46 createGeometry(config, topVolume, type);
47 }

◆ createConfiguration()

PXDGeometryPar createConfiguration ( const GearDir & param)
private

Create a parameter object from the Gearbox XML parameters.

Definition at line 131 of file GeoPXDCreator.cc.

132 {
133 // Create an empty payload
134 PXDGeometryPar pxdGeometryPar;
135
136 //Read prefix ('SVD' or 'PXD')
137 pxdGeometryPar.setPrefix(m_prefix);
138
139 //Read some global parameters
140 VXDGlobalPar globals((float)content.getDouble("ElectronTolerance", 100),
141 (float)content.getDouble("MinimumElectrons", 10),
142 content.getLength("ActiveStepSize", 0.005),
143 content.getBool("ActiveChips", false),
144 content.getBool("SeeNeutrons", false),
145 content.getBool("OnlyPrimaryTrueHits", false),
146 content.getBool("OnlyActiveMaterial", false),
147 (float)content.getLength("DistanceTolerance", 0.005),
148 content.getString("DefaultMaterial", "Air")
149 );
150 pxdGeometryPar.setGlobalParams(globals);
151
152 //Read envelope parameters
153 GearDir envelopeParams(content, "Envelope/");
154 VXDEnvelopePar envelope(envelopeParams.getString("Name", ""),
155 envelopeParams.getString("Material", "Air"),
156 envelopeParams.getString("Color", ""),
157 envelopeParams.getAngle("minPhi", 0),
158 envelopeParams.getAngle("maxPhi", 2 * M_PI),
159 (envelopeParams.getNodes("InnerPoints/point").size() > 0)
160 );
161
162 for (const GearDir& point : envelopeParams.getNodes("InnerPoints/point")) {
163 pair<double, double> ZXPoint(point.getLength("z"), point.getLength("x"));
164 envelope.getInnerPoints().push_back(ZXPoint);
165 }
166 for (const GearDir& point : envelopeParams.getNodes("OuterPoints/point")) {
167 pair<double, double> ZXPoint(point.getLength("z"), point.getLength("x"));
168 envelope.getOuterPoints().push_back(ZXPoint);
169 }
170 pxdGeometryPar.setEnvelope(envelope);
171
172 // Read alignment for detector m_prefix ('PXD' or 'SVD')
173 string pathAlign = (boost::format("Align[@component='%1%']/") % m_prefix).str();
174 GearDir paramsAlign(GearDir(content, "Alignment/"), pathAlign);
175 if (!paramsAlign) {
176 B2WARNING("Could not find alignment parameters for component " << m_prefix);
177 return pxdGeometryPar;
178 }
179 pxdGeometryPar.getAlignmentMap()[m_prefix] = VXDAlignmentPar(paramsAlign.getLength("du"),
180 paramsAlign.getLength("dv"),
181 paramsAlign.getLength("dw"),
182 paramsAlign.getAngle("alpha"),
183 paramsAlign.getAngle("beta"),
184 paramsAlign.getAngle("gamma")
185 );
186
187 //Read the definition of all sensor types
188 GearDir components(content, "Components/");
189 for (const GearDir& paramsSensor : components.getNodes("Sensor")) {
190 string sensorTypeID = paramsSensor.getString("@type");
191
192 VXDGeoSensorPar sensor(paramsSensor.getString("Material"),
193 paramsSensor.getString("Color", ""),
194 paramsSensor.getLength("width"),
195 paramsSensor.getLength("width2", 0),
196 paramsSensor.getLength("length"),
197 paramsSensor.getLength("height"),
198 paramsSensor.getAngle("angle", 0),
199 paramsSensor.getBool("@slanted", false)
200 );
201 sensor.setActive(VXDGeoComponentPar(
202 paramsSensor.getString("Material"),
203 paramsSensor.getString("Active/Color", "#f00"),
204 paramsSensor.getLength("Active/width"),
205 paramsSensor.getLength("Active/width2", 0),
206 paramsSensor.getLength("Active/length"),
207 paramsSensor.getLength("Active/height")
208 ), VXDGeoPlacementPar(
209 "Active",
210 paramsSensor.getLength("Active/u"),
211 paramsSensor.getLength("Active/v"),
212 paramsSensor.getString("Active/w", "center"),
213 paramsSensor.getLength("Active/woffset", 0)
214 ));
215
216 PXDSensorInfoPar* pxdInfo = readSensorInfo(GearDir(paramsSensor, "Active"));
217 sensor.setSensorInfo(pxdInfo);
218 sensor.setComponents(getSubComponents(paramsSensor));
219 pxdGeometryPar.getSensorMap()[sensorTypeID] = sensor;
220 pxdGeometryPar.getSensorInfos().push_back(pxdInfo);
221 }
222
223 //Build all ladders including Sensors
224 GearDir support(content, "Support/");
225 readHalfShellSupport(support, pxdGeometryPar);
226
227 for (const GearDir& shell : content.getNodes("HalfShell")) {
228
229 string shellName = m_prefix + "." + shell.getString("@name");
230 string pathShell = (boost::format("Align[@component='%1%']/") % shellName).str();
231 GearDir paramsShell(GearDir(content, "Alignment/"), pathShell);
232 if (!paramsShell) {
233 B2WARNING("Could not find alignment parameters for component " << shellName);
234 return pxdGeometryPar;
235 }
236 pxdGeometryPar.getAlignmentMap()[shellName] = VXDAlignmentPar(paramsShell.getLength("du"),
237 paramsShell.getLength("dv"),
238 paramsShell.getLength("dw"),
239 paramsShell.getAngle("alpha"),
240 paramsShell.getAngle("beta"),
241 paramsShell.getAngle("gamma")
242 );
243
244 VXDHalfShellPar halfShell(shell.getString("@name"), shell.getAngle("shellAngle", 0));
245
246 for (const GearDir& layer : shell.getNodes("Layer")) {
247 int layerID = layer.getInt("@id");
248
249 readLadder(layerID, components, pxdGeometryPar);
250
251 //Loop over defined ladders
252 for (const GearDir& ladder : layer.getNodes("Ladder")) {
253 int ladderID = ladder.getInt("@id");
254 double phi = ladder.getAngle("phi", 0);
255 readLadderComponents(layerID, ladderID, content, pxdGeometryPar);
256 halfShell.addLadder(layerID, ladderID, phi);
257 }
258 }
259 pxdGeometryPar.getHalfShells().push_back(halfShell);
260 }
261
262 //Create diamond radiation sensors if defined and in background mode
263 GearDir radiationDir(content, "RadiationSensors");
264 if (pxdGeometryPar.getGlobalParams().getActiveChips() && radiationDir) {
265 VXDGeoRadiationSensorsPar radiationSensors(
266 m_prefix,
267 radiationDir.getBool("insideEnvelope"),
268 radiationDir.getLength("width"),
269 radiationDir.getLength("length"),
270 radiationDir.getLength("height"),
271 radiationDir.getString("material")
272 );
273
274 //Add radiation sensor positions
275 for (GearDir& position : radiationDir.getNodes("position")) {
276 VXDGeoRadiationSensorsPositionPar diamonds(position.getLength("z"),
277 position.getLength("radius"),
278 position.getAngle("theta")
279 );
280
281 //Loop over all phi positions
282 for (GearDir& sensor : position.getNodes("phi")) {
283 //Add sensor with angle and id
284 diamonds.addSensor(sensor.getInt("@id"), sensor.getAngle());
285 }
286 radiationSensors.addPosition(diamonds);
287 }
288 pxdGeometryPar.setRadiationSensors(radiationSensors);
289 }
290
291 return pxdGeometryPar;
292 }

◆ createDiamonds()

void createDiamonds ( const VXDGeoRadiationSensorsPar & params,
G4LogicalVolume & topVolume,
G4LogicalVolume & envelopeVolume )
inherited

Create diamond radiation sensors.

Definition at line 210 of file GeoVXDCreator.cc.

212 {
213 //Set the correct top volume to either global top or detector envelope
214 G4LogicalVolume* top = &topVolume;
215 if (params.getInsideEnvelope()) {
216 top = &envelopeVolume;
217 }
218
219 //shape and material are the same for all sensors so create them now
220 const double width = params.getWidth();
221 const double length = params.getLength();
222 const double height = params.getHeight();
223 G4Box* shape = 0;
224 G4Material* material = geometry::Materials::get(params.getMaterial());
225
226 //Now loop over all positions
227 const std::vector<VXDGeoRadiationSensorsPositionPar>& Positions = params.getPositions();
228 for (const VXDGeoRadiationSensorsPositionPar& position : Positions) {
229 //get the radial and z position
230 const double r = position.getRadius();
231 const double z = position.getZ();
232 const double theta = position.getTheta();
233 //and loop over all phi positions
234 const std::map<int, double>& Sensors = position.getSensors();
235 for (const std::pair<const int, double>& sensor : Sensors) {
236 //for (GearDir& sensor : position.getNodes("phi")) {
237 //we need angle and Id
238 const double phi = sensor.second;
239 const int id = sensor.first;
240 //then we create a nice name
241 const std::string name = params.getSubDetector() + ".DiamondSensor." + std::to_string(id);
242 //and create the sensor volume
243 if (not shape) shape = new G4Box("radiationSensorDiamond", width / 2 * CLHEP::cm, length / 2 * CLHEP::cm, height / 2 * CLHEP::cm);
244 G4LogicalVolume* volume = new G4LogicalVolume(shape, material, name);
245 //add a sensitive detector implementation
246 BkgSensitiveDetector* sensitive = new BkgSensitiveDetector(params.getSubDetector().c_str(), id);
247 volume->SetSensitiveDetector(sensitive);
248 //and place it at the correct position
249 G4Transform3D transform = G4RotateZ3D(phi - M_PI / 2) * G4Translate3D(0, r * CLHEP::cm,
250 z * CLHEP::cm) * G4RotateX3D(-M_PI / 2 - theta);
251 new G4PVPlacement(transform, volume, name, top, false, 1);
252 }
253 }
254 }
std::map< VxdID, Sensor > Sensors
Map of all hits in all Sensors.

◆ createFromDB()

virtual void createFromDB ( const std::string & name,
G4LogicalVolume & topVolume,
geometry::GeometryTypes type )
inlineoverridevirtual

Create the geometry from the Database.

Reimplemented from CreatorBase.

Definition at line 60 of file GeoPXDCreator.h.

61 {
62 DBObjPtr<PXDGeometryPar> dbObj;
63 if (!dbObj) {
64 // Check that we found the object and if not report the problem
65 B2FATAL("No configuration for " << name << " found.");
66 }
67 createGeometry(*dbObj, topVolume, type);
68 }

◆ createGeometry()

void createGeometry ( const PXDGeometryPar & parameters,
G4LogicalVolume & topVolume,
geometry::GeometryTypes type )
private

Create the geometry from a parameter object.

Definition at line 343 of file GeoPXDCreator.cc.

344 {
345
346 m_activeStepSize = parameters.getGlobalParams().getActiveStepSize() / Unit::mm;
347 m_activeChips = parameters.getGlobalParams().getActiveChips();
348 m_seeNeutrons = parameters.getGlobalParams().getSeeNeutrons();
349 m_onlyPrimaryTrueHits = parameters.getGlobalParams().getOnlyPrimaryTrueHits();
350 m_distanceTolerance = parameters.getGlobalParams().getDistanceTolerance();
351 m_electronTolerance = parameters.getGlobalParams().getElectronTolerance();
352 m_minimumElectrons = parameters.getGlobalParams().getMinimumElectrons();
353 m_onlyActiveMaterial = parameters.getGlobalParams().getOnlyActiveMaterial();
354 m_defaultMaterial = parameters.getGlobalParams().getDefaultMaterial();
355
356 G4Material* material = Materials::get(m_defaultMaterial);
357 if (!material) B2FATAL("Default Material of VXD, '" << m_defaultMaterial << "', could not be found");
358
359
360 //Build envelope
361 G4LogicalVolume* envelope(0);
362 G4VPhysicalVolume* physEnvelope{nullptr};
363 if (!parameters.getEnvelope().getExists()) {
364 B2INFO("Could not find definition for " + m_prefix + " Envelope, placing directly in top volume");
365 envelope = &topVolume;
366 } else {
367 double minZ(0), maxZ(0);
368 G4Polycone* envelopeCone = geometry::createRotationSolid("Envelope",
369 parameters.getEnvelope().getInnerPoints(),
370 parameters.getEnvelope().getOuterPoints(),
371 parameters.getEnvelope().getMinPhi(),
372 parameters.getEnvelope().getMaxPhi(),
373 minZ, maxZ
374 );
375 envelope = new G4LogicalVolume(envelopeCone, material, m_prefix + ".Envelope");
376 setVisibility(*envelope, false);
377 physEnvelope = new G4PVPlacement(getAlignment(parameters.getAlignment(m_prefix)), envelope, m_prefix + ".Envelope",
378 &topVolume, false, 1);
379
380 // Set up region for production cuts
381 G4Region* aRegion = new G4Region("PXDEnvelope");
382 envelope->SetRegion(aRegion);
383 aRegion->AddRootLogicalVolume(envelope);
384 }
385
386 //Read the definition of all sensor types
387 for (const pair<const string, VXDGeoSensorPar>& typeAndSensor : parameters.getSensorMap()) {
388 const string& sensorTypeID = typeAndSensor.first;
389 const VXDGeoSensorPar& paramsSensor = typeAndSensor.second;
390 VXDGeoSensor sensor(
391 paramsSensor.getMaterial(),
392 paramsSensor.getColor(),
393 paramsSensor.getWidth() / Unit::mm,
394 paramsSensor.getWidth2() / Unit::mm,
395 paramsSensor.getLength() / Unit::mm,
396 paramsSensor.getHeight() / Unit::mm,
397 paramsSensor.getSlanted()
398 );
399 sensor.setActive(VXDGeoComponent(
400 paramsSensor.getMaterial(),
401 paramsSensor.getActiveArea().getColor(),
402 paramsSensor.getActiveArea().getWidth() / Unit::mm,
403 paramsSensor.getActiveArea().getWidth2() / Unit::mm,
404 paramsSensor.getActiveArea().getLength() / Unit::mm,
405 paramsSensor.getActiveArea().getHeight() / Unit::mm
406 ), VXDGeoPlacement(
407 "Active",
408 paramsSensor.getActivePlacement().getU() / Unit::mm,
409 paramsSensor.getActivePlacement().getV() / Unit::mm,
410 paramsSensor.getActivePlacement().getW(),
411 paramsSensor.getActivePlacement().getWOffset() / Unit::mm
412 ));
413 sensor.setSensorInfo(createSensorInfo(paramsSensor));
414
415 vector<VXDGeoPlacement> subcomponents;
416 const auto& components = paramsSensor.getComponents();
417 subcomponents.reserve(components.size());
418 std::transform(components.begin(), components.end(), std::back_inserter(subcomponents),
419 [](auto const & component) {
420 return VXDGeoPlacement(component.getName(),
421 component.getU() / Unit::mm,
422 component.getV() / Unit::mm,
423 component.getW(),
424 component.getWOffset() / Unit::mm
425 );
426 });
427 sensor.setComponents(subcomponents);
428 m_sensorMap[sensorTypeID] = sensor;
429 }
430
431 //Read the component cache from DB
432 for (const string& name : parameters.getComponentInsertOder()) {
433 if (m_componentCache.find(name) != m_componentCache.end()) {
434 // already created due to being a sub component of a previous
435 // component. Seems fishy since the information of this component
436 // is in the db at least twice so we could run into
437 // inconsistencies.
438 B2WARNING("Component " << name << " already created from previous subcomponents, should not be here");
439 continue;
440 }
441 const VXDGeoComponentPar& paramsComponent = parameters.getComponent(name);
442 VXDGeoComponent c(
443 paramsComponent.getMaterial(),
444 paramsComponent.getColor(),
445 paramsComponent.getWidth() / Unit::mm,
446 paramsComponent.getWidth2() / Unit::mm,
447 paramsComponent.getLength() / Unit::mm,
448 paramsComponent.getHeight() / Unit::mm
449 );
450 double angle = paramsComponent.getAngle();
451
452
453 if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
454 B2DEBUG(100, "One dimension empty, using auto resize for component");
455 } else {
456 G4VSolid* solid = createTrapezoidal(m_prefix + "." + name, c.getWidth(), c.getWidth2(), c.getLength(), c.getHeight(), angle);
457 c.setVolume(new G4LogicalVolume(solid, Materials::get(c.getMaterial()), m_prefix + "." + name));
458 }
459
460 vector<VXDGeoPlacement> subComponents;
461 const auto& paramsSubComponents = paramsComponent.getSubComponents();
462 subComponents.reserve(paramsSubComponents.size());
463 std::transform(paramsSubComponents.begin(), paramsSubComponents.end(), std::back_inserter(subComponents),
464 [](auto const & paramsSubComponent) {
465 return VXDGeoPlacement(paramsSubComponent.getName(),
466 paramsSubComponent.getU() / Unit::mm,
467 paramsSubComponent.getV() / Unit::mm,
468 paramsSubComponent.getW(),
469 paramsSubComponent.getWOffset() / Unit::mm
470 );
471 });
472 createSubComponents(m_prefix + "." + name, c, subComponents);
473 if (m_activeChips && parameters.getSensitiveChipID(name) >= 0) {
474 int chipID = parameters.getSensitiveChipID(name);
475 B2DEBUG(50, "Creating BkgSensitiveDetector for component " << name << " with chipID " << chipID);
476 BkgSensitiveDetector* sensitive = new BkgSensitiveDetector(m_prefix.c_str(), chipID);
477 c.getVolume()->SetSensitiveDetector(sensitive);
478 m_sensitive.push_back(sensitive);
479 }
480
481 m_componentCache[name] = c;
482 }
483
484 //Build all ladders including Sensors
485 VXD::GeoVXDAssembly shellSupport = createHalfShellSupport(parameters);
486
487 //const std::vector<VXDHalfShellPar>& HalfShells = parameters.getHalfShells();
488 for (const VXDHalfShellPar& shell : parameters.getHalfShells()) {
489 string shellName = shell.getName();
490 m_currentHalfShell = m_prefix + "." + shellName;
491 G4Transform3D shellAlignment = getAlignment(parameters.getAlignment(m_currentHalfShell));
492
493 // Remember shell coordinate system (into which ladders are inserted)
494 VXD::GeoCache::getInstance().addHalfShellPlacement(m_halfShellVxdIDs[m_currentHalfShell], shellAlignment);
495
496 //Place shell support
497 double shellAngle = shell.getShellAngle(); // Only used to move support, not active volumes!
498 if (!m_onlyActiveMaterial) shellSupport.place(envelope, shellAlignment * G4RotateZ3D(shellAngle));
499
500 //const std::map< int, std::vector<std::pair<int, double>> >& Layers = shell.getLayers();
501 for (const std::pair<const int, std::vector<std::pair<int, double>> >& layer : shell.getLayers()) {
502 int layerID = layer.first;
503 const std::vector<std::pair<int, double>>& Ladders = layer.second;
504
505
506 setCurrentLayer(layerID, parameters);
507
508 //Place Layer support
509 VXD::GeoVXDAssembly layerSupport = createLayerSupport();
510 if (!m_onlyActiveMaterial) layerSupport.place(envelope, shellAlignment * G4RotateZ3D(shellAngle));
511 VXD::GeoVXDAssembly ladderSupport = createLadderSupport();
512
513 //Loop over defined ladders
514 for (const std::pair<int, double>& ladder : Ladders) {
515 int ladderID = ladder.first;
516 double phi = ladder.second;
517
518 G4Transform3D ladderPlacement = placeLadder(ladderID, phi, envelope, shellAlignment, parameters);
519 if (!m_onlyActiveMaterial) ladderSupport.place(envelope, ladderPlacement);
520 }
521
522 }
523 }
524
525 //Now build cache with all transformations
526 if (physEnvelope) {
527 VXD::GeoCache::getInstance().findVolumes(physEnvelope);
528 } else {
529 //create a temporary placement of the top volume.
530 G4PVPlacement topPlacement(nullptr, G4ThreeVector(0, 0, 0), &topVolume,
531 "temp_Top", nullptr, false, 1, false);
532 //and search for all VXD sensitive sensors within
533 VXD::GeoCache::getInstance().findVolumes(&topPlacement);
534 }
535
536 //Create diamond radiation sensors if defined and in background mode
537 if (m_activeChips) {
538 if (parameters.getRadiationSensors().getSubDetector() == "") {
539 B2DEBUG(10, "Apparently no radiation sensors defined, skipping");
540 } else {
541 createDiamonds(parameters.getRadiationSensors(), topVolume, *envelope);
542 }
543 }
544 }
void setVisibility(G4LogicalVolume &volume, bool visible)
Helper function to quickly set the visibility of a given volume.
Definition utilities.cc:108

◆ createHalfShellSupport()

VXD::GeoVXDAssembly createHalfShellSupport ( const PXDGeometryPar & parameters)
virtual

Create support structure for PXD Half Shell, that means everything that does not depend on layer or sensor alignment.

Parameters
parametersReference to the database containing the parameters

Definition at line 560 of file GeoPXDCreator.cc.

561 {
562 VXD::GeoVXDAssembly supportAssembly;
563
564 if (!parameters.getBuildSupport()) return supportAssembly;
565
566
567 // Create the Endlanges
568 const std::vector<VXDPolyConePar> Endflanges = parameters.getEndflanges();
569 for (const VXDPolyConePar& endflange : Endflanges) {
570
571 double minZ(0), maxZ(0);
572 string name = endflange.getName();
573
574 // Create a polycone
575 double minPhi = endflange.getMinPhi();
576 double dPhi = endflange.getMaxPhi() - minPhi;
577 int nPlanes = endflange.getPlanes().size();
578 if (nPlanes < 2) {
579 B2ERROR("Polycone needs at least two planes");
580 return supportAssembly;
581 }
582 std::vector<double> z(nPlanes, 0);
583 std::vector<double> rMin(nPlanes, 0);
584 std::vector<double> rMax(nPlanes, 0);
585 int index(0);
586 minZ = numeric_limits<double>::infinity();
587 maxZ = -numeric_limits<double>::infinity();
588
589 const std::vector<VXDPolyConePlanePar> Planes = endflange.getPlanes();
590 for (const VXDPolyConePlanePar& plane : Planes) {
591 z[index] = plane.getPosZ() / Unit::mm;
592 minZ = min(minZ, z[index]);
593 maxZ = max(maxZ, z[index]);
594 rMin[index] = plane.getInnerRadius() / Unit::mm;
595 rMax[index] = plane.getOuterRadius() / Unit::mm;
596 ++index;
597 }
598
599 G4VSolid* supportCone = new G4Polycone(name, minPhi, dPhi, nPlanes, z.data(), rMin.data(), rMax.data());
600
601
602 //Cutout boxes to make place for modules
603
604 //We have the z dimensions of the polycon. Let's
605 //add 1mm on each side to make sure we don't run into problems when the
606 //surfaces match
607 minZ -= 1. / Unit::mm;
608 maxZ += 1. / Unit::mm;
609
610
611 //Now get the number of cutouts and their size/position/angle
612 int nCutouts = parameters.getNCutOuts();
613 double sizeX = parameters.getCutOutWidth() / Unit::mm / 2.;
614 double sizeY = parameters.getCutOutHeight() / Unit::mm / 2.;
615 double sizeZ = (maxZ - minZ) / 2.;
616 G4ThreeVector origin(
617 parameters.getCutOutShift() / Unit::mm,
618 parameters.getCutOutRPhi() / Unit::mm,
619 minZ + sizeZ
620 );
621
622 double phi0 = parameters.getCutOutStartPhi();
623 double dphi = parameters.getCutOutDeltaPhi();
624 for (int i = 0; i < nCutouts; ++i) {
625 G4Box* box = new G4Box("Cutout", sizeX, sizeY, sizeZ);
626 G4Transform3D placement = G4RotateZ3D(phi0 + i * dphi) * G4Translate3D(origin);
627 G4VSolid* supportConeOld = supportCone;
628 supportCone = new G4SubtractionSolid("PXD Support endflange", supportConeOld, box, placement);
629 }
630
631
632 string materialName = endflange.getMaterial();
633 G4Material* material = geometry::Materials::get(materialName);
634 if (!material) B2FATAL("Material '" << materialName << "', required by PXD component " << name << ", could not be found");
635
636 G4LogicalVolume* volume = new G4LogicalVolume(supportCone, material, name);
637 geometry::setColor(*volume, "#ccc4");
638 supportAssembly.add(volume);
639
640 }
641
642
643 //Create Carbon cooling tubes
644 {
645 int nTubes = parameters.getNTubes();
646 double minZ = parameters.getTubesMinZ() / Unit::mm;
647 double maxZ = parameters.getTubesMaxZ() / Unit::mm;
648 double minR = parameters.getTubesMinR() / Unit::mm;
649 double maxR = parameters.getTubesMaxR() / Unit::mm;
650 double sizeZ = (maxZ - minZ) / 2.;
651 double shiftX = parameters.getTubesRPhi() / Unit::mm;
652 double shiftY = 0;
653 double shiftZ = minZ + sizeZ;
654 double phi0 = parameters.getTubesStartPhi();
655 double dphi = parameters.getTubesDeltaPhi();
656 string material = parameters.getTubesMaterial();
657
658 G4Tubs* tube = new G4Tubs("CarbonTube", minR, maxR, sizeZ, 0, 2 * M_PI);
659 G4LogicalVolume* tubeVol = new G4LogicalVolume(tube, geometry::Materials::get(material), "CarbonTube");
660 geometry::setColor(*tubeVol, "#000");
661 for (int i = 0; i < nTubes; ++i) {
662 G4Transform3D placement = G4RotateZ3D(phi0 + i * dphi) * G4Translate3D(shiftX, shiftY, shiftZ);
663 supportAssembly.add(tubeVol, placement);
664 }
665 }
666
667 return supportAssembly;
668 }

◆ createLadderSupport()

VXD::GeoVXDAssembly createLadderSupport ( )
virtual

Create support structure for a PXD Ladder.

Definition at line 558 of file GeoPXDCreator.cc.

558{ return VXD::GeoVXDAssembly(); }

◆ createLayerSupport()

VXD::GeoVXDAssembly createLayerSupport ( )
virtual

Create support structure for a PXD Layer.

Definition at line 556 of file GeoPXDCreator.cc.

556{ return VXD::GeoVXDAssembly(); }

◆ createPayloads()

virtual void createPayloads ( const GearDir & content,
const IntervalOfValidity & iov )
inlineoverridevirtual

Create the configuration objects and save them in the Database.

If more than one object is needed adjust accordingly

Reimplemented from CreatorBase.

Definition at line 51 of file GeoPXDCreator.h.

52 {
53 DBImportObjPtr<PXDGeometryPar> importObj;
54 PXDGeometryPar config = createConfiguration(content);
55 importObj.construct(config);
56 importObj.import(iov);
57 }

◆ createSensitiveDetector()

VXD::SensitiveDetectorBase * createSensitiveDetector ( VxdID sensorID,
const VXDGeoSensor & sensor,
const VXDGeoSensorPlacement & placement )
overridevirtual

Return a SensitiveDetector implementation for a given sensor.

Parameters
sensorIDSensorID for the sensor
sensorInformation about the sensor to create the Sensitive Detector for
placementInformation on how to place the sensor

Implements GeoVXDCreator.

Definition at line 546 of file GeoPXDCreator.cc.

548 {
549 SensorInfo* sensorInfo = new SensorInfo(dynamic_cast<const SensorInfo&>(*sensor.getSensorInfo()));
550 sensorInfo->setID(sensorID);
551 if (placement.getFlipV()) sensorInfo->flipVSegmentation();
552 SensitiveDetector* sensitive = new SensitiveDetector(sensorInfo);
553 return sensitive;
554 }
VXD::SensitiveDetector< PXDSimHit, PXDTrueHit > SensitiveDetector
The PXD Sensitive Detector class.

◆ createSensorInfo()

VXD::SensorInfoBase * createSensorInfo ( const VXDGeoSensorPar & sensor)
overridevirtual

Read the sensor definitions from the database.

Parameters
sensorReference to the database containing the parameters

Implements GeoVXDCreator.

Definition at line 56 of file GeoPXDCreator.cc.

57 {
58
59 const PXDSensorInfoPar& infoPar = dynamic_cast<const PXDSensorInfoPar&>(*sensor.getSensorInfo());
60
61 SensorInfo* info = new SensorInfo(
62 VxdID(0, 0, 0),
63 infoPar.getWidth(),
64 infoPar.getLength(),
65 infoPar.getThickness(),
66 infoPar.getUCells(),
67 infoPar.getVCells1(),
68 infoPar.getSplitLength(),
69 infoPar.getVCells2()
70 );
71 info->setDEPFETParams(
72 infoPar.getBulkDoping() / (Unit::um * Unit::um * Unit::um),
73 infoPar.getBackVoltage(),
74 infoPar.getTopVoltage(),
75 infoPar.getSourceBorderSmallPitch(),
76 infoPar.getClearBorderSmallPitch(),
77 infoPar.getDrainBorderSmallPitch(),
78 infoPar.getSourceBorderLargePitch(),
79 infoPar.getClearBorderLargePitch(),
80 infoPar.getDrainBorderLargePitch(),
81 infoPar.getGateDepth(),
82 infoPar.getDoublePixel(),
83 infoPar.getChargeThreshold(),
84 infoPar.getNoiseFraction()
85 );
86 info->setIntegrationWindow(
87 infoPar.getIntegrationStart(),
88 infoPar.getIntegrationEnd()
89 );
90
91 m_SensorInfo.push_back(info);
92 return info;
93 }

◆ createSubComponents()

GeoVXDAssembly createSubComponents ( const std::string & name,
VXDGeoComponent & component,
std::vector< VXDGeoPlacement > placements,
bool originCenter = true,
bool allowOutside = false )
inherited

Place a list of subcomponents into an component.

If the volume of the given component is NULL, a new container will be created to fit all subcomponents. It will have air as medium. If at least one subcomponent with this placement is found the whole component is wrapped in a container volume with Air medium which extends above and below to fit the subcomponents

Parameters
nameName for the potential new volume or as prefix for the container to extend the component
componentComponent to fit the subcomponents into
placementsPlacement information for all subcomponents
originCenterbool
allowOutsidebool
Returns
offset in w which was applied to the component when extending it

Definition at line 75 of file GeoVXDCreator.cc.

77 {
78 GeoVXDAssembly assembly;
79 B2DEBUG(100, "Creating component " << name);
80 vector<VXDGeoComponent> subComponents;
81 subComponents.reserve(placements.size());
82 //Go over all subcomponents and check if they will fit inside.
83 //If component.volume is zero we will create one so sum up needed space
84 bool widthResize = component.getWidth() <= 0;
85 bool lengthResize = component.getLength() <= 0;
86 bool heightResize = component.getHeight() <= 0;
87
88 for (VXDGeoPlacement& p : placements) {
89 //Test component already exists
90 if (m_componentCache.find(p.getName()) == m_componentCache.end()) {
91 B2FATAL("A component is requested that was not created before!");
92 }
93 VXDGeoComponent sub = m_componentCache[p.getName()];
94
95 B2DEBUG(100, "SubComponent " << p.getName());
96 B2DEBUG(100, boost::format("Placement: u:%1% cm, v:%2% cm, w:%3% + %4% cm") % p.getU() % p.getV() % p.getW() % p.getWOffset());
97 B2DEBUG(100, boost::format("Dimensions: %1%x%2%x%3% cm") % sub.getWidth() % sub.getLength() % sub.getHeight());
98
99 if (p.getW() == VXDGeoPlacement::c_above || p.getW() == VXDGeoPlacement::c_below) {
100 //Below placement only valid if we are allowed to create a container around component
101 if (!allowOutside) B2FATAL("Cannot place component " << p.getName() << " outside of component " << name);
102 } else if (sub.getHeight() + p.getWOffset() > component.getHeight()) {
103 //Component will not fit heightwise. If we resize the volume anyway than we don't have problems
104 if (!heightResize) {
105 B2FATAL("Subcomponent " << p.getName() << " does not fit into volume: "
106 << "height " << sub.getHeight() << " > " << component.getHeight());
107 }
108 component.getHeight() = sub.getHeight() + p.getWOffset();
109 }
110
111 //Check if component will fit inside width,length. If we can resize do it if needed, otherwise bail
112 double minWidth = max(abs(p.getU() + sub.getWidth() / 2.0), abs(p.getU() - sub.getWidth() / 2.0));
113 double minLength = max(abs(p.getV() + sub.getLength() / 2.0), abs(p.getV() - sub.getLength() / 2.0));
114 if (minWidth > component.getWidth() + component.getWidth() * numeric_limits<double>::epsilon()) {
115 if (!widthResize) {
116 B2FATAL("Subcomponent " << p.getName() << " does not fit into volume: "
117 << "minWidth " << minWidth << " > " << component.getWidth());
118 }
119 component.setWidth(minWidth * 2.0);
120 }
121 if (minLength > component.getLength() + component.getLength() * numeric_limits<double>::epsilon()) {
122 if (!lengthResize) {
123 B2FATAL("Subcomponent " << p.getName() << " does not fit into volume: "
124 << "minLength " << minLength << " > " << component.getLength());
125 }
126 component.setLength(minLength * 2.0);
127 }
128 subComponents.push_back(sub);
129 }
130
131 //zero dimensions are fine mathematically but we don't want them in the simulation
132 if (component.getWidth() <= 0 || component.getLength() <= 0 || component.getHeight() <= 0) {
133 B2FATAL("At least one dimension of component " << name << " is zero which does not make sense");
134 }
135
136 //No volume yet, create a new one automatically assuming air material
137 if (!component.getVolume()) {
138 G4VSolid* componentShape = createTrapezoidal(name, component.getWidth(), component.getWidth2(), component.getLength(),
139 component.getHeight());
140 component.setVolume(new G4LogicalVolume(componentShape, Materials::get(component.getMaterial()), name));
141 }
142
143 B2DEBUG(100, boost::format("Component %1% dimensions: %2%x%3%x%4% cm") % name % component.getWidth() % component.getLength() %
144 component.getHeight());
145
146 //Ok, all volumes set up, now add them together
147 for (size_t i = 0; i < placements.size(); ++i) {
148 VXDGeoPlacement& p = placements[i];
149 VXDGeoComponent& s = subComponents[i];
150
151 G4Transform3D transform = getPosition(component, s, p, originCenter);
152 if (p.getW() == VXDGeoPlacement::c_below || p.getW() == VXDGeoPlacement::c_above) {
153 //Add to selected mother (either component or container around component
154 assembly.add(s.getVolume(), transform);
155 } else {
156 new G4PVPlacement(transform, s.getVolume(), name + "." + p.getName(), component.getVolume(), false, i);
157 }
158 }
159
160 //Set some visibility options for volume. Done here because all components including sensor go through here
161 if (component.getColor().empty()) {
162 B2DEBUG(200, "Component " << name << " is an Air volume, setting invisible");
163 setVisibility(*component.getVolume(), false);
164 } else {
165 B2DEBUG(200, "Component " << name << " color: " << component.getColor());
166 setColor(*component.getVolume(), component.getColor());
167 }
168 B2DEBUG(100, "--> Created component " << name);
169 //Return the difference in W between the origin of the original component and the including container
170 return assembly;
171 }
ExpRunEvt getPosition(const std::vector< Evt > &events, double tEdge)
Get the exp-run-evt number from the event time [hours].
Definition Splitter.h:341
void setColor(G4LogicalVolume &volume, const std::string &color)
Set the color of a logical volume.
Definition utilities.cc:100

◆ createTrapezoidal()

G4VSolid * createTrapezoidal ( const std::string & name,
double width,
double width2,
double length,
double & height,
double angle = 0 )
inherited

Create a trapezoidal solid.

Parameters
namename of the Geant4 solid
widthfull forward width of the shape in mm
width2full backward width of the shape in mm
lengthlength of the shape in mm
[height]height of the shape in mm. If angle is not 0 this value might be changed if the actual height will be smaller due to the slanted edges
angleangle of the sides along w with respect to to the uv plane. 0 means normal box shaped, !=0 means the upper endcap of the solid will be smaller since all edges will be slanted by angle
Returns
A G4VShape which could be a G4Box, a G4Trd or a G4Trap depending on the parameters

Definition at line 256 of file GeoVXDCreator.cc.

258 {
259 double offset(0);
260 if (angle > 0) {
261 const double tana = tan(angle);
262 height = min(tana * length, min(tana * width, height));
263 offset = height / tana;
264 }
265 const double hwidth = width / 2.0;
266 const double hwidth2 = width2 / 2.0;
267 const double hlength = length / 2.0;
268 const double hheight = height / 2.0;
269
270 if (width2 <= 0 || width == width2) {
271 if (angle <= 0) {
272 return new G4Box(name, hwidth, hlength, hheight);
273 } else {
274 return new G4Trd(name, hwidth, hwidth - offset, hlength, hlength - offset, hheight);
275 }
276 }
277 //FIXME: offset not working, g4 complains about nonplanarity of face -X. But we do not need that shape at the moment
278 //so lets ignore it for now
279 return new G4Trap(name, hheight, 0, 0, hlength, hwidth, hwidth2, 0, hlength - offset, hwidth - offset, hwidth2 - offset, 0);
280 }

◆ getAlignment()

G4Transform3D getAlignment ( const VXDAlignmentPar & params)
inherited

Get Alignment from paylead object.

Parameters
paramsPayload object
Returns
Transformation matrix for component

Definition at line 173 of file GeoVXDCreator.cc.

174 {
175 G4RotationMatrix rotation(params.getAlpha(), params.getBeta(), params.getGamma());
176 G4ThreeVector translation(params.getDU() / Unit::mm, params.getDV() / Unit::mm, params.getDW() / Unit::mm);
177 return G4Transform3D(rotation, translation);
178 }

◆ getPosition()

G4Transform3D getPosition ( const VXDGeoComponent & mother,
const VXDGeoComponent & daughter,
const VXDGeoPlacement & placement,
bool originCenter )
inherited

Return the position where a daughter component is to be placed.

Parameters
motherMother component
daughterDaughter component
placementVXDGeoPlacement
originCenterbool
Returns
Transformation matrix to place the daughter relative to the origin to the mother

Definition at line 180 of file GeoVXDCreator.cc.

182 {
183 double u(placement.getU()), v(placement.getV()), w(0);
184 switch (placement.getW()) {
185 case VXDGeoPlacement::c_below: //Place below component
186 w = - mother.getHeight() / 2.0 - daughter.getHeight() / 2.0;
187 break;
188 case VXDGeoPlacement::c_bottom: //Place inside, at bottom of component
189 w = - mother.getHeight() / 2.0 + daughter.getHeight() / 2.0;
190 break;
191 case VXDGeoPlacement::c_center: //Place inside, centered
192 w = 0;
193 break;
194 case VXDGeoPlacement::c_top: //Place inside, at top of mother
195 w = mother.getHeight() / 2.0 - daughter.getHeight() / 2.0;
196 break;
197 case VXDGeoPlacement::c_above: //Place above mother
198 w = mother.getHeight() / 2.0 + daughter.getHeight() / 2.0;
199 break;
200 }
201 if (!originCenter) { //Sensor has coordinate origin in the corner, all submothers at their center
202 u -= mother.getWidth() / 2.0;
203 v -= mother.getLength() / 2.0;
204 }
205 return G4Translate3D(u, v, w + placement.getWOffset());
206 }

◆ getSubComponents()

std::vector< VXDGeoPlacementPar > getSubComponents ( const GearDir & path)
inherited

Return vector of VXDGeoPlacements with all the components defined inside a given path.

Definition at line 607 of file GeoVXDCreator.cc.

608 {
609 vector<VXDGeoPlacementPar> result;
610 for (const GearDir& component : path.getNodes("Component")) {
611 string type;
612 if (!component.exists("@type")) {
613 type = component.getString("@name");
614 } else {
615 type = component.getString("@type");
616 }
617 int nPos = max(component.getNumberNodes("u"), component.getNumberNodes("v"));
618 nPos = max(nPos, component.getNumberNodes("w"));
619 nPos = max(nPos, component.getNumberNodes("woffset"));
620 for (int iPos = 1; iPos <= nPos; ++iPos) {
621 string index = (boost::format("[%1%]") % iPos).str();
622 result.push_back(VXDGeoPlacementPar(
623 type,
624 component.getLength("u" + index, 0),
625 component.getLength("v" + index, 0),
626 component.getString("w" + index, "bottom"),
627 component.getLength("woffset" + index, 0)
628 ));
629 }
630 }
631 return result;
632 }

◆ placeLadder()

G4Transform3D placeLadder ( int ladderID,
double phi,
G4LogicalVolume * volume,
const G4Transform3D & placement,
const VXDGeometryPar & parameters )
inherited

Place ladder corresponding to the given ladder id into volume setLayer has to be called first to set the correct layer id.

Definition at line 282 of file GeoVXDCreator.cc.

285 {
286 VxdID ladder(m_ladder.getLayerID(), ladderID, 0);
287
288 G4Translate3D ladderPos(m_ladder.getRadius(), m_ladder.getShift(), 0);
289 G4Transform3D ladderPlacement = placement * G4RotateZ3D(phi) * ladderPos * getAlignment(parameters.getAlignment(ladder));
290 // The actual coordinate system of ladder (w still points to Z, there is only phi rotation + move to correct radius + shift)
291 VXD::GeoCache::getInstance().addLadderPlacement(m_halfShellVxdIDs[m_currentHalfShell], ladder, ladderPlacement);
292
293
294 vector<G4Point3D> lastSensorEdge;
295 for (const VXDGeoSensorPlacement& p : m_ladder.getSensors()) {
296 VxdID sensorID(ladder);
297 sensorID.setSensorNumber(p.getSensorID());
298
299
300 std::map<string, VXDGeoSensor>::iterator it = m_sensorMap.find(p.getSensorTypeID());
301 if (it == m_sensorMap.end()) {
302 B2FATAL("Invalid SensorTypeID " << p.getSensorTypeID() << ", please check the definition of " << sensorID);
303 }
304 VXDGeoSensor& s = it->second;
305 string name = m_prefix + "." + (string)sensorID;
306
307 //Calculate the reflection transformation needed. Since we want the
308 //active area to be non reflected we apply this transformation on the
309 //sensor and on the active area
310 G4Transform3D reflection;
311 if (p.getFlipU()) reflection = reflection * G4ReflectX3D();
312 if (p.getFlipV()) reflection = reflection * G4ReflectY3D();
313 if (p.getFlipW()) reflection = reflection * G4ReflectZ3D();
314
315 G4VSolid* sensorShape = createTrapezoidal(name, s.getWidth(), s.getWidth2(), s.getLength(),
316 s.getHeight());
317 G4Material* sensorMaterial = Materials::get(s.getMaterial());
318 if (m_onlyActiveMaterial) {
319 s.setVolume(new G4LogicalVolume(sensorShape, Materials::get(m_defaultMaterial), name));
320 } else {
321 s.setVolume(new G4LogicalVolume(sensorShape, sensorMaterial, name));
322 }
323
324 // Create sensitive Area: this Part is created separately since we want full control over the coordinate system:
325 // local x (called u) should point in RPhi direction
326 // local y (called v) should point in global z
327 // local z (called w) should away from the origin
328 G4VSolid* activeShape = createTrapezoidal(name + ".Active", s.getActiveArea().getWidth(), s.getActiveArea().getWidth2(),
329 s.getActiveArea().getLength(), s.getActiveArea().getHeight());
330
331 //Create appropriate sensitive detector instance
332 SensitiveDetectorBase* sensitive = createSensitiveDetector(sensorID, s, p);
333
334 sensitive->setOptions(m_seeNeutrons, m_onlyPrimaryTrueHits,
335 m_distanceTolerance, m_electronTolerance, m_minimumElectrons);
336 m_sensitive.push_back(sensitive);
337 G4LogicalVolume* active = new G4LogicalVolume(activeShape, sensorMaterial, name + ".Active",
338 0, sensitive);
339 m_UserLimits.push_back(new G4UserLimits(m_activeStepSize));
340 active->SetUserLimits(m_UserLimits.back());
341
342 setColor(*active, s.getActiveArea().getColor());
343
344 //The coordinates of the active region are given as the distance between the corners, not to the center
345 //Place the active area
346 G4Transform3D activePosition = G4Translate3D(s.getActiveArea().getWidth() / 2.0, s.getActiveArea().getLength() / 2.0, 0) *
347 getPosition(s, s.getActiveArea(), s.getActivePlacement(), false);
348
349 G4ReflectionFactory::Instance()->Place(activePosition * reflection, name + ".Active", active, s.getVolume(),
350 false, (int)sensorID, false);
351
352 //Now create all the other components and place the Sensor
353 GeoVXDAssembly assembly;
354 if (!m_onlyActiveMaterial) assembly = createSubComponents(name, s, s.getComponents(), false, true);
355
356 G4RotationMatrix rotation(0, -M_PI / 2.0, -M_PI / 2.0);
357 G4Transform3D sensorAlign = getAlignment(parameters.getAlignment(sensorID));
358 G4Transform3D sensorPlacement = G4Rotate3D(rotation) * sensorAlign * reflection;
359
360 if (s.getSlanted()) {
361 sensorPlacement = G4TranslateX3D(m_ladder.getSlantedRadius() - m_ladder.getRadius()) * G4RotateY3D(
362 -m_ladder.getSlantedAngle()) * sensorPlacement;
363 }
364 sensorPlacement = G4Translate3D(0.0, 0.0, p.getZ()) * sensorPlacement;
365 // Remember the placement of sensor into ladder
366 VXD::GeoCache::getInstance().addSensorPlacement(ladder, sensorID, sensorPlacement * activePosition * reflection);
367 sensorPlacement = ladderPlacement * sensorPlacement;
368
369 assembly.add(s.getVolume());
370 assembly.place(volume, sensorPlacement);
371
372 //See if we want to glue the modules together
373 if (!m_ladder.getGlueMaterial().empty() && !m_onlyActiveMaterial) {
374 double u = s.getWidth() / 2.0 + m_ladder.getGlueSize();
375 double v = s.getLength() / 2.0;
376 double w = s.getHeight() / 2.0 + m_ladder.getGlueSize();
377 std::vector<G4Point3D> curSensorEdge(4);
378 //Lets get the forward corners of the sensor by applying the unreflected placement matrix
379 curSensorEdge[0] = sensorPlacement * reflection * G4Point3D(u, v, + w);
380 curSensorEdge[1] = sensorPlacement * reflection * G4Point3D(u, v, - w);
381 curSensorEdge[2] = sensorPlacement * reflection * G4Point3D(-u, v, - w);
382 curSensorEdge[3] = sensorPlacement * reflection * G4Point3D(-u, v, + w);
383 //If we already have backward edges this is not the first module so we can apply the glue
384 if (lastSensorEdge.size()) {
385 //Check that the modules don't overlap in z
386 bool glueOK = true;
387 for (int i = 0; i < 4; ++i) glueOK &= curSensorEdge[i].z() <= lastSensorEdge[i].z();
388 if (!glueOK) {
389 B2WARNING("Cannot place Glue at sensor " + (string)sensorID +
390 " since it overlaps with the last module in z");
391 } else {
392 //Create Glue which spans from last sensor to this sensor
393 G4TessellatedSolid* solidTarget = new G4TessellatedSolid(m_prefix + ".Glue." + (string)sensorID);
394
395 //Face at end of last Sensor
396 solidTarget->AddFacet(new G4QuadrangularFacet(
397 curSensorEdge[3], curSensorEdge[2], curSensorEdge[1], curSensorEdge[0], ABSOLUTE));
398 //Face at begin of current Sensor
399 solidTarget->AddFacet(new G4QuadrangularFacet(
400 lastSensorEdge[0], lastSensorEdge[1], lastSensorEdge[2], lastSensorEdge[3], ABSOLUTE));
401
402 //Top faces
403 solidTarget->AddFacet(new G4TriangularFacet(
404 curSensorEdge[3], curSensorEdge[0], lastSensorEdge[0], ABSOLUTE));
405 solidTarget->AddFacet(new G4TriangularFacet(
406 lastSensorEdge[0], lastSensorEdge[3], curSensorEdge[3], ABSOLUTE));
407 //Bottom faces
408 solidTarget->AddFacet(new G4TriangularFacet(
409 curSensorEdge[1], curSensorEdge[2], lastSensorEdge[2], ABSOLUTE));
410 solidTarget->AddFacet(new G4TriangularFacet(
411 lastSensorEdge[2], lastSensorEdge[1], curSensorEdge[1], ABSOLUTE));
412 //Right faces
413 solidTarget->AddFacet(new G4TriangularFacet(
414 curSensorEdge[0], curSensorEdge[1], lastSensorEdge[1], ABSOLUTE));
415 solidTarget->AddFacet(new G4TriangularFacet(
416 lastSensorEdge[1], lastSensorEdge[0], curSensorEdge[0], ABSOLUTE));
417 //Left faces
418 solidTarget->AddFacet(new G4TriangularFacet(
419 curSensorEdge[2], curSensorEdge[3], lastSensorEdge[3], ABSOLUTE));
420 solidTarget->AddFacet(new G4TriangularFacet(
421 lastSensorEdge[3], lastSensorEdge[2], curSensorEdge[2], ABSOLUTE));
422
423 solidTarget->SetSolidClosed(true);
424
425 G4LogicalVolume* glue = new G4LogicalVolume(solidTarget, Materials::get(m_ladder.getGlueMaterial()),
426 m_prefix + ".Glue." + (string)sensorID);
427 setColor(*glue, "#097");
428 new G4PVPlacement(G4Transform3D(), glue, m_prefix + ".Glue." + (string)sensorID, volume, false, 1);
429 }
430 }
431 //Remember the backward edge of this sensor to be glued to.
432 lastSensorEdge.resize(4);
433 lastSensorEdge[0] = sensorPlacement * reflection * G4Point3D(u, -v, + w);
434 lastSensorEdge[1] = sensorPlacement * reflection * G4Point3D(u, -v, - w);
435 lastSensorEdge[2] = sensorPlacement * reflection * G4Point3D(-u, -v, - w);
436 lastSensorEdge[3] = sensorPlacement * reflection * G4Point3D(-u, -v, + w);
437 }
438 }
439
440 return ladderPlacement;
441 }

◆ readComponent()

void readComponent ( const std::string & name,
GearDir components,
VXDGeometryPar & vxdGeometryPar )
inherited

Read parameters for component name from Gearbox into geometry payload.

The name is assumed to be unique and Volumes are cached.

Parameters
nameName of the component
componentsPath to components
vxdGeometryParVXD geometry parameters

Definition at line 534 of file GeoVXDCreator.cc.

535 {
536
537
538 //Check if component already exists
539 if (vxdGeometryPar.getComponentMap().find(name) != vxdGeometryPar.getComponentMap().end()) {
540 return; // nothing to do
541 }
542
543 //Component does not exist, so lets create a new one
544 string path = (boost::format("descendant::Component[@name='%1%']/") % name).str();
545 GearDir params(componentsDir, path);
546 if (!params) {
547 B2FATAL("Could not find definition for component " << name);
548 return;
549 }
550
551 VXDGeoComponentPar c(
552 params.getString("Material", vxdGeometryPar.getGlobalParams().getDefaultMaterial()),
553 params.getString("Color", ""),
554 params.getLength("width", 0),
555 params.getLength("width2", 0),
556 params.getLength("length", 0),
557 params.getLength("height", 0),
558 params.getAngle("angle", 0)
559 );
560
561 if (c.getWidth() <= 0 || c.getLength() <= 0 || c.getHeight() <= 0) {
562 B2DEBUG(100, "One dimension empty, using auto resize for component");
563 }
564
565 c.setSubComponents(getSubComponents(params));
566 readSubComponents(c.getSubComponents(), componentsDir, vxdGeometryPar);
567
568 if (vxdGeometryPar.getGlobalParams().getActiveChips() && params.exists("activeChipID")) {
569 int chipID = params.getInt("activeChipID");
570 vxdGeometryPar.getSensitiveChipIdMap()[name] = chipID;
571 }
572 vxdGeometryPar.getComponentMap()[name] = c;
573 vxdGeometryPar.getComponentInsertOder().push_back(name);
574 }

◆ readHalfShellSupport()

void readHalfShellSupport ( const GearDir & support,
PXDGeometryPar & pxdGeometryPar )

Create support structure for VXD Half Shell, that means everything that does not depend on layer or sensor alignment.

Parameters
supportReference to the database containing the parameters
pxdGeometryParPXD geometry

Definition at line 294 of file GeoPXDCreator.cc.

295 {
296 for (const GearDir& endflange : support.getNodes("Endflange")) {
297 VXDPolyConePar endflangePar(
298 endflange.getString("@name"),
299 endflange.getString("Material", "Air"),
300 endflange.getAngle("minPhi", 0),
301 endflange.getAngle("maxPhi", 2 * M_PI),
302 (endflange.getNodes("Cutout").size() > 0),
303 endflange.getLength("Cutout/width1", 0.),
304 endflange.getLength("Cutout/width2", 0.),
305 endflange.getLength("Cutout/height", 0.),
306 endflange.getLength("Cutout/depth", 0.)
307 );
308
309 for (const GearDir& plane : endflange.getNodes("Plane")) {
310 VXDPolyConePlanePar planePar(
311 plane.getLength("posZ"),
312 plane.getLength("innerRadius"),
313 plane.getLength("outerRadius")
314 );
315 endflangePar.getPlanes().push_back(planePar);
316 }
317 pxdGeometryPar.getEndflanges().push_back(endflangePar);
318 }
319
320 // Cout outs for endflanges
321 pxdGeometryPar.setNCutOuts(support.getInt("Cutout/count"));
322 pxdGeometryPar.setCutOutWidth(support.getLength("Cutout/width"));
323 pxdGeometryPar.setCutOutHeight(support.getLength("Cutout/height"));
324 pxdGeometryPar.setCutOutShift(support.getLength("Cutout/shift"));
325 pxdGeometryPar.setCutOutRPhi(support.getLength("Cutout/rphi"));
326 pxdGeometryPar.setCutOutStartPhi(support.getAngle("Cutout/startPhi"));
327 pxdGeometryPar.setCutOutDeltaPhi(support.getAngle("Cutout/deltaPhi"));
328
329 //Create Carbon cooling tubes
330 pxdGeometryPar.setNTubes(support.getInt("CarbonTubes/count"));
331 pxdGeometryPar.setTubesMinZ(support.getLength("CarbonTubes/minZ"));
332 pxdGeometryPar.setTubesMaxZ(support.getLength("CarbonTubes/maxZ"));
333 pxdGeometryPar.setTubesMinR(support.getLength("CarbonTubes/innerRadius"));
334 pxdGeometryPar.setTubesMaxR(support.getLength("CarbonTubes/outerRadius"));
335 pxdGeometryPar.setTubesRPhi(support.getLength("CarbonTubes/rphi"));
336 pxdGeometryPar.setTubesStartPhi(support.getAngle("CarbonTubes/startPhi"));
337 pxdGeometryPar.setTubesDeltaPhi(support.getAngle("CarbonTubes/deltaPhi"));
338 pxdGeometryPar.setTubesMaterial(support.getString("CarbonTubes/Material", "Carbon"));
339
340 return;
341 }

◆ readLadder()

void readLadder ( int layer,
GearDir components,
VXDGeometryPar & geoparameters )
virtualinherited

Read parameters for a ladder in layer with given ID from gearbox and layer store them in payload.

Definition at line 576 of file GeoVXDCreator.cc.

577 {
578 string path = (boost::format("Ladder[@layer=%1%]/") % layer).str();
579 GearDir paramsLadder(components, path);
580 if (!paramsLadder) {
581 B2FATAL("Could not find Ladder definition for layer " << layer);
582 }
583
584 geoparameters.getLadderMap()[layer] = VXDGeoLadderPar(
585 layer,
586 paramsLadder.getLength("shift"),
587 paramsLadder.getLength("radius"),
588 paramsLadder.getAngle("slantedAngle", 0),
589 paramsLadder.getLength("slantedRadius", 0),
590 paramsLadder.getLength("Glue/oversize", 0),
591 paramsLadder.getString("Glue/Material", "")
592 );
593
594 for (const GearDir& sensorInfo : paramsLadder.getNodes("Sensor")) {
595
596 geoparameters.getLadderMap()[layer].addSensor(VXDGeoSensorPlacementPar(
597 sensorInfo.getInt("@id"),
598 sensorInfo.getString("@type"),
599 sensorInfo.getLength("."),
600 sensorInfo.getBool("@flipU", false),
601 sensorInfo.getBool("@flipV", false),
602 sensorInfo.getBool("@flipW", false)
603 ));
604 }
605 }

◆ readLadderComponents()

void readLadderComponents ( int layerID,
int ladderID,
GearDir content,
VXDGeometryPar & vxdGeometryPar )
virtualinherited

Read parameters for ladder components and their alignment corresponding to the given ladder id.

Definition at line 472 of file GeoVXDCreator.cc.

473 {
474 VxdID ladder(layerID, ladderID, 0);
475
476 // Read alignment for ladder
477 string path = (boost::format("Align[@component='%1%']/") % ladder).str();
478 GearDir params(GearDir(content, "Alignment/"), path);
479 if (!params) {
480 B2WARNING("Could not find alignment parameters for ladder " << ladder);
481 return;
482 }
483 vxdGeometryPar.getAlignmentMap()[ladder] = VXDAlignmentPar(params.getLength("du"),
484 params.getLength("dv"),
485 params.getLength("dw"),
486 params.getAngle("alpha"),
487 params.getAngle("beta"),
488 params.getAngle("gamma")
489 );
490
491
492
493 for (const VXDGeoSensorPlacementPar& p : vxdGeometryPar.getLadderMap()[layerID].getSensors()) {
494 VxdID sensorID(ladder);
495 sensorID.setSensorNumber(p.getSensorID());
496
497 std::map<string, VXDGeoSensorPar>::iterator it = vxdGeometryPar.getSensorMap().find(p.getSensorTypeID());
498 if (it == vxdGeometryPar.getSensorMap().end()) {
499 B2FATAL("Invalid SensorTypeID " << p.getSensorTypeID() << ", please check the definition of " << sensorID);
500 }
501
502 //Now create all the other components and place the Sensor
503 if (!vxdGeometryPar.getGlobalParams().getOnlyActiveMaterial()) {
504 VXDGeoSensorPar& s = it->second;
505 readSubComponents(s.getComponents(), GearDir(content, "Components/"), vxdGeometryPar);
506 }
507 // Read alignment for sensor
508 string pathSensor = (boost::format("Align[@component='%1%']/") % sensorID).str();
509 GearDir paramsSensor(GearDir(content, "Alignment/"), pathSensor);
510 if (!paramsSensor) {
511 B2WARNING("Could not find alignment parameters for sensorID " << sensorID);
512 return;
513 }
514 vxdGeometryPar.getAlignmentMap()[sensorID] = VXDAlignmentPar(paramsSensor.getLength("du"),
515 paramsSensor.getLength("dv"),
516 paramsSensor.getLength("dw"),
517 paramsSensor.getAngle("alpha"),
518 paramsSensor.getAngle("beta"),
519 paramsSensor.getAngle("gamma")
520 );
521 }
522 return;
523 }

◆ readSensorInfo()

PXDSensorInfoPar * readSensorInfo ( const GearDir & sensor)

Read the sensor definitions from the gearbox.

Parameters
sensorReference to the database containing the parameters

Definition at line 95 of file GeoPXDCreator.cc.

96 {
97 PXDSensorInfoPar* info = new PXDSensorInfoPar(
98 VxdID(0, 0, 0),
99 sensor.getLength("width"),
100 sensor.getLength("length"),
101 sensor.getLength("height"),
102 sensor.getInt("pixelsU"),
103 sensor.getInt("pixelsV[1]"),
104 sensor.getLength("splitLength", 0),
105 sensor.getInt("pixelsV[2]", 0)
106 );
107
108 info->setDEPFETParams(
109 sensor.getDouble("BulkDoping"),
110 sensor.getWithUnit("BackVoltage"),
111 sensor.getWithUnit("TopVoltage"),
112 sensor.getLength("SourceBorderSmallPixel"),
113 sensor.getLength("ClearBorderSmallPixel"),
114 sensor.getLength("DrainBorderSmallPixel"),
115 sensor.getLength("SourceBorderLargePixel"),
116 sensor.getLength("ClearBorderLargePixel"),
117 sensor.getLength("DrainBorderLargePixel"),
118 sensor.getLength("GateDepth"),
119 sensor.getBool("DoublePixel"),
120 sensor.getDouble("ChargeThreshold"),
121 sensor.getDouble("NoiseFraction")
122 );
123 info->setIntegrationWindow(
124 sensor.getTime("IntegrationStart"),
125 sensor.getTime("IntegrationEnd")
126 );
127 return info;
128 }

◆ readSubComponents()

void readSubComponents ( const std::vector< VXDGeoPlacementPar > & placements,
const GearDir & componentsDir,
VXDGeometryPar & vxdGeometryPar )
inherited

Read parameters for all components in placement container from Gearbox into payload.

Parameters
placementscontainer holding names of all components to be cached
componentsDirPath to Gearbox where parameters are to be found
vxdGeometryPar

Definition at line 525 of file GeoVXDCreator.cc.

527 {
528 for (const VXDGeoPlacementPar& p : placements) {
529 readComponent(p.getName(), componentsDir, vxdGeometryPar);
530 }
531 return;
532 }

◆ setCurrentLayer()

void setCurrentLayer ( int layer,
const VXDGeometryPar & parameters )
virtualinherited

Read parameters for given layer and store in m_ladder.

Definition at line 443 of file GeoVXDCreator.cc.

444 {
445 const VXDGeoLadderPar& paramsLadder = parameters.getLadder(layer);
446
447 m_ladder = VXDGeoLadder(
448 layer,
449 paramsLadder.getShift() / Unit::mm,
450 paramsLadder.getRadius() / Unit::mm,
451 paramsLadder.getSlantedAngle(),
452 paramsLadder.getSlantedRadius() / Unit::mm,
453 paramsLadder.getGlueSize() / Unit::mm,
454 paramsLadder.getGlueMaterial()
455 );
456
457
458 for (const VXDGeoSensorPlacementPar& sensorInfo : paramsLadder.getSensors()) {
459 m_ladder.addSensor(VXDGeoSensorPlacement(
460 sensorInfo.getSensorID(),
461 sensorInfo.getSensorTypeID(),
462 sensorInfo.getZ() / Unit::mm,
463 sensorInfo.getFlipU(),
464 sensorInfo.getFlipV(),
465 sensorInfo.getFlipW()
466 ));
467 }
468 }

Member Data Documentation

◆ m_activeChips

bool m_activeChips {false}
protectedinherited

Make also chips sensitive.

Definition at line 211 of file GeoVXDCreator.h.

211{false};

◆ m_activeStepSize

double m_activeStepSize {5 * Unit::um}
protectedinherited

Stepsize to be used inside active volumes.

Definition at line 209 of file GeoVXDCreator.h.

209{5 * Unit::um};

◆ m_alignment

GearDir m_alignment
protectedinherited

GearDir pointing to the alignment parameters.

Definition at line 185 of file GeoVXDCreator.h.

◆ m_componentCache

std::map<std::string, VXDGeoComponent> m_componentCache
protectedinherited

Cache of all previously created components.

Definition at line 190 of file GeoVXDCreator.h.

◆ m_components

GearDir m_components
protectedinherited

GearDir pointing to the toplevel of the components.

Definition at line 187 of file GeoVXDCreator.h.

◆ m_currentHalfShell

std::string m_currentHalfShell {""}
protectedinherited

Current half-shell being processed (need to know ladder parent for hierarchy)

Definition at line 222 of file GeoVXDCreator.h.

222{""};

◆ m_defaultMaterial

std::string m_defaultMaterial
protectedinherited

Name of the Material to be used for Air.

Definition at line 201 of file GeoVXDCreator.h.

◆ m_distanceTolerance

float m_distanceTolerance {(float)(5 * Unit::um)}
protectedinherited

tolerance for Geant4 steps to be merged to a single step

Definition at line 203 of file GeoVXDCreator.h.

203{(float)(5 * Unit::um)};

◆ m_electronTolerance

float m_electronTolerance {100}
protectedinherited

tolerance for the energy deposition in electrons to be merged in a single step

Definition at line 205 of file GeoVXDCreator.h.

205{100};

◆ m_halfShellVxdIDs

std::map<std::string, Belle2::VxdID> m_halfShellVxdIDs
protectedinherited
Initial value:
{
{{"PXD.Ying"}, {Belle2::VxdID(1, 0, 0, 1)}},
{{"PXD.Yang"}, {Belle2::VxdID(1, 0, 0, 2)}},
{{"SVD.Pat"}, {Belle2::VxdID(3, 0, 0, 1)}},
{{"SVD.Mat"}, {Belle2::VxdID(3, 0, 0, 2)}}
}
Class to uniquely identify a any structure of the PXD and SVD.
Definition VxdID.h:32

Used for translation of half-shell name into a VxdID to consistently handle it in hierarchy.

Definition at line 224 of file GeoVXDCreator.h.

224 {
225 {{"PXD.Ying"}, {Belle2::VxdID(1, 0, 0, 1)}},
226 {{"PXD.Yang"}, {Belle2::VxdID(1, 0, 0, 2)}},
227 {{"SVD.Pat"}, {Belle2::VxdID(3, 0, 0, 1)}},
228 {{"SVD.Mat"}, {Belle2::VxdID(3, 0, 0, 2)}}
229 };

◆ m_ladder

VXDGeoLadder m_ladder
protectedinherited

Parameters of the currently active ladder.

Definition at line 194 of file GeoVXDCreator.h.

◆ m_minimumElectrons

float m_minimumElectrons {10}
protectedinherited

minimum number of electrons to be deposited by a particle to be saved

Definition at line 207 of file GeoVXDCreator.h.

207{10};

◆ m_onlyActiveMaterial

bool m_onlyActiveMaterial {false}
protectedinherited

If this is true, only active Materials will be placed for tracking studies.

Dead Material will be ignored

Definition at line 218 of file GeoVXDCreator.h.

218{false};

◆ m_onlyPrimaryTrueHits

bool m_onlyPrimaryTrueHits {false}
protectedinherited

If true only create TrueHits from primary particles and ignore secondaries.

Definition at line 215 of file GeoVXDCreator.h.

215{false};

◆ m_prefix

std::string m_prefix
protectedinherited

Prefix to prepend to all volume names.

Definition at line 183 of file GeoVXDCreator.h.

◆ m_radiationsensors

GeoVXDRadiationSensors m_radiationsensors
protectedinherited

Diamond radiation sensor "sub creator".

Definition at line 198 of file GeoVXDCreator.h.

◆ m_seeNeutrons

bool m_seeNeutrons {false}
protectedinherited

Make sensitive detectors also see neutrons.

Definition at line 213 of file GeoVXDCreator.h.

213{false};

◆ m_sensitive

std::vector<Simulation::SensitiveDetectorBase*> m_sensitive
protectedinherited

List to all created sensitive detector instances.

Definition at line 196 of file GeoVXDCreator.h.

◆ m_SensorInfo

std::vector<SensorInfo*> m_SensorInfo
private

Vector of points to SensorInfo objects.

Definition at line 119 of file GeoPXDCreator.h.

◆ m_sensorMap

std::map<std::string, VXDGeoSensor> m_sensorMap
protectedinherited

Map containing Information about all defined sensor types.

Definition at line 192 of file GeoVXDCreator.h.

◆ m_UserLimits

std::vector<G4UserLimits*> m_UserLimits
protectedinherited

Vector of G4UserLimit pointers.

Definition at line 220 of file GeoVXDCreator.h.


The documentation for this class was generated from the following files: