Belle II Software development
|
The creator for the VXD geometry of the Belle II detector. More...
#include <GeoVXDCreator.h>
Public Member Functions | |
GeoVXDCreator (const std::string &prefix) | |
Constructor of the GeoVXDCreator class. | |
virtual | ~GeoVXDCreator () |
The destructor of the GeoVXDCreator class. | |
virtual SensorInfoBase * | createSensorInfo (const VXDGeoSensorPar &sensor)=0 |
Read the sensor definitions from the database. | |
virtual SensitiveDetectorBase * | createSensitiveDetector (VxdID sensorID, const VXDGeoSensor &sensor, const VXDGeoSensorPlacement &placement)=0 |
Return a SensitiveDetector implementation for a given sensor. | |
virtual void | setCurrentLayer (int layer, const VXDGeometryPar ¶meters) |
Read parameters for given layer and store in m_ladder. | |
G4Transform3D | placeLadder (int ladderID, double phi, G4LogicalVolume *volume, const G4Transform3D &placement, const VXDGeometryPar ¶meters) |
Place ladder corresponding to the given ladder id into volume setLayer has to be called first to set 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 ¶ms) |
Get Alignment from paylead object. | |
GeoVXDAssembly | createSubComponents (const std::string &name, VXDGeoComponent &component, std::vector< VXDGeoPlacement > placements, bool originCenter=true, bool allowOutside=false) |
Place a list of subcomponents into an component. | |
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 ¶ms, G4LogicalVolume &topVolume, G4LogicalVolume &envelopeVolume) |
Create diamond radiation sensors. | |
std::vector< VXDGeoPlacementPar > | getSubComponents (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. | |
virtual void | create (const GearDir &content, G4LogicalVolume &topVolume, GeometryTypes type)=0 |
Function to actually create the geometry, has to be overridden by derived classes. | |
virtual void | createFromDB (const std::string &name, G4LogicalVolume &topVolume, GeometryTypes type) |
Function to create the geometry from the Database. | |
virtual void | createPayloads (const GearDir &content, const IntervalOfValidity &iov) |
Function to create the geometry database. | |
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, VXDGeoComponent > | m_componentCache |
Cache of all previously created components. | |
std::map< std::string, VXDGeoSensor > | m_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::VxdID > | m_halfShellVxdIDs |
Used for translation of half-shell name into a VxdID to consitently handle it in hierarchy. | |
The creator for the VXD geometry of the Belle II detector.
Definition at line 48 of file GeoVXDCreator.h.
|
explicit |
Constructor of the GeoVXDCreator class.
Definition at line 54 of file GeoVXDCreator.cc.
|
virtual |
The destructor of the GeoVXDCreator class.
Definition at line 59 of file GeoVXDCreator.cc.
|
pure virtualinherited |
Function to actually create the geometry, has to be overridden by derived classes.
content | GearDir pointing to the parameters which should be used for construction |
topVolume | Top volume in which the geometry has to be placed |
type | Type of geometry to be build |
Implemented in GeoARICHBtestCreator, BgoCreator, CaveCreator, ClawCreator, CLAWSCreator, CsiCreator, DosiCreator, FANGSCreator, He3tubeCreator, MicrotpcCreator, Ph1bpipeCreator, Ph1sustrCreator, PindiodeCreator, PlumeCreator, QcsmonitorCreator, DiamondCreator, Fei4Creator, SddCreator, GeoARICHCreator, BeamabortCreator, GeoCDCCreator, GeoCDCCreatorReducedCDC, GeoECLCreator, GeoMagneticField, MyDBCreator, GeoBeamPipeCreator, GeoCryostatCreator, GeoFarBeamLineCreator, GeoBKLMCreator, GeoEKLMCreator, GeoKLMCreator, GeoPXDCreator, GeoCOILCreator, GeoServiceMaterialCreator, GeoSTRCreator, GeoSVDCreator, GeoTOPCreator, GeoHeavyMetalShieldCreator, GeoVXDServiceCreator, and AWESOMEGeometryCreator.
void createDiamonds | ( | const VXDGeoRadiationSensorsPar & | params, |
G4LogicalVolume & | topVolume, | ||
G4LogicalVolume & | envelopeVolume | ||
) |
Create diamond radiation sensors.
Definition at line 209 of file GeoVXDCreator.cc.
|
virtualinherited |
Function to create the geometry from the Database.
name | name of the component in the database, could be used to disambiguate multiple components created with the same creator |
topVolume | Top volume in which the geometry has to be placed |
type | Type of geometry to be build |
Reimplemented in GeoMagneticField, GeoARICHCreator, BeamabortCreator, GeoCDCCreator, GeoCDCCreatorReducedCDC, GeoECLCreator, MyDBCreator, GeoBeamPipeCreator, GeoCryostatCreator, GeoFarBeamLineCreator, GeoBKLMCreator, GeoEKLMCreator, GeoKLMCreator, GeoPXDCreator, GeoCOILCreator, GeoServiceMaterialCreator, GeoSTRCreator, GeoSVDCreator, GeoTOPCreator, GeoHeavyMetalShieldCreator, and GeoVXDServiceCreator.
Definition at line 17 of file CreatorBase.cc.
|
virtualinherited |
Function to create the geometry database.
This function should be implemented to convert Gearbox parameters to one ore more database payloads
content | GearDir pointing to the parameters which should be used for construction |
iov | interval of validity to use when generating payloads |
Reimplemented in GeoARICHCreator, BeamabortCreator, GeoCDCCreator, GeoCDCCreatorReducedCDC, GeoECLCreator, GeoMagneticField, MyDBCreator, GeoBeamPipeCreator, GeoCryostatCreator, GeoFarBeamLineCreator, GeoBKLMCreator, GeoEKLMCreator, GeoKLMCreator, GeoPXDCreator, GeoCOILCreator, GeoServiceMaterialCreator, GeoSTRCreator, GeoSVDCreator, GeoTOPCreator, GeoHeavyMetalShieldCreator, and GeoVXDServiceCreator.
Definition at line 24 of file CreatorBase.cc.
|
pure virtual |
Return a SensitiveDetector implementation for a given sensor.
sensorID | SensorID for the sensor |
sensor | Information about the sensor to create the Sensitive Detector for |
placement | Placement of the sensor |
Implemented in GeoPXDCreator, and GeoSVDCreator.
|
pure virtual |
Read the sensor definitions from the database.
sensor | Reference to the database containing the parameters |
Implemented in GeoPXDCreator, and GeoSVDCreator.
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
name | Name for the potential new volume or as prefix for the container to extend the component |
component | Component to fit the subcomponents into |
placements | Placement information for all subcomponents |
originCenter | bool |
allowOutside | bool |
Definition at line 74 of file GeoVXDCreator.cc.
G4VSolid * createTrapezoidal | ( | const std::string & | name, |
double | width, | ||
double | width2, | ||
double | length, | ||
double & | height, | ||
double | angle = 0 |
||
) |
Create a trapezoidal solid.
name | name of the Geant4 solid | |
width | full forward width of the shape in mm | |
width2 | full backward width of the shape in mm | |
length | length of the shape in mm | |
[in,out] | 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 |
angle | angle 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 |
Definition at line 255 of file GeoVXDCreator.cc.
G4Transform3D getAlignment | ( | const VXDAlignmentPar & | params | ) |
Get Alignment from paylead object.
params | Payload object |
Definition at line 172 of file GeoVXDCreator.cc.
G4Transform3D getPosition | ( | const VXDGeoComponent & | mother, |
const VXDGeoComponent & | daughter, | ||
const VXDGeoPlacement & | placement, | ||
bool | originCenter | ||
) |
Return the position where a daughter component is to be placed.
mother | Mother component |
daughter | Daughter component |
placement | VXDGeoPlacement |
originCenter | bool |
Definition at line 179 of file GeoVXDCreator.cc.
std::vector< VXDGeoPlacementPar > getSubComponents | ( | const GearDir & | path | ) |
Return vector of VXDGeoPlacements with all the components defined inside a given path.
Definition at line 606 of file GeoVXDCreator.cc.
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.
Definition at line 281 of file GeoVXDCreator.cc.
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.
name | Name of the component |
components | Path to components |
vxdGeometryPar | VXD geometry parameters |
Definition at line 533 of file GeoVXDCreator.cc.
|
virtual |
Read parameters for a ladder in layer with given ID from gearbox and layer store them in payload.
Definition at line 575 of file GeoVXDCreator.cc.
|
virtual |
Read parameters for ladder components and their alignment corresponding to the given ladder id.
Definition at line 471 of file GeoVXDCreator.cc.
void readSubComponents | ( | const std::vector< VXDGeoPlacementPar > & | placements, |
const GearDir & | componentsDir, | ||
VXDGeometryPar & | vxdGeometryPar | ||
) |
Read parameters for all components in placement container from Gearbox into payload.
placements | container holding names of all components to be cached |
componentsDir | Path to Gearbox where parameters are to be found |
vxdGeometryPar |
Definition at line 524 of file GeoVXDCreator.cc.
|
virtual |
Read parameters for given layer and store in m_ladder.
Definition at line 442 of file GeoVXDCreator.cc.
|
protected |
Make also chips sensitive.
Definition at line 209 of file GeoVXDCreator.h.
|
protected |
Stepsize to be used inside active volumes.
Definition at line 207 of file GeoVXDCreator.h.
|
protected |
GearDir pointing to the alignment parameters.
Definition at line 183 of file GeoVXDCreator.h.
|
protected |
Cache of all previously created components.
Definition at line 188 of file GeoVXDCreator.h.
|
protected |
GearDir pointing to the toplevel of the components.
Definition at line 185 of file GeoVXDCreator.h.
|
protected |
Current half-shell being processed (need to know ladder parent for hierarchy)
Definition at line 220 of file GeoVXDCreator.h.
|
protected |
Name of the Material to be used for Air.
Definition at line 199 of file GeoVXDCreator.h.
|
protected |
tolerance for Geant4 steps to be merged to a single step
Definition at line 201 of file GeoVXDCreator.h.
|
protected |
tolerance for the energy deposition in electrons to be merged in a single step
Definition at line 203 of file GeoVXDCreator.h.
|
protected |
Used for translation of half-shell name into a VxdID to consitently handle it in hierarchy.
Definition at line 222 of file GeoVXDCreator.h.
|
protected |
Parameters of the currently active ladder.
Definition at line 192 of file GeoVXDCreator.h.
|
protected |
minimum number of electrons to be deposited by a particle to be saved
Definition at line 205 of file GeoVXDCreator.h.
|
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.
|
protected |
If true only create TrueHits from primary particles and ignore secondaries.
Definition at line 213 of file GeoVXDCreator.h.
|
protected |
Prefix to prepend to all volume names.
Definition at line 181 of file GeoVXDCreator.h.
|
protected |
Diamond radiation sensor "sub creator".
Definition at line 196 of file GeoVXDCreator.h.
|
protected |
Make sensitive detectors also see neutrons.
Definition at line 211 of file GeoVXDCreator.h.
|
protected |
List to all created sensitive detector instances.
Definition at line 194 of file GeoVXDCreator.h.
|
protected |
Map containing Information about all defined sensor types.
Definition at line 190 of file GeoVXDCreator.h.
|
protected |
Vector of G4UserLimit pointers.
Definition at line 218 of file GeoVXDCreator.h.