BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSCavityElement.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 BDSCAVITYELEMENT_H
20#define BDSCAVITYELEMENT_H
21
22#include "BDSAcceleratorComponent.hh"
23
24#include "globals.hh" // geant4 globals / types
25
26class BDSCavityInfo;
27class BDSFieldInfo;
28class G4Material;
29
37{
38public:
39 BDSCavityElement(const G4String& name,
40 G4double chordLength,
41 G4Material* vacuumMaterialIn,
42 const BDSFieldInfo* vacuumField,
43 const BDSCavityInfo* cavityInfoIn);
44
45 virtual ~BDSCavityElement();
46
47 inline const BDSFieldInfo* GetFieldInfo() const {return vacuumFieldInfo;}
48 inline const BDSCavityInfo* GetCavityInfo() const {return cavityInfo;}
49
50protected:
53 virtual void BuildContainerLogicalVolume() override;
54
56 virtual void Build() override;
57
59 virtual void BuildField();
60
63
66
67private:
69 BDSCavityElement() = delete;
70
75
77 G4Material* vacuumMaterial;
78};
79
80#endif
Abstract class that represents a component of an accelerator.
const G4String name
Const protected member variable that may not be changed by derived classes.
G4double chordLength
Protected member variable that can be modified by derived classes.
RF Cavity. Uses factories to construct appropriate geometry.
BDSCavityElement & operator=(const BDSCavityElement &)=delete
Assignment and copy constructor not implemented nor used.
G4Material * vacuumMaterial
Cache of material to be used for vacuum - does not own it.
virtual void BuildContainerLogicalVolume() override
BDSCavityElement()=delete
Private constructor to force the use of the provided one.
BDSCavityElement(BDSCavityElement &)=delete
Assignment and copy constructor not implemented nor used.
const BDSCavityInfo * cavityInfo
Convenience shortcut to cavity information inside field information object.
const BDSFieldInfo * vacuumFieldInfo
Recipe for field.
virtual void Build() override
The full construction sequence that calls all methods in order.
virtual void BuildField()
Creates field objects - doesn't nothing by default and derived classes can override.
Holder for all Geometrical information required to create an RF cavity.
All info required to build complete field of any type.
Definition: BDSFieldInfo.hh:66