BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
BDSCollimatorBeamMask.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2024.
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 BDSCOLLIMATORBEAMMASK_H
20#define BDSCOLLIMATORBEAMMASK_H
21
22#include "globals.hh"
23
24#include "BDSAcceleratorComponent.hh"
25
26class G4Colour;
27class G4Material;
28
36{
37public:
38 BDSCollimatorBeamMask(const G4String& name,
39 G4double length,
40 BDSBeamPipeInfo* beamPipeInfoIn,
41 G4double horizontalWidth,
42 G4Material* collimatorMaterial,
43 G4Material* vacuumMaterial,
44 G4double xApertureIn = 0,
45 G4double yApertureIn = 0,
46 G4double xApertureSlitIn = 0,
47 G4double yApertureSlitIn = 0,
48 G4double xOffsetIn = 0,
49 G4double yOffsetIn = 0,
50 G4double xOffsetSlitIn = 0,
51 G4double yOffsetSlitIn = 0,
52 G4double tiltSlitIn = 0,
53 G4Colour* colourIn = nullptr,
54 G4bool circularOuterIn = false);
55 virtual ~BDSCollimatorBeamMask(){;};
56
58 virtual G4String Material() const;
59 virtual G4double XAperture() const {return xAperture;}
60 virtual G4double XApertureSlit() const {return xApertureSlit;}
61 virtual G4double YAperture() const {return yAperture;}
62 virtual G4double YApertureSlit() const {return yApertureSlit;}
64
65 virtual void SetMinimumKineticEnergy(G4double minimumKineticEnergyIn) {minKineticEnergy = minimumKineticEnergyIn;}
66
67protected:
70 virtual void CheckParameters();
71
72 virtual void BuildContainerLogicalVolume();
73 virtual void BuildInner();
74 virtual void Build();
75
77 G4UserLimits* CollimatorUserLimits();
78
80 G4VSolid* collimatorSolid;
81 G4VSolid* innerSolid;
82 G4VSolid* vacuumSolid;
84
85 G4double horizontalWidth;
86 G4Material* collimatorMaterial;
87 G4Material* vacuumMaterial;
88 G4double xAperture;
89 G4double yAperture;
90 G4double xApertureSlit;
91 G4double yApertureSlit;
92 G4double xOffset;
93 G4double yOffset;
94 G4double xOffsetSlit;
95 G4double yOffsetSlit;
96 G4double tiltSlit;
97 G4Colour* colour;
100
101
102
103
104private:
107
112};
113
114#endif
Abstract class that represents a component of an accelerator.
const G4String name
Const protected member variable that may not be changed by derived classes.
Holder class for all information required to describe a beam pipe model.
A class for a beam mask collimator.
G4double yApertureSlit
Aperture of side slit in y dimension.
G4double yOffsetSlit
Offset of the side slit wrt the main slit in y.
G4double horizontalWidth
Horizontal width.
G4double yAperture
Aperture of main slit in y dimension.
virtual G4String Material() const
Accessor.
BDSCollimatorBeamMask(BDSCollimatorBeamMask &)=delete
Assignment and copy constructor not implemented nor used.
virtual G4double YAperture() const
Accessor.
virtual G4double XApertureSlit() const
Accessor.
G4Colour * colour
Colour of beam mask.
G4Material * vacuumMaterial
Vacuum material.
virtual void SetMinimumKineticEnergy(G4double minimumKineticEnergyIn)
G4Material * collimatorMaterial
Material.
virtual G4double YApertureSlit() const
Accessor.
G4VSolid * vacuumSolid
Geometrical objects:
G4bool circularOuter
Shape of the outer solid.
virtual G4double XAperture() const
Accessor.
G4double yOffset
Offset of the mask in the pipe in y.
G4UserLimits * CollimatorUserLimits()
Return either default user limits or custom ones based on optional minimumKineticEnergy.
BDSCollimatorBeamMask & operator=(const BDSCollimatorBeamMask &)=delete
Assignment and copy constructor not implemented nor used.
G4double xApertureSlit
Aperture of side slit in x dimension.
G4double xAperture
Aperture of main slit in x dimension.
G4double tiltSlit
Angle of the side slit.
virtual void BuildContainerLogicalVolume()
G4double xOffsetSlit
Offset of the side slit wrt the main slit in x.
G4VSolid * innerSolid
Geometrical objects:
BDSCollimatorBeamMask()
Private default constructor to force the use of the supplied one.
G4VSolid * collimatorSolid
Geometrical objects:
G4double xOffset
Offset of the mask in the pipe in x.
G4double minKineticEnergy
Optional minimum kinetic energy for collimator materials.