BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
BDSCollimatorJaw Class Reference

Collimator with only two jaw and no top bit. More...

#include <BDSCollimatorJaw.hh>

Inheritance diagram for BDSCollimatorJaw:
Inheritance graph
Collaboration diagram for BDSCollimatorJaw:
Collaboration graph

Public Member Functions

 BDSCollimatorJaw (G4String nameIn, G4double lengthIn, G4double horizontalWidthIn, G4double xHalfGapIn, G4double yHalfHeightIn, G4double xsizeLeftIn, G4double xsizeRightIn, G4bool buildLeftJawIn, G4bool buildRightJawIn, G4Material *collimatorMaterialIn, G4Material *vacuumMaterialIn, G4Colour *colourIn=nullptr)
 
- Public Member Functions inherited from BDSCollimator
 BDSCollimator (const G4String &name, G4double length, G4double horizontalWidth, const G4String &type, G4Material *collimatorMaterial, G4Material *vacuumMaterial, G4double xApertureIn=0, G4double yApertureIn=0, G4double xApertureOutIn=0, G4double yApertureOutIn=0, G4Colour *colourIn=nullptr, G4bool circularOuterIn=false)
 
virtual void SetMinimumKineticEnergy (G4double minimimumKineticEnergyIn)
 
virtual G4String Material () const
 Accessor. More...
 
virtual G4double XApertureIn () const
 Accessor. More...
 
virtual G4double XApertureOut () const
 Accessor. More...
 
virtual G4double YApertureIn () const
 Accessor. More...
 
virtual G4double YApertureOut () const
 Accessor. More...
 
- Public Member Functions inherited from BDSAcceleratorComponent
 BDSAcceleratorComponent (const G4String &name, G4double arcLength, G4double angle, const G4String &type, BDSBeamPipeInfo *beamPipeInfo=nullptr, const G4ThreeVector &inputFaceNormalIn=G4ThreeVector(0, 0,-1), const G4ThreeVector &outputFaceNormalIn=G4ThreeVector(0, 0, 1), BDSFieldInfo *fieldInfoIn=nullptr)
 
virtual void Initialise ()
 
virtual void SetRegion (const G4String &regionIn)
 Set the region name for this component. More...
 
void SetField (BDSFieldInfo *fieldInfoIn)
 Set the field definition for the whole component. More...
 
virtual void SetMinimumKineticEnergy (G4double)
 
virtual G4String GetName () const
 The name of the component without modification. More...
 
G4double GetAngle () const
 
G4double Sagitta () const
 Calculate the sagitta - ie the distance between the chord and the arc at the centre. More...
 
G4String GetType () const
 Get a string describing the type of the component. More...
 
G4String GetRegion () const
 Get the region name for this component. More...
 
virtual G4bool HasAField () const
 Whether this component has a field or not (ie is active). Implicit cast of pointer to bool. More...
 
virtual void SetFieldUsePlacementWorldTransform ()
 
BDSBeamPipeInfoGetBeamPipeInfo () const
 
virtual G4String Material () const
 Return the name of a material associated with the component - ie the primary material. More...
 
virtual std::set< G4LogicalVolume * > GetAcceleratorVacuumLogicalVolumes () const
 Access the 'vacuum' volume(s) in this component if any. Default is empty set. More...
 
virtual std::set< G4LogicalVolume * > GetAcceleratorMaterialLogicalVolumes () const
 Return a set of logical volumes excluding the ones in the 'vacuum' set. More...
 
void IncrementCopyNumber ()
 Increment (+1) the number of times this component has been copied. More...
 
G4int GetCopyNumber () const
 Get the number of times this component has been copied. More...
 
BDSSimpleComponentEndPieceBefore () const
 
BDSSimpleComponentEndPieceAfter () const
 
virtual void SetBiasVacuumList (const std::list< std::string > &biasVacuumListIn)
 Copy the bias list to this element. More...
 
virtual void SetBiasMaterialList (const std::list< std::string > &biasMaterialListIn)
 Copy the bias list to this element. More...
 
virtual G4double GetArcLength () const
 
virtual G4double GetChordLength () const
 
G4ThreeVector InputFaceNormal () const
 
G4ThreeVector OutputFaceNormal () const
 
G4bool AngledInputFace () const
 Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory. More...
 
G4bool AngledOutputFace () const
 Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory. More...
 
