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) Royal Holloway,
3University of London 2001 - 2023.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef BDSLINKCOMPONENT_H
20#define BDSLINKCOMPONENT_H
21
22#include "BDSAcceleratorComponent.hh"
23#include "BDSLinkOpaqueBox.hh"
24
25#include "globals.hh" // geant4 types / globals
26
40{
41public:
42 BDSLinkComponent() = delete;
46 BDSLinkComponent(const G4String& nameIn,
47 BDSLinkOpaqueBox* componentIn,
48 G4double arcLengthIn,
49 G4double angleIn = 0,
50 const G4ThreeVector& inputFaceNormalIn = G4ThreeVector(0,0,-1),
51 const G4ThreeVector& outputFaceNormalIn = G4ThreeVector(0,0, 1));
52
55 virtual ~BDSLinkComponent() noexcept {;}
56
58 inline BDSLinkOpaqueBox* Component() const {return component;}
59 inline G4String LinkName() const {return component ? component->LinkName() : "unknown";}
60 inline G4double ComponentArcLength() const {return component ? component->ArcLength() : -1.0;}
61 inline G4double ComponentChordLength() const {return component ? component->ChordLength() : -1.0;}
63
64private:
69
72
73 BDSLinkOpaqueBox* component;
74};
75
76#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.