19#ifndef BDSBEAMLINEELEMENT_H
20#define BDSBEAMLINEELEMENT_H
22#include "BDSAcceleratorComponent.hh"
23#include "BDSExtent.hh"
24#include "BDSExtentGlobal.hh"
25#include "BDSSamplerInfo.hh"
26#include "BDSSamplerType.hh"
27#include "BDSTiltOffset.hh"
30#include "G4ThreeVector.hh"
38typedef HepGeom::Transform3D G4Transform3D;
42typedef CLHEP::HepRotation G4RotationMatrix;
43class G4VPhysicalVolume;
70 const G4ThreeVector& positionStartIn,
71 const G4ThreeVector& positionMiddleIn,
72 const G4ThreeVector& positionEndIn,
73 G4RotationMatrix* rotationStartIn,
74 G4RotationMatrix* rotationMiddleIn,
75 G4RotationMatrix* rotationEndIn,
76 const G4ThreeVector& referencePositionStartIn,
77 const G4ThreeVector& referencePositionMiddleIn,
78 const G4ThreeVector& referencePositionEndIn,
79 G4RotationMatrix* referenceRotationStartIn,
80 G4RotationMatrix* referenceRotationMiddleIn,
81 G4RotationMatrix* referenceRotationEndIn,
82 G4double sPositionStartIn,
83 G4double sPositionMiddleIn,
84 G4double sPositionEndIn,
93 std::set<G4VPhysicalVolume*>
PlaceElement(
const G4String& pvName,
94 G4VPhysicalVolume* containerPV,
95 G4bool useCLPlacementTransform,
97 G4bool checkOverlaps)
const;
Abstract class that represents a component of an accelerator.
G4double GetAngle() const
G4bool AngledInputFace() const
Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory.
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.
virtual G4double GetChordLength() const
virtual G4double GetArcLength() const
BDSBeamPipeInfo * GetBeamPipeInfo() const
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.
Holder class for all information required to describe a beam pipe model.
A class that holds a fully constructed BDSAcceleratorComponent as well as any information relevant to...
G4double GetChordLength() const
Accessor.
G4ThreeVector positionEnd
Global coordinates for the start, middle and end of this beamline element.
G4ThreeVector OutputFaceNormal() const
Return face normal accounting for placement tilt of this component.
G4double GetAngle() const
Accessor.
G4ThreeVector GetPositionMiddle() const
Accessor.
G4ThreeVector referencePositionStart
G4RotationMatrix * referenceRotationMiddle
BDSAcceleratorComponent * component
The accelerator component.
void SetReferencePositionEnd(G4ThreeVector newReferencePositionEnd)
Reassign the end variable as required when applying a transform.
G4ThreeVector GetReferencePositionEnd() const
Accessor.
G4int index
Index of this item in the beamline - saves keeping track of iterators and conversion.
G4ThreeVector GetPositionEnd() const
Accessor.
G4ThreeVector positionStart
Global coordinates for the start, middle and end of this beamline element.
G4double sPositionEnd
S Positions for the start, middle and end of this beamline element.
friend std::ostream & operator<<(std::ostream &out, BDSBeamlineElement const &element)
Output stream.
BDSTiltOffset * tiltOffset
The tilt and offset this element was constructed with. Default is nullptr.
BDSSamplerType GetSamplerType() const
Accessor.
G4RotationMatrix * GetReferenceRotationStart() const
Accessor.
G4Transform3D * placementTransform
G4RotationMatrix * GetRotationEnd() const
Accessor.
std::set< G4VPhysicalVolume * > PlaceElement(const G4String &pvName, G4VPhysicalVolume *containerPV, G4bool useCLPlacementTransform, G4int copyNumber, G4bool checkOverlaps) const
G4ThreeVector GetPositionStart() const
Accessor.
BDSExtent GetExtent() const
Accessor.
G4String GetPlacementName() const
Accessor.
BDSTiltOffset * GetTiltOffset() const
Accessor.
void UpdateSamplerPlacementTransform(const G4Transform3D &tranfsormIn)
G4ThreeVector referencePositionEnd
G4ThreeVector InputFaceNormal() const
Return face normal accounting for placement tilt of this component.
G4bool AngledOutputFace() const
Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory.
G4Transform3D * samplerPlacementTransform
G4Transform3D * GetPlacementTransform() const
Accessor.
G4RotationMatrix * GetReferenceRotationEnd() const
Accessor.
G4String GetMaterial() const
Accessor.
G4String GetName() const
Accessor.
G4Transform3D * placementTransformCL
G4double sPositionStart
S Positions for the start, middle and end of this beamline element.
BDSSamplerInfo * GetSamplerInfo() const
Accessor.
G4int GetIndex() const
Accessor.
G4ThreeVector GetReferencePositionMiddle() const
Accessor.
G4double GetSPositionEnd() const
Accessor.
G4RotationMatrix * GetRotationStart() const
Accessor.
G4ThreeVector GetReferencePositionStart() const
Accessor.
BDSAcceleratorComponent * GetAcceleratorComponent() const
Accessor.
G4Transform3D * GetPlacementTransformCL() const
Accessor.
G4RotationMatrix * GetReferenceRotationMiddle() const
Accessor.
G4bool Overlaps(const BDSBeamlineElement *otherElement) const
Whether this beam line element will overlaps in 3D Cartesian coordinates with another.
G4ThreeVector positionMiddle
Global coordinates for the start, middle and end of this beamline element.
G4int copyNumber
identification number of AcceleratorComponent (0 for first volume of given type)
G4RotationMatrix * referenceRotationStart
G4Transform3D * GetSamplerPlacementTransform() const
Accessor.
G4RotationMatrix * rotationStart
Global rotation matrices for the start, middle and end of this beamline element.
G4RotationMatrix * rotationMiddle
Global rotation matrices for the start, middle and end of this beamline element.
G4double GetSPositionMiddle() const
Accessor.
G4double sPositionMiddle
S Positions for the start, middle and end of this beamline element.
void SetReferenceRotationEnd(G4RotationMatrix *newReferenceRotatonEnd)
Reassign the end variable as required when applying a transform.
G4int GetCopyNo() const
Accessor.
G4RotationMatrix * rotationEnd
Global rotation matrices for the start, middle and end of this beamline element.
G4RotationMatrix * referenceRotationEnd
G4double GetArcLength() const
Accessor.
G4RotationMatrix * GetRotationMiddle() const
Accessor.
G4double GetTilt() const
Convenience accessor.
G4String GetType() const
Accessor.
BDSBeamPipeInfo * GetBeamPipeInfo() const
Accessor.
static std::set< G4VPhysicalVolume * > GetPVsFromAssembly(G4AssemblyVolume *av)
Utility method to account for the interface in G4AssemblyVolume.
G4bool AngledInputFace() const
Whether the face normal is angled at all w.r.t. the incoming / outgoing reference trajectory.
G4ThreeVector referencePositionMiddle
BDSExtentGlobal GetExtentGlobal() const
Create a global extent object from the extent of the component.
G4double GetSPositionStart() const
Accessor.
Holder for +- extents in 3 dimensions with a rotation and translation.
Holder for +- extents in 3 dimensions.
BDSExtent GetExtent() const
Accessor - see member for more info.
All info required to build a sampler but not place it.
A holder for any placement offsets and rotations for a BDSAcceleratorComponent.
G4double GetTilt() const
Accessor.