BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSBeamlineSet.cc
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#include "BDSBeamline.hh"
19#include "BDSBeamlineSet.hh"
20
21
23{
24 delete massWorld;
25 delete curvilinearWorld;
26 delete curvilinearBridgeWorld;
27 delete endPieces;
28}
29
30const std::vector<G4ThreeVector> BDSBeamlineSet::GetMaximumExtentAbsolute() const
31{
32 std::vector<G4ThreeVector> extents;
34 return extents;
35}
36
37void BDSBeamlineSet::GetMaximumExtentAbsolute(std::vector<G4ThreeVector>& extents) const
38{
39 if (massWorld)
40 {extents.push_back(massWorld->GetMaximumExtentAbsolute());}
41 if (curvilinearWorld)
42 {extents.push_back(curvilinearWorld->GetMaximumExtentAbsolute());}
43 if (curvilinearBridgeWorld)
44 {extents.push_back(curvilinearBridgeWorld->GetMaximumExtentAbsolute());}
45 if (endPieces)
46 {extents.push_back(endPieces->GetMaximumExtentAbsolute());}
47}
48
49void BDSBeamlineSet::GetExtentGlobals(std::vector<BDSExtentGlobal>& extents) const
50{
51 if (massWorld)
52 {extents.push_back(massWorld->GetExtentGlobal());}
53 if (curvilinearWorld)
54 {extents.push_back(curvilinearWorld->GetExtentGlobal());}
55 if (curvilinearBridgeWorld)
56 {extents.push_back(curvilinearBridgeWorld->GetExtentGlobal());}
57 if (endPieces)
58 {extents.push_back(endPieces->GetExtentGlobal());}
59}
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.
BDSExtentGlobal GetExtentGlobal() const
Get the global extents for this beamline.