std::list< std::string > GetBiasVacuumList () const
 Access the bias list copied from parser. More...
 
std::list< std::string > GetBiasMaterialList () const
 Access the bias list copied from parser. More...
 
virtual void SetInputFaceNormal (const G4ThreeVector &input)
 Allow updating of face normals. Virtual so derived class may apply it to daughters. More...
 
virtual void SetOutputFaceNormal (const G4ThreeVector &output)
 Allow updating of face normals. Virtual so derived class may apply it to daughters. More...
 
- Public Member Functions inherited from BDSGeometryComponent
 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) More...
 
BDSGeometryComponentoperator= (const BDSGeometryComponent &)=delete
 Assignment operator not used.
 
G4bool ContainerIsAssembly () const
 Whether the container is an assembly. If not, it's a logical volume. More...
 
void SetPlacementOffset (const G4ThreeVector &offsetIn)
 Set the offset from 0,0,0 that the object should ideally be placed in its parent. More...
 
G4ThreeVector GetExtentPositive () const
 Get the extent of the object in the positive direction in all dimensions. More...
 
G4ThreeVector GetExtentNegative () const
 Get the extent of the object in the negative direction in all dimensions. More...
 
void InheritExtents (BDSGeometryComponent const *const anotherComponent)
 Update the extents of this object with those of another object. More...
 
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. More...
 
void RegisterLogicalVolume (G4LogicalVolume *logicalVolume)
 
void RegisterLogicalVolume (const std::set< G4LogicalVolume * > &localVolumes)
 Apply RegisterLogicalVolume() to a set of logical volumes. More...
 
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. More...
 
void RegisterPhysicalVolume (G4VPhysicalVolume *physicalVolume)
 
void RegisterPhysicalVolume (const std::set< G4VPhysicalVolume * > &physicalVolumes)
 Apply RegisterPhysicalVolume() to a set of physical volumes. More...
 
void RegisterRotationMatrix (G4RotationMatrix *rotationMatrix)
 
void RegisterRotationMatrix (const std::set< G4RotationMatrix * > &rotationMatrices)
 Apply Register RotationMatrix() to a set of rotation matrices. More...
 
void RegisterVisAttributes (G4VisAttributes *visAttribute)
 
void RegisterVisAttributes (const std::set< G4VisAttributes * > &visAttributes)
 Apply RegisterVisAttribute() to a set of visualisation attributes. More...
 
void RegisterUserLimits (G4UserLimits *userLimit)
 
void RegisterUserLimits (const std::set< G4UserLimits * > &userLimits)
 Apply RegisterUserLimit to a set of user limits. More...
 
void InheritObjects (BDSGeometryComponent *component)
 
virtual std::set< G4LogicalVolume * > GetAllLogicalVolumes () const
 Access all logical volumes belonging to this component. More...
 
virtual std::set< G4LogicalVolume * > GetAllBiasingVolumes () const
 Return all logical volumes that should be used for biasing minus any that are in the excluded set. More...
 
virtual std::map< G4LogicalVolume *, BDSSDTypeGetAllSensitiveVolumes () const
 Access all sensitive volumes belonging to this component. More...
 
void MakeAllVolumesSensitive (BDSSDType stype=BDSSDType::energydep)
 
virtual void AttachSensitiveDetectors ()
 Attach a sensitive detector class to all registered sensitive volumes in this component. More...
 
virtual void ExcludeLogicalVolumeFromBiasing (G4LogicalVolume *lv)
 
void StripOuterAndMakeAssemblyVolume ()
 Change from a container logical volume to an assembly volume. More...
 
G4VSolid * GetContainerSolid () const
 Accessor - see member for more info. More...
 
G4LogicalVolume * GetContainerLogicalVolume () const
 Accessor - see member for more info. More...
 
G4AssemblyVolume * GetContainerAssemblyVolume () const
 Accessor - see member for more info. More...
 
G4Transform3D GetPlacementTransform () const
 Accessor - see member for more info. More...
 
G4ThreeVector GetPlacementOffset () const
 Accessor - see member for more info. More...
 
G4RotationMatrix * GetPlacementRotation () const
 Accessor - see member for more info. More...
 
BDSExtent GetExtent () const
 Accessor - see member for more info. More...
 
BDSExtent GetInnerExtent () const
 Accessor - see member for more info. More...
 
