BDSGeometryComponent Class Reference

A generic geometry component for a bdsim model. More...

#include <BDSGeometryComponent.hh>

Inheritance diagram for BDSGeometryComponent:

Inheritance graph
[legend]
Collaboration diagram for BDSGeometryComponent:

Collaboration graph
[legend]

Public Member Functions

 BDSGeometryComponent (G4VSolid *containerSolidIn, G4LogicalVolume *containerLVIn)
 BDSGeometryComponent (G4VSolid *containerSolidIn, G4LogicalVolume *containerLVIn, std::pair< G4double, G4double > extentXIn, std::pair< G4double, G4double > extentYIn, std::pair< G4double, G4double > extentZIn, G4ThreeVector placementOffset=G4ThreeVector(0, 0, 0))
 ~BDSGeometryComponent ()
G4String GetName () const
 Get the name from the container logical volume.
G4VSolid * GetContainerSolid () const
 Get the solid of the container for possible subtraction.
G4LogicalVolume * GetContainerLogicalVolume () const
 Get the logical volume of the container for placement.
G4ThreeVector GetPlacementOffset () const
 Get the offset from 0,0,0 that the object should ideally be placed in its parent.
void SetPlacementOffset (G4ThreeVector &offsetIn)
 Set the offset from 0,0,0 that the object should ideally be placed in its parent.
std::pair< G4double, G4double > GetExtentX () const
 get -ve/+ve extent in local x
std::pair< G4double, G4double > GetExtentY () const
 get -ve/+ve extent in local y
std::pair< G4double, G4double > GetExtentZ () const
 get -ve/+ve extent in local z
G4ThreeVector GetExtentPositive () const
 Get the extent of the object in the positive direction in all dimensions.
G4ThreeVector GetExtentNegative () const
 Get the extent of the object in the negative direction in all dimensions.
void SetExtentX (G4double lowerX, G4double upperX)
 set the extent in local x
void SetExtentY (G4double lowerY, G4double upperY)
 set the extent in local y
void SetExtentZ (G4double lowerZ, G4double upperZ)
 set the extent in local z
void SetExtentX (std::pair< G4double, G4double > extentXIn)
 set the extent in local x
void SetExtentY (std::pair< G4double, G4double > extentYIn)
 set the extent in local y
void SetExtentZ (std::pair< G4double, G4double > extentZIn)
 set the extent in local z
void RegisterLogicalVolume (G4LogicalVolume *logicalVolume)
void RegisterLogicalVolumes (std::vector< G4LogicalVolume * > logicalVolumes)
 Apply RegisterLogicalVolume(G4LogicalVolume* logicalVolume) to a vector of logical volumes.
void RegisterSensitiveVolume (G4LogicalVolume *sensitiveVolume)
void RegisterSensitiveVolumes (std::vector< G4LogicalVolume * > sensitiveVolumes)
 Apply RegisterSensitiveVolume(G4LogicalVolume* sensitiveVolume) to a vector of logical volumes.
std::vector< G4LogicalVolume * > GetAllLogicalVolumes () const
 Access all logical volumes belonging to this component.
std::vector< G4LogicalVolume * > GetAllSensitiveVolumes () const
 Access all sensitive volumes belonging to this component.

Protected Member Functions

 BDSGeometryComponent (BDSGeometryComponent &component)
 Copy constructor.

Protected Attributes

G4VSolid * containerSolid
G4LogicalVolume * containerLogicalVolume
std::pair< G4double, G4double > extentX
std::pair< G4double, G4double > extentY
std::pair< G4double, G4double > extentZ
std::vector< G4LogicalVolume * > allLogicalVolumes
std::vector< G4LogicalVolume * > allSensitiveVolumes
 registry of all volumes that should be made sensitive
G4ThreeVector placementOffset

Detailed Description

A generic geometry component for a bdsim model.

This class contains the minimum information required for any geometrical object for a bdsim geant4 model

Author:
Laurie Nevay <laurie.nevay@rhul.ac.uk>

Definition at line 19 of file BDSGeometryComponent.hh.


Member Function Documentation

void BDSGeometryComponent::RegisterLogicalVolume ( G4LogicalVolume *  logicalVolume  ) 

Register a logical volume as belonging to this geometry component, which then becomes responsible for it

Definition at line 51 of file BDSGeometryComponent.cc.

References allLogicalVolumes, and containerSolid.

Referenced by BDSCollimatorBase::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSMagnetOuterFactoryPolesSquare::CommonConstructor(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSBeamPipeFactoryLHCDetailed::CommonFinalConstruction(), BDSBeamPipeFactoryElliptical::CommonFinalConstruction(), BDSMagnetOuterFactoryLHC::CommonFinalConstructor(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryPolesBase::KickerConstructor(), and RegisterLogicalVolumes().

Here is the caller graph for this function:

void BDSGeometryComponent::RegisterSensitiveVolume ( G4LogicalVolume *  sensitiveVolume  ) 

Mark a volume as one that should be made sensitive using the read out geometry. Note, if a volume is already sensitive with a specialised sensitive detector, it should NOT be registered using this method.

Definition at line 88 of file BDSGeometryComponent.cc.

References allSensitiveVolumes, and containerSolid.

Referenced by BDSCollimatorBase::Build(), BDSBeamPipeFactoryBase::BuildBeamPipeAndRegisterVolumes(), BDSSpoiler::BuildInnerSpoiler(), BDSScintillatorScreen::BuildScintillatorScreen(), BDSMagnetOuterFactoryPolesSquare::CommonConstructor(), BDSMagnetOuterFactoryPolesBase::CommonConstructor(), BDSBeamPipeFactoryLHCDetailed::CommonFinalConstruction(), BDSBeamPipeFactoryElliptical::CommonFinalConstruction(), BDSMagnetOuterFactoryCylindrical::CommonFinalConstructor(), BDSMagnetOuterFactoryPolesBase::KickerConstructor(), BDSElement::PlaceComponents(), and RegisterSensitiveVolumes().

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on 28 Jun 2015 for BDSIM by  doxygen 1.4.7