BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLinkComponent.cc
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) BDSIM Collaboration, 2001 - 2026.
3
4This file is part of BDSIM.
5
6BDSIM is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published
8by the Free Software Foundation version 3 of the License.
9
10BDSIM is distributed in the hope that it will be useful, but
11WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
17*/
18#include "BDSLinkComponent.hh"
19#include "BDSLinkOpaqueBox.hh"
20
21#include "G4Types.hh"
22#include "G4ThreeVector.hh"
23
24
26 BDSLinkOpaqueBox* componentIn,
27 G4double arcLengthIn,
28 G4double angleIn,
29 const G4ThreeVector& inputFaceNormalIn,
30 const G4ThreeVector& outputFaceNormalIn):
31 BDSAcceleratorComponent(nameIn, arcLengthIn, angleIn, "linkComponent", nullptr,
32 inputFaceNormalIn, outputFaceNormalIn),
33 component(componentIn)
34{
35 RegisterDaughter(component);
36 InheritExtents(component);
37 containerSolid = component->GetContainerSolid();
38 containerLogicalVolume = component->GetContainerLogicalVolume();
39}
Abstract class that represents a component of an accelerator.
G4LogicalVolume * GetContainerLogicalVolume() const
Accessor - see member for more info.
void InheritExtents(BDSGeometryComponent const *const anotherComponent)
Update the extents of this object with those of another object.
void RegisterDaughter(BDSGeometryComponent *anotherComponent)
G4VSolid * GetContainerSolid() const
Accessor - see member for more info.
BDSLinkComponent()=delete
Wrapper box for an accelerator component.