BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
|
An object for both the returned magnet outer body but also a tight fitting container for the whole magnet. More...
#include <BDSMagnetOuter.hh>
Public Member Functions | |
BDSMagnetOuter (G4VSolid *containerSolidIn, G4LogicalVolume *containerLVIn, const BDSExtent &extent, BDSGeometryComponent *magnetContainerIn, const G4ThreeVector &placementOffset=G4ThreeVector(0, 0, 0), BDSSimpleComponent *endPieceBeforeIn=nullptr, BDSSimpleComponent *endPieceAfterIn=nullptr, const G4ThreeVector &inputFaceNormalIn=G4ThreeVector(0, 0,-1), const G4ThreeVector &outputFaceNormalIn=G4ThreeVector(0, 0, 1)) | |
BDSMagnetOuter (BDSGeometryComponent *component, BDSGeometryComponent *magnetContainerIn, BDSSimpleComponent *endPieceBeforeIn=nullptr, BDSSimpleComponent *endPieceAfterIn=nullptr, const G4ThreeVector &inputFaceNormalIn=G4ThreeVector(0, 0,-1), const G4ThreeVector &outputFaceNormalIn=G4ThreeVector(0, 0, 1)) | |
BDSMagnetOuter (BDSGeometryExternal *external, BDSGeometryComponent *magnetContainerIn) | |
BDSGeometryComponent * | GetMagnetContainer () const |
void | SetEndPieceBefore (BDSSimpleComponent *endPieceIn) |
void | SetEndPieceAfter (BDSSimpleComponent *endPieceIn) |
void | ClearMagnetContainer () |
Clear the memory of the now unneeded magnet container object. | |
void | ClearEndPieces () |
Clear the memory of the possibly unneeded end piece objects. | |
BDSGeometryExternal * | ExternalGeometry () const |
BDSSimpleComponent * | EndPieceBefore () const |
Access the end piece. | |
BDSSimpleComponent * | EndPieceAfter () const |
Access the end piece. | |
G4ThreeVector | InputFaceNormal () const |
Accessor. | |
G4ThreeVector | OutputFaceNormal () const |
Accessor. | |
void | SetInputFaceNormal (const G4ThreeVector &input) |
Setter for face normals. | |
void | SetOutputFaceNormal (const G4ThreeVector &output) |
Setter for face normals. | |
![]() | |
BDSGeometryComponent (G4VSolid *containerSolidIn, G4LogicalVolume *containerLVIn, const BDSExtent &extentIn=BDSExtent(), const BDSExtent &innerExtentIn=BDSExtent(), const G4ThreeVector &placementOffsetIn=G4ThreeVector(0, 0, 0), G4RotationMatrix *placementRotationIn=nullptr) | |
BDSGeometryComponent (G4AssemblyVolume *containerAssemblyIn, const BDSExtent &extentIn=BDSExtent(), const BDSExtent &innerExtentIn=BDSExtent(), const G4ThreeVector &placementOffsetIn=G4ThreeVector(0, 0, 0), G4RotationMatrix *placementRotationIn=nullptr) | |
BDSGeometryComponent (const BDSGeometryComponent &component) | |
Copy constructor (no copying of registered objects) | |
BDSGeometryComponent & | operator= (const BDSGeometryComponent &)=delete |
Assignment operator not used. | |
G4bool | ContainerIsAssembly () const |
Whether the container is an assembly. If not, it's a logical volume. | |
void | SetPlacementOffset (const G4ThreeVector &offsetIn) |
Set the offset from 0,0,0 that the object should ideally be placed in its parent. | |
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 | InheritExtents (BDSGeometryComponent const *const anotherComponent) |
Update the extents of this object with those of another object. | |
void | InheritExtents (BDSGeometryComponent const *const anotherComponent, const G4ThreeVector &offset) |
void | RegisterDaughter (BDSGeometryComponent *anotherComponent) |
void | RegisterSolid (G4VSolid *solid) |
void | RegisterSolid (const std::set< G4VSolid * > &solids) |
Similarly for a set of unique solids. | |
void | RegisterLogicalVolume (G4LogicalVolume *logicalVolume) |
void | RegisterLogicalVolume (const std::set< G4LogicalVolume * > &localVolumes) |
Apply RegisterLogicalVolume() to a set of logical volumes. | |
void | RegisterSensitiveVolume (G4LogicalVolume *sensitiveVolume, BDSSDType sensitivityType) |
void | RegisterSensitiveVolume (const std::set< G4LogicalVolume * > &sensitiveVolumes, BDSSDType sensitivityType) |
void | RegisterSensitiveVolume (const std::map< G4LogicalVolume *, BDSSDType > &sensitiveVolumes) |
Copy in a mapping of sensitive volumes to sensitive detectors. | |
void | RegisterPhysicalVolume (G4VPhysicalVolume *physicalVolume) |
void | RegisterPhysicalVolume (const std::set< G4VPhysicalVolume * > &physicalVolumes) |
Apply RegisterPhysicalVolume() to a set of physical volumes. | |
void | RegisterRotationMatrix (G4RotationMatrix *rotationMatrix) |
void | RegisterRotationMatrix (const std::set< G4RotationMatrix * > &rotationMatrices) |
Apply Register RotationMatrix() to a set of rotation matrices. | |
void | RegisterVisAttributes (G4VisAttributes *visAttribute) |
void | RegisterVisAttributes (const std::set< G4VisAttributes * > &visAttributes) |
Apply RegisterVisAttribute() to a set of visualisation attributes. | |
void | RegisterUserLimits (G4UserLimits *userLimit) |
void | RegisterUserLimits (const std::set< G4UserLimits * > &userLimits) |
Apply RegisterUserLimit to a set of user limits. | |
void | InheritObjects (BDSGeometryComponent *component) |
virtual std::set< G4LogicalVolume * > | GetAllLogicalVolumes () const |
Access all logical volumes belonging to this component. | |
virtual std::set< G4LogicalVolume * > | GetAllBiasingVolumes () const |
Return all logical volumes that should be used for biasing minus any that are in the excluded set. | |
virtual std::map< G4LogicalVolume *, BDSSDType > | GetAllSensitiveVolumes () const |
Access all sensitive volumes belonging to this component. | |
void | MakeAllVolumesSensitive (BDSSDType stype=BDSSDType::energydep) |
virtual void | AttachSensitiveDetectors () |
Attach a sensitive detector class to all registered sensitive volumes in this component. | |
virtual void | ExcludeLogicalVolumeFromBiasing (G4LogicalVolume *lv) |
void | StripOuterAndMakeAssemblyVolume () |
Change from a container logical volume to an assembly volume. | |
virtual G4String | GetName () const |
Accessor - see member for more info. | |
G4VSolid * | GetContainerSolid () const |
Accessor - see member for more info. | |
G4LogicalVolume * | GetContainerLogicalVolume () const |
Accessor - see member for more info. | |
G4AssemblyVolume * | GetContainerAssemblyVolume () const |
Accessor - see member for more info. | |
G4Transform3D | GetPlacementTransform () const |
Accessor - see member for more info. | |
G4ThreeVector | GetPlacementOffset () const |
Accessor - see member for more info. | |
G4RotationMatrix * | GetPlacementRotation () const |
Accessor - see member for more info. | |
BDSExtent | GetExtent () const |
Accessor - see member for more info. | |
BDSExtent | GetInnerExtent () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetExtentX () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetExtentY () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetExtentZ () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetInnerExtentX () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetInnerExtentY () const |
Accessor - see member for more info. | |
std::pair< G4double, G4double > | GetInnerExtentZ () const |
Accessor - see member for more info. | |
virtual std::set< G4VPhysicalVolume * > | GetAllPhysicalVolumes () const |
Accessor - see member for more info. | |
virtual std::set< G4RotationMatrix * > | GetAllRotationMatrices () const |
Accessor - see member for more info. | |
virtual std::set< G4VisAttributes * > | GetAllVisAttributes () const |
Accessor - see member for more info. | |
virtual std::set< G4UserLimits * > | GetAllUserLimits () const |
Accessor - see member for more info. | |
virtual std::set< BDSGeometryComponent * > | GetAllDaughters () const |
Accessor - see member for more info. | |
virtual std::set< G4VSolid * > | GetAllSolids () const |
Accessor - see member for more info. | |
void | SetExtent (const BDSExtent &extIn) |
Set extent. | |
void | SetInnerExtent (const BDSExtent &extIn) |
Set extent. | |
Protected Attributes | |
BDSGeometryComponent * | magnetContainer |
BDSSimpleComponent * | endPieceBefore |
BDSSimpleComponent * | endPieceAfter |
G4ThreeVector | inputFaceNormal |
G4ThreeVector | outputFaceNormal |
BDSGeometryExternal * | externalGeometry |
![]() | |
G4bool | containerIsAssembly |
True if the 'container' is really an assembly; false if an LV. | |
G4VSolid * | containerSolid |
G4LogicalVolume * | containerLogicalVolume |
G4AssemblyVolume * | containerAssembly |
BDSExtent | outerExtent |
BDSExtent | innerExtent |
std::set< BDSGeometryComponent * > | allDaughters |
registry of all daughter geometry components | |
std::set< G4VSolid * > | allSolids |
registry of all solids belonging to this component | |
std::set< G4LogicalVolume * > | allLogicalVolumes |
std::map< G4LogicalVolume *, BDSSDType > | sensitivity |
G4bool | overrideSensitivity |
std::set< G4VPhysicalVolume * > | allPhysicalVolumes |
registry of all physical volumes belonging to this component | |
std::set< G4RotationMatrix * > | allRotationMatrices |
registry of all rotation matrices belonging to this component | |
std::set< G4VisAttributes * > | allVisAttributes |
registry of all visualisation attributes belonging to this component | |
std::set< G4UserLimits * > | allUserLimits |
registry of all user limits belonging to this component | |
G4ThreeVector | placementOffset |
G4RotationMatrix * | placementRotation |
std::set< G4LogicalVolume * > * | lvsExcludedFromBiasing |
Volumes that should not be included when return GetAllBiasingVolumes(). | |
Additional Inherited Members | |
![]() | |
static void | AttachUserLimitsToAssembly (G4AssemblyVolume *av, G4UserLimits *ul) |
Utility function to apply user limits to an assembly volume as there's not interface. | |
An object for both the returned magnet outer body but also a tight fitting container for the whole magnet.
Mostly BDSGeometryComponent but with the addition of a suggested container volume for the whole magnet body as the magnet outer section is typically the outside of the magnet and only the magnet factory knows its true shape and can make a well fitting container.
Definition at line 45 of file BDSMagnetOuter.hh.
BDSMagnetOuter::BDSMagnetOuter | ( | G4VSolid * | containerSolidIn, |
G4LogicalVolume * | containerLVIn, | ||
const BDSExtent & | extent, | ||
BDSGeometryComponent * | magnetContainerIn, | ||
const G4ThreeVector & | placementOffset = G4ThreeVector(0,0,0) , |
||
BDSSimpleComponent * | endPieceBeforeIn = nullptr , |
||
BDSSimpleComponent * | endPieceAfterIn = nullptr , |
||
const G4ThreeVector & | inputFaceNormalIn = G4ThreeVector(0,0,-1) , |
||
const G4ThreeVector & | outputFaceNormalIn = G4ThreeVector(0,0, 1) |
||
) |
Definition at line 26 of file BDSMagnetOuter.cc.
BDSMagnetOuter::BDSMagnetOuter | ( | BDSGeometryComponent * | component, |
BDSGeometryComponent * | magnetContainerIn, | ||
BDSSimpleComponent * | endPieceBeforeIn = nullptr , |
||
BDSSimpleComponent * | endPieceAfterIn = nullptr , |
||
const G4ThreeVector & | inputFaceNormalIn = G4ThreeVector(0,0,-1) , |
||
const G4ThreeVector & | outputFaceNormalIn = G4ThreeVector(0,0, 1) |
||
) |
Definition at line 45 of file BDSMagnetOuter.cc.
BDSMagnetOuter::BDSMagnetOuter | ( | BDSGeometryExternal * | external, |
BDSGeometryComponent * | magnetContainerIn | ||
) |
Definition at line 60 of file BDSMagnetOuter.cc.
|
virtual |
Definition at line 71 of file BDSMagnetOuter.cc.
void BDSMagnetOuter::ClearEndPieces | ( | ) |
Clear the memory of the possibly unneeded end piece objects.
Definition at line 86 of file BDSMagnetOuter.cc.
void BDSMagnetOuter::ClearMagnetContainer | ( | ) |
Clear the memory of the now unneeded magnet container object.
Definition at line 77 of file BDSMagnetOuter.cc.
Referenced by BDSMagnet::BuildOuter().
|
inline |
Access the end piece.
Definition at line 75 of file BDSMagnetOuter.hh.
Referenced by BDSMagnet::BuildOuter().
|
inline |
Access the end piece.
Definition at line 74 of file BDSMagnetOuter.hh.
Referenced by BDSMagnet::BuildOuter().
|
inline |
Optional external geometry. An instance of this class may be based on one. In this case, the is the full object. Could be nullptr.
Definition at line 99 of file BDSMagnetOuter.hh.
|
inline |
Access the magnet container - a BDSGeometryComponent instance that has a suggested container solid (null pointer LV! - constructed from solid in BDSMagnet and saves doing it repeatedly in factories) that would contain both the magnet outer section and the beam pipe - so a solid container. Use as a way to pass solid + extents
Definition at line 71 of file BDSMagnetOuter.hh.
Referenced by BDSMagnet::BuildOuter().
|
inline |
Accessor.
Definition at line 88 of file BDSMagnetOuter.hh.
Referenced by BDSMagnet::BuildOuter().
|
inline |
Accessor.
Definition at line 89 of file BDSMagnetOuter.hh.
Referenced by BDSMagnet::BuildOuter().
|
inline |
Definition at line 79 of file BDSMagnetOuter.hh.
|
inline |
Definition at line 78 of file BDSMagnetOuter.hh.
void BDSMagnetOuter::SetInputFaceNormal | ( | const G4ThreeVector & | input | ) |
Setter for face normals.
Definition at line 94 of file BDSMagnetOuter.cc.
References BDSAcceleratorComponent::SetInputFaceNormal().
Referenced by BDSMagnetOuterFactoryBase::SetFaceNormals(), and BDSMagnet::SetInputFaceNormal().
void BDSMagnetOuter::SetOutputFaceNormal | ( | const G4ThreeVector & | output | ) |
Setter for face normals.
Definition at line 101 of file BDSMagnetOuter.cc.
References BDSAcceleratorComponent::SetInputFaceNormal().
Referenced by BDSMagnetOuterFactoryBase::SetFaceNormals(), and BDSMagnet::SetOutputFaceNormal().
|
protected |
Definition at line 104 of file BDSMagnetOuter.hh.
|
protected |
Definition at line 103 of file BDSMagnetOuter.hh.
|
protected |
Definition at line 107 of file BDSMagnetOuter.hh.
|
protected |
Definition at line 105 of file BDSMagnetOuter.hh.
|
protected |
Definition at line 102 of file BDSMagnetOuter.hh.
|
protected |
Definition at line 106 of file BDSMagnetOuter.hh.