BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSTunnelBuilder.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 BDSTUNNELBUILDER_H
19#define BDSTUNNELBUILDER_H
20
21#include "globals.hh" // geant4 types / globals
22
23#include "BDSBeamline.hh"
24
35{
36public:
37 explicit BDSTunnelBuilder(G4double tunnelMaxSegmentLengthIn = 50*CLHEP::m);
39
44 BDSBeamline* BuildTunnelSections(const BDSBeamline* flatBeamLine) const;
45
46private:
49 G4bool BreakTunnel(BDSBeamline::const_iterator proposedStart,
51 const G4double& halfWidth) const;
52
56
58 G4double maxItems;
59
61 G4double maxLength;
62
64 G4double maxAngle;
65
67 G4double minLength;
68};
69
70
71#endif
A vector of BDSBeamlineElement instances - a beamline.
BeamlineVector::const_iterator const_iterator
Iterator mechanics.
A class that constructs tunnel segments around a beamline.
BDSBeamline * BuildTunnelSections(const BDSBeamline *flatBeamLine) const
G4double maxAngle
Maximum angle before split.
G4double maxItems
Maximum number of items before split.
G4bool BreakTunnel(BDSBeamline::const_iterator proposedStart, BDSBeamline::const_iterator proposedEnd, const G4double &halfWidth) const
G4double minLength
Minimum length to angle ratio to allow a split.
G4double maxLength
Maximum length before split.
G4double displacementTolerance