BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
BDSBLMFactory.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 BDSBLMFACTORY_H
20#define BDSBLMFACTORY_H
21
22#include "globals.hh"
23
24class BDSBLM;
25class BDSExtent;
26class G4VSensitiveDetector;
27
28namespace GMAD
29{
30 class BLMPlacement;
31}
32
40{
41public:
44
45 BDSBLM* CreateBLM(const GMAD::BLMPlacement& bp,
46 G4VSensitiveDetector* sd);
47
50 BDSBLM* CreateBLM(const G4String& name,
51 const G4String& geometryFile,
52 const G4String& geometryType,
53 const G4String& material,
54 G4double blm1,
55 G4double blm2,
56 G4double blm3,
57 G4double blm4,
58 G4VSensitiveDetector* sd,
59 const G4String& bias = "");
60
61private:
62 void PositiveFinite(G4double value,
63 const G4String& parameterName,
64 const G4String& blmName) const;
65
67 BDSBLM* BuildBLMCylinder(const G4String& name,
68 const G4String& material,
69 G4double halfLength,
70 G4double radius);
71
73 BDSBLM* BuildBLMCube(const G4String& name,
74 const G4String& material,
75 G4double halfLengthX,
76 G4double halfLengthY,
77 G4double halfLengthZ);
78
80 BDSBLM* BuildBLMSphere(const G4String& name,
81 const G4String& material,
82 G4double radius);
83
86 BDSBLM* CommonConstruction(const G4String& name,
87 const G4String& material,
88 G4VSolid* shape,
89 const BDSExtent& extent);
90};
91
92#endif
Factory for building BLMs.
BDSBLM * BuildBLMCylinder(const G4String &name, const G4String &material, G4double halfLength, G4double radius)
Build the geometry for a cylinder.
BDSBLM * BuildBLMCube(const G4String &name, const G4String &material, G4double halfLengthX, G4double halfLengthY, G4double halfLengthZ)
Build the geometry for a cube.
BDSBLM * CommonConstruction(const G4String &name, const G4String &material, G4VSolid *shape, const BDSExtent &extent)
BDSBLM * BuildBLMSphere(const G4String &name, const G4String &material, G4double radius)
Build the geometry for a sphere.
A beam loss monitor.
Definition: BDSBLM.hh:42
Holder for +- extents in 3 dimensions.
Definition: BDSExtent.hh:39
blm for parser.
Definition: blmplacement.h:39
Parser namespace for GMAD language. Combination of Geant4 and MAD.