19#ifndef BDSACCELERATORCOMPONENT_H
20#define BDSACCELERATORCOMPONENT_H
24#include "BDSGeometryComponent.hh"
101 const G4ThreeVector& inputFaceNormalIn = G4ThreeVector(0,0,-1),
102 const G4ThreeVector& outputFaceNormalIn = G4ThreeVector(0,0, 1),
222 virtual void Build();
Abstract class that represents a component of an accelerator.
virtual void Initialise()
BDSFieldInfo * fieldInfo
Recipe for field that could overlay this whole component.
G4UserLimits * userLimits
Cache of user limits.
G4double GetAngle() const
G4bool AngledInputFace() const
Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory.
std::list< std::string > biasVacuumList
Copy of bias list from parser for this particular component.
G4double Sagitta() const
Calculate the sagitta - ie the distance between the chord and the arc at the centre.
virtual G4String Material() const
Return the name of a material associated with the component - ie the primary material.
virtual G4String GetName() const
The name of the component without modification.
G4ThreeVector outputFaceNormal
Output face unit normal vector in outgoing reference coordinate frame.
G4String GetRegion() const
Get the region name for this component.
BDSAcceleratorComponent & operator=(const BDSAcceleratorComponent &)=delete
Assignment and copy constructor not implemented nor used.
G4ThreeVector inputFaceNormal
Input face unit normal vector in incoming reference coordinate frame.
const G4double arcLength
Const protected member variable that may not be changed by derived classes.
void SetAcceleratorVacuumLogicalVolume(G4LogicalVolume *accVacLVIn)
BDSSimpleComponent * EndPieceBefore() const
virtual G4bool HasAField() const
Whether this component has a field or not (ie is active). Implicit cast of pointer to bool.
BDSAcceleratorComponent(BDSAcceleratorComponent &)=delete
Assignment and copy constructor not implemented nor used.
const G4String name
Const protected member variable that may not be changed by derived classes.
static G4Material * emptyMaterial
Useful variable often used in construction.
static G4bool sensitiveOuter
Useful variable often used in construction.
virtual void SetOutputFaceNormal(const G4ThreeVector &output)
Allow updating of face normals. Virtual so derived class may apply it to daughters.
static G4double lengthSafety
Useful variable often used in construction.
G4int copyNumber
Record of how many times this component has been copied.
virtual void SetMinimumKineticEnergy(G4double)
virtual G4double GetChordLength() const
static G4bool checkOverlaps
Useful variable often used in construction.
const G4String type
Const protected member variable that may not be changed by derived classes.
G4ThreeVector OutputFaceNormal() const
G4int GetCopyNumber() const
Get the number of times this component has been copied.
G4double angle
Protected member variable that can be modified by derived classes.
virtual G4double GetArcLength() const
virtual std::set< G4LogicalVolume * > GetAcceleratorVacuumLogicalVolumes() const
Access the 'vacuum' volume(s) in this component if any. Default is empty set.
G4ThreeVector InputFaceNormal() const
virtual std::set< G4LogicalVolume * > GetAcceleratorMaterialLogicalVolumes() const
Return a set of logical volumes excluding the ones in the 'vacuum' set.
static G4double lengthSafetyLarge
static G4Material * worldMaterial
Useful variable often used in construction.
BDSAcceleratorComponent()=delete
BDSBeamPipeInfo * GetBeamPipeInfo() const
std::list< std::string > GetBiasVacuumList() 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 BuildContainerLogicalVolume()=0
G4String region
Protected member variable that can be modified by derived classes.
virtual void BuildUserLimits()
virtual void SetBiasVacuumList(const std::list< std::string > &biasVacuumListIn)
Copy the bias list to this element.
void SetField(BDSFieldInfo *fieldInfoIn)
Set the field definition for the whole component.
virtual void AttachUserLimits() const
Doesn't change member variables, but may change their contents.
void IncrementCopyNumber()
Increment (+1) the number of times this component has been copied.
virtual void SetBiasMaterialList(const std::list< std::string > &biasMaterialListIn)
Copy the bias list to this element.
G4double chordLength
Protected member variable that can be modified by derived classes.
G4bool AngledOutputFace() const
Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory.
G4String GetType() const
Get a string describing the type of the component.
std::list< std::string > GetBiasMaterialList() const
Access the bias list copied from parser.
std::set< G4LogicalVolume * > acceleratorVacuumLV
A set of logical volumes we classify as 'vacuum' for biasing purposes.
std::list< std::string > biasMaterialList
Copy of bias list from parser for this particular component.
virtual void SetRegion(const G4String ®ionIn)
Set the region name for this component.
static G4VisAttributes * containerVisAttr
Useful variable often used in construction.
static G4bool sensitiveVacuum
Useful variable often used in construction.
BDSBeamPipeInfo * beamPipeInfo
Optional beam pipe recipe that is written out to the survey if it exists.
virtual void SetFieldUsePlacementWorldTransform()
Holder class for all information required to describe a beam pipe model.
All info required to build complete field of any type.
A generic geometry component for a bdsim model.
A BDSAcceleratorComponent wrapper for BDSGeometryComponent.