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

Base class for gas capillary. More...

#include <BDSGasCapillary.hh>

Inheritance diagram for BDSGasCapillary:
Inheritance graph
Collaboration diagram for BDSGasCapillary:
Collaboration graph

Public Member Functions

 BDSGasCapillary (const G4String &name, G4double length, BDSBeamPipeInfo *beamPipeInfo, G4double horizontalWidth, G4Material *capillaryOuterMaterial, G4Material *capillaryGasMaterial, G4Material *electrodeMaterial, G4double capillaryGasDiameter=0, G4double electrodeThickness=0, G4bool circularOuterIn=false)
 
virtual G4String CapillaryOuterMaterial () const
 Accessor.
 
virtual G4String CapillaryGasMaterial () const
 Accessor.
 
virtual G4String ElectrodeMaterial () const
 Accessor.
 
- 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.
 
void SetField (BDSFieldInfo *fieldInfoIn)
 Set the field definition for the whole component.
 
virtual void SetMinimumKineticEnergy (G4double)
 
virtual G4String GetName () const
 The name of the component without modification.
 
G4double GetAngle () const
 
G4double Sagitta () const
 Calculate the sagitta - ie the distance between the chord and the arc at the centre.
 
G4String GetType () const
 Get a string describing the type of the component.
 
G4String GetRegion () const
 Get the region name for this component.
 
virtual G4bool HasAField () const
 Whether this component has a field or not (ie is active). Implicit cast of pointer to bool.
 
virtual void SetFieldUsePlacementWorldTransform ()
 
BDSBeamPipeInfoGetBeamPipeInfo () const
 
virtual G4String Material () const
 Return the name of a material associated with the component - ie the primary material.
 
virtual std::set< G4LogicalVolume * > GetAcceleratorVacuumLogicalVolumes () const
 Access the 'vacuum' volume(s) in this component if any. Default is empty set.
 
virtual std::set< G4LogicalVolume * > GetAcceleratorMaterialLogicalVolumes () const
 Return a set of logical volumes excluding the ones in the 'vacuum' set.
 
void IncrementCopyNumber ()
 Increment (+1) the number of times this component has been copied.
 
G4int GetCopyNumber () const
 Get the number of times this component has been copied.
 
BDSSimpleComponentEndPieceBefore () const
 
BDSSimpleComponentEndPieceAfter () const
 
virtual void SetBiasVacuumList (const std::list< std::string > &biasVacuumListIn)
 Copy the bias list to this element.
 
virtual void SetBiasMaterialList (const std::list< std::string > &biasMaterialListIn)
 Copy the bias list to this element.
 
virtual void SetBiasMaterialLVList (const std::list< std::string > &biasMaterialLVListIn)
 Copy the bias list to this element.
 
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.
 
G4bool AngledOutputFace () const
 Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory.
 
std::list< std::string > GetBiasVacuumList () const
 Access the bias list copied from parser.
 
std::list< std::string > GetBiasMaterialList () const
 Access the bias list copied from parser.
 
std::list< std::string > GetBiasMaterialLVList () const
 Access the bias list copied from parser.
 
virtual void SetInputFaceNormal (const G4ThreeVector &input)
 Allow updating of face normals. Virtual so derived class may apply it to daughters.
 
virtual void SetOutputFaceNormal (const G4ThreeVector &output)
 Allow updating of face normals. Virtual so derived class may apply it to daughters.
 
- 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)
 