std::pair< G4double, G4double > GetExtentX () const
 Accessor - see member for more info. More...
 
std::pair< G4double, G4double > GetExtentY () const
 Accessor - see member for more info. More...
 
std::pair< G4double, G4double > GetExtentZ () const
 Accessor - see member for more info. More...
 
std::pair< G4double, G4double > GetInnerExtentX () const
 Accessor - see member for more info. More...
 
std::pair< G4double, G4double > GetInnerExtentY () const
 Accessor - see member for more info. More...
 
std::pair< G4double, G4double > GetInnerExtentZ () const
 Accessor - see member for more info. More...
 
virtual std::set< G4VPhysicalVolume * > GetAllPhysicalVolumes () const
 Accessor - see member for more info. More...
 
virtual std::set< G4RotationMatrix * > GetAllRotationMatrices () const
 Accessor - see member for more info. More...
 
virtual std::set< G4VisAttributes * > GetAllVisAttributes () const
 Accessor - see member for more info. More...
 
virtual std::set< G4UserLimits * > GetAllUserLimits () const
 Accessor - see member for more info. More...
 
virtual std::set< BDSGeometryComponent * > GetAllDaughters () const
 Accessor - see member for more info. More...
 
virtual std::set< G4VSolid * > GetAllSolids () const
 Accessor - see member for more info. More...
 
void SetExtent (const BDSExtent &extIn)
 Set extent. More...
 
void SetInnerExtent (const BDSExtent &extIn)
 Set extent. More...
 

Protected Member Functions

virtual void CheckParameters () override
 
virtual void Build () override
 Override function in BDSCollimator for totally different construction. More...
 
virtual void BuildContainerLogicalVolume () override
 Override function in BDSCollimator for different size based container. More...
 
virtual void BuildInnerCollimator () final
 To fulfill inheritance but unused. More...
 
- Protected Member Functions inherited from BDSCollimator
virtual void CheckParameters ()
 
virtual void Build ()
 
virtual void BuildContainerLogicalVolume ()
 
virtual void BuildInnerCollimator ()=0
 
G4UserLimits * CollimatorUserLimits ()
 Return either default user limits or custom ones based on optional minimumKineticEnergy. More...
 
- Protected Member Functions inherited from BDSAcceleratorComponent
virtual void Build ()
 
virtual void BuildContainerLogicalVolume ()=0
 
void SetAcceleratorVacuumLogicalVolume (G4LogicalVolume *accVacLVIn)
 
void SetAcceleratorVacuumLogicalVolume (const std::set< G4LogicalVolume * > &accVacLVIn)
 
virtual void BuildUserLimits ()
 
virtual void AttachUserLimits () const
 Doesn't change member variables, but may change their contents. More...
 

Protected Attributes

G4VSolid * jawSolid
 Jaw solid. More...
 
G4double xSizeLeft
 Offset of jaw 1. More...
 
G4double xSizeRight
 Offset of jaw 2. More...
 
G4double xHalfGap
 Half gap separation between jaws. More...
 
G4double jawHalfWidth
 Half width of each jaw. More...
 
G4double yHalfHeight
 Half height of each jaw. More...
 
G4bool buildLeftJaw
 Build left jaw or not. More...
 
G4bool buildRightJaw
 Build right jaw or not. More...
 
G4bool buildAperture
 Build aperture or not. More...
 
- Protected Attributes inherited from BDSCollimator
G4double horizontalWidth
 Horizontal width. More...
 
G4Material * collimatorMaterial
 Material. More...
 
G4Material * vacuumMaterial
 Vacuum material. More...
 
G4double xAperture
 Aperture at entrance in x dimension. More...
 
G4double yAperture
 Aperture at entrance in y dimension. More...
 
G4double xApertureOut
 Aperture at exit in x dimension. More...
 
G4double yApertureOut
 Aperture at exit in y dimension. More...
 
G4bool tapered
 Flag for tapered collimator. More...
 
G4Colour * colour
 Colour of collimator. More...
 
G4double minKineticEnergy
 Optional minimum kinetic energy for collimator materials. More...
 
G4bool circularOuter
 Aperture type of the collimator. More...
 
G4VSolid * collimatorSolid
 Geometrical objects: More...
 
G4VSolid * innerSolid
 Geometrical objects: More...
 
G4VSolid * vacuumSolid
 Geometrical objects: More...
 
