19#include "BDSBeamPipe.hh"
20#include "BDSBeamPipeFactory.hh"
21#include "BDSBeamPipeInfo.hh"
23#include "BDSSDType.hh"
24#include "BDSShield.hh"
25#include "BDSUtilities.hh"
29#include "G4LogicalVolume.hh"
30#include "G4SubtractionSolid.hh"
31#include "G4VisAttributes.hh"
32#include "G4PVPlacement.hh"
39 G4double horizontalWidthIn,
42 G4Material* materialIn,
46 horizontalWidth(horizontalWidthIn),
53BDSShield::~BDSShield()
65 containerSolid =
new G4Box(
name +
"_container_solid",
69 containerLogicalVolume =
new G4LogicalVolume(containerSolid,
71 name +
"_container_lv");
76 G4VSolid* outerSolid =
new G4Box(
name +
"_outer_solid",
82 G4VSolid* shieldSolid;
83 G4LogicalVolume* shieldLV;
88 G4VSolid* innerSolid =
new G4Box(
name +
"_inner_solid",
94 shieldSolid =
new G4SubtractionSolid(
name +
"shield_solid",
99 shieldLV =
new G4LogicalVolume(shieldSolid,
105 shieldLV =
new G4LogicalVolume(outerSolid,
114 G4VisAttributes* shieldVisAttr =
new G4VisAttributes(*
colour);
115 shieldVisAttr->SetVisibility(
true);
116 shieldLV->SetVisAttributes(shieldVisAttr);
119 G4PVPlacement* shieldPV =
new G4PVPlacement(
nullptr,
123 containerLogicalVolume,
140 G4cout << __METHOD_NAME__ <<
"Shield will not fit around beam pipe - not building beam pipe!" << G4endl << G4endl;
150 G4PVPlacement* bpPV =
new G4PVPlacement(
nullptr,
152 bp->GetContainerLogicalVolume(),
154 containerLogicalVolume,
Abstract class that represents a component of an accelerator.
const G4String name
Const protected member variable that may not be changed by derived classes.
static G4bool sensitiveOuter
Useful variable often used in construction.
static G4double lengthSafety
Useful variable often used in construction.
static G4bool checkOverlaps
Useful variable often used in construction.
static G4double lengthSafetyLarge
static G4Material * worldMaterial
Useful variable often used in construction.
G4double chordLength
Protected member variable that can be modified by derived classes.
BDSBeamPipeInfo * beamPipeInfo
Optional beam pipe recipe that is written out to the survey if it exists.
static BDSBeamPipeFactory * Instance()
Singleton accessor.
Holder class for all information required to describe a beam pipe model.
G4double aper1
Public member for direct access.
G4double beamPipeThickness
Public member for direct access.
G4double aper2
Public member for direct access.
void RegisterDaughter(BDSGeometryComponent *anotherComponent)
void RegisterLogicalVolume(G4LogicalVolume *logicalVolume)
void RegisterPhysicalVolume(G4VPhysicalVolume *physicalVolume)
void RegisterVisAttributes(G4VisAttributes *visAttribute)
void RegisterSolid(G4VSolid *solid)
void RegisterSensitiveVolume(G4LogicalVolume *sensitiveVolume, BDSSDType sensitivityType)
void BuildBeamPipe()
Build a beam pipe in the hole if required.
void BuildShield()
Build the outer shield geoemtry.
BDSShield()=delete
Default constructor, assignment and copy constructor not used.
G4double horizontalWidth
Outer size of shield.
G4Material * material
Shield material.
G4double ySize
Inner vertical half width of shield.
G4Colour * colour
Colour of shielding block.
G4double xSize
Inner horizontal half width of shield.
virtual void BuildContainerLogicalVolume()
Build a container volume for everything.
G4bool IsFinite(G4double value, G4double tolerance=std::numeric_limits< double >::epsilon())