BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSFieldInfoExtra.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
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 BDSFIELDINFOEXTRA_H
20#define BDSFIELDINFOEXTRA_H
21
22#include "BDSFieldType.hh"
23#include "BDSMuonCoolerStructs.hh"
24
25#include <vector>
26
42{
43public:
45 virtual ~BDSFieldInfoExtra(){;}
46
48 virtual BDSFieldInfoExtra* Clone() const = 0;
49};
50
58{
59public:
62 BDSFieldType electricFieldTypeIn,
63 BDSFieldType dipoleFieldTypeIn,
64 const std::vector<BDS::MuonCoolerCoilInfo>& coilInfosIn,
65 const std::vector<BDS::MuonCoolerDipoleInfo>& dipoleInfosIn,
66 const std::vector<BDS::MuonCoolerCavityInfo>& cavityInfosIn):
67 magneticFieldType(magneticFieldTypeIn),
68 electricFieldType(electricFieldTypeIn),
69 dipoleFieldType(dipoleFieldTypeIn),
70 coilInfos(coilInfosIn),
71 dipoleInfos(dipoleInfosIn),
72 cavityInfos(cavityInfosIn)
73 {;}
75
79 std::vector<BDS::MuonCoolerCoilInfo> coilInfos;
80 std::vector<BDS::MuonCoolerDipoleInfo> dipoleInfos;
81 std::vector<BDS::MuonCoolerCavityInfo> cavityInfos;
82
83 virtual BDSFieldInfoExtra* Clone() const {return new BDSFieldInfoExtraMuonCooler(*this);}
84};
85
86#endif
necessary extra information for a muon cooler field.
BDSFieldType dipoleFieldType
Type of the dipole sub-field.
BDSFieldType electricFieldType
Type of the electric sub-field.
BDSFieldInfoExtraMuonCooler(BDSFieldType magneticFieldTypeIn, BDSFieldType electricFieldTypeIn, BDSFieldType dipoleFieldTypeIn, const std::vector< BDS::MuonCoolerCoilInfo > &coilInfosIn, const std::vector< BDS::MuonCoolerDipoleInfo > &dipoleInfosIn, const std::vector< BDS::MuonCoolerCavityInfo > &cavityInfosIn)
virtual BDSFieldInfoExtra * Clone() const
Derived class must implement for copying.
BDSFieldType magneticFieldType
Type of the magnetic sub-field.
Base class for any extra (complex) information for a particular field.
virtual BDSFieldInfoExtra * Clone() const =0
Derived class must implement for copying.