- Protected Attributes inherited from BDSAcceleratorComponent
BDSBeamPipeInfobeamPipeInfo
 Optional beam pipe recipe that is written out to the survey if it exists. More...
 
std::set< G4LogicalVolume * > acceleratorVacuumLV
 A set of logical volumes we classify as 'vacuum' for biasing purposes. More...
 
BDSSimpleComponentendPieceBefore
 
BDSSimpleComponentendPieceAfter
 
G4UserLimits * userLimits
 Cache of user limits. More...
 
BDSFieldInfofieldInfo
 Recipe for field that could overlay this whole component. More...
 
const G4String name
 Const protected member variable that may not be changed by derived classes. More...
 
const G4double arcLength
 Const protected member variable that may not be changed by derived classes. More...
 
const G4String type
 Const protected member variable that may not be changed by derived classes. More...
 
G4double chordLength
 Protected member variable that can be modified by derived classes. More...
 
G4double angle
 Protected member variable that can be modified by derived classes. More...
 
G4String region
 Protected member variable that can be modified by derived classes. More...
 
- Protected Attributes inherited from BDSGeometryComponent
G4bool containerIsAssembly
 True if the 'container' is really an assembly; false if an LV. More...
 
G4VSolid * containerSolid
 
G4LogicalVolume * containerLogicalVolume
 
G4AssemblyVolume * containerAssembly
 
BDSExtent outerExtent
 
BDSExtent innerExtent
 
std::set< BDSGeometryComponent * > allDaughters
 registry of all daughter geometry components More...
 
std::set< G4VSolid * > allSolids
 registry of all solids belonging to this component More...
 
std::set< G4LogicalVolume * > allLogicalVolumes
 
std::map< G4LogicalVolume *, BDSSDTypesensitivity
 
G4bool overrideSensitivity
 
std::set< G4VPhysicalVolume * > allPhysicalVolumes
 registry of all physical volumes belonging to this component More...
 
std::set< G4RotationMatrix * > allRotationMatrices
 registry of all rotation matrices belonging to this component More...
 
std::set< G4VisAttributes * > allVisAttributes
 registry of all visualisation attributes belonging to this component More...
 
std::set< G4UserLimits * > allUserLimits
 registry of all user limits belonging to this component More...
 
G4ThreeVector placementOffset
 
G4RotationMatrix * placementRotation
 
std::set< G4LogicalVolume * > * lvsExcludedFromBiasing
 Volumes that should not be included when return GetAllBiasingVolumes(). More...
 

Private Member Functions

 BDSCollimatorJaw ()=delete
 Private default constructor to force the use of the supplied one.
 
BDSCollimatorJawoperator= (const BDSCollimatorJaw &)=delete
 Assignment and copy constructor not implemented nor used.
 
 BDSCollimatorJaw (BDSCollimatorJaw &)=delete
 Assignment and copy constructor not implemented nor used.
 

Additional Inherited Members

- Static Public Member Functions inherited from BDSGeometryComponent
static void AttachUserLimitsToAssembly (G4AssemblyVolume *av, G4UserLimits *ul)
 Utility function to apply user limits to an assembly volume as there's not interface. More...
 
- Static Public Attributes inherited from BDSAcceleratorComponent
static G4double lengthSafetyLarge = 0
 
- Static Protected Attributes inherited from BDSAcceleratorComponent
static G4double lengthSafety = -1
 Useful variable often used in construction. More...
 
static G4Material * emptyMaterial = nullptr
 Useful variable often used in construction. More...
 
static G4Material * worldMaterial = nullptr
 Useful variable often used in construction. More...
 
static G4bool checkOverlaps = false
 Useful variable often used in construction. More...
 
static G4bool sensitiveOuter = true
 Useful variable often used in construction. More...
 
static G4bool sensitiveVacuum = false
 Useful variable often used in construction. More...
 
static G4VisAttributes * containerVisAttr = nullptr
 Useful variable often used in construction. More...
 

Detailed Description

Collimator with only two jaw and no top bit.

Author
Will Shields

Definition at line 36 of file BDSCollimatorJaw.hh.

Constructor & Destructor Documentation

◆ BDSCollimatorJaw()

