BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSBeamlineSet.cc
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#include "BDSBeamline.hh"
20#include "BDSBeamlineSet.hh"
21
22
24{
25 delete massWorld;
26 delete curvilinearWorld;
27 delete curvilinearBridgeWorld;
28 delete endPieces;
29}
30
31const std::vector<G4ThreeVector> BDSBeamlineSet::GetMaximumExtentAbsolute() const
32{
33 std::vector<G4ThreeVector> extents;
35 return extents;
36}
37
38void BDSBeamlineSet::GetMaximumExtentAbsolute(std::vector<G4ThreeVector>& extents) const
39{
40 if (massWorld)
41 {extents.push_back(massWorld->GetMaximumExtentAbsolute());}
42 if (curvilinearWorld)
43 {extents.push_back(curvilinearWorld->GetMaximumExtentAbsolute());}
44 if (curvilinearBridgeWorld)
45 {extents.push_back(curvilinearBridgeWorld->GetMaximumExtentAbsolute());}
46 if (endPieces)
47 {extents.push_back(endPieces->GetMaximumExtentAbsolute());}
48}
49
50void BDSBeamlineSet::GetExtentGlobals(std::vector<BDSExtentGlobal>& extents) const
51{
52 if (massWorld)
53 {extents.push_back(massWorld->GetExtentGlobal());}
54 if (curvilinearWorld)
55 {extents.push_back(curvilinearWorld->GetExtentGlobal());}
56 if (curvilinearBridgeWorld)
57 {extents.push_back(curvilinearBridgeWorld->GetExtentGlobal());}
58 if (endPieces)
59 {extents.push_back(endPieces->GetExtentGlobal());}
60}
const std::vector< G4ThreeVector > GetMaximumExtentAbsolute() const
Get maximum extents.
void DeleteContents()
Destroy objects pointed to by this instance.
void GetExtentGlobals(std::vector< BDSExtentGlobal > &extents) const
Append global extents of all beamlines to supplied vector.
G4ThreeVector GetMaximumExtentAbsolute() const
Get the maximum extent absolute in each dimension.
Definition: BDSBeamline.cc:590
BDSExtentGlobal GetExtentGlobal() const
Get the global extents for this beamline.
Definition: BDSBeamline.cc:924