Belle II Software  release-08-01-10
GeoVXDCreator Class Referenceabstract

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

#include <GeoVXDCreator.h>

Inheritance diagram for GeoVXDCreator:
Collaboration diagram for GeoVXDCreator:

Public Member Functions

 GeoVXDCreator (const std::string &prefix)
 Constructor of the GeoVXDCreator class.
 
virtual ~GeoVXDCreator ()
 The destructor of the GeoVXDCreator class.
 
virtual SensorInfoBasecreateSensorInfo (const VXDGeoSensorPar &sensor)=0
 Read the sensor definitions from the database. More...
 
virtual SensitiveDetectorBasecreateSensitiveDetector (VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement)=0
 Return a SensitiveDetector implementation for a given sensor. More...
 
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. More...
 
G4Transform3D getAlignment (const VXDAlignmentPar &params)
 Get Alignment from paylead object. More...
 
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. More...
 
G4VSolid * createTrapezoidal (const std::string &name, double width, double width2, double length, double &height, double angle=0)
 Create a trapezoidal solid. More...
 
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. More...
 
void readSubComponents (const std::vector< VXDGeoPlacementPar > &placements, const GearDir &componentsDir, VXDGeometryPar &vxdGeometryPar)
 Read parameters for all components in placement container from Gearbox into payload. More...
 
 BELLE2_DEFINE_EXCEPTION (DBNotImplemented, "Cannot create geometry from Database.")
 Exception that will be thrown in createFromDB if member is not yet implemented by creator.
 
virtual void create (const GearDir &content, G4LogicalVolume &topVolume, GeometryTypes type)=0
 Function to actually create the geometry, has to be overridden by derived classes. More...
 
virtual void createFromDB (const std::string &name, G4LogicalVolume &topVolume, GeometryTypes type)
 Function to create the geometry from the Database. More...
 
virtual void createPayloads (const GearDir &content, const IntervalOfValidity &iov)
 Function to create the geometry database. More...
 

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. More...
 
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 consitently handle it in hierarchy. More...
 

Detailed Description

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


Definition at line 48 of file GeoVXDCreator.h.

Member Function Documentation

◆ create()

virtual void create ( const GearDir content,
G4LogicalVolume &  topVolume,
GeometryTypes  type 
)
pure virtualinherited

◆ createFromDB()

void createFromDB ( const std::string &  name,
G4LogicalVolume &  topVolume,
GeometryTypes  type 
)
virtualinherited

Function to create the geometry from the Database.

Parameters
namename of the component in the database, could be used to disambiguate multiple components created with the same creator
topVolumeTop volume in which the geometry has to be placed
typeType of geometry to be build

Reimplemented in GeoVXDServiceCreator, GeoHeavyMetalShieldCreator, GeoTOPCreator, GeoSVDCreator, GeoSTRCreator, GeoServiceMaterialCreator, GeoCOILCreator, GeoPXDCreator, GeoKLMCreator, GeoEKLMCreator, GeoBKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, GeoBeamPipeCreator, MyDBCreator, GeoECLCreator, GeoCDCCreatorReducedCDC, GeoCDCCreator, BeamabortCreator, GeoARICHCreator, and GeoMagneticField.

Definition at line 17 of file CreatorBase.cc.

◆ createPayloads()

void createPayloads ( const GearDir content,
const IntervalOfValidity iov 
)
virtualinherited

Function to create the geometry database.

This function should be implemented to convert Gearbox parameters to one ore more database payloads

Parameters
contentGearDir pointing to the parameters which should be used for construction
iovinterval of validity to use when generating payloads

Reimplemented in GeoVXDServiceCreator, GeoHeavyMetalShieldCreator, GeoTOPCreator, GeoSVDCreator, GeoSTRCreator, GeoServiceMaterialCreator, GeoCOILCreator, GeoPXDCreator, GeoKLMCreator, GeoEKLMCreator, GeoBKLMCreator, GeoFarBeamLineCreator, GeoCryostatCreator, GeoBeamPipeCreator, MyDBCreator, GeoMagneticField, GeoECLCreator, GeoCDCCreatorReducedCDC, GeoCDCCreator, BeamabortCreator, and GeoARICHCreator.

Definition at line 24 of file CreatorBase.cc.

◆ createSensitiveDetector()

virtual SensitiveDetectorBase* createSensitiveDetector ( VxdID  sensorID,
const VXDGeoSensor sensor,
const VXDGeoSensorPlacement placement 
)
pure virtual

Return a SensitiveDetector implementation for a given sensor.

Parameters
sensorIDSensorID for the sensor
sensorInformation about the sensor to create the Sensitive Detector for
placementPlacement of the sensor

Implemented in GeoSVDCreator, and GeoPXDCreator.

◆ createSensorInfo()

virtual SensorInfoBase* createSensorInfo ( const VXDGeoSensorPar sensor)
pure virtual

Read the sensor definitions from the database.

Parameters
sensorReference to the database containing the parameters

Implemented in GeoSVDCreator, and GeoPXDCreator.

◆ createSubComponents()

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.

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 74 of file GeoVXDCreator.cc.

◆ createTrapezoidal()

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

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
[in,out]heightof 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 254 of file GeoVXDCreator.cc.

◆ getAlignment()

G4Transform3D getAlignment ( const VXDAlignmentPar params)

Get Alignment from paylead object.

Parameters
paramsPayload object
Returns
Transformation matrix for component

Definition at line 172 of file GeoVXDCreator.cc.

◆ getPosition()

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

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 179 of file GeoVXDCreator.cc.

◆ readComponent()

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

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 532 of file GeoVXDCreator.cc.

◆ readSubComponents()

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

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 523 of file GeoVXDCreator.cc.

Member Data Documentation

◆ m_halfShellVxdIDs

std::map<std::string, Belle2::VxdID> m_halfShellVxdIDs
protected
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:33

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

Definition at line 222 of file GeoVXDCreator.h.

◆ m_onlyActiveMaterial

bool m_onlyActiveMaterial {false}
protected

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

Dead Material will be ignored

Definition at line 216 of file GeoVXDCreator.h.


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