BDSGeometryComponentoperator= (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 *, BDSSDTypeGetAllSensitiveVolumes () 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.
 
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 Member Functions

virtual void CheckParameters ()
 
virtual void BuildContainerLogicalVolume ()
 
virtual void BuildUncutSolid ()
 
virtual void BuildHolesSolid ()
 
virtual void BuildCutSolid ()
 
virtual void Build ()
 
virtual void SetupLV (G4LogicalVolume *lv, G4Colour *colour)
 
- Protected Member Functions inherited from BDSAcceleratorComponent
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.
 

Protected Attributes

G4double horizontalWidth
 Horizontal width.
 
G4double capillaryGasDiameter
 Aperture diameter of the gas.
 
G4double electrodeThickness
 Thickness of the two electrodes.
 
G4bool circularOuter
 Aperture type of the outer wall.
 
G4VSolid * capillaryOuterSolid
 Solids:
 
G4VSolid * capillaryGasSolid
 Solids:
 
G4VSolid * electrodeSolid
 Solids:
 
G4VSolid * capillaryOuterUncutSolid
 Solids:
 
G4VSolid * electrodeUncutSolid
 Solids:
 
G4VSolid * capillaryHoleSolid
 Solids:
 
G4VSolid * electrodeHoleSolid
 Solids:
 
G4Material * capillaryOuterMaterial
 Materials:
 
G4Material * capillaryGasMaterial
 Materials:
 
G4Material * electrodeMaterial
 Materials:
 
G4LogicalVolume * capillaryOuterLogicalVolume
 Logical Volumes:
 
G4LogicalVolume * capillaryGasLogicalVolume
 Logical Volumes:
 
G4LogicalVolume * electrodeLogicalVolume
 Logical Volumes:
 
- Protected Attributes inherited from BDSAcceleratorComponent
BDSBeamPipeInfobeamPipeInfo
 Optional beam pipe recipe that is written out to the survey if it exists.
 
std::set< G4LogicalVolume * > acceleratorVacuumLV
 A set of logical volumes we classify as 'vacuum' for biasing purposes.
 
BDSSimpleComponentendPieceBefore
 
BDSSimpleComponentendPieceAfter
 
G4UserLimits * userLimits
 Cache of user limits.
 
BDSFieldInfofieldInfo
 Recipe for field that could overlay this whole component.
 
const G4String name
 Const protected member variable that may not be changed by derived classes.
 
const G4double arcLength
 Const protected member variable that may not be changed by derived classes.
 
const G4String type
 Const protected member variable that may not be changed by derived classes.
 
G4double chordLength
 Protected member variable that can be modified by derived classes.
 
G4double angle
 Protected member variable that can be modified by derived classes.
 
G4String region
 Protected member variable that can be modified by derived classes.
 
- Protected Attributes inherited from BDSGeometryComponent
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 *, BDSSDTypesensitivity
 
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().
 

Private Member Functions

 BDSGasCapillary ()=delete
 Private default constructor to force the use of the supplied one.
 
BDSGasCapillaryoperator= (const BDSGasCapillary &)=delete
 Assignment and copy constructor not implemented nor used.
 
 BDSGasCapillary (BDSGasCapillary &)=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.
 
- 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.
 
static G4Material * emptyMaterial = nullptr
 Useful variable often used in construction.
 
static G4Material * worldMaterial = nullptr
 Useful variable often used in construction.
 
static G4bool checkOverlaps = false
 Useful variable often used in construction.
 
static G4bool sensitiveOuter = true
 Useful variable often used in construction.
 
static G4bool sensitiveVacuum = false
 Useful variable often used in construction.
 
static G4VisAttributes * containerVisAttr = nullptr
 Useful variable often used in construction.
 

Detailed Description

Base class for gas capillary.

Author
Marin Deniaud

Definition at line 36 of file BDSGasCapillary.hh.

Constructor & Destructor Documentation

◆ BDSGasCapillary()

BDSGasCapillary::BDSGasCapillary ( const G4String &  name,
G4double  length,
BDSBeamPipeInfo beamPipeInfo,
G4double  horizontalWidth,
G4Material *  capillaryOuterMaterial,
G4Material *  capillaryGasMaterial,
G4Material *  electrodeMaterial,
G4double  capillaryGasDiameter = 0,
G4double  electrodeThickness = 0,
G4bool  circularOuterIn = false 
)

Definition at line 45 of file BDSGasCapillary.cc.

◆ ~BDSGasCapillary()

BDSGasCapillary::~BDSGasCapillary ( )
virtual

Definition at line 76 of file BDSGasCapillary.cc.

Member Function Documentation

◆ Build()

void BDSGasCapillary::Build ( )
protectedvirtual

This calls BuildContainerLogicalVolume() and then sets the visual attributes of the container logical volume. This should be overridden by derived class to add more geometry apart from the container volume. The overridden Build() function can however, call make use of this function to call BuildContainerLogicalVolume() by calling BDSAcceleratorComponent::Build() at the beginning.

Reimplemented from BDSAcceleratorComponent.

Definition at line 214 of file BDSGasCapillary.cc.

References BDSAcceleratorComponent::Build(), capillaryGasMaterial, capillaryGasSolid, capillaryOuterMaterial, capillaryOuterSolid, BDSAcceleratorComponent::checkOverlaps, CheckParameters(), BDSAcceleratorComponent::chordLength, electrodeMaterial, electrodeSolid, electrodeThickness, BDSAcceleratorComponent::GetAcceleratorVacuumLogicalVolumes(), BDSColours::Instance(), BDSAcceleratorComponent::name, and BDSGeometryComponent::RegisterPhysicalVolume().

Here is the call graph for this function:

◆ BuildContainerLogicalVolume()

void BDSGasCapillary::BuildContainerLogicalVolume ( )
protectedvirtual

◆ BuildCutSolid()

void BDSGasCapillary::BuildCutSolid ( )
protectedvirtual

Definition at line 190 of file BDSGasCapillary.cc.

◆ BuildHolesSolid()

void BDSGasCapillary::BuildHolesSolid ( )
protectedvirtual

Definition at line 174 of file BDSGasCapillary.cc.

◆ BuildUncutSolid()

void BDSGasCapillary::BuildUncutSolid ( )
protectedvirtual

Definition at line 144 of file BDSGasCapillary.cc.

◆ CapillaryGasMaterial()

G4String BDSGasCapillary::CapillaryGasMaterial ( ) const
virtual

Accessor.

Definition at line 104 of file BDSGasCapillary.cc.

References capillaryGasMaterial.

◆ CapillaryOuterMaterial()

G4String BDSGasCapillary::CapillaryOuterMaterial ( ) const
virtual

Accessor.

Definition at line 96 of file BDSGasCapillary.cc.

References capillaryOuterMaterial.

◆ CheckParameters()

void BDSGasCapillary::CheckParameters ( )
protectedvirtual

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

Definition at line 79 of file BDSGasCapillary.cc.

References capillaryGasDiameter, horizontalWidth, BDS::IsFinite(), and BDSAcceleratorComponent::name.

Referenced by Build().

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

◆ ElectrodeMaterial()

G4String BDSGasCapillary::ElectrodeMaterial ( ) const
virtual

Accessor.

Definition at line 112 of file BDSGasCapillary.cc.

References electrodeMaterial.

◆ SetupLV()

void BDSGasCapillary::SetupLV ( G4LogicalVolume *  lv,
G4Colour *  colour 
)
protectedvirtual

Definition at line 283 of file BDSGasCapillary.cc.

Field Documentation

◆ capillaryGasDiameter

G4double BDSGasCapillary::capillaryGasDiameter
protected

Aperture diameter of the gas.

Definition at line 74 of file BDSGasCapillary.hh.

Referenced by CheckParameters().

◆ capillaryGasLogicalVolume

G4LogicalVolume* BDSGasCapillary::capillaryGasLogicalVolume
protected

Logical Volumes:

Definition at line 98 of file BDSGasCapillary.hh.

◆ capillaryGasMaterial

G4Material* BDSGasCapillary::capillaryGasMaterial
protected

Materials:

Definition at line 92 of file BDSGasCapillary.hh.

Referenced by Build(), and CapillaryGasMaterial().

◆ capillaryGasSolid

G4VSolid* BDSGasCapillary::capillaryGasSolid
protected

Solids:

Definition at line 80 of file BDSGasCapillary.hh.

Referenced by Build().

◆ capillaryHoleSolid

G4VSolid* BDSGasCapillary::capillaryHoleSolid
protected

Solids:

Definition at line 86 of file BDSGasCapillary.hh.

◆ capillaryOuterLogicalVolume

G4LogicalVolume* BDSGasCapillary::capillaryOuterLogicalVolume
protected

Logical Volumes:

Definition at line 97 of file BDSGasCapillary.hh.

◆ capillaryOuterMaterial

G4Material* BDSGasCapillary::capillaryOuterMaterial
protected

Materials:

Definition at line 91 of file BDSGasCapillary.hh.

Referenced by Build(), and CapillaryOuterMaterial().

◆ capillaryOuterSolid

G4VSolid* BDSGasCapillary::capillaryOuterSolid
protected

Solids:

Definition at line 79 of file BDSGasCapillary.hh.

Referenced by Build().

◆ capillaryOuterUncutSolid

G4VSolid* BDSGasCapillary::capillaryOuterUncutSolid
protected

Solids:

Definition at line 83 of file BDSGasCapillary.hh.

◆ circularOuter

G4bool BDSGasCapillary::circularOuter
protected

Aperture type of the outer wall.

Definition at line 76 of file BDSGasCapillary.hh.

◆ electrodeHoleSolid

G4VSolid* BDSGasCapillary::electrodeHoleSolid
protected

Solids:

Definition at line 87 of file BDSGasCapillary.hh.

◆ electrodeLogicalVolume

G4LogicalVolume* BDSGasCapillary::electrodeLogicalVolume
protected

Logical Volumes:

Definition at line 99 of file BDSGasCapillary.hh.

◆ electrodeMaterial

G4Material* BDSGasCapillary::electrodeMaterial
protected

Materials:

Definition at line 93 of file BDSGasCapillary.hh.

Referenced by Build(), and ElectrodeMaterial().

◆ electrodeSolid

G4VSolid* BDSGasCapillary::electrodeSolid
protected

Solids:

Definition at line 81 of file BDSGasCapillary.hh.

Referenced by Build().

◆ electrodeThickness

G4double BDSGasCapillary::electrodeThickness
protected

Thickness of the two electrodes.

Definition at line 75 of file BDSGasCapillary.hh.

Referenced by Build().

◆ electrodeUncutSolid

G4VSolid* BDSGasCapillary::electrodeUncutSolid
protected

Solids:

Definition at line 84 of file BDSGasCapillary.hh.

◆ horizontalWidth

G4double BDSGasCapillary::horizontalWidth
protected

Horizontal width.

Definition at line 73 of file BDSGasCapillary.hh.

Referenced by CheckParameters().


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