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