BDSAcceleratorComponent Class Reference

Abstract class that represents a component of an accelerator. It must be constructed with a name, length (arc), angle it induces (x,z plane in the local coordinates of the component) in the reference trajectory and a string representing its type. The class has no concept of its position in the beamline or in global coordinates. This information is contained in an instance of BDSBeamlineElement. More...

#include <BDSAcceleratorComponent.hh>

Inheritance diagram for BDSAcceleratorComponent:

Inheritance graph
[legend]
Collaboration diagram for BDSAcceleratorComponent:

Collaboration graph
[legend]

Public Member Functions

 BDSAcceleratorComponent (G4String name, G4double arcLength, G4double angle, G4String type, BDSTiltOffset tiltOffset=BDSTiltOffset(), G4int precisionRegion=0, BDSBeamPipeInfo *beamPipeInfo=NULL)
virtual ~BDSAcceleratorComponent ()
G4String GetName () const
 The name of the component without modification.
G4String GetType () const
 Get a string describing the type of the component.
G4int GetPrecisionRegion () const
 0 = no precision region, 1 = precision region 1, 2 = precision region 2.
G4double GetAngle () const
BDSTiltOffset GetTiltOffset () const
 Accessor for tilt offset information.
virtual G4double GetArcLength () const
 Access the length of the component.
virtual G4double GetChordLength () const
G4LogicalVolume * GetReadOutLogicalVolume () const
 Access the read out geometry.
virtual void PrepareField (G4VPhysicalVolume *referenceVolume)
G4double GetParameterValue (G4String spec, G4String name) const
 Get parameter value from the specification ('spec') string.
G4String GetParameterValueString (G4String spec, G4String name) const
 Get parameter value from the specification ('spec') string.
G4double GetSPos () const
 This function should be revisited given recent changes (v0.7).
void SetSPos (G4double spos)
 This function should be revisited given recent changes (v0.7).
void SetGFlashVolumes (G4LogicalVolume *aLogVol)
 This function should be revisited given recent changes (v0.7).
std::vector< G4LogicalVolume * > GetGFlashVolumes () const
 This function should be revisited given recent changes (v0.7).
void SetMultiplePhysicalVolumes (G4VPhysicalVolume *aPhysVol)
 This function should be revisited given recent changes (v0.7).
std::vector< G4VPhysicalVolume * > GetMultiplePhysicalVolumes () const
 This function should be revisited given recent changes (v0.7).

Protected Member Functions

virtual void Initialise ()
virtual void Build ()
virtual void BuildContainerLogicalVolume ()=0

Protected Attributes

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.
BDSTiltOffset tiltOffset
 Protected member variable that can be modified by derived classes.
G4int precisionRegion
 Protected member variable that can be modified by derived classes.
BDSBeamPipeInfobeamPipeInfo
 Protected member variable that can be modified by derived classes.

Static Protected Attributes

static G4double lengthSafety = -1
 Useful variables often used in construction.
static G4Material * emptyMaterial = NULL

Private Member Functions

 BDSAcceleratorComponent ()
BDSAcceleratorComponentoperator= (const BDSAcceleratorComponent &)
 Assignment and copy constructor not implemented nor used.
 BDSAcceleratorComponent (BDSAcceleratorComponent &)

Private Attributes

G4LogicalVolume * readOutLV
 Read out geometry volume.
G4double itsSPos
 S coordinate - to be revisited / moved to BDSBeamlineElement.
std::vector< G4LogicalVolume * > itsGFlashVolumes
std::vector< G4VPhysicalVolume * > itsMultiplePhysicalVolumes

Friends

class BDSComponentFactory
 BDSComponentFactory creates BDSAcceleratorComponents.
class BDSLine
class BDSDetectorConstruction

Detailed Description

Abstract class that represents a component of an accelerator. It must be constructed with a name, length (arc), angle it induces (x,z plane in the local coordinates of the component) in the reference trajectory and a string representing its type. The class has no concept of its position in the beamline or in global coordinates. This information is contained in an instance of BDSBeamlineElement.

