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) 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 BDSCOLLIMATORBEAMMASK_H
19#define BDSCOLLIMATORBEAMMASK_H
20
21#include "globals.hh"
22
23#include "BDSAcceleratorComponent.hh"
24
25class G4Colour;
26class G4Material;
27
37{
38public:
39 BDSCollimatorBeamMask() = delete;
40 BDSCollimatorBeamMask(const G4String& name,
41 G4double length,
42 BDSBeamPipeInfo* beamPipeInfoIn,
43 G4double horizontalWidth,
44 G4Material* collimatorMaterial,
45 G4Material* vacuumMaterial,
46 G4double xApertureIn = 0,
47 G4double yApertureIn = 0,
48 G4double xApertureSlitIn = 0,
49 G4double yApertureSlitIn = 0,
50 G4double xOffsetIn = 0,
51 G4double yOffsetIn = 0,
52 G4double xOffsetSlitIn = 0,
53 G4double yOffsetSlitIn = 0,
54 G4double tiltSlitIn = 0,
55 G4Colour* colourIn = nullptr,
56 G4bool circularOuterIn = false);
61 virtual ~BDSCollimatorBeamMask(){;};
62
64 virtual G4String Material() const;
65 virtual G4double XAperture() const {return xAperture;}
66 virtual G4double XApertureSlit() const {return xApertureSlit;}
67 virtual G4double YAperture() const {return yAperture;}
68 virtual G4double YApertureSlit() const {return yApertureSlit;}
70
71 virtual void SetMinimumKineticEnergy(G4double minimumKineticEnergyIn) {minKineticEnergy = minimumKineticEnergyIn;}
72
73protected:
76 virtual void CheckParameters();
77
78 virtual void BuildContainerLogicalVolume();
79 virtual void BuildInner();
80 virtual void Build();
81
83 G4UserLimits* CollimatorUserLimits();
84
86 G4VSolid* collimatorSolid;
87 G4VSolid* innerSolid;
88 G4VSolid* vacuumSolid;
90
91 G4double horizontalWidth;
92 G4Material* collimatorMaterial;
93 G4Material* vacuumMaterial;
94 G4double xAperture;
95 G4double yAperture;
96 G4double xApertureSlit;
97 G4double yApertureSlit;
98 G4double xOffset;
99 G4double yOffset;
100 G4double xOffsetSlit;
101 G4double yOffsetSlit;
102 G4double tiltSlit;
103 G4Colour* colour;
106};
107
108#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:
G4VSolid * collimatorSolid
Geometrical objects:
G4double xOffset
Offset of the mask in the pipe in x.
G4double minKineticEnergy
Optional minimum kinetic energy for collimator materials.