BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSCavityFactory.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 BDSCAVITYFACTORY_H
19#define BDSCAVITYFACTORY_H
20
21#include "BDSCavityType.hh"
22
23#include "globals.hh"
24#include "G4String.hh"
25
26class BDSCavity;
31class BDSCavityInfo;
32
33class G4Material;
34
42{
43public:
44 static BDSCavityFactory* Instance();
45
50
52 BDSCavity* CreateCavity(const G4String& name,
53 G4double totalChordLength,
54 const BDSCavityInfo* info,
55 G4Material* vacuumMaterial);
56
57private:
59
61
66
67 BDSCavityFactoryBase* GetAppropriateFactory(const BDSCavityType cavityType);
68
74};
75
76#endif
Abstract base class for rf cavity geometry factories.
Factory for elliptical SRF cavity geometry.
Factory for elliptical SRF cavity geometry.
Factory for elliptical SRF cavity geometry.
Interface to create any RF cavity geometry.
BDSCavityFactoryPillBox * pillBox
Point to factory this main interface owns.
static BDSCavityFactory * instance
Singleton instance.
BDSCavityFactoryRectangular * rectangular
Point to factory this main interface owns.
BDSCavityFactory()
Private constructor as singleton pattern.
static BDSCavityFactory * Instance()
Singleton accessor.
BDSCavityFactoryElliptical * elliptical
Point to factory this main interface owns.
BDSCavity * CreateCavity(const G4String &name, G4double totalChordLength, const BDSCavityInfo *info, G4Material *vacuumMaterial)
Main function to create a piece of cavity geometry.
BDSCavityFactory & operator=(const BDSCavityFactory &)=delete
Unused default constructors.
BDSCavityFactory(const BDSCavityFactory &)=delete
Unused default constructors.
Holder for all Geometrical information required to create an RF cavity.
A holder class for an RF cavity piece of geometry.
Definition BDSCavity.hh:38