BDSCollimatorJaw::BDSCollimatorJaw ( G4String  nameIn,
G4double  lengthIn,
G4double  horizontalWidthIn,
G4double  xHalfGapIn,
G4double  yHalfHeightIn,
G4double  xsizeLeftIn,
G4double  xsizeRightIn,
G4bool  buildLeftJawIn,
G4bool  buildRightJawIn,
G4Material *  collimatorMaterialIn,
G4Material *  vacuumMaterialIn,
G4Colour *  colourIn = nullptr 
)

Definition at line 38 of file BDSCollimatorJaw.cc.

◆ ~BDSCollimatorJaw()

BDSCollimatorJaw::~BDSCollimatorJaw ( )
virtual

Definition at line 74 of file BDSCollimatorJaw.cc.

Member Function Documentation

◆ Build()

void BDSCollimatorJaw::Build ( )
overrideprotectedvirtual

◆ BuildContainerLogicalVolume()

void BDSCollimatorJaw::BuildContainerLogicalVolume ( )
overrideprotectedvirtual

Override function in BDSCollimator for different size based container.

Reimplemented from BDSCollimator.

Definition at line 123 of file BDSCollimatorJaw.cc.

References BDSAcceleratorComponent::chordLength, BDSCollimator::horizontalWidth, BDSAcceleratorComponent::name, BDSGeometryComponent::SetExtent(), BDSCollimator::vacuumMaterial, and yHalfHeight.

Here is the call graph for this function:

◆ BuildInnerCollimator()

virtual void BDSCollimatorJaw::BuildInnerCollimator ( )
inlinefinalprotectedvirtual

To fulfill inheritance but unused.

Implements BDSCollimator.

Definition at line 65 of file BDSCollimatorJaw.hh.

◆ CheckParameters()

void BDSCollimatorJaw::CheckParameters ( )
overrideprotectedvirtual

Check and update parameters before construction. Called at the start of Build() as we can't call a virtual function in a constructor.

Reimplemented from BDSCollimator.

Definition at line 77 of file BDSCollimatorJaw.cc.

References buildAperture, buildLeftJaw, buildRightJaw, BDSCollimator::colour, BDSColours::GetColour(), BDSCollimator::horizontalWidth, BDSColours::Instance(), BDS::IsFinite(), jawHalfWidth, BDSAcceleratorComponent::name, xHalfGap, xSizeLeft, xSizeRight, and yHalfHeight.

Referenced by Build().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ buildAperture

G4bool BDSCollimatorJaw::buildAperture
protected

Build aperture or not.

Definition at line 75 of file BDSCollimatorJaw.hh.

Referenced by Build(), and CheckParameters().

◆ buildLeftJaw

G4bool BDSCollimatorJaw::buildLeftJaw
protected

Build left jaw or not.

Definition at line 73 of file BDSCollimatorJaw.hh.

Referenced by Build(), and CheckParameters().

◆ buildRightJaw

G4bool BDSCollimatorJaw::buildRightJaw
protected

Build right jaw or not.

Definition at line 74 of file BDSCollimatorJaw.hh.

Referenced by Build(), and CheckParameters().

◆ jawHalfWidth

G4double BDSCollimatorJaw::jawHalfWidth
protected

Half width of each jaw.

Definition at line 71 of file BDSCollimatorJaw.hh.

Referenced by CheckParameters().

◆ jawSolid

G4VSolid* BDSCollimatorJaw::jawSolid
protected

Jaw solid.

Definition at line 67 of file BDSCollimatorJaw.hh.

◆ xHalfGap

G4double BDSCollimatorJaw::xHalfGap
protected

Half gap separation between jaws.

Definition at line 70 of file BDSCollimatorJaw.hh.

Referenced by Build(), and CheckParameters().

◆ xSizeLeft

G4double BDSCollimatorJaw::xSizeLeft
protected

Offset of jaw 1.

Definition at line 68 of file BDSCollimatorJaw.hh.

Referenced by Build(), and CheckParameters().

◆ xSizeRight

G4double BDSCollimatorJaw::xSizeRight
protected

Offset of jaw 2.

Definition at line 69 of file BDSCollimatorJaw.hh.

Referenced by Build(), and CheckParameters().

◆ yHalfHeight

G4double BDSCollimatorJaw::yHalfHeight
protected

Half height of each jaw.

Definition at line 72 of file BDSCollimatorJaw.hh.

Referenced by Build(), BuildContainerLogicalVolume(), and CheckParameters().


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