This is an abstract class as the derived class must provide the implementation of BuildContainerLogicalVolume() that constructs the basic container. This is the minimum required so that an instance of the derived class will operate with the rest of the placement machinery in BDSIM. Typically, a derived class overrides the Build() function as well.

The class provides deferred construction through the Initialise() function to allow two stage construction if it's required.

Note, the geometry of any derived component should be nominally constructed along local z axis (beam direction) and x,y are transverse dimensions in a right-handed coordinate system.

This was significantly reworked in version 0.7 from the original. The indicator author is the maintainer of the new version.

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

Definition at line 42 of file BDSAcceleratorComponent.hh.


Constructor & Destructor Documentation

BDSAcceleratorComponent::BDSAcceleratorComponent ( G4String  name,
G4double  arcLength,
G4double  angle,
G4String  type,
BDSTiltOffset  tiltOffset = BDSTiltOffset(),
G4int  precisionRegion = 0,
BDSBeamPipeInfo beamPipeInfo = NULL 
)

Constructor - this is the minimum information needed to create a BDSAcceleratorComponent instance. Methods in the class will allow the derived class to associate the appropraite volumes to the members of BDSGeometryComponent - the base class. The developer of a derived class should take care to set all members of BDSGeometryComponent in the derived class, including extents. Note, this class has arc length and chord length which are initially set to be the same, unless angle is != 0 in which case, the chord length is calculated from arc length

Definition at line 17 of file BDSAcceleratorComponent.cc.

References chordLength, emptyMaterial, BDSGlobalConstants::GetLengthSafety(), BDSMaterials::GetMaterial(), BDSGlobalConstants::Instance(), BDSMaterials::Instance(), BDS::IsFinite(), itsSPos, lengthSafety, and readOutLV.

Here is the call graph for this function:

BDSAcceleratorComponent::BDSAcceleratorComponent (  )  [private]

Private default constructor to force use of provided constructors, which ensure an object meets the requirements for the rest of the construction and placement machinery in BDSIM


Member Function Documentation

void BDSAcceleratorComponent::Build (  )  [protected, virtual]

Build the container only. 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 in BDSAwakeScintillatorScreen, BDSCollimatorBase, BDSDecapole, BDSDrift, BDSKicker, BDSLWCalorimeter, BDSMagnet, BDSOctupole, BDSQuadrupole, BDSRBend, BDSScintillatorScreen, BDSSectorBend, BDSSextupole, BDSSolenoid, BDSSpoiler, and BDSTeleporter.

Definition at line 67 of file BDSAcceleratorComponent.cc.

References BuildContainerLogicalVolume(), BDSGeometryComponent::containerLogicalVolume, BDSGlobalConstants::Instance(), and BDSExecOptions::Instance().

Referenced by BDSTeleporter::Build(), BDSSpoiler::Build(), BDSMagnet::Build(), BDSLWCalorimeter::Build(), BDSCollimatorBase::Build(), and Initialise().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void BDSAcceleratorComponent::BuildContainerLogicalVolume (  )  [protected, pure virtual]

Build the container solid and logical volume that all parts of the component will contained within - must be provided by derived class.

Implemented in BDSAwakeScintillatorScreen, BDSCollimatorBase, BDSDrift, BDSDump, BDSElement, BDSLaserWire, BDSLine, BDSMagnet, BDSSampler, BDSSamplerCylinder, BDSScintillatorScreen, BDSTeleporter, BDSTerminator, and BDSTransform3D.

Referenced by Build().

Here is the caller graph for this function:

G4double BDSAcceleratorComponent::GetAngle (  )  const [inline]

Get the angle the component induces in the reference trajector (rad). Note, this is 0 for h and v kickers

Definition at line 174 of file BDSAcceleratorComponent.hh.

References angle.

void BDSAcceleratorComponent::Initialise (  )  [protected, virtual]

initialise method checks if marker logical volume already exists and builds new one if not

Reimplemented in BDSLine.

Definition at line 58 of file BDSAcceleratorComponent.cc.

References angle, Build(), BDS::BuildReadOutVolume(), chordLength, name, and readOutLV.

Referenced by BDSDetectorConstruction::BuildBeamline(), and BDSComponentFactory::createComponent().

Here is the call graph for this function:

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