BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSLinkComponent.hh
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#ifndef BDSLINKCOMPONENT_H
19#define BDSLINKCOMPONENT_H
20
21#include "BDSAcceleratorComponent.hh"
22#include "BDSLinkOpaqueBox.hh"
23
24#include "globals.hh" // geant4 types / globals
25
39{
40public:
41 BDSLinkComponent() = delete;
45 BDSLinkComponent(const G4String& nameIn,
46 BDSLinkOpaqueBox* componentIn,
47 G4double arcLengthIn,
48 G4double angleIn = 0,
49 const G4ThreeVector& inputFaceNormalIn = G4ThreeVector(0,0,-1),
50 const G4ThreeVector& outputFaceNormalIn = G4ThreeVector(0,0, 1));
51
54 virtual ~BDSLinkComponent() noexcept {;}
55
57 inline BDSLinkOpaqueBox* Component() const {return component;}
58 inline G4String LinkName() const {return component ? component->LinkName() : "unknown";}
59 inline G4double ComponentArcLength() const {return component ? component->ArcLength() : -1.0;}
60 inline G4double ComponentChordLength() const {return component ? component->ChordLength() : -1.0;}
62
63private:
68
71
72 BDSLinkOpaqueBox* component;
73};
74
75#endif
Abstract class that represents a component of an accelerator.
A BDSAcceleratorComponent wrapper for BDSLinkOpaqueBox.
BDSLinkOpaqueBox * Component() const
Accessor.
G4double ComponentChordLength() const
Accessor.
G4String LinkName() const
Accessor.
BDSLinkComponent(BDSLinkComponent &)=delete
Assignment and copy constructor not implemented nor used.
G4double ComponentArcLength() const
Accessor.
BDSLinkComponent & operator=(const BDSLinkComponent &)=delete
Assignment and copy constructor not implemented nor used.
BDSLinkComponent()=delete
virtual ~BDSLinkComponent() noexcept
virtual void BuildContainerLogicalVolume()
Required implementation from base class.
Wrapper box for an accelerator component.
G4String LinkName() const
Accessor.
G4double ChordLength() const
Accessor.
G4double ArcLength() const
